Functional versions of OpenWrt for Netgear WNR2000v1

Hi,

I managed to compile a small size of firmware for some of the latest three main versions of OpenWRT for Netgear WRT2000v1 and here are all details required.

All these versions of firmware have been tested on my router on which I already installed a recompiled version of u-boot (bootloader) made by fuhry. I don’t know if they work stable with the original u-boot.

Regards,
Danut

2 Likes

LEDE 17.01.7

This ultimate version of LEDE I had to compile without IPv6 and ppp packages, to get a free space of 448KB in the flash memory. By compiling using OpenWRT Image Builder I got the file uImage=1037KB and rootfs=2048KB. I placed them in folder Test for Tftpd64 and opened a serial connection. These are the steps:

Tell u-boot that we have a tftp server on 192.168.1.10

  • setenv serverip 192.168.1.10

Tell 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

Load lede_17017_own_build_4_rootfs.bin on TFTP server, and put it to memory address 0x81000000

  • tftpboot 0x81000000 lede_17017_own_build_4_rootfs.bin

U-boot will tell you the length of lede_17017_own_build_4_rootfs.bin in hex, let's say ZZZZZZ (for this file is 200000). Copy bit by bit 0xZZZZZZ bytes from offset 0x050000

  • cp.b 0x81000000 0xbf050000 0x200000

Same to the lede_17017_own_build_4_uImage.bin, write it from offset 0x002c0000 instead of 0x002a0000 as it was in the original offset, to get a bit more free space. Again, 0xYYYYYY (1032f6 for this file) is the length that tftpboot reports

  • tftpboot 0x81000000 lede_17017_own_build_4_uImage.bin
  • cp.b 0x81000000 0xbf2c0000 0x1032f6

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 0xbf2c0000"

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

  • saveenv

Reset the board

  • reset

Here is the link to archive: - lede_17017_own_build_4.zip

Here is the the flash dump file: - lede_17017_own_build_4_flash_dump.bin

U-Boot 1.1.4.15 (Jan 13 2011 - 13:00:15)

AP81 (ar7100) U-boot
sri
32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 244k for U-Boot at: 81fc0000
Reserving 192k for malloc() at: 81f90000
Reserving 44 Bytes for Board Info at: 81f8ffd4
Reserving 36 Bytes for Global Data at: 81f8ffb0
Reserving 128k for boot params() at: 81f6ffb0
Stack Pointer at: 81f6ff98
Now running in RAM - U-Boot at: 81fc0000
id read 0x100000ff
flash size 4MB, sector count = 64
Flash: 4MB
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
Fetching MAC Address from 0x81fea700
: cfg1 0xf cfg2 0x7114
eth0: 00:1f:33:f4:77:77
dup 1 speed 100
eth0 up
eth0
### main_loop entered: bootdelay=4

### main_loop: bootcmd="bootm 0xbf2c0000"
Hit any key to stop autoboot:  0

 Client starts...[Listening] for ADVERTISE...checksum bad

 nmrp server is stopped or failed !
## Booting image at bf2c0000 ...
   Image Name:   MIPS OpenWrt Linux-4.4.182
   Created:      2019-06-20  10:53:53 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1061558 Bytes =  1 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ...OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

[    0.000000] Linux version 4.4.182 (danut@DELL-STUDIO-1558) (gcc version 5.4.0 (LEDE GCC 5.4.0 r4030-6028f00df0) ) #0 Thu Jun 20 10:53:53 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9132 rev 1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] No valid device tree found, continuing without
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: 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 mem=32M rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 28520K/32768K available (2585K kernel code, 151K rwdata, 292K rodata, 292K init, 189K bss, 4248K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000013] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007875] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.090597] pid_max: default: 32768 minimum: 301
[    0.095370] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.101979] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.112453] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.122290] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.129231] NET: Registered protocol family 16
[    0.135371] MIPS: machine is NETGEAR WNR2000
[    0.608044] clocksource: Switched to clocksource MIPS
[    0.614534] NET: Registered protocol family 2
[    0.620013] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.626987] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.633410] TCP: Hash tables configured (established 1024 bind 1024)
[    0.639911] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.645755] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.652340] NET: Registered protocol family 1
[    0.662178] Crashlog allocated RAM at address 0x1f00000
[    0.686313] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.692196] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.705227] io scheduler noop registered
[    0.709204] io scheduler deadline registered (default)
[    0.714528] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.721467] console [ttyS0] disabled
[    0.745070] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 12500000) is a 16550A
[    0.753767] console [ttyS0] enabled
[    0.753767] console [ttyS0] enabled
[    0.760789] bootconsole [early0] disabled
[    0.760789] bootconsole [early0] disabled
[    0.772409] m25p80 spi0.0: found s25sl032a, expected m25p80
[    0.778108] m25p80 spi0.0: s25sl032a (4096 Kbytes)
[    0.782957] 4 cmdlinepart partitions found on MTD device spi0.0
[    0.788926] Creating 4 MTD partitions on "spi0.0":
[    0.793756] 0x000000000000-0x000000040000 : "u-boot"
[    0.801724] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.809347] 0x000000050000-0x0000003f0000 : "firmware"
[    0.823182] 2 uimage-fw partitions found on MTD device firmware
[    0.829184] 0x000000050000-0x0000002c0000 : "rootfs"
[    0.836133] mtd: device 3 (rootfs) set to be root filesystem
[    0.841940] 1 squashfs-split partitions found on MTD device rootfs
[    0.848181] 0x000000250000-0x0000002c0000 : "rootfs_data"
[    0.855804] 0x0000002c0000-0x0000003c32f6 : "kernel"
[    0.863094] 0x0000003f0000-0x000000400000 : "art"
[    0.887875] libphy: ag71xx_mdio: probed
[    1.210274] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RMII
[    1.529504] ag71xx ag71xx.1: connected to PHY at ag71xx-mdio.0:04 [uid=004dd042, driver=Generic PHY]
[    1.539691] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:RMII
[    1.547323] NET: Registered protocol family 17
[    1.551967] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.564778] 8021q: 802.1Q VLAN Support v1.8
[    1.577640] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.586600] Freeing unused kernel memory: 292K
[    2.862418] init: Console is alive
[    2.866102] init: - watchdog -
[    3.957780] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.056434] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.074839] init: - preinit -
[    4.572261] eth0: link up (100Mbps/Full duplex)
[    4.602652] random: procd: uninitialized urandom read (4 bytes read, 7 bits of entropy available)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    7.989143] jffs2: notice: (327) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    8.006544] mount_root: switching to jffs2 overlay
[    8.026932] urandom-seed: Seeding with /etc/urandom.seed
[    8.292129] eth0: link down
[    8.307358] procd: - early -
[    8.311529] procd: - watchdog -
[    8.969965] procd: - watchdog -
[    8.973445] procd: - ubus -
[    9.098361] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.109271] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.118918] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.128005] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.137558] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.146743] random: ubusd: uninitialized urandom read (4 bytes read, 15 bits of entropy available)
[    9.156336] random: ubusd: uninitialized urandom read (4 bytes read, 16 bits of entropy available)
[    9.165684] random: ubusd: uninitialized urandom read (4 bytes read, 16 bits of entropy available)
[    9.175205] procd: - init -
Please press Enter to activate this console.
[    9.657297] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.667939] Loading modules backported from Linux version wt-2017-01-31-0-ge882dff19e7f
[    9.676065] Backport generated by backports.git backports-20160324-13-g24da7d3c
[    9.689637] nf_conntrack version 0.5.0 (450 buckets, 1800 max)
[    9.732922] xt_time: kernel timezone is -0000
[    9.758462] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.807504] PPP generic driver version 2.4.2
[    9.814869] NET: Registered protocol family 24
[    9.950419] ieee80211 phy0: Atheros AR9100 MAC/BB Rev:7 AR2133 RF Rev:a1 mem=0xb80c0000, irq=2
[   10.088521] kmodloader: done loading kernel modules from /etc/modules.d/*
[   11.334940] random: jshn: uninitialized urandom read (4 bytes read, 19 bits of entropy available)
[   18.970004] ar71xx: pll_reg 0xb8050014: 0x13000a44
[   18.975710] eth0: link up (100Mbps/Full duplex)
[   18.990106] device eth0 entered promiscuous mode
[   19.958354] br-lan: port 1(eth0) entered forwarding state
[   19.963863] br-lan: port 1(eth0) entered forwarding state
[   21.958052] br-lan: port 1(eth0) entered forwarding state



BusyBox v1.25.1 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01.7, r4030-6028f00df0)
    \________\/    -----------------------------------------------------------

root@LEDE-test:/# free
             total       used       free     shared    buffers     cached
Mem:         28812      16564      12248         52       1660       4676
-/+ buffers/cache:      10228      18584
Swap:            0          0          0
root@LEDE-test:/# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 2048      2048         0 100% /rom
tmpfs                    14404        52     14352   0% /tmp
/dev/mtdblock4             448       216       232  48% /overlay
overlayfs:/overlay         448       216       232  48% /
tmpfs                      512         0       512   0% /dev
root@LEDE-test:/#

OpenWRT 18.06.8

This ultimate version of OpenWRT 18.06 I had to compile without IPv6 package, to get a free space of 384KB in the flash memory. By compiling using OpenWRT Image Builder I got the file uImage=1144KB and rootfs=2176KB. I placed them in folder Test for Tftpd64 and opened a serial connection. These are the steps:

Tell u-boot that we have a tftp server on 192.168.1.10

  • setenv serverip 192.168.1.10

Tell 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

Load openwrt_18068_own_build_3_rootfs.bin on TFTP server, and put it to memory address 0x81000000

  • tftpboot 0x81000000 openwrt_18068_own_build_3_rootfs.bin

U-boot will tell you the length of openwrt_18068_own_build_3_rootfs.bin in hex, let's say ZZZZZZ (for this file is 220000). Copy bit by bit 0xZZZZZZ bytes from offset 0x050000

  • cp.b 0x81000000 0xbf050000 0x220000

Same to the openwrt_18068_own_build_3_uImage.bin, write it from offset 0x002d0000 instead of 0x002a0000 as it was in the original offset, to get a bit more free space. Again, 0xYYYYYY (11dddd for this file) is the length that tftpboot reports

  • tftpboot 0x81000000 openwrt_18068_own_build_3_uImage.bin
  • cp.b 0x81000000 0xbf2c0000 0x11dddd

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 0xbf2d0000"

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

  • saveenv

Reset the board

  • reset

Here is the link to archive: - openwrt_18068_own_build_3.zip

Here is the link to flash dump: - openwrt_18068_own_build_3_flash_dump.bin

U-Boot 1.1.4.15 (Jan 13 2011 - 13:00:15)

AP81 (ar7100) U-boot
sri
32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 244k for U-Boot at: 81fc0000
Reserving 192k for malloc() at: 81f90000
Reserving 44 Bytes for Board Info at: 81f8ffd4
Reserving 36 Bytes for Global Data at: 81f8ffb0
Reserving 128k for boot params() at: 81f6ffb0
Stack Pointer at: 81f6ff98
Now running in RAM - U-Boot at: 81fc0000
id read 0x100000ff
flash size 4MB, sector count = 64
Flash: 4MB
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
Fetching MAC Address from 0x81fea700
: cfg1 0xf cfg2 0x7114
eth0: 00:1f:33:f4:77:77
dup 1 speed 100
eth0 up
eth0
### main_loop entered: bootdelay=4

### main_loop: bootcmd="bootm 0xbf2d0000"
Hit any key to stop autoboot:  0

 Client starts...[Listening] for ADVERTISE...checksum bad

 nmrp server is stopped or failed !
## Booting image at bf2d0000 ...
   Image Name:   MIPS OpenWrt Linux-4.9.214
   Created:      2020-02-27  21:25:59 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1170845 Bytes =  1.1 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ...OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

[    0.000000] Linux version 4.9.214 (danut@DELL-STUDIO-1558) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7989-82fbd85747) ) #0 Thu Feb 27 21:25:59 2020
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9132 rev 1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: 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 mem=32M rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 28252K/32768K available (2953K kernel code, 146K rwdata, 292K rodata, 184K init, 202K bss, 4516K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:40.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000013] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007901] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.090608] pid_max: default: 32768 minimum: 301
[    0.095359] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.101964] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.112596] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.122433] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.129255] NET: Registered protocol family 16
[    0.135616] MIPS: machine is NETGEAR WNR2000
[    0.649574] clocksource: Switched to clocksource MIPS
[    0.656029] NET: Registered protocol family 2
[    0.661508] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.668478] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.674891] TCP: Hash tables configured (established 1024 bind 1024)
[    0.681389] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.687229] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.693790] NET: Registered protocol family 1
[    0.703787] Crashlog allocated RAM at address 0x1f00000
[    0.710565] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.726440] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.732304] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.753397] io scheduler noop registered
[    0.757315] io scheduler deadline registered (default)
[    0.762841] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.769767] console [ttyS0] disabled
[    0.793348] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 12500000) is a 16550A
[    0.802055] console [ttyS0] enabled
[    0.802055] console [ttyS0] enabled
[    0.809065] bootconsole [early0] disabled
[    0.809065] bootconsole [early0] disabled
[    0.821648] m25p80 spi0.0: found s25sl032a, expected m25p80
[    0.827277] m25p80 spi0.0: s25sl032a (4096 Kbytes)
[    0.832193] 4 cmdlinepart partitions found on MTD device spi0.0
[    0.838146] Creating 4 MTD partitions on "spi0.0":
[    0.842993] 0x000000000000-0x000000040000 : "u-boot"
[    0.851113] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.859050] 0x000000050000-0x0000003f0000 : "firmware"
[    0.873107] 2 uimage-fw partitions found on MTD device firmware
[    0.879085] 0x000000050000-0x0000002d0000 : "rootfs"
[    0.885905] mtd: device 3 (rootfs) set to be root filesystem
[    0.891704] 1 squashfs-split partitions found on MTD device rootfs
[    0.897932] 0x000000270000-0x0000002d0000 : "rootfs_data"
[    0.905543] 0x0000002d0000-0x0000003edddd : "kernel"
[    0.913269] 0x0000003f0000-0x000000400000 : "art"
[    0.921890] libphy: Fixed MDIO Bus: probed
[    0.949636] libphy: ag71xx_mdio: probed
[    1.291840] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RMII
[    1.631033] ag71xx ag71xx.1: connected to PHY at ag71xx-mdio.0:04 [uid=004dd042, driver=Generic PHY]
[    1.641235] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:RMII
[    1.648736] NET: Registered protocol family 17
[    1.653473] 8021q: 802.1Q VLAN Support v1.8
[    1.666285] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.674578] Freeing unused kernel memory: 184K
[    1.679050] This architecture does not have kernel memory protection.
[    2.569585] random: fast init done
[    2.617016] init: Console is alive
[    2.620803] init: - watchdog -
[    3.821247] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.898190] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.916665] init: - preinit -
[    4.692345] eth0: link up (100Mbps/Full duplex)
[    4.733905] random: procd: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    7.899103] mount_root: no usable overlay filesystem found, using tmpfs overlay
[    7.932907] urandom-seed: Seed file not found (/etc/urandom.seed)
[    8.204031] eth0: link down
[    8.221255] procd: - early -
[    8.224277] procd: - watchdog -
[    8.789728] procd: - watchdog -
[    8.793217] procd: - ubus -
[    8.987748] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.155111] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.162125] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.169798] procd: - init -
Please press Enter to activate this console.
[    9.509513] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.519873] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[    9.527933] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[    9.541258] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    9.605572] xt_time: kernel timezone is -0000
[    9.631529] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.678921] PPP generic driver version 2.4.2
[    9.686318] NET: Registered protocol family 24
[    9.818279] ieee80211 phy0: Atheros AR9100 MAC/BB Rev:7 AR2133 RF Rev:a1 mem=0xb80c0000, irq=2
[    9.970004] kmodloader: done loading kernel modules from /etc/modules.d/*
[   11.231725] urandom_read: 5 callbacks suppressed
[   11.231736] random: jshn: uninitialized urandom read (4 bytes read)
[   27.960611] jffs2: notice: (1008) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   29.132172] eth0: link up (100Mbps/Full duplex)
[   29.153073] br-lan: port 1(eth0) entered blocking state
[   29.158342] br-lan: port 1(eth0) entered disabled state
[   29.164105] device eth0 entered promiscuous mode
[   30.169712] br-lan: port 1(eth0) entered blocking state
[   30.174987] br-lan: port 1(eth0) entered forwarding state



BusyBox v1.28.4 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 18.06.8, r7989-82fbd85747
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# free
             total       used       free     shared    buffers     cached
Mem:         28436      18428      10008         92       1808       5364
-/+ buffers/cache:      11256      17180
Swap:            0          0          0
root@OpenWrt:/# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 2304      2304         0 100% /rom
tmpfs                    14216        44     14172   0% /tmp
tmpfs                    14216        48     14168   0% /tmp/root
tmpfs                      512         0       512   0% /dev
/dev/mtdblock4             384       224       160  58% /overlay
overlayfs:/overlay         384       224       160  58% /
root@OpenWrt:/#

OpenWRT 19.07.2

This ultimate version of OpenWRT 19.07 I had to compile without IPv6, dropbear, ppp packages and without kernel debug informations, to get a free space of 640KB in the flash memory. By compiling using OpenWRT Image Builder I got the file uImage=1101KB and rootfs=1920KB. I placed them in folder Test for Tftpd64 and opened a serial connection. These are the steps:

Tell u-boot that we have a tftp server on 192.168.1.10

  • setenv serverip 192.168.1.10

Tell 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

Load openwrt_19072_own_build_3_rootfs.bin on TFTP server, and put it to memory address 0x81000000

  • tftpboot 0x81000000 openwrt_19072_own_build_3_rootfs.bin

U-boot will tell you the length of openwrt_18068_own_build_3_rootfs.bin in hex, let's say ZZZZZZ (for this file is 1e0000). Copy bit by bit 0xZZZZZZ bytes from offset 0x050000

  • cp.b 0x81000000 0xbf050000 0x1e0000

Same to the openwrt_19072_own_build_3_uImage.bin, write it from offset 0x002d0000 instead of 0x002a0000 as it was in the original offset, to get a bit more free space. Again, 0xYYYYYY (11333e for this file) is the length that tftpboot reports

  • tftpboot 0x81000000 openwrt_19072_own_build_3_uImage.bin
  • cp.b 0x81000000 0xbf2c0000 0x11333e

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 0xbf2d0000"

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

  • saveenv

Reset the board

  • reset

Here is the link to archive: - openwrt_19072_own_build_3.zip

Here is the link to flash dump: - openwrt_19072_own_build_3_flash_dump.bin

U-Boot 1.1.4.15 (Jan 13 2011 - 13:00:15)

AP81 (ar7100) U-boot
sri
32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 244k for U-Boot at: 81fc0000
Reserving 192k for malloc() at: 81f90000
Reserving 44 Bytes for Board Info at: 81f8ffd4
Reserving 36 Bytes for Global Data at: 81f8ffb0
Reserving 128k for boot params() at: 81f6ffb0
Stack Pointer at: 81f6ff98
Now running in RAM - U-Boot at: 81fc0000
id read 0x100000ff
flash size 4MB, sector count = 64
Flash: 4MB
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
Fetching MAC Address from 0x81fea700
: cfg1 0xf cfg2 0x7114
eth0: 00:1f:33:f4:77:77
dup 1 speed 100
eth0 up
eth0
### main_loop entered: bootdelay=4

### main_loop: bootcmd="bootm 0xbf2d0000"
Hit any key to stop autoboot:  0

 Client starts...[Listening] for ADVERTISE...checksum bad

 nmrp server is stopped or failed !
## Booting image at bf2d0000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.171
   Created:      2020-02-27  21:05:12 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1127166 Bytes =  1.1 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ...OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 33554432

Starting kernel ...

Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
Please press Enter to activate this console.



BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 19.07.2, r10947-65030d81f3
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# free
              total        used        free      shared  buff/cache   available
Mem:          28720       11484       10996          32        6240       14836
Swap:             0           0           0
root@OpenWrt:/# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 2048      2048         0 100% /rom
tmpfs                    14360        36     14324   0% /tmp
/dev/mtdblock4             640       224       416  35% /overlay
overlayfs:/overlay         640       224       416  35% /
tmpfs                      512         0       512   0% /dev
root@OpenWrt:/#

Hi Sadang, I would like to try your builds (in particular OpenWRT 19.07.02) but I can’t download the archive (links appears to be broken), can you post it to another resource please?

1 Like

Hi,

Thanks for reminding me about this topic. I updated the links, and I hope they stay valid longer.

Regards,
SaDang

Hi SaDang,

many thanks for the updated links (and for the great work you've made for this old router!) - I've successfully downloaded and applied OpenWRT 19.07.02 on my device. I will also try 18.06.8.

BTW - just a couple of typos on the installation steps for both OpenWRT 18.06.8 and OpenWRT 19.07.2: bootm should be 0xbf2c0000 and not 0xbf2d0000.

Thanks again,
Andrea

I have a WNR2000 and played with openwrt on it before. Due to its 4/32 limitation I'm using it as an AP only so -luci/+dropbear would be nice.
It'd be great if new fireware can be generated automatically, say by Github action, so that we can keep update to date with patch. Is that possible?

At one point I collected these logs. Is the offset of rootfs_data partition hardcoded somewhere and can it be adjusted? If not that means rootfs image size should not exceed 2228224(0x22*64k). Somehow I find it suboptimal to put the RW rootfs_data partition in the middle of RO partitions rootfs and kernel.

[    0.804845] 0x000000000000-0x000000040000 : "u-boot"
[    0.812809] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.820371] 0x000000050000-0x0000003f0000 : "firmware"
[    0.840447] 0x000000050000-0x0000002b0000 : "rootfs"
                       270000-0x0000002b0000 : "rootfs_data"
[    0.867001] 0x0000002b0000-0x0000003e79f7 : "kernel"
[    0.874322] 0x0000003f0000-0x000000400000 : "art"

mtd0: 00040000 "u-boot"
mtd1: 00010000 "u-boot-env"
mtd2: 003a0000 "firmware"
mtd3: 00260000 "rootfs"
mtd4: 00040000 "rootfs_data"
mtd5: 001379f7 "kernel"
mtd6: 00010000 "art"

Hi sadang

Image Builder gives me a uImage of size 1398132 today. How did you rip IPv6 and get it down to 1101KB? Thanks.

-rw-r--r-- 1 1398132 Feb 18 00:03 openwrt-19.07.7-ar71xx-tiny-uImage-lzma.bin
-rw-r--r-- 1 1703936 Feb 18 00:04 openwrt-19.07.7-ar71xx-tiny-wnr2000-rootfs-squashfs.bin