mirror of https://github.com/hak5/openwrt.git
ar71xx: make loader-okli build step more generic
Add support for different loader types. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>openwrt-19.07
parent
9968dcedb4
commit
108a6f6792
|
@ -4,8 +4,9 @@ define Build/copy-file
|
||||||
cat "$(1)" > "$@"
|
cat "$(1)" > "$@"
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# Arguments: <output name> <kernel offset>
|
||||||
define Build/loader-okli
|
define Build/loader-okli
|
||||||
dd if=$(KDIR)/loader-$(1).gz bs=7680 conv=sync of="$@.new"
|
dd if=$(KDIR)/loader-$(word 1,$(1)).$(LOADER_TYPE) bs=$(word 2,$(1)) conv=sync of="$@.new"
|
||||||
cat "$@" >> "$@.new"
|
cat "$@" >> "$@.new"
|
||||||
mv "$@.new" "$@"
|
mv "$@.new" "$@"
|
||||||
endef
|
endef
|
||||||
|
@ -60,7 +61,7 @@ define Device/tplink-nolzma
|
||||||
LOADER_FLASH_OFFS := 0x22000
|
LOADER_FLASH_OFFS := 0x22000
|
||||||
COMPILE := loader-$(1).gz
|
COMPILE := loader-$(1).gz
|
||||||
COMPILE/loader-$(1).gz := loader-okli-compile
|
COMPILE/loader-$(1).gz := loader-okli-compile
|
||||||
KERNEL := copy-file $(KDIR)/vmlinux.bin.lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1)
|
KERNEL := copy-file $(KDIR)/vmlinux.bin.lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 7680
|
||||||
KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs.bin.lzma | loader-kernel-cmdline | tplink-v1-header
|
KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs.bin.lzma | loader-kernel-cmdline | tplink-v1-header
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue