2018-08-06 15:47:41 +00:00
|
|
|
DEVICE_VARS += NETGEAR_KERNEL_MAGIC NETGEAR_BOARD_ID NETGEAR_HW_ID
|
|
|
|
|
2019-08-22 12:34:45 +00:00
|
|
|
define Build/netgear-rootfs
|
|
|
|
mkimage \
|
|
|
|
-A mips -O linux -T filesystem -C none \
|
|
|
|
-M $(NETGEAR_KERNEL_MAGIC) \
|
|
|
|
-n '$(VERSION_DIST) filesystem' \
|
|
|
|
-d $(IMAGE_ROOTFS) $@.fs
|
|
|
|
cat $@.fs >> $@
|
|
|
|
rm -rf $@.fs
|
|
|
|
endef
|
|
|
|
|
2018-06-13 08:51:51 +00: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 \
|
|
|
|
-M $(NETGEAR_KERNEL_MAGIC) \
|
|
|
|
-a 0xbf070000 -e 0xbf070000 \
|
|
|
|
-n 'MIPS $(VERSION_DIST) Linux-$(LINUX_VERSION)' \
|
|
|
|
-d $@.squashfs $@
|
|
|
|
rm -rf $@.squashfs $@.fs
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/netgear-uImage
|
|
|
|
$(call Build/uImage,$(1) -M $(NETGEAR_KERNEL_MAGIC))
|
|
|
|
endef
|
2019-01-02 22:19:04 +00:00
|
|
|
|
2020-07-25 18:29:12 +00:00
|
|
|
define Device/netgear_generic
|
2019-07-04 14:09:15 +00:00
|
|
|
DEVICE_VENDOR := NETGEAR
|
2019-01-02 22:19:04 +00:00
|
|
|
KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
|
2020-07-25 18:29:12 +00:00
|
|
|
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
|
2019-01-02 22:19:04 +00:00
|
|
|
IMAGES += factory.img
|
2020-07-25 18:29:12 +00:00
|
|
|
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | \
|
|
|
|
append-rootfs | pad-rootfs
|
2019-12-19 19:42:19 +00:00
|
|
|
IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
|
2020-03-10 13:58:27 +00:00
|
|
|
check-size
|
2019-12-19 19:42:19 +00:00
|
|
|
IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | \
|
2020-03-10 13:58:27 +00:00
|
|
|
check-size
|
2019-01-02 22:19:04 +00:00
|
|
|
endef
|