mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-23 12:58:23 +00:00
build: image: add append-dtb-elf helper
The mips kernel vmlinux image supports adding an empty ELF section for DTB to be later inserted into with MIPS_ELF_APPENDED_DTB. This ELF + inserted DTB image can then be directly booted on some devices. Example usage: image/subtarget.mk: KERNEL_NAME := vmlinux.elf KERNEL_INITRAMFS_NAME := vmlinux-initramfs.elf KERNEL := kernel-bin | append-dtb-elf On mt7621 memory size needed to be manually specified. Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> Signed-off-by: maurerr <mariusd84@gmail.com>
This commit is contained in:
parent
da6e395c30
commit
ee7c78b6eb
@ -142,6 +142,13 @@ define Build/append-dtb
|
|||||||
cat $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb >> $@
|
cat $(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb >> $@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Build/append-dtb-elf
|
||||||
|
$(TARGET_CROSS)objcopy \
|
||||||
|
--set-section-flags=.appended_dtb=alloc,contents \
|
||||||
|
--update-section \
|
||||||
|
.appended_dtb=$(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb $@
|
||||||
|
endef
|
||||||
|
|
||||||
define Build/install-dtb
|
define Build/install-dtb
|
||||||
$(call locked, \
|
$(call locked, \
|
||||||
$(foreach dts,$(DEVICE_DTS), \
|
$(foreach dts,$(DEVICE_DTS), \
|
||||||
|
Loading…
Reference in New Issue
Block a user