netifd: add flow steering mode to the packet steering script
[openwrt/openwrt.git] / target / linux / realtek / image / Makefile
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 include $(TOPDIR)/rules.mk
4 include $(INCLUDE_DIR)/image.mk
5
6 KERNEL_LOADADDR = 0x80100000
7
8 DEVICE_VARS += \
9 CAMEO_BOARD_MODEL \
10 CAMEO_BOARD_VERSION \
11 CAMEO_CUSTOMER_SIGNATURE \
12 CAMEO_KERNEL_PART \
13 CAMEO_KERNEL_PART_SIZE \
14 CAMEO_ROOTFS_PART \
15 H3C_DEVICE_ID \
16 H3C_PRODUCT_ID \
17 ZYXEL_VERS
18
19 define Build/zyxel-vers
20 ( echo VERS;\
21 for hw in $(ZYXEL_VERS); do\
22 echo -n "V9.99($$hw.0) | ";\
23 date -d @$(SOURCE_DATE_EPOCH) +%m/%d/%Y;\
24 done ) >> $@
25 endef
26
27 define Build/cameo-tag
28 $(SCRIPT_DIR)/cameo-tag.py $@ $(CAMEO_KERNEL_PART_SIZE)
29 endef
30
31 define Build/cameo-version
32 echo -n "OpenWrt" >> $@
33 dd if=/dev/zero bs=25 count=1 >> $@
34 endef
35
36 define Build/cameo-headers
37 dd if=$@ bs=$(CAMEO_KERNEL_PART_SIZE) count=1 of=$@.kernel_part; \
38 dd if=$@ bs=$(CAMEO_KERNEL_PART_SIZE) skip=1 of=$@.rootfs_part; \
39 $(SCRIPT_DIR)/cameo-imghdr.py $@.kernel_part $@.kernel_part.hex \
40 "$(CAMEO_BOARD_MODEL)" os $(CAMEO_KERNEL_PART) \
41 $(CAMEO_CUSTOMER_SIGNATURE) \
42 $(CAMEO_BOARD_VERSION) \
43 $(KERNEL_LOADADDR); \
44 $(SCRIPT_DIR)/cameo-imghdr.py $@.rootfs_part $@.rootfs_part.hex \
45 "$(CAMEO_BOARD_MODEL)" squashfs $(CAMEO_ROOTFS_PART) \
46 $(CAMEO_CUSTOMER_SIGNATURE) \
47 $(CAMEO_BOARD_VERSION); \
48 cat $@.kernel_part.hex $@.rootfs_part.hex > $@
49 endef
50
51 define Build/7z
52 $(STAGING_DIR_HOST)/bin/7zr a $(@).new -t7z -m0=lzma $(@)
53 mv $@.new $@
54 endef
55
56 define Build/h3c-image
57 $(STAGING_DIR_HOST)/bin/mkh3cimg \
58 -i $(@) \
59 -o $(@).new \
60 -c 7z \
61 -p $(H3C_PRODUCT_ID) \
62 -d $(H3C_DEVICE_ID)
63 mv $@.new $@
64 endef
65
66 define Build/h3c-vfs
67 $(STAGING_DIR_HOST)/bin/mkh3cvfs \
68 -i $(@) \
69 -o $(@).new \
70 -f openwrt-kernel.bin
71 mv $@.new $@
72 endef
73
74 define Device/Default
75 PROFILES = Default
76 KERNEL := \
77 kernel-bin | \
78 append-dtb | \
79 libdeflate-gzip | \
80 uImage gzip
81 KERNEL_INITRAMFS := \
82 kernel-bin | \
83 append-dtb | \
84 libdeflate-gzip | \
85 uImage gzip
86 DEVICE_DTS_DIR := ../dts-$(KERNEL_PATCHVER)
87 DEVICE_DTS = $$(SOC)_$(1)
88 IMAGES := sysupgrade.bin
89 IMAGE/sysupgrade.bin := \
90 append-kernel | \
91 pad-to 64k | \
92 append-rootfs | \
93 pad-rootfs | \
94 check-size | \
95 append-metadata
96 endef
97
98 include $(SUBTARGET).mk
99
100 $(eval $(call BuildImage))