From 0a219c8dfb02ce8e0862bff118739d1158585c32 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Sun, 2 Oct 2016 21:00:22 +0200 Subject: [PATCH] ramips: use rootfs splitter and new image build code for BR-6475ND Use the edimax uImage splitter instead of the fixed size rootfs partition. Signed-off-by: Mathias Kresin --- target/linux/ramips/dts/BR-6475ND.dts | 5 --- target/linux/ramips/image/rt3883.mk | 49 ++++++--------------------- 2 files changed, 11 insertions(+), 43 deletions(-) diff --git a/target/linux/ramips/dts/BR-6475ND.dts b/target/linux/ramips/dts/BR-6475ND.dts index f437ac165ca..87b048a8410 100644 --- a/target/linux/ramips/dts/BR-6475ND.dts +++ b/target/linux/ramips/dts/BR-6475ND.dts @@ -80,11 +80,6 @@ reg = <0x00070000 0x00790000>; label = "firmware"; }; - - partition@170000 { - reg = <0x00270000 0x00590000>; - label = "rootfs"; - }; }; rtl8367 { diff --git a/target/linux/ramips/image/rt3883.mk b/target/linux/ramips/image/rt3883.mk index 1cf0d3991b4..efdbc1f6a8c 100644 --- a/target/linux/ramips/image/rt3883.mk +++ b/target/linux/ramips/image/rt3883.mk @@ -2,6 +2,17 @@ # RT3662/RT3883 Profiles # +define Device/br-6475nd + DTS := BR-6475ND + BLOCKSIZE := 64k + IMAGE_SIZE := 7744k + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ + edimax-header -s CSYS -m RN54 -f 0x70000 -S 0x01100000 | pad-rootfs + DEVICE_TITLE := Edimax BR-6475nD + DEVICE_PACKAGES := swconfig +endef +TARGET_DEVICES += br-6475nd + define Device/cy-swr1100 DTS := CY-SWR1100 BLOCKSIZE := 64k @@ -76,32 +87,6 @@ endef TARGET_DEVICES += tew-692gr -# $(1) = squashfs/initramfs -# $(2) = lowercase board name -# $(3) = dts file -# $(4) = kernel size -# $(5) = rootfs size -# $(6) = signature -# $(7) = model -# $(8) = flash address -# $(9) = start address -define BuildFirmware/EdimaxCombined/squashfs - $(call PatchKernelLzmaDtb,$(2),$(3)) - $(call MkImage,lzma,$(KDIR)/vmlinux-$(2).bin.lzma,$(KDIR)/vmlinux-$(2).bin.uImage) - if [ `stat -c%s "$(KDIR)/vmlinux-$(2).bin.uImage"` -gt `expr $(4) - 20` ]; then \ - echo "Warning: $(KDIR)/vmlinux-$(2).bin.uImage is too big" >&2; \ - exit 1; \ - else if [ `stat -c%s "$(KDIR)/root.$(1)"` -gt $(5) ]; then \ - echo "Warning: $(KDIR)/root.$(1) is too big" >&2; \ - exit 1; \ - else \ - ( dd if=$(KDIR)/vmlinux-$(2).bin.uImage bs=`expr $(4) - 20` conv=sync ; dd if=$(KDIR)/root.$(1) ) > $(KDIR)/vmlinux-$(2).bin.uImage.combined ; \ - fi ; fi - mkedimaximg -i "$(KDIR)/vmlinux-$(2).bin.uImage.combined" \ - -o $(call imgname,$(1),$(2)).bin \ - -s $(6) -m $(7) -f $(8) -S $(9) -endef - define BuildFirmware/RTN56U/squashfs $(call BuildFirmware/Default8M/$(1),$(1),rt-n56u,RT-N56U) -mkrtn56uimg -s $(call sysupname,$(1),rt-n56u) @@ -109,11 +94,7 @@ define BuildFirmware/RTN56U/squashfs -mkrtn56uimg -f $(call imgname,$(1),rt-n56u)-factory.bin endef - Image/Build/Profile/RTN56U=$(call BuildFirmware/RTN56U/$(1),$(1),rt-n56u,RT-N56U) -kernel_size_BR6475ND:=2097152 -rootfs_size_BR6475ND:=5832704 -Image/Build/Profile/BR6475ND=$(call BuildFirmware/EdimaxCombined/$(1),$(1),br-6475nd,BR-6475ND,$(kernel_size_BR6475ND),$(rootfs_size_BR6475ND),CSYS,RN54,0x70000,0x01100000) define LegacyDevice/RTN56U @@ -122,11 +103,3 @@ define LegacyDevice/RTN56U DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig endef LEGACY_DEVICES += RTN56U - - -define LegacyDevice/BR6475ND - BLOCKSIZE := 64k - DEVICE_TITLE := Edimax BR-6475nD - DEVICE_PACKAGES := swconfig -endef -LEGACY_DEVICES += BR6475ND