mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-08 03:50:48 +00:00
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>
This commit is contained in:
parent
6fdeb48c1e
commit
c984fc7624
@ -16,7 +16,6 @@ define Build/boot-common
|
|||||||
rm -fR $@.boot
|
rm -fR $@.boot
|
||||||
mkdir -p $@.boot
|
mkdir -p $@.boot
|
||||||
|
|
||||||
$(CP) $(DTS_DIR)/$(DEVICE_DTS).dtb $@.boot/rockchip.dtb
|
|
||||||
$(CP) $(IMAGE_KERNEL) $@.boot/kernel.img
|
$(CP) $(IMAGE_KERNEL) $@.boot/kernel.img
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -48,7 +47,7 @@ endef
|
|||||||
### Devices ###
|
### Devices ###
|
||||||
define Device/Default
|
define Device/Default
|
||||||
PROFILES := Default
|
PROFILES := Default
|
||||||
KERNEL := kernel-bin
|
KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||||
IMAGES := sysupgrade.img.gz
|
IMAGES := sysupgrade.img.gz
|
||||||
DEVICE_DTS = rockchip/$$(SOC)-$(lastword $(subst _, ,$(1)))
|
DEVICE_DTS = rockchip/$$(SOC)-$(lastword $(subst _, ,$(1)))
|
||||||
endef
|
endef
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2020 Tobias Maedel
|
# 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
|
define Device/friendlyarm_nanopi-r2s
|
||||||
DEVICE_VENDOR := FriendlyARM
|
DEVICE_VENDOR := FriendlyARM
|
||||||
DEVICE_MODEL := NanoPi R2S
|
DEVICE_MODEL := NanoPi R2S
|
||||||
|
@ -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"
|
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
|
load mmc ${devnum}:1 ${kernel_addr_r} kernel.img
|
||||||
|
|
||||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
bootm ${kernel_addr_r}
|
||||||
|
@ -2,7 +2,6 @@ part uuid mmc ${devnum}:2 uuid
|
|||||||
|
|
||||||
setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32,0xff130000 root=PARTUUID=${uuid} rw rootwait"
|
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
|
load mmc ${devnum}:1 ${kernel_addr_r} kernel.img
|
||||||
|
|
||||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
bootm ${kernel_addr_r}
|
||||||
|
@ -2,7 +2,6 @@ part uuid mmc ${devnum}:2 uuid
|
|||||||
|
|
||||||
setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32,0xff1a0000 root=PARTUUID=${uuid} rw rootwait"
|
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
|
load mmc ${devnum}:1 ${kernel_addr_r} kernel.img
|
||||||
|
|
||||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
bootm ${kernel_addr_r}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user