[openwrt/openwrt] tegra: image: remove unnecessary assumptions from bootscript

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


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

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

    tegra: image: remove unnecessary assumptions from bootscript
    
    'bootz' expects gziped kernel image anyway, so hard-code it to zImage,
    and remove root path from 'load' commands, by default the files are
    searched in root directory.
    
    This will make the bootscript static, so the command which modified it
    when image was created can now be removed.
    
    Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 target/linux/tegra/image/Makefile           | 3 +--
 target/linux/tegra/image/generic-bootscript | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/target/linux/tegra/image/Makefile b/target/linux/tegra/image/Makefile
index fbff1cf6e8..71a5fc581d 100644
--- a/target/linux/tegra/image/Makefile
+++ b/target/linux/tegra/image/Makefile
@@ -14,10 +14,9 @@ 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#@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 \
+		-d $(BOOT_SCRIPT) \
 		$@.boot/boot.scr
 
 	SIGNATURE="$(IMG_PART_SIGNATURE)" \
diff --git a/target/linux/tegra/image/generic-bootscript b/target/linux/tegra/image/generic-bootscript
index 0908025d5d..0e7816490d 100644
--- a/target/linux/tegra/image/generic-bootscript
+++ b/target/linux/tegra/image/generic-bootscript
@@ -2,7 +2,7 @@ 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
+load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} zImage
+load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} ${soc}-${board}.dtb
 
 bootz ${kernel_addr_r} - ${fdt_addr_r}



More information about the lede-commits mailing list