diff options
author | Daniel Golle <daniel@makrotopia.org> | 2022-07-28 16:45:03 +0200 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-07-28 16:45:19 +0200 |
commit | a49212d762fb2635564cd3365651da51d0c535d9 (patch) | |
tree | c38dbd0098ffd32194eaca80db10331eb8d3751b /target/linux/realtek/image/Makefile | |
parent | aeaa02afac6b7d55dd2b8175858b9799a24fb494 (diff) | |
download | upstream-a49212d762fb2635564cd3365651da51d0c535d9.tar.gz upstream-a49212d762fb2635564cd3365651da51d0c535d9.tar.bz2 upstream-a49212d762fb2635564cd3365651da51d0c535d9.zip |
Revert "realtek: remove support for HPE 1920 series"
This reverts commit a63aeaecf1f3387df020854c9b22a365207399ce.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/realtek/image/Makefile')
-rw-r--r-- | target/linux/realtek/image/Makefile | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index cf779002e8..6165d99bfc 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -8,6 +8,7 @@ KERNEL_ENTRY = 0x80000400 DEVICE_VARS += ZYXEL_VERS DLINK_KERNEL_PART_SIZE DEVICE_VARS += CAMEO_KERNEL_PART CAMEO_ROOTFS_PART CAMEO_CUSTOMER_SIGNATURE CAMEO_BOARD_VERSION +DEVICE_VARS += H3C_PRODUCT_ID H3C_DEVICE_ID define Build/zyxel-vers ( echo VERS;\ @@ -41,6 +42,43 @@ define Build/dlink-headers cat $@.kernel_part.hex $@.rootfs_part.hex > $@ endef +define Build/7z + $(STAGING_DIR_HOST)/bin/7zr a $(@).new -t7z -m0=lzma $(@) + mv $@.new $@ +endef + +define Build/h3c-image + $(STAGING_DIR_HOST)/bin/mkh3cimg \ + -i $(@) \ + -o $(@).new \ + -c 7z \ + -p $(H3C_PRODUCT_ID) \ + -d $(H3C_DEVICE_ID) + mv $@.new $@ +endef + +define Build/h3c-vfs + $(STAGING_DIR_HOST)/bin/mkh3cvfs \ + -i $(@) \ + -o $(@).new \ + -f openwrt-kernel.bin + mv $@.new $@ +endef + +define Build/relocate-kernel + rm -rf $@.relocate + $(CP) ../../generic/image/relocate $@.relocate + $(MAKE) -j1 -C $@.relocate KERNEL_ADDR=$(KERNEL_LOADADDR) LZMA_TEXT_START=0x82000000 \ + CROSS_COMPILE=$(TARGET_CROSS) + ( \ + dd if=$@.relocate/loader.bin bs=32 conv=sync && \ + perl -e '@s = stat("$@"); print pack("N", @s[7])' && \ + cat "$@" \ + ) > "$@.new" + mv "$@.new" "$@" + rm -rf $@.relocate +endef + define Device/Default PROFILES = Default KERNEL := kernel-bin | append-dtb | gzip | uImage gzip @@ -52,6 +90,17 @@ define Device/Default check-size | append-metadata endef +define Device/hpe_1920 + DEVICE_VENDOR := HPE + IMAGE_SIZE := 29632k + BLOCKSIZE := 64k + H3C_PRODUCT_ID := 0x3c010501 + KERNEL := kernel-bin | append-dtb | relocate-kernel | 7z | h3c-image | h3c-vfs + KERNEL_INITRAMFS := kernel-bin | append-dtb | relocate-kernel | 7z | h3c-image + IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ + pad-rootfs | check-size | append-metadata +endef + # "NGE" refers to the uImage magic define Device/netgear_nge KERNEL := kernel-bin | append-dtb | lzma | uImage lzma |