Hi,
there is almost 0 documentation how to update u-boot; where to flash (dd) it, if it does support boot from rootfs on ZFS etc.
Regarding the ZFS; here I assume /boot has to be on ext4/vfat and rest of the rootfs (/) as ZFS to make it works?
Is there any way to flash more details on this part?
I found files as following but no idea...
/usr/lib/linux-u-boot-current-bananapi_21.05.1_armhf/u-boot-sunxi-with-spl.bin
root@bananapi:/usr/lib/u-boot# pwd
/usr/lib/u-boot
root@bananapi:/usr/lib/u-boot# ls
Bananapi_defconfig LICENSE platform_install.sh
Also I wanted to do simple update; to make u-boot boot from /dev/mmcblk0p2 instead of rootfs that was place originally on /dev/mmcblk0p1; /dev/mmcblk0p2 is identical copy of /dev/mmcblk0p1
Thanks
Edit> seems that details are stored here platform_install.sh;
But how/where i can re-compile file u-boot-sunxi-with-spl.bin so that it will boot from /dev/mmcblk0p2 instead of /dev/mmcblk0p1; or is that based on the Boot flag set on partition?
so i assume in my case i have to pass
$1 = /usr/lib/linux-u-boot-current-bananapi_21.05.1_armhf
$2 = /dev/mmcblk0
DIR=/usr/lib/linux-u-boot-current-bananapi_21.05.1_armhf
write_uboot_platform ()
{
dd if=/dev/zero of=$2 bs=1k count=1023 seek=1 status=noxfer > /dev/null 2>&1;
dd if=$1/u-boot-sunxi-with-spl.bin of=$2 bs=1024 seek=8 status=noxfer > /dev/null 2>&1
}
setup_write_uboot_platform ()
{
if grep -q "ubootpart" /proc/cmdline; then
local tmp=$(cat /proc/cmdline);
tmp="${tmp##*ubootpart=}";
tmp="${tmp%% *}";
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2>/dev/null);
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2>/dev/null);
[[ -n $dev ]] && DEVICE="/dev/$dev";
else
if [[ -f /var/lib/armbian/force_search_uboot ]]; then
for dev in $(lsblk -d -n -p -o NAME);
do
if grep -q 'eGON.BT0' <(dd if=$dev bs=32 skip=256 count=1 status=none); then
echo "SPL signature found on $dev" 1>&2;
DEVICE=$dev;
break;
fi;
done;
fi;
fi
}