Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Clearfog[Pro] U-Boot needs to be manually moved after update

Featured Replies

Hi,

 

I updated my ClearfogPro today and noticed (that like in the last updates),  updating the linux-u-boot-clearfogpro-next package fails,

with the error "/dev/mmcblk2" doesn't exist".

 

This happen obviously, because I don't have a SD Card installed, as I am using a M.2 SSD to boot and as root.

Quick check inside the .deb file revealed the platform_install.sh which only tries writing the u-boot.mmc version to /dev/mmcblk2.

 

For me this is not a big problem, I know how to get the correct u-boot into place (/usr/lib/linux-u-boot-next-clearfogpro_5.60_armhf/u-boot.sata) but new users might find it difficult.

 

Would it be possible to let the users select the device for writing the u-boot when the mmc variant fails?

Just a popup with a text saying: "Could not write u-boot to default location (sdcard/mmc), please specify device" and a textbox below...

(Might even look into doing something like this myself and then send a PR)

 

Or does Armbian normally keep track of where the u-boot is and I just did something wrong when moving from sdcard to ssd?

 

Greetings,

count-doku

 

EDIT:

Just realised this might apply to other boards to, if it would better fit into Development or so, please move.

 

  • Author

As there were no answers I suspect most people run of the sdcard / mmc anyways, or manually moving u-boot into place after an update does not bother them.

 

So I wrote a small update code for myself (see below), feel free to use it. 

#!/bin/bash

DIR=/usr/lib/linux-u-boot-next-clearfogpro_5.60_armhf
VARIANT=u-boot.mmc
DEVICE=/dev/mmcblk2

if [ -b $DEVICE ]; then
        echo "Writing u-boot to default location..."
        dd if=$DIR/$VARIANT of=$DEVICE bs=512 seek=1 status=noxfer
        echo "Completed!"
        exit 1;
else
        echo 'Could not write the default uboot to mmc/sdcard '
        read -p 'Please enter uboot variant to install: mmc, sd, sata, flash > ' VARIANT
        case $VARIANT in
                mmc|MMC|sd|SD)
                        VARIANT=u-boot.mmc
                ;;
                sata|SATA)
                        VARIANT=u-boot.sata
                ;;
                flash|FLASH)
                        VARIANT=u-boot.flash
                ;;
                *)
                        echo 'Invalid variant, aborting.'
                        exit 0
                ;;
        esac

        read -p 'Enter boot device (eg. /dev/mmcblk2) > ' DEVICE
        if [ ! -b $DEVICE ]; then
                echo "Device not available, aborting!"
                exit 0;
        fi

        echo ''
        echo 'U-Boot Path: ' $DIR
        echo 'Will now try to write ' $VARIANT ' to ' $DEVICE
        read -p 'Start writing? (yes/no)' START
        if [ $START == "yes" ]; then
                echo "Writing..."
                dd if=$DIR/$VARIANT of=$DEVICE bs=512 seek=1 status=noxfer
                echo "Completed!"
                exit 1
        fi
fi

Of course things like the U-Boot Directory change and need to be adjusted. It could also be called as a parameter.

 

I am unsure if it is possible to integrate that into Armbian as I could not find out, where the related linux-u-boot-clearfogpro-next.deb Packages gets build / comes from.

 

 

Greetings,

count-doku

 

 

 

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.