1 # SPDX-License-Identifier: GPL-2.0-only
3 include $(TOPDIR
)/rules.mk
4 include $(INCLUDE_DIR
)/image.mk
6 KERNEL_LOADADDR
= 0x80100000
7 KERNEL_ENTRY
= 0x80100400
11 CAMEO_CUSTOMER_SIGNATURE \
14 DLINK_KERNEL_PART_SIZE \
19 define Build
/zyxel-vers
21 for hw in
$(ZYXEL_VERS
); do\
22 echo
-n
"V9.99($$hw.0) | ";\
23 date
-d @
$(SOURCE_DATE_EPOCH
) +%m
/%d
/%Y
;\
27 define Build
/dlink-cameo
28 $(SCRIPT_DIR
)/cameo-tag.py
$@
$(DLINK_KERNEL_PART_SIZE
)
31 define Build
/dlink-version
32 echo
-n
"OpenWrt" >> $@
33 dd if
=/dev
/zero bs
=25 count
=1 >> $@
36 define Build
/dlink-headers
37 dd if
=$@ bs
=$(DLINK_KERNEL_PART_SIZE
) count
=1 of
=$@.kernel_part
; \
38 dd if
=$@ bs
=$(DLINK_KERNEL_PART_SIZE
) skip
=1 of
=$@.rootfs_part
; \
39 $(SCRIPT_DIR
)/cameo-imghdr.py
$@.kernel_part
$@.kernel_part.hex \
40 "$(DEVICE_MODEL)" os
$(CAMEO_KERNEL_PART
) \
41 $(CAMEO_CUSTOMER_SIGNATURE
) \
42 $(CAMEO_BOARD_VERSION
) \
44 $(SCRIPT_DIR
)/cameo-imghdr.py
$@.rootfs_part
$@.rootfs_part.hex \
45 "$(DEVICE_MODEL)" squashfs
$(CAMEO_ROOTFS_PART
) \
46 $(CAMEO_CUSTOMER_SIGNATURE
) \
47 $(CAMEO_BOARD_VERSION
); \
48 cat
$@.kernel_part.hex
$@.rootfs_part.hex
> $@
52 $(STAGING_DIR_HOST
)/bin
/7zr a
$(@
).new
-t7z
-m0
=lzma
$(@
)
56 define Build
/h3c-image
57 $(STAGING_DIR_HOST
)/bin
/mkh3cimg \
61 -p
$(H3C_PRODUCT_ID
) \
67 $(STAGING_DIR_HOST
)/bin
/mkh3cvfs \
86 DEVICE_DTS_DIR
:= ..
/dts-
$(KERNEL_PATCHVER
)
87 DEVICE_DTS
= $$(SOC
)_
$(1)
88 IMAGES
:= sysupgrade.bin
89 IMAGE
/sysupgrade.bin
:= \
98 include $(SUBTARGET
).mk
100 $(eval
$(call BuildImage
))