A header used in ELECOM WRC-300GHBK2-I and WRC-1750GHBK2-I/C is also
used in ELECOM WRC-2533GHBK-I, so split the code to generate the header
and move it to image-commands.mk to use from ramips target.
Signed-off-by: INAGAKI Hiroshi <[email protected]>
Reviewed-by: Sungbo Eo <[email protected]>
}
endef
+define Build/elecom-product-header
+ $(eval product=$(word 1,$(1)))
+ $(eval fw=$(word 2,$(1)))
+
+ ( \
+ echo -n -e "ELECOM\x00\x00$(product)" | dd bs=40 count=1 conv=sync; \
+ echo -n "0.00" | dd bs=16 count=1 conv=sync; \
+ dd if=$(fw); \
+ ) > $(fw).new
+ mv $(fw).new $(fw)
+endef
+
define Build/eva-image
$(STAGING_DIR_HOST)/bin/lzma2eva $(KERNEL_LOADADDR) $(KERNEL_LOADADDR) $@
[email protected]
-f 0x70000 -S 0x01100000 \
- ( \
- echo -n -e "ELECOM\x00\x00$(product)" | dd bs=40 count=1 conv=sync; \
- echo -n "0.00" | dd bs=16 count=1 conv=sync; \
- if [ "$$(stat -c%s
[email protected].new)" -le $$(($(subst k,* 1024,$(subst m, * 1024k,$(IMAGE_SIZE))))) ]; then \
+ if [ "$$(stat -c%s
[email protected])" -le $$(($(subst k,* 1024,$(subst m, * 1024k,$(IMAGE_SIZE))))) ]; then \
else \
echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
fi