openwrtv3/target/linux
Huan Truong fd62fa752b ar71xx: Add support for Netgear WNR2000v1
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>
2016-12-14 10:37:01 +01:00
..
adm5120 kernel: drop usbdev LED trigger 2016-10-19 12:09:45 +02:00
adm8668 build: fix subtarget descriptions 2016-09-04 13:35:11 +02:00
apm821xx kernel: bump to 4.4.35 2016-11-29 21:12:08 +01:00
ar7 kernel: update kernel 3.18 to version 3.18.43 2016-10-24 20:25:14 +03:00
ar71xx ar71xx: Add support for Netgear WNR2000v1 2016-12-14 10:37:01 +01:00
arc770 tools: remove old mkdosfs symlink from dosfstools 2016-10-12 11:59:09 +02:00
archs38 tools: remove old mkdosfs symlink from dosfstools 2016-10-12 11:59:09 +02:00
arm64 arm64: boot-wrapper: Add mirror 2016-11-16 10:54:33 +01:00
at91 at91: Remove u-boot from platform images folder 2016-10-06 12:15:13 +02:00
ath25 kernel: update kernel 4.4 to version 4.4.20 2016-09-15 08:10:55 +02:00
au1000 kernel: update kernel 3.18 to version 3.18.43 2016-10-24 20:25:14 +03:00
bcm53xx bcm53xx: backport missed BCM53573 ILP patch from 4.10 2016-12-13 09:26:27 +01:00
brcm47xx kernel: bump to 4.4.36 2016-12-04 12:31:30 +01:00
brcm63xx brcm63xx: Livebox 1: add userspace board support 2016-11-21 18:40:15 +01:00
brcm2708 brcm2708: update linux 4.4 patches to latest version 2016-12-04 12:32:04 +01:00
cns3xxx kernel: bump to 4.4.38 2016-12-13 08:28:28 +01:00
gemini gemini: rename config-default to config-4.4 2016-08-24 01:44:05 +03:00
generic ar71xx: Add support for Netgear WNR2000v1 2016-12-14 10:37:01 +01:00
imx6 imx6: Add ds1672 RTC to kernel for working hctosys (Gateworks) 2016-10-27 00:34:01 +02:00
ipq806x ipq806x: add thermal sensor driver 2016-12-01 15:47:43 +01:00
ixp4xx kernel: update kernel 3.18 to version 3.18.43 2016-10-24 20:25:14 +03:00
kirkwood kirkwood: fix pogo_e02 LED name 2016-10-26 12:37:46 +02:00
lantiq lantiq: remove "init" kernel command line parameter from bootargs 2016-12-12 09:57:40 +01:00
layerscape kernel: bump to 4.4.38 2016-12-13 08:28:28 +01:00
malta malta: enable be64 and le64 subtargets 2016-08-15 15:32:36 +02:00
mcs814x treewide: dts: use C style includes 2016-11-12 21:04:15 +01:00
mediatek kernel: update kernel 4.4 to version 4.4.30 2016-11-02 10:25:44 +01:00
mpc85xx cleanup ucidef_set_interface* usage 2016-09-10 15:32:25 +02:00
mvebu mvebu: fix sysupgrade for Linksys WRT3200ACM 2016-12-04 07:03:17 +01:00
mxs tools: remove old mkdosfs symlink from dosfstools 2016-10-12 11:59:09 +02:00
octeon octeon: fix feature flag for initramfs support 2016-11-16 23:37:27 +01:00
omap build: fix subtarget descriptions 2016-09-04 13:35:11 +02:00
omap24xx kernel: clean up usb gadget support 2016-09-15 13:11:21 +02:00
orion orion: make image size errors non-fatal 2016-12-04 11:41:53 +01:00
oxnas treewide: dts: use keycode defines from input dt-binding 2016-11-13 07:07:58 +01:00
ppc40x build: fix subtarget descriptions 2016-09-04 13:35:11 +02:00
ppc44x build: fix subtarget descriptions 2016-09-04 13:35:11 +02:00
ramips ramips: Fix led init script for Lenovo Y1/Y1s 2016-12-04 15:51:18 +01:00
rb532 kernel: update kernel 4.1 to version 4.1.34 2016-10-24 20:25:14 +03:00
realview build: fix subtarget descriptions 2016-09-04 13:35:11 +02:00
sunxi sunxi: enable CONFIG_VHOST_NET like on x86 2016-11-24 13:25:16 +01:00
uml uml: clean up the kernel config and add squashfs+ext4/f2fs support 2016-11-24 12:53:18 +01:00
x86 x86: fix GRUB_ROOT for Xen subtarget 2016-11-19 11:45:29 +01:00
xburst use immediate set in target Makefiles 2016-09-10 15:30:38 +02:00
zynq zynq: fix maintainer email address 2016-10-05 01:18:24 +02:00
Makefile