diff options
author | Chuanhong Guo <gch981213@gmail.com> | 2022-11-13 21:29:26 +0800 |
---|---|---|
committer | Chuanhong Guo <gch981213@gmail.com> | 2022-11-14 22:50:21 +0800 |
commit | c984fc762412f206ebeb3e873742988ff760fb90 (patch) | |
tree | dee0a969f2fcf96d81804a5bc6a2b468826092a2 /target/linux/rockchip/image | |
parent | 6fdeb48c1ec207e7952bfff1596b65626fb336fd (diff) | |
download | upstream-c984fc762412f206ebeb3e873742988ff760fb90.tar.gz upstream-c984fc762412f206ebeb3e873742988ff760fb90.tar.bz2 upstream-c984fc762412f206ebeb3e873742988ff760fb90.zip |
rockchip: use LZMA FIT for kernel image
Use LZMA compressed kernel to save some space in boot partition.
Fixes: #11197
Tested-by: Tianling Shen <cnsztl@immortalwrt.org> [NanoPi R2S]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/rockchip/image')
-rw-r--r-- | target/linux/rockchip/image/Makefile | 3 | ||||
-rw-r--r-- | target/linux/rockchip/image/armv8.mk | 3 | ||||
-rw-r--r-- | target/linux/rockchip/image/mmc.bootscript | 3 | ||||
-rw-r--r-- | target/linux/rockchip/image/nanopi-r2s.bootscript | 3 | ||||
-rw-r--r-- | target/linux/rockchip/image/nanopi-r4s.bootscript | 3 |
5 files changed, 7 insertions, 8 deletions
diff --git a/target/linux/rockchip/image/Makefile b/target/linux/rockchip/image/Makefile index e4db1e5d58..e232166e51 100644 --- a/target/linux/rockchip/image/Makefile +++ b/target/linux/rockchip/image/Makefile @@ -16,7 +16,6 @@ define Build/boot-common rm -fR $@.boot mkdir -p $@.boot - $(CP) $(DTS_DIR)/$(DEVICE_DTS).dtb $@.boot/rockchip.dtb $(CP) $(IMAGE_KERNEL) $@.boot/kernel.img endef @@ -48,7 +47,7 @@ endef ### Devices ### define Device/Default PROFILES := Default - KERNEL := kernel-bin + KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb IMAGES := sysupgrade.img.gz DEVICE_DTS = rockchip/$$(SOC)-$(lastword $(subst _, ,$(1))) endef diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk index 6cc31f1d8c..f95416323d 100644 --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk @@ -2,6 +2,9 @@ # # Copyright (C) 2020 Tobias Maedel +# FIT will be loaded at 0x02080000. Leave 16M for that, align it to 2M and load the kernel after it. +KERNEL_LOADADDR := 0x03200000 + define Device/friendlyarm_nanopi-r2s DEVICE_VENDOR := FriendlyARM DEVICE_MODEL := NanoPi R2S diff --git a/target/linux/rockchip/image/mmc.bootscript b/target/linux/rockchip/image/mmc.bootscript index b70a62c4c7..9269fda9cf 100644 --- a/target/linux/rockchip/image/mmc.bootscript +++ b/target/linux/rockchip/image/mmc.bootscript @@ -2,7 +2,6 @@ part uuid mmc ${devnum}:2 uuid setenv bootargs "console=ttyS2,1500000 console=tty1 earlycon=uart8250,mmio32,0xff1a0000 root=PARTUUID=${uuid} rw rootwait" -load mmc ${devnum}:1 ${fdt_addr_r} rockchip.dtb load mmc ${devnum}:1 ${kernel_addr_r} kernel.img -booti ${kernel_addr_r} - ${fdt_addr_r} +bootm ${kernel_addr_r} diff --git a/target/linux/rockchip/image/nanopi-r2s.bootscript b/target/linux/rockchip/image/nanopi-r2s.bootscript index 5198881a26..8f961d3732 100644 --- a/target/linux/rockchip/image/nanopi-r2s.bootscript +++ b/target/linux/rockchip/image/nanopi-r2s.bootscript @@ -2,7 +2,6 @@ part uuid mmc ${devnum}:2 uuid setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32,0xff130000 root=PARTUUID=${uuid} rw rootwait" -load mmc ${devnum}:1 ${fdt_addr_r} rockchip.dtb load mmc ${devnum}:1 ${kernel_addr_r} kernel.img -booti ${kernel_addr_r} - ${fdt_addr_r} +bootm ${kernel_addr_r} diff --git a/target/linux/rockchip/image/nanopi-r4s.bootscript b/target/linux/rockchip/image/nanopi-r4s.bootscript index abe9c24ee3..1e53200027 100644 --- a/target/linux/rockchip/image/nanopi-r4s.bootscript +++ b/target/linux/rockchip/image/nanopi-r4s.bootscript @@ -2,7 +2,6 @@ part uuid mmc ${devnum}:2 uuid setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32,0xff1a0000 root=PARTUUID=${uuid} rw rootwait" -load mmc ${devnum}:1 ${fdt_addr_r} rockchip.dtb load mmc ${devnum}:1 ${kernel_addr_r} kernel.img -booti ${kernel_addr_r} - ${fdt_addr_r} +bootm ${kernel_addr_r} |