Message ID | 1472892762-20216-7-git-send-email-dev@kresin.me |
---|---|
State | RFC |
Headers | show |
> Signed-off-by: Mathias Kresin <dev@kresin.me> > --- > target/linux/ramips/image/mt7620.mk | 6 ++++-- > target/linux/ramips/image/mt7621.mk | 6 ++++-- > 2 files changed, 8 insertions(+), 4 deletions(-) > > diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk > index 00dd4f2..1df806b 100644 > --- a/target/linux/ramips/image/mt7620.mk > +++ b/target/linux/ramips/image/mt7620.mk > @@ -422,14 +422,16 @@ TARGET_DEVICES += tiny-ac > dch_m225_mtd_size=7012352 > define Device/dch-m225 > DTS := DCH-M225 > + BLOCKSIZE := 4k > IMAGES += factory.bin > IMAGE_SIZE := $(dch_m225_mtd_size) > IMAGE/sysupgrade.bin := \ > - append-kernel | pad-offset 65536 64 | append-rootfs | \ > + append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \ > seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ > pad-rootfs | check-size $$$$(IMAGE_SIZE) > IMAGE/factory.bin := \ > - append-kernel | pad-offset 65536 64 | append-rootfs | pad-rootfs -x 64 | \ > + append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \ > + append-rootfs | pad-rootfs -x 64 | \ > seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ > seama-seal -m "signature=wapn22_dlink.2013gui_dap1320b" | \ > check-size $$$$(IMAGE_SIZE) > diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk > index e602dfb..acc17c3 100644 > --- a/target/linux/ramips/image/mt7621.mk > +++ b/target/linux/ramips/image/mt7621.mk > @@ -65,15 +65,17 @@ TARGET_DEVICES += wsr-1166 > > define Device/dir-860l-b1 > DTS := DIR-860L-B1 > + BLOCKSIZE := 4k > IMAGES += factory.bin > KERNEL := kernel-bin | patch-dtb | relocate-kernel | lzma | uImage lzma > IMAGE_SIZE := $(ralink_default_fw_size_16M) > IMAGE/sysupgrade.bin := \ > - append-kernel | pad-offset 65536 64 | append-rootfs | \ > + append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \ > seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ > pad-rootfs | check-size $$$$(IMAGE_SIZE) > IMAGE/factory.bin := \ > - append-kernel | pad-offset 65536 64 | append-rootfs | pad-rootfs -x 64 | \ > + append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \ > + append-rootfs | pad-rootfs -x 64 | \ > seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ > seama-seal -m "signature=wrgac13_dlink.2013gui_dir860lb" | \ > check-size $$$$(IMAGE_SIZE) > -- > 2.7.4 This patch broke dir-860l-b1. Changing BLOCKSIZE for dir-860l-b1 to 64k makes it work again.
14.09.2016 02:02, Russell Senior: >> diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk >> index e602dfb..acc17c3 100644 >> --- a/target/linux/ramips/image/mt7621.mk >> +++ b/target/linux/ramips/image/mt7621.mk >> @@ -65,15 +65,17 @@ TARGET_DEVICES += wsr-1166 >> >> define Device/dir-860l-b1 >> DTS := DIR-860L-B1 >> + BLOCKSIZE := 4k >> IMAGES += factory.bin >> KERNEL := kernel-bin | patch-dtb | relocate-kernel | lzma | uImage lzma >> IMAGE_SIZE := $(ralink_default_fw_size_16M) >> IMAGE/sysupgrade.bin := \ >> - append-kernel | pad-offset 65536 64 | append-rootfs | \ >> + append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \ >> seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ >> pad-rootfs | check-size $$$$(IMAGE_SIZE) >> IMAGE/factory.bin := \ >> - append-kernel | pad-offset 65536 64 | append-rootfs | pad-rootfs -x 64 | \ >> + append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \ >> + append-rootfs | pad-rootfs -x 64 | \ >> seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ >> seama-seal -m "signature=wrgac13_dlink.2013gui_dir860lb" | \ >> check-size $$$$(IMAGE_SIZE) >> -- >> 2.7.4 > > This patch broke dir-860l-b1. Changing BLOCKSIZE for dir-860l-b1 to 64k makes it work again. Thanks for the report. To my knowledge the D-Link DIR-860L rev B1 has a MX25L12805D flash chip which supports 4K sector size. But I've missed to include the required kernel config changes. This was fixed with 925e63e71fa6691f3fa374f71c77d0a91c7e7539. Would you please make sure that this commit is in your tree. Please provide a full bootlog and the output of 'cat /proc/mtd' from an image which has the blocksize reverted to 64k. Might be possible that it's related to the seama header. I've checked the seama mtd splitter code before committing the change but might have missed something. Mathias
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 00dd4f2..1df806b 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -422,14 +422,16 @@ TARGET_DEVICES += tiny-ac dch_m225_mtd_size=7012352 define Device/dch-m225 DTS := DCH-M225 + BLOCKSIZE := 4k IMAGES += factory.bin IMAGE_SIZE := $(dch_m225_mtd_size) IMAGE/sysupgrade.bin := \ - append-kernel | pad-offset 65536 64 | append-rootfs | \ + append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \ seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ pad-rootfs | check-size $$$$(IMAGE_SIZE) IMAGE/factory.bin := \ - append-kernel | pad-offset 65536 64 | append-rootfs | pad-rootfs -x 64 | \ + append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \ + append-rootfs | pad-rootfs -x 64 | \ seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ seama-seal -m "signature=wapn22_dlink.2013gui_dap1320b" | \ check-size $$$$(IMAGE_SIZE) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index e602dfb..acc17c3 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -65,15 +65,17 @@ TARGET_DEVICES += wsr-1166 define Device/dir-860l-b1 DTS := DIR-860L-B1 + BLOCKSIZE := 4k IMAGES += factory.bin KERNEL := kernel-bin | patch-dtb | relocate-kernel | lzma | uImage lzma IMAGE_SIZE := $(ralink_default_fw_size_16M) IMAGE/sysupgrade.bin := \ - append-kernel | pad-offset 65536 64 | append-rootfs | \ + append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs | \ seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ pad-rootfs | check-size $$$$(IMAGE_SIZE) IMAGE/factory.bin := \ - append-kernel | pad-offset 65536 64 | append-rootfs | pad-rootfs -x 64 | \ + append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \ + append-rootfs | pad-rootfs -x 64 | \ seama -m "dev=/dev/mtdblock/2" -m "type=firmware" | \ seama-seal -m "signature=wrgac13_dlink.2013gui_dir860lb" | \ check-size $$$$(IMAGE_SIZE)
Signed-off-by: Mathias Kresin <dev@kresin.me> --- target/linux/ramips/image/mt7620.mk | 6 ++++-- target/linux/ramips/image/mt7621.mk | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)