diff --git a/config/u-boot/boot.cmd b/config/u-boot/boot.cmd index 5cb4b8971..b86b6809a 100644 --- a/config/u-boot/boot.cmd +++ b/config/u-boot/boot.cmd @@ -3,8 +3,12 @@ if test ${boot_dev} = ""; then setenv root_dev /dev/mmcblk0p3; fi; +if test ${dev_num} = ""; then + setenv dev_num 0; +fi; + if test ${boot_part} = ""; then - setenv boot_part 0:1; + setenv boot_part ${dev_num}:1; fi; if test ${soc} = "kirkwood"; then diff --git a/config/u-boot/boot.scr b/config/u-boot/boot.scr index 5143b051b..b3c6bc2c8 100644 Binary files a/config/u-boot/boot.scr and b/config/u-boot/boot.scr differ diff --git a/config/u-boot/uEnv.txt b/config/u-boot/uEnv.txt index 6edc97715..21780a971 100644 --- a/config/u-boot/uEnv.txt +++ b/config/u-boot/uEnv.txt @@ -1,3 +1,4 @@ KVER=xxxKVERxxx DTBSUNXI=sun8i-h3-nanopi-r1.dtb +root_dev=UUID=xxxROOT-UUIDxxx SERIAL-CONSOLE=ON diff --git a/lfs/flash-images b/lfs/flash-images index dcad81ab3..e9bd0434b 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -215,6 +215,12 @@ endif rm -f $(MNThdd)/etc/grub.d/11_linux_scon endif +ifeq "$(BUILD_ARCH)" "armv5tel" + # Insert the UUID to uENV.txt + sed -i $(MNThdd)/boot/uENV.txt \ + -e "s/^root_dev=.*/root_dev=UUID=$$(blkid -o value -s UUID $(PART_ROOT))/g" +endif + # Set ramdisk mode to automatic echo RAMDISK_MODE=2 > $(MNThdd)/etc/sysconfig/ramdisk