define Build/mkfwimage
$(STAGING_DIR_HOST)/bin/mkfwimage \
-B $(1).OpenWrt.$(REVISION) \
- -k $(word 1,$^) \
- -r $(word 2,$^) \
+ -k $(IMAGE_KERNEL) \
+ -r $(IMAGE_ROOTFS) \
-o $@.new && \
mv $@.new $@
endef
define Build/combined-image
-sh $(TOPDIR)/scripts/combined-image.sh \
- "$(word 1,$^)" \
- "$(word 2,$^)" \
+ "$(IMAGE_KERNEL)" \
+ "$(IMAGE_ROOTFS)" \
"$@.new" && \
mv $@.new $@
endef
define Build/mkmylofw
$(STAGING_DIR_HOST)/bin/mkmylofw -B $(1) \
- -p0x020000:0x130000:ah:0x80041000:linux:$(word 1,$^) \
- -p0x150000:0x2a0000:::rootfs:$(word 2,$^) \
+ -p0x020000:0x130000:ah:0x80041000:linux:$(IMAGE_KERNEL) \
+ -p0x150000:0x2a0000:::rootfs:$(IMAGE_ROOTFS) \
$@.new && \
mv $@.new $@
endef
dd if=$@.l7 of=$@ bs=65536 conv=sync
endef
+define Build/copy-kernel
+ rm -f $@ $@.elf
+ cp $< $@
+ cp $< $@.elf
+endef
+
+define Build/elf-kernel
+ cp $(IMAGE_KERNEL).elf $@
+endef
+
define Device/Default
PROFILES = Default $$(DEVICE_NAME)
- KERNEL := kernel-bin | lzma-kernel
+ KERNEL := copy-kernel | lzma-kernel
IMAGES := sysupgrade.bin
FILESYSTEMS := squashfs
endef
define Device/generic
DEVICE_TITLE := Generic Images
- IMAGES := kernel.lzma kernel.gz rootfs.bin sysupgrade.bin
- IMAGE/kernel.gz := append-kernel | gzip-kernel
- IMAGE/kernel.lzma := append-kernel | lzma-kernel
+ IMAGES := kernel.lzma kernel.elf kernel.gz rootfs.bin sysupgrade.bin
+ IMAGE/kernel.gz := elf-kernel | gzip-kernel
+ IMAGE/kernel.elf := elf-kernel
+ IMAGE/kernel.lzma := elf-kernel | lzma-kernel
IMAGE/rootfs.bin := append-rootfs | pad-rootfs | pad-to 128k
IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to 128k | combined-image
IMAGE_NAME = $$(IMAGE_PREFIX)-$$(if $$(findstring kernel,$$(2)),,$$(1)-)$$(2)