aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
Commit message (Collapse)AuthorAgeFilesLines
* kernel: fix build error in mtdsplit driverKoen Vandeputte2017-02-071-1/+1
| | | | | | | Add missing parentheses. Fixes kernel build issue when using this driver. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* kernel: update mtdsplit for linux 4.9Felix Fietkau2017-02-031-4/+4
| | | | | | add backport patches for older kernels Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ar71xx: Add support for Netgear WNR2000v1Huan Truong2016-12-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <htruong@tnhh.net>
* kernel: mtdsplit_uimage: fix Edimax parserMathias Kresin2016-10-151-13/+7
| | | | | | | | | | | | | | 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 <dev@kresin.me> edimax parser fix
* kernel: mtdsplit_uimage: fix rootfs offsetMathias Kresin2016-10-151-1/+1
| | | | | | | | 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 <dev@kresin.me>
* kernel: mtdsplit: support uimage with UBIRafał Miłecki2016-02-241-3/+7
| | | | | | | | This patch adds uimage firmware split support for ubi. Signed-off-by: YounJae Rho <luxflow@live.com> SVN-Revision: 48755
* kernel: mtdsplit: modify rootfs helpers to provide partition typeRafał Miłecki2016-02-011-5/+3
| | | | | | | | | | Our mtdsplit parsers may want to create partition with name choice based on partition file system (e.g. SquashFS vs. JFFS2). This patch allows passing extra argument pointing to variable that will be set properly. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 48598
* ar71xx: add support for Netgear WPN824NJohn Crispin2016-01-191-0/+2
| | | | | | | | | | | | | | | | Add support for Netgear WPN824N. Hardware specs: * AR7240, 4 LAN ports, 1 WAN port * AR9285 WLAN * 32 MB RAM * 4 MB Flash * 16 LEDs (LAN, WAN and Power/Status contain two LEDs for dual color effect) * 3 Buttons (not supported) Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> SVN-Revision: 48356
* kernel: mtdsplit_uimage: fix passed info about buf sizeRafał Miłecki2015-02-121-2/+2
| | | | | | | | We obviously can't use sizeof(*buf) which is always 1. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 44424
* kernel: mtdsplit_uimage: read more data to match Edimax needsRafał Miłecki2015-02-121-8/+12
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 44415
* kernel: mtdsplit_uimage: use separated buffer for reading dataRafał Miłecki2015-02-121-18/+16
| | | | | | | | | We shouldn't read data directly into the header struct, as some devices (e.g. Edimax) need more bytes due to some extra header. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 44414
* kernel: mtdsplit_uimage: add parser for Edimax devicesRafał Miłecki2015-02-121-0/+53
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 44413
* mtdsplit_uimage: more generic header verify functionRafał Miłecki2015-02-121-11/+26
| | | | | | | | | | Some devices have uImage headers after some extra headers (e.g. Edimax devices). To support such cases our verify callback function should be allowed to return header offset, not just a boolean value. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 44412
* ar71xx: add Netgear WNR1000v2/WNR1000v2-VC support (#18633)John Crispin2015-01-301-0/+4
| | | | | | | | | | | The board is already supported by OpenWrt. WNR1000v2/WNR1000v2-VC are pretty much the same as WNR2000v3/WNR612v2, therefore the same initialization code and flash layout is used. Signed-off-by: Ștefan Rusu <saltwaterc@gmail.com> Tested-by: Douglas Fraser <1dsfraser@gmail.com> SVN-Revision: 44221
* kernel: move mtdsplit files to drivers/mtd/mtdsplit/ to simplify ↵Felix Fietkau2015-01-021-0/+287
maintenance, unify patches across kernel versions Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 43805