From 49d9c6c5cda3eb40d831336ab3b25ff54a82d242 Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Sun, 22 Jul 2018 12:59:26 +0200 Subject: [PATCH] - corrected error on UUID of partitions - corrected bug on copying uname-string --- create_arm_img_urpmi.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/create_arm_img_urpmi.sh b/create_arm_img_urpmi.sh index 40808d8..03ab716 100755 --- a/create_arm_img_urpmi.sh +++ b/create_arm_img_urpmi.sh @@ -409,10 +409,6 @@ EOF info "device $DEVICE" info "partitions list:" info "$(/sbin/partx -v "$INSTALL_PATH/$IMAGE")" - BOOTP="${DEVICE}p1" - BOOT_UUID=$(blkid -o value uuid "$BOOTP" | head -n 1) - ROOTP="${DEVICE}p2" - ROOT_UUID=$(blkid -o value uuid "$ROOTP" | head -n 1) } formatpartitions() @@ -432,6 +428,12 @@ formatpartitions() /sbin/losetup -d "$DEVICE" exit 1 fi + BOOTP="${DEVICE}p1" + BOOT_UUID=$(blkid -o value uuid "$BOOTP" | head -n 1) + info "Boot UUID: $BOOT_UUID" + ROOTP="${DEVICE}p2" + ROOT_UUID=$(blkid -o value uuid "$ROOTP" | head -n 1) + info "Root UUID: $ROOT_UUID" } copyingsystem() @@ -479,9 +481,10 @@ $ROOT_UUID / ext4 defaults 0 0" > "$BUILD_PATH"/e rpi) info "copying raspberry firmware in /boot" /bin/rsync -rlptDH "$FIRMWARE_PATH/firmware-stable/boot/" "$BOOT" - cp -a "$FIRMWARE_PATH/firmware-stable/extra/uname_string*" "$BOOT" + cp -a "$FIRMWARE_PATH/firmware-stable/extra/uname_string" "$BOOT" + cp -a "$FIRMWARE_PATH/firmware-stable/extra/uname_string7" "$BOOT" info "copying config.txt" - cp "$SOURCE_PATH/$CONFIG_PATH/config.txt" + cp "$SOURCE_PATH/$CONFIG_PATH/config.txt" "$BOOT" info "adding modules in /etc/modules" echo "vchiq snd_bcm2835 @@ -502,11 +505,13 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules info "copying wifi firmware file missing in Mageia" /bin/mkdir -p "$ROOT/usr/lib/firmware/brcm/" - cp "$SOURCE_PATH/$CONFIG_PATH/brcmfmac43430-sdio.txt" "$ROOT/usr/lib/firmware/brcm/" + /bin/cp "$SOURCE_PATH/$CONFIG_PATH/brcmfmac43430-sdio.txt" "$ROOT/usr/lib/firmware/brcm/" if [ $? -ne 0 ];then error "line $LINENO error copying wifi firmware in $ROOTP/usr/lib/firmware/brcm/ : exiting" exit 1 fi + info "copying tools in /usr/local/" + /bin/cp -a "$SOURCE_PATH/tools" "/usr/local" ;; xu3-4) ;; @@ -667,8 +672,6 @@ xu3 | xu4) ;; rpi) CREATEIMG="createrpiimage" - #FIRMWARE_PATH="$SOURCE_PATH/.." - #FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip" ;; *) error "No Target : $TARGET"