<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtk-20170518/target/linux/generic/files/drivers/mtd/mtdsplit, branch master</title>
<subtitle>MTK 20170518 : Mediatek SDK based on OpenWRT Barrier Breaker</subtitle>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/'/>
<entry>
<title>kernel: mtdsplit: split by WRG header</title>
<updated>2018-02-13T10:16:49+00:00</updated>
<author>
<name>George Hopkins</name>
<email>george-hopkins@null.net</email>
</author>
<published>2017-10-28T12:01:10+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=5c7a58764e55d34317db2cfedb7206c634b4d7f6'/>
<id>5c7a58764e55d34317db2cfedb7206c634b4d7f6</id>
<content type='text'>
Support splitting WRG images, which can be found in older
D-Link devices.

Signed-off-by: George Hopkins &lt;george-hopkins@null.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support splitting WRG images, which can be found in older
D-Link devices.

Signed-off-by: George Hopkins &lt;george-hopkins@null.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: mtdsplit: Add support for D-link JBOOT</title>
<updated>2018-02-11T15:02:52+00:00</updated>
<author>
<name>Pawel Dembicki</name>
<email>paweldembicki@gmail.com</email>
</author>
<published>2018-02-04T12:11:16+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=680e867d7f48bc326007e0b2bd8abba1ae702da6'/>
<id>680e867d7f48bc326007e0b2bd8abba1ae702da6</id>
<content type='text'>
The D-Link devices with JBOOT bootloader use their own kernel
image header (stag + sch2 headers).

This driver find jImage header and set rootfs start after kernel file.

Signed-off-by: Pawel Dembicki &lt;paweldembicki@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The D-Link devices with JBOOT bootloader use their own kernel
image header (stag + sch2 headers).

This driver find jImage header and set rootfs start after kernel file.

Signed-off-by: Pawel Dembicki &lt;paweldembicki@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>generic: make mtdsplit-tplink.c honor rootfs offset</title>
<updated>2017-11-08T22:18:22+00:00</updated>
<author>
<name>Thibaut VARÈNE</name>
<email>hacks@slashdirt.org</email>
</author>
<published>2017-10-28T12:48:08+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=74f891752b617a9f17f675f341160458c055b301'/>
<id>74f891752b617a9f17f675f341160458c055b301</id>
<content type='text'>
The splitter ignored the rootfs offset from the header, probably
because until c1e6e61 it was invalid.

This patch fixes the splitter to use the now correct header data.

Regarding target/linux/ar71xx/files/drivers/mtd/tplinkpart.c,
this particular splitter "falls back" to the correct rootfs offset
reading and as such it doesn't need to be updated, although it will
report a kernel partition length that can be larger than the actual
length as it assumes that partition fills the entire segment up to
the rootfs partition.

Tested-by: Mathias Kresin &lt;dev@kresin.me&gt;
Tested-by: Stefan Lippers-Hollmann &lt;s.l-h@gmx.de&gt;
Tested-by: Daniel Engberg &lt;daniel.engberg.lists@pyret.net&gt;
Tested-by: Henryk Heisig &lt;hyniu@o2.pl&gt;
Signed-off-by: Thibaut VARÈNE &lt;hacks@slashdirt.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The splitter ignored the rootfs offset from the header, probably
because until c1e6e61 it was invalid.

This patch fixes the splitter to use the now correct header data.

Regarding target/linux/ar71xx/files/drivers/mtd/tplinkpart.c,
this particular splitter "falls back" to the correct rootfs offset
reading and as such it doesn't need to be updated, although it will
report a kernel partition length that can be larger than the actual
length as it assumes that partition fills the entire segment up to
the rootfs partition.

Tested-by: Mathias Kresin &lt;dev@kresin.me&gt;
Tested-by: Stefan Lippers-Hollmann &lt;s.l-h@gmx.de&gt;
Tested-by: Daniel Engberg &lt;daniel.engberg.lists@pyret.net&gt;
Tested-by: Henryk Heisig &lt;hyniu@o2.pl&gt;
Signed-off-by: Thibaut VARÈNE &lt;hacks@slashdirt.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: mtdsplit: Add support for Mikrotik NOR firmware</title>
<updated>2017-02-22T21:52:19+00:00</updated>
<author>
<name>Thibaut VARENE</name>
<email>hacks@slashdirt.org</email>
</author>
<published>2017-02-14T13:42:10+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=890daca9e2596359808bcffcab31202288bef63f'/>
<id>890daca9e2596359808bcffcab31202288bef63f</id>
<content type='text'>
The RouterBOOT bootloader does not care where the kernel lives in the SPI
flash, all that matters is that the kernel is wrapped in the custom yaffs
container as generated by kernel2minor.

This container has a fixed signature as follows:
00000000  00 00 00 01 00 00 00 01  ff ff 6b 65 72 6e 65 6c  |..........kernel|

This patch adds mtdsplit support for identifying that signature and
triggering the search for the rootfs. rootfs is expected at EB boundary since
we use wget mtd_find_rootfs_from(). We make no use of the yaffs file size
field because it contains invalid data in the image generated by kernel2minor.

Signed-off-by: Thibaut VARENE &lt;hacks@slashdirt.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The RouterBOOT bootloader does not care where the kernel lives in the SPI
flash, all that matters is that the kernel is wrapped in the custom yaffs
container as generated by kernel2minor.

This container has a fixed signature as follows:
00000000  00 00 00 01 00 00 00 01  ff ff 6b 65 72 6e 65 6c  |..........kernel|

This patch adds mtdsplit support for identifying that signature and
triggering the search for the rootfs. rootfs is expected at EB boundary since
we use wget mtd_find_rootfs_from(). We make no use of the yaffs file size
field because it contains invalid data in the image generated by kernel2minor.

Signed-off-by: Thibaut VARENE &lt;hacks@slashdirt.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: fix build error in mtdsplit driver</title>
<updated>2017-02-07T10:39:11+00:00</updated>
<author>
<name>Koen Vandeputte</name>
<email>koen.vandeputte@ncentric.com</email>
</author>
<published>2017-02-07T08:31:35+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=4339e5ddb10973d9ae10103db1c1a4f7c20a1d98'/>
<id>4339e5ddb10973d9ae10103db1c1a4f7c20a1d98</id>
<content type='text'>
Add missing parentheses.
Fixes kernel build issue when using this driver.

Signed-off-by: Koen Vandeputte &lt;koen.vandeputte@ncentric.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add missing parentheses.
Fixes kernel build issue when using this driver.

Signed-off-by: Koen Vandeputte &lt;koen.vandeputte@ncentric.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: update mtdsplit for linux 4.9</title>
<updated>2017-02-03T11:35:44+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2017-02-01T07:06:10+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=402193baa155255f08944a579f1f17e016d6cac2'/>
<id>402193baa155255f08944a579f1f17e016d6cac2</id>
<content type='text'>
add backport patches for older kernels

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
add backport patches for older kernels

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ar71xx: Add support for Netgear WNR2000v1</title>
<updated>2016-12-14T09:37:01+00:00</updated>
<author>
<name>Huan Truong</name>
<email>htruong@tnhh.net</email>
</author>
<published>2016-12-12T21:25:01+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=fd62fa752bbff9ae5277098152e7960a14d241e1'/>
<id>fd62fa752bbff9ae5277098152e7960a14d241e1</id>
<content type='text'>
This patch adds supports for the WNR2000v1 board with 4MB flash, and
produces device-specific factory, rootfs, and sysupgrade files for the
WNR2000v1. This board is errorneously claimed as supported on the OpenWRT
wiki as AP81, but AP81 image would not work because of APT81 image
requiring having 8MB of flash, while WNR2000v1 has only 4MB.

The image requires the u-boot bootloader to be modified to fuhry's
bootloader first.

Short specification:

- CPU: Atheros AR9132
- 4x 10/100 Mbps Ethernet, 1x WAN 10/100 Mbps
- 4 MB of Flash
- 32 MB of RAM
- UART header (J1) on board
- 1x button

Factory/Initial flash instructions:

- Set up a TFTP server on your local machine.
- Download the uImage for ar71xx-generic and the rootfs image for
  ar71xx-generic-wnr2000 and save in the tftp server root.
- Gain serial access to the router via the UART port (telnetenable over
  the network only won't work!).
- Upgrade the u-boot bootloader to fuhry's version by running the
  script: http://fuhry.com/b/wnr2000/install-repart.sh
- When the router restarts, interrupt u-boot and gain access to u-boot command line.
- Repartititon the board and flash initial uImage and rootfs as follow.

Commands to type in u-boot:

	# tells u-boot that we have a tftp server on 192.168.1.10
	setenv serverip 192.168.1.10

	# tells u-boot that the router should take the address 192.168.1.1
	setenv ipaddr 192.168.1.1

	# erase the region from 0x050000-0x3f0000
	erase 0xbf050000 +0x3A0000

	# loads sqfs.bin on TFTP server, and put it to memory address 0x81000000
	tftpboot 0x81000000 sqfs.bin
	# it will tell you the length of sqfs.bin in hex, let's say ZZZZZZ
	# copy bit by bit 0xZZZZZZ bytes from offset 0x050000
	cp.b 0x81000000 0xbf050000 0xZZZZZZ

	# same to the uImage.bin, write it right next to sqfs.bin
	# again, 0xYYYYYY is the length that tftpboot reports
	tftpboot 0x81000000 uImage.bin
	cp.b 0x81000000 0xbf2a0000 0xYYYYYY

	# We need to tell the kernel what board it is booting into, and where to find the partitions
	setenv bootargs "board=WNR2000 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,3712k(firmware),64k(art)ro rootfstype=squashfs,jffs2 noinitrd"

	# Tell u-boot where to find the uImage
	setenv bootcmd "bootm 0xbf2a0000"

	# Tell u-boot to save parameters to the u-boot-env partitions
	saveenv

	# Reset the board
	reset

Tested on:

- WNR2000v1 board.
- Initial flash works.

Known bugs:

- I don't know why factory image doesn't work on initial flash on stock
  firmware in u-boot recovery mode while it should.
- Sysupgrade does not yet work, if you do -f it will mess up your
  installation (requiring a reinstall of sqfs and uImage).

Signed-off-by: Huan Truong &lt;htruong@tnhh.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds supports for the WNR2000v1 board with 4MB flash, and
produces device-specific factory, rootfs, and sysupgrade files for the
WNR2000v1. This board is errorneously claimed as supported on the OpenWRT
wiki as AP81, but AP81 image would not work because of APT81 image
requiring having 8MB of flash, while WNR2000v1 has only 4MB.

The image requires the u-boot bootloader to be modified to fuhry's
bootloader first.

Short specification:

- CPU: Atheros AR9132
- 4x 10/100 Mbps Ethernet, 1x WAN 10/100 Mbps
- 4 MB of Flash
- 32 MB of RAM
- UART header (J1) on board
- 1x button

Factory/Initial flash instructions:

- Set up a TFTP server on your local machine.
- Download the uImage for ar71xx-generic and the rootfs image for
  ar71xx-generic-wnr2000 and save in the tftp server root.
- Gain serial access to the router via the UART port (telnetenable over
  the network only won't work!).
- Upgrade the u-boot bootloader to fuhry's version by running the
  script: http://fuhry.com/b/wnr2000/install-repart.sh
- When the router restarts, interrupt u-boot and gain access to u-boot command line.
- Repartititon the board and flash initial uImage and rootfs as follow.

Commands to type in u-boot:

	# tells u-boot that we have a tftp server on 192.168.1.10
	setenv serverip 192.168.1.10

	# tells u-boot that the router should take the address 192.168.1.1
	setenv ipaddr 192.168.1.1

	# erase the region from 0x050000-0x3f0000
	erase 0xbf050000 +0x3A0000

	# loads sqfs.bin on TFTP server, and put it to memory address 0x81000000
	tftpboot 0x81000000 sqfs.bin
	# it will tell you the length of sqfs.bin in hex, let's say ZZZZZZ
	# copy bit by bit 0xZZZZZZ bytes from offset 0x050000
	cp.b 0x81000000 0xbf050000 0xZZZZZZ

	# same to the uImage.bin, write it right next to sqfs.bin
	# again, 0xYYYYYY is the length that tftpboot reports
	tftpboot 0x81000000 uImage.bin
	cp.b 0x81000000 0xbf2a0000 0xYYYYYY

	# We need to tell the kernel what board it is booting into, and where to find the partitions
	setenv bootargs "board=WNR2000 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,3712k(firmware),64k(art)ro rootfstype=squashfs,jffs2 noinitrd"

	# Tell u-boot where to find the uImage
	setenv bootcmd "bootm 0xbf2a0000"

	# Tell u-boot to save parameters to the u-boot-env partitions
	saveenv

	# Reset the board
	reset

Tested on:

- WNR2000v1 board.
- Initial flash works.

Known bugs:

- I don't know why factory image doesn't work on initial flash on stock
  firmware in u-boot recovery mode while it should.
- Sysupgrade does not yet work, if you do -f it will mess up your
  installation (requiring a reinstall of sqfs and uImage).

Signed-off-by: Huan Truong &lt;htruong@tnhh.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: mtdsplit: add support for WRGG images</title>
<updated>2016-10-26T22:50:42+00:00</updated>
<author>
<name>Stijn Tintel</name>
<email>stijn@linux-ipv6.be</email>
</author>
<published>2016-08-07T11:39:00+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=136319e72d14ed4f77e03db54c0c46dc85d685c3'/>
<id>136319e72d14ed4f77e03db54c0c46dc85d685c3</id>
<content type='text'>
Support splitting WRGG images, found in some D-Link devices (e.g.
DAP-2695).

Signed-off-by: Stijn Tintel &lt;stijn@linux-ipv6.be&gt;
Acked-by: John Crispin &lt;john@phrozen.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support splitting WRGG images, found in some D-Link devices (e.g.
DAP-2695).

Signed-off-by: Stijn Tintel &lt;stijn@linux-ipv6.be&gt;
Acked-by: John Crispin &lt;john@phrozen.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: mtdsplit_uimage: fix Edimax parser</title>
<updated>2016-10-15T07:01:45+00:00</updated>
<author>
<name>Mathias Kresin</name>
<email>dev@kresin.me</email>
</author>
<published>2016-09-29T17:28:13+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=634d690d740ad2e586701a393d60cc9753808193'/>
<id>634d690d740ad2e586701a393d60cc9753808193</id>
<content type='text'>
According to the author the code was added to in preparation for adding
support for a new board. The patch for the board was never send and the
code never really tested.

The edimax header starting with the edimax magic is put in front of the
uImage header. There is no special uImage header used. Means, default
magic and the type field is set to kernel as usual.

Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;

edimax parser fix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to the author the code was added to in preparation for adding
support for a new board. The patch for the board was never send and the
code never really tested.

The edimax header starting with the edimax magic is put in front of the
uImage header. There is no special uImage header used. Means, default
magic and the type field is set to kernel as usual.

Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;

edimax parser fix
</pre>
</div>
</content>
</entry>
<entry>
<title>kernel: mtdsplit_uimage: fix rootfs offset</title>
<updated>2016-10-15T07:01:45+00:00</updated>
<author>
<name>Mathias Kresin</name>
<email>dev@kresin.me</email>
</author>
<published>2016-10-02T17:18:56+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=35073d47bb91fc0066a08c85c9206a6338a19b7e'/>
<id>35073d47bb91fc0066a08c85c9206a6338a19b7e</id>
<content type='text'>
The return value of the find_header function need to be added to the
uimage_size, otherwise mtd_find_rootfs_from() might search for a rootfs
within a custom header and fails.

Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The return value of the find_header function need to be added to the
uimage_size, otherwise mtd_find_rootfs_from() might search for a rootfs
within a custom header and fails.

Signed-off-by: Mathias Kresin &lt;dev@kresin.me&gt;
</pre>
</div>
</content>
</entry>
</feed>
