tegra: image: remove unnecessary assumptions from bootscript
authorTomasz Maciej Nowak <tmn505@gmail.com>
Wed, 25 Nov 2020 16:10:05 +0000 (17:10 +0100)
committerPetr Štetiar <ynezz@true.cz>
Tue, 22 Dec 2020 17:59:10 +0000 (18:59 +0100)
'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@gmail.com>
target/linux/tegra/image/Makefile
target/linux/tegra/image/generic-bootscript

index fbff1cf6e8749899eb1a9d9935de991c3af094f0..71a5fc581d83d901cfa35e07887e90b6ad6eef91 100644 (file)
@@ -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)" \
index 0908025d5d59f4156a3d3d1bd22194fb267a4d2b..0e7816490d9ebd182a053630f078360262491113 100644 (file)
@@ -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}