2020-11-04 10:21:16 +01:00
|
|
|
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
|
2018-08-06 17:47:41 +02:00
|
|
|
|
2019-08-22 14:34:45 +02:00
|
|
|
define Build/netgear-rootfs
|
|
|
|
mkimage \
|
|
|
|
-A mips -O linux -T filesystem -C none \
|
2020-11-04 10:21:16 +01:00
|
|
|
$(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC)) \
|
2019-08-22 14:34:45 +02:00
|
|
|
-n '$(VERSION_DIST) filesystem' \
|
|
|
|
-d $(IMAGE_ROOTFS) $@.fs
|
|
|
|
cat $@.fs >> $@
|
|
|
|
rm -rf $@.fs
|
|
|
|
endef
|
|
|
|
|
2018-06-13 10:51:51 +02:00
|
|
|
define Build/netgear-squashfs
|
|
|
|
rm -rf $@.fs $@.squashfs
|
|
|
|
mkdir -p $@.fs/image
|
|
|
|
cp $@ $@.fs/image/uImage
|
|
|
|
$(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
|
|
|
|
$@.fs $@.squashfs -be \
|
|
|
|
-noappend -root-owned -b 65536 \
|
|
|
|
$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
|
|
|
|
|
|
|
|
dd if=/dev/zero bs=1k count=1 >> $@.squashfs
|
|
|
|
mkimage \
|
|
|
|
-A mips -O linux -T filesystem -C none \
|
2020-11-04 10:21:16 +01:00
|
|
|
$(if $(UIMAGE_MAGIC),-M $(UIMAGE_MAGIC)) \
|
2018-06-13 10:51:51 +02:00
|
|
|
-a 0xbf070000 -e 0xbf070000 \
|
|
|
|
-n 'MIPS $(VERSION_DIST) Linux-$(LINUX_VERSION)' \
|
|
|
|
-d $@.squashfs $@
|
|
|
|
rm -rf $@.squashfs $@.fs
|
|
|
|
endef
|
|
|
|
|
2020-07-25 20:29:12 +02:00
|
|
|
define Device/netgear_generic
|
2019-07-04 16:09:15 +02:00
|
|
|
DEVICE_VENDOR := NETGEAR
|
2020-11-04 10:21:16 +01:00
|
|
|
KERNEL := kernel-bin | append-dtb | lzma -d20 | uImage lzma
|
|
|
|
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | uImage lzma
|
2019-01-02 14:19:04 -08:00
|
|
|
IMAGES += factory.img
|
2020-07-25 20:29:12 +02:00
|
|
|
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | \
|
|
|
|
append-rootfs | pad-rootfs
|
2019-12-19 20:42:19 +01:00
|
|
|
IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
|
2020-03-10 22:58:27 +09:00
|
|
|
check-size
|
2019-12-19 20:42:19 +01:00
|
|
|
IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | \
|
2020-03-10 22:58:27 +09:00
|
|
|
check-size
|
2019-01-02 14:19:04 -08:00
|
|
|
endef
|