#address-cells = <1>;
#size-cells = <1>;
- partition0,0@0x00000000 {
+ partition0,0@0 {
label = "NAND 128MiB 3,3V 8-bit";
reg = <0x00000000 0x08000000>;
read-only;
};
- partition0,1@0x00000000 {
+ partition0,1@0 {
label = "uboot";
reg = <0x00000000 0x00180000>;
read-only;
};
- partition0,2@0x00180000 {
+ partition0,2@180000 {
label = "device-tree";
reg = <0x00180000 0x00020000>;
};
- partition0,3@0x001a0000 {
+ partition0,3@180000 {
label = "kernel";
- reg = <0x001a0000 0x001e0000>;
+ reg = <0x00180000 0x00380000>;
/*
- * will also contain a fake/empty
- * rootfs to fool Netgear's uboot
- * rootfs integrety checks.
+ * device-tree is @ 0x00180000 - 0x001fffff
+ * kernel starts from 0x200000.
+ * this is coded into netgear's u-boot.
+ *
+ * this partition will also contain a
+ * fake/empty rootfs at the end to fool
+ * Netgear's uboot rootfs integrety checks.
*/
};
- partition0,4@0x00380000 {
+ partition0,4@500000 {
label = "ubi";
- reg = <0x00380000 0x01660000>;
+ reg = <0x00500000 0x014e0000>;
};
- partition0,5@0x019e0000 {
+ partition0,5@19e0000 {
label = "config";
reg = <0x019e0000 0x00080000>;
read-only;
};
- partition0,6@0x01a60000 {
+ partition0,6@1a60000 {
label = "pot";
reg = <0x01a60000 0x00080000>;
read-only;
};
- partition0,7@0x01ae0000 {
+ partition0,7@1ae0000 {
label = "traffic_meter";
reg = <0x01ae0000 0x00300000>;
read-only;
};
- partition0,8@0x01de0000 {
+ partition0,8@1de0000 {
label = "language";
reg = <0x01de0000 0x001c0000>;
read-only;
};
- partition0,9@0x01fa0000 {
+ partition0,9@1fa0000 {
label = "ecos";
reg = <0x01fa0000 0x06020000>;
read-only;
};
- partition0,10@0x07fc0000 {
+ partition0,10@7fc0000 {
label = "wifi_data";
reg = <0x07fc0000 0x00040000>;
read-only;
};
- partition0,11@0x00180000 {
+ partition0,11@180000 {
label = "firmware";
reg = <0x00180000 0x01860000>;
read-only;
$(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb,,--space $(DTB_SIZE))
endef
+define Build/prepend-dtb
+ cat "$@.dtb.uimage" "$@" > "$@.new"
+ mv "$@.new" "$@"
+endef
+
define Build/export-dtb
cp $(IMAGE_KERNEL).dtb $@
endef
-$(STAGING_DIR_HOST)/bin/mkimage -A $(LINUX_KARCH) \
-O linux -T kernel -C none \
-n '$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' \
- -d $(IMAGE_KERNEL).dtb $@.new
- @mv $@.new $@
+ -d "$@.dtb" "$@.dtb.uimage"
endef
define Build/MuImage-initramfs
DTB_SIZE := 131008
IMAGE_SIZE := 24960k
IMAGES := factory.img sysupgrade.tar kernel.dtb
- KERNEL_SIZE := 1920k
- KERNEL := dtb | kernel-bin | lzma | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | \
- append-uImage-fakeroot-hdr
+ KERNEL_SIZE := 3584k
+ # append a fake/empty rootfs to fool netgear's uboot
+ # CHECK_DNI_FIRMWARE_ROOTFS_INTEGRITY in do_chk_dniimg()
+ KERNEL := kernel-bin | lzma | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | \
+ append-uImage-fakeroot-hdr | dtb | create-uImage-dtb | prepend-dtb
KERNEL_INITRAMFS := kernel-bin | gzip | dtb | MuImage-initramfs gzip
- IMAGE/factory.img := create-uImage-dtb | append-kernel | pad-to 2M | append-ubi | \
+ IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \
netgear-dni | check-size $$$$(IMAGE_SIZE)
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
IMAGE/kernel.dtb := export-dtb | uImage none