diff --git a/recipes-bsp/fng-install/fng-install-postinstallation/fnginstall-postinstallation b/recipes-bsp/fng-install/fng-install-postinstallation/fnginstall-postinstallation index d5bfede7a0cf976e32097f11fda92f908afa663e..11bacf714cc7043ec0d2db231d38c173af0b5d8b 100644 --- a/recipes-bsp/fng-install/fng-install-postinstallation/fnginstall-postinstallation +++ b/recipes-bsp/fng-install/fng-install-postinstallation/fnginstall-postinstallation @@ -19,7 +19,7 @@ IFS='|' for script in $scripts; do - [ "$VERBOSE" -gt 0 ] && echo "Running $script ..." + echo "Running $script ..." "./$script" --fngpostinstall r=$? diff --git a/recipes-bsp/fng-install/fng-install/fng-install.sh b/recipes-bsp/fng-install/fng-install/fng-install.sh index 59c4d83bdc879104be24fe1ff6711e0e5d1fa0c4..eca758b03941b6c5d068795711c3189daf1c972e 100644 --- a/recipes-bsp/fng-install/fng-install/fng-install.sh +++ b/recipes-bsp/fng-install/fng-install/fng-install.sh @@ -503,7 +503,7 @@ target_os_postinstall() DEVICETREEOV='$DEVICETREEOV' \ ROOTPARTITION='$TARGET_PARTITION_ROOT' \ BOOTPARTITION='$TARGET_PARTITION_BOOT' \ - $TARGET_POSTINSTALL_SCRIPT" + $TARGET_POSTINSTALL_SCRIPT" 2>&1 | tee -a "$LOGFILE" >&5 then milestone "Executing postinstall step done." else @@ -1140,6 +1140,7 @@ do_update() # Needs to go inside the subshell, otherwise the AB_PARTITIONING_TARGET # variable is not accessable + { if $AB_PARTITIONING_FOUND;then echo "Installed as '$AB_PARTITIONING_TARGET' installation, use" if [ $AB_PARTITIONING_TARGET = 'B' ];then @@ -1149,6 +1150,7 @@ do_update() fi echo "to boot the newly installed image." fi + }>&5 ) return $? } diff --git a/recipes-bsp/fng-install/prepare-image/gf-prepare-bootpartition.sh b/recipes-bsp/fng-install/prepare-image/gf-prepare-bootpartition.sh index 99c473b0db2967a05be1a2429689a7aeab5fbdb1..f7bd5926aacf523f8be7f0c14c243f141f0fd71c 100644 --- a/recipes-bsp/fng-install/prepare-image/gf-prepare-bootpartition.sh +++ b/recipes-bsp/fng-install/prepare-image/gf-prepare-bootpartition.sh @@ -66,13 +66,13 @@ do get_partition_label label "$part" # Check if [ "$label" = "$PARTITION_LABEL" ];then - warn_msg "Warning: found duplicated label for bootpartition" + warn_msg "Found duplicated label for bootpartition" if command -v fatlabel 1>/dev/null;then - warn_msg "Warning: change label of $part to ${label}BAK" + warn_msg "Changing label of $part to ${label}BAK" fatlabel "$part" "${label}BAK" else - warn_msg "Warning: Deleting filesystem on $part" - dd if=/dev/zero of="$part" bs=1M count=1 + warn_msg "Deleting filesystem on $part" + dd if=/dev/zero of="$part" bs=1M count=1 2>/dev/null fi fi done diff --git a/recipes-bsp/fng-install/prepare-image/gf-prepare-rtc.sh b/recipes-bsp/fng-install/prepare-image/gf-prepare-rtc.sh index 4202794d1268c3eb17c14fbc4f53550cf8b9b8c0..ab89dafd493982b1dd93038b20bbd217e1aa9f34 100644 --- a/recipes-bsp/fng-install/prepare-image/gf-prepare-rtc.sh +++ b/recipes-bsp/fng-install/prepare-image/gf-prepare-rtc.sh @@ -10,15 +10,21 @@ if ! . /usr/sbin/gf-prepare-common.sh; then fi poll_rtc() { - if i2cget -y 2 "$1" 0x00 2>&1 | grep -E '.*0x.*|.*Device or resource busy.*'; then - echo "Device found at address $1" + # Check if there is an i2c device at the know bus and address + # if the tool returns 'Device or resource busy' we assume a + # driver has grapped the existing rtc device + if i2cget -y 2 "$1" 0x00 2>&1 | grep -q -E '.*0x.*|.*Device or resource busy.*'; then return 0 else - echo "No device found at address $1" return 1 fi } +# These overlays currently only apply to Tanaro +if ! grep -q -i Tanaro /sys/devices/soc0/machine;then + echo "Device is not a 'Tanaro', skipping rtc detection." +fi + # Get the directory containing the bootfiles mount_bootpartition BOOTFILES_DIR @@ -27,13 +33,15 @@ cd "$BOOTFILES_DIR" || exit 1 # RX8803 if poll_rtc 0x32; then + echo "Selecting overlay 'rx8803-overlay.dtbo'" append_overlay "rx8803-overlay.dtbo" else # PCF8563 if poll_rtc 0x51; then + echo "Selecting overlay 'pcf8563-overlay.dtbo'" append_overlay "pcf8563-overlay.dtbo" else - echo "Error: Unable to find any valid device" + echo "Error: Unable to find any valid rtc device, not applying any overlay." exit 1 fi fi