[openwrt/openwrt] tegra: image: make bootscript standalone

LEDE Commits lede-commits at lists.infradead.org
Tue Dec 22 13:13:13 EST 2020


ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/bbd665f38d6b48e56bb5ef38ee0eeceb02a8e129

commit bbd665f38d6b48e56bb5ef38ee0eeceb02a8e129
Author: Tomasz Maciej Nowak <tmn505 at gmail.com>
AuthorDate: Wed Nov 25 17:10:04 2020 +0100

    tegra: image: make bootscript standalone
    
    Don't hard-code the PTUUID, use U-Boot commands to determine it, as some
    partitioning tools could rewrite PTUUID when modifying partitions.
    
    Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 target/linux/tegra/image/Makefile           | 5 +----
 target/linux/tegra/image/generic-bootscript | 4 +++-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/target/linux/tegra/image/Makefile b/target/linux/tegra/image/Makefile
index aa0083f9ae..fbff1cf6e8 100644
--- a/target/linux/tegra/image/Makefile
+++ b/target/linux/tegra/image/Makefile
@@ -14,10 +14,7 @@ define Build/tegra-sdcard
 	$(if $(DEVICE_DTS),\
 		$(foreach dtb,$(DEVICE_DTS),$(CP) $(DTS_DIR)/$(dtb).dtb $@.boot), \
 		$(CP) $(DTS_DIR)/*.dtb $@.boot)
-	sed \
-		-e 's#@ROOT@#$(IMG_PART_SIGNATURE)#g' \
-		-e 's#@KERNEL@#$(KERNEL_NAME)#g' \
-		$(BOOT_SCRIPT) > $@-boot.scr
+	sed -e 's#@KERNEL@#$(KERNEL_NAME)#g' $(BOOT_SCRIPT) > $@-boot.scr
 	mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
 		-n '$(DEVICE_TITLE) OpenWrt bootscript' \
 		-d $@-boot.scr \
diff --git a/target/linux/tegra/image/generic-bootscript b/target/linux/tegra/image/generic-bootscript
index 7e86afdf5f..0908025d5d 100644
--- a/target/linux/tegra/image/generic-bootscript
+++ b/target/linux/tegra/image/generic-bootscript
@@ -1,4 +1,6 @@
-setenv bootargs "root=PARTUUID=@ROOT at -02 rw rootwait console=ttyS0,115200 console=tty0"
+part uuid ${devtype} ${devnum}:2 ptuuid
+
+setenv bootargs "root=PARTUUID=${ptuuid} rw rootwait console=ttyS0,115200 console=tty0"
 
 load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /@KERNEL@
 load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /${soc}-${board}.dtb



More information about the lede-commits mailing list