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
Reset the board
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:/#