Welcome! Log In Create A New Profile

Advanced

LEDE on a dockstar device with now openwrt - Question

Posted by Menno K 
I try to install LEDE on my dockstar. The following commands are executed:

1. I download the most recent Lede software: download lede-17.01.2-kirkwood-dockstar-squashfs-sysupgrade.tar
2. I unzip these files (kernel + root) to my tftpserver
3. I made some new partitions and uboot commands:

setenv mtdparts 'mtdparts=orion_nand:1M(u-boot),4M(uImage),-(rootfs)'
setenv bootargs_root 'root=/dev/mtdblock2 rootfstype=squashfs ro'
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000'
saveenv

4. I download the kernel from my tftp server and format the partition:
tftpboot 0x6400000 kernel
nand erase.part uImage
nand write.e 0x6400000 0x100000 ${filesize}

5. I download the root files from my tftp server and format the partition

tftp 0x6400000 root
nand erase.part rootfs
nand write.e 0x6400000 rootfs ${filesize}

6. I start the dockstar succesfully and change some passwords. This works well and without problems.

But there is one issue! Changing network parameters (from the luci gui) or the autostart of some modules doesn't work! I think the problem is that the rootfs_data partition is not availible when the device start up. The device use the rom settings and overwrite the /etc/config/network config. But the partition is after booting availible.

Is there anybody who can help me with this problem?

Boot logs:
root@LEDE:/rom/etc# dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.50 (buildbot@builds-02.infra.lede-project.org) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3103-1b51a49) ) #0 Mon Feb 20 15:02:54 2017
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: Seagate FreeAgent Dockstar
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat c04d973c, node_mem_map c7efa000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: ttyS0,115200 mtdparts=orion_nand:1M(u-boot),4M(uImage),-(rootfs) root=/dev/mtdblock2 rootfstype=squashfs rw
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 124560K/131072K available (4074K kernel code, 142K rwdata, 652K rodata, 176K init, 201K bss, 6512K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc04a5db4   (4728 kB)
[    0.000000]       .init : 0xc04a6000 - 0xc04d2000   ( 176 kB)
[    0.000000]       .data : 0xc04d2000 - 0xc04f5ac8   ( 143 kB)
[    0.000000]        .bss : 0xc04f5ac8 - 0xc05281bc   ( 202 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000008] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000081] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[    0.090087] pid_max: default: 32768 minimum: 301
[    0.090203] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090223] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090790] CPU: Testing write buffer coherency: ok
[    0.091144] Setting up static identity map for 0x81e0 - 0x821c
[    0.091388] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.095861] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.095933] pinctrl core: initialized pinctrl subsystem
[    0.096986] NET: Registered protocol family 16
[    0.097392] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.098127] cpuidle: using governor ladder
[    0.098488] Feroceon L2: Enabling L2
[    0.098533] Feroceon L2: Cache support initialised.
[    0.098806] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.116268] SCSI subsystem initialized
[    0.116685] libata version 3.00 loaded.
[    0.116989] usbcore: registered new interface driver usbfs
[    0.117065] usbcore: registered new interface driver hub
[    0.117131] usbcore: registered new device driver usb
[    0.117970] clocksource: Switched to clocksource orion_clocksource
[    0.118852] NET: Registered protocol family 2
[    0.119453] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.119477] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.119496] TCP: Hash tables configured (established 1024 bind 1024)
[    0.119553] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.119575] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.119721] NET: Registered protocol family 1
[    0.119752] PCI: CLS 0 bytes, default 32
[    0.120526] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.120574] Crashlog allocated RAM at address 0x3f00000
[    0.135256] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.135271] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.137929] io scheduler noop registered
[    0.137942] io scheduler deadline registered (default)
[    0.139115] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.139680] irq: Cannot allocate irq_descs @ IRQ32, assuming pre-allocated
[    0.140028] irq: Cannot allocate irq_descs @ IRQ64, assuming pre-allocated
[    0.171415] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.174415] console [ttyS0] disabled
[    0.174488] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[    5.119232] console [ttyS0] enabled
[    5.162381] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[    5.238494] nand: Micron MT29F2G08AAD
[    5.282329] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    5.373059] Scanning device for bad blocks
[    5.454033] Bad eraseblock 419 at 0x000003460000
[    5.519901] Bad eraseblock 559 at 0x0000045e0000
[    5.621887] Bad eraseblock 1173 at 0x0000092a0000
[    5.716220] Bad eraseblock 1673 at 0x00000d120000
[    5.800960] 3 cmdlinepart partitions found on MTD device orion_nand
[    5.876041] Creating 3 MTD partitions on "orion_nand":
[    5.937603] 0x000000000000-0x000000100000 : "u-boot"
[    5.998811] 0x000000100000-0x000000500000 : "uImage"
[    6.059336] 0x000000500000-0x000010000000 : "rootfs"
[    6.120278] mtd: device 2 (rootfs) set to be root filesystem
[    6.188213] 1 squashfs-split partitions found on MTD device rootfs
[    6.262272] 0x000000680000-0x000010000000 : "rootfs_data"
[    6.329049] libphy: orion_mdio_bus: probed
[    6.378996] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    6.461773] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address XX:XX:XX:XX:XX:XX
[    6.566057] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.644223] ehci-pci: EHCI PCI platform driver
[    6.697508] ehci-platform: EHCI generic platform driver
[    6.760177] ehci-orion: EHCI orion driver
[    6.808326] orion-ehci f1050000.ehci: EHCI Host Controller
[    6.874033] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    6.965892] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[    7.047987] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    7.120612] hub 1-0:1.0: USB hub found
[    7.165629] hub 1-0:1.0: 1 port detected
[    7.213086] usbcore: registered new interface driver usb-storage
[    7.527984] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    7.760058] hub 1-1:1.0: USB hub found
[    7.805158] hub 1-1:1.0: 4 ports detected
[    8.127982] usb 1-1.4: new high-speed USB device number 3 using orion-ehci
[    8.287980] rtc-mv f1010300.rtc: internal RTC not ticking
[    8.352758] i2c /dev entries driver
[    8.395249] orion_wdt: Initial timeout 21 sec
[    8.450898] marvell-cesa f1030000.crypto: CESA device successfully registered
[    8.537465] NET: Registered protocol family 10
[    8.592449] NET: Registered protocol family 17
[    8.645724] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    8.796800] 8021q: 802.1Q VLAN Support v1.8
[    8.849884] hctosys: unable to open rtc device (rtc0)
[    8.916981] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    9.002045] Freeing unused kernel memory: 176K (c04a6000 - c04d2000)
[    9.582539] init: Console is alive
[    9.623437] init: - watchdog -
[    9.729026] init: - preinit -
[   10.143997] random: jshn: uninitialized urandom read (4 bytes read, 8 bits of entropy available)
[   10.310762] random: jshn: uninitialized urandom read (4 bytes read, 8 bits of entropy available)
[   10.438841] random: jshn: uninitialized urandom read (4 bytes read, 8 bits of entropy available)
[   10.567056] random: jshn: uninitialized urandom read (4 bytes read, 8 bits of entropy available)
[   10.692876] random: jshn: uninitialized urandom read (4 bytes read, 8 bits of entropy available)
[   10.818466] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   10.936268] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[   11.008362] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   11.093160] random: procd: uninitialized urandom read (4 bytes read, 9 bits of entropy available)
[   13.870808] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   13.988589] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   14.363970] mount_root: no usable overlay filesystem found, using tmpfs overlay
[   14.454441] urandom-seed: Seed file not found (/etc/urandom.seed)
[   14.584943] procd: - early -
[   14.619932] procd: - watchdog -
[   15.472683] procd: - ubus -
[   15.536734] random: ubusd: uninitialized urandom read (4 bytes read, 16 bits of entropy available)
[   15.645054] random: ubusd: uninitialized urandom read (4 bytes read, 16 bits of entropy available)
[   15.752747] random: ubusd: uninitialized urandom read (4 bytes read, 16 bits of entropy available)
[   15.860148] random: ubusd: uninitialized urandom read (4 bytes read, 16 bits of entropy available)
[   15.968530] procd: - init -
[   16.137412] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   16.208490] ip_tables: (C) 2000-2006 Netfilter Core Team
[   16.276239] nf_conntrack version 0.5.0 (1949 buckets, 7796 max)
[   16.365308] xt_time: kernel timezone is -0000
[   16.423909] PPP generic driver version 2.4.2
[   16.476664] NET: Registered protocol family 24
[   20.949029] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   21.389307] device eth0 entered promiscuous mode
[   21.559831] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   21.900430] br-lan: port 1(eth0) entered forwarding state
[   21.965168] br-lan: port 1(eth0) entered forwarding state
[   22.428470] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   23.958008] br-lan: port 1(eth0) entered forwarding state
[   24.984875] jffs2: notice: (1892) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   73.358011] random: nonblocking pool is initialized



root@LEDE:/rom/etc# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 0fb00000 00020000 "rootfs"
mtd3: 0f980000 00020000 "rootfs_data"



root@LEDE:/rom/etc# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 1536      1536         0 100% /rom
tmpfs                    62368       324     62044   1% /tmp
tmpfs                    62368        52     62316   0% /tmp/root
tmpfs                      512         0       512   0% /dev
/dev/mtdblock3          255488      6208    249280   2% /overlay
overlayfs:/overlay      255488      6208    249280   2% /
root@LEDE:/rom/etc#



Edited 1 time(s). Last edit at 06/17/2017 03:56PM by bodhi.
Menno K
LEDE on a dockstar device with now openwrt
June 10, 2017 06:50AM
For now i using a dockstar as WIFI accespoint with openwrt version 15.05 with the installation steps on https://wiki.openwrt.org/toh/seagate/dockstar with uboot version U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:34:27 -0700)

This works great but i can't upgrade this to a new version (upgrade tab is not availible). For security and safety i want to upgrade this to a new LEDE version. How can i do that because the lede version has no zimage , ubs and dtb files (and maybe also another partitioning format).

Can anybody give me the exact steps to upgrade this to a new lede version? Currently i have serial access on this device.

Thanks for your help!
Menno K
Re: LEDE on a dockstar device with now openwrt
June 10, 2017 07:19AM
Extra information:

root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 000e0000 00020000 "uboot"
mtd1: 00020000 00020000 "uboot_env"
mtd2: 00100000 00020000 "second_stage_uboot"
mtd3: 0fe00000 00020000 "root"

The available files from lede:

[F] lede-kirkwood-dockstar-initramfs-uImage
[F] lede-kirkwood-dockstar-squashfs-factory.bin
[F] lede-kirkwood-dockstar-squashfs-sysupgrade.tar
[F] lede-kirkwood-dockstar-uImage
Re: LEDE on a dockstar device with now openwrt
June 17, 2017 03:38AM
@Menno K
LEDE uses kernel and rootfs in UBI for kirkwoods now, so what you did won't work. (admittedly there is no documentation yet as the wiki is still under construction, and there is a re-merge underway, sorry for that)

The installation works by changing uboot settings (and also uboot because stock uboot can't boot from ubi, you seem to have bodhi's uboot, that's ok, it can boot LEDE too) booting a initramfs image and then doing a sysupgrade.

set the uboot like this (I've also double-checked your device's flash partitions from the dts patch in LEDE source here https://github.com/lede-project/source/tree/master/target/linux/kirkwood/patches-4.4 to make sure it was correct)

setenv mtdparts=mtdparts=orion_nand:0x0xe0000(uboot),0x100000(u-boot environment),0x0x200000(second stage u-boot),0x0xfe00000(ubi)
setenv bootargs_lede ''
setenv bootcmd 'run bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000'
setenv console=console=ttyS0,115200
setenv ethaddr 00:00:00:00:00 (put your mac address instead of the example one)
setenv mtdids=nand0=orion_nand
saveenv

If you want multiboot setup you can make a bootcmd_lede instead of changing the bootcmd, and append the bootcmd_lede to the bootcmd so that if it does not find debian or arch it will boot LEDE

setenv bootcmd run bootcmd_something; run bootcmd_something_else; run bootcmd_lede;

Then you download and place the lede-kirkwood-dockstar-initramfs-uImage on a USB flash drive formatted with FAT32 and insert it in the device then fro uboot write

usb reset; fatload usb 0 0x800000 lede-kirkwood-dockstar-initramfs-uImage; bootm 0x800000


Also tftp works fine, but don't flash that image, only bootm.

That file is a LEDE system image that runs from RAM, and you will only use that to do a sysupgrade as normal with lede-kirkwood-dockstar-squashfs-sysupgrade.tar. It will reformat flash if needed, deal with any bad blocks and so on.

@bodhi Could you move his post in that thread into this? It is not about the recovery. He is asking how to install current LEDE on his device.
Menno K
Re: LEDE on a dockstar device with now openwrt
June 18, 2017 04:01AM
Thanks for your help! I did the following things:

1. I upgrade the Uboot to most recent bodhi version
2. I set the new parameters to ( i change some things because the mtdparts string was in my opinion not correct):
setenv mtdparts mtdparts=orion_nand:0x0xe0000(uboot),0x100000(uboot_env),0x0x200000(second_stage_uboot),0x0xfe00000(ubi)
setenv bootargs_lede ''
setenv bootcmd 'run bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000'
setenv console=console=ttyS0,115200
setenv ethaddr 00:00:00:00:00
setenv mtdids=nand0=orion_nand
saveenv
3. I run the following code for starting the proces:
usb reset; fatload usb 0 0x800000 lede-kirkwood-dockstar-initramfs-uImage; bootm 0x800000
4. I logging to the ssh dockstar session and i put the following commands to the commandline:
cd /tmp
wget http://downloads.lede-project.org/releases/17.01.2/targets/kirkwood/generic/lede-17.01.2-kirkwood-dockstar-squashfs-sysupgrade.tar
sysupgrade lede-17.01.2-kirkwood-dockstar-squashfs-sysupgrade.tar

The dockstar restart and i get the following message from the serial connection:

U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:34:27 -0700)
Seagate FreeAgent DockStar

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
## Error: "bootargs_lede" not defined
ubi0: attaching mtd1
ubi0: scanning is finished
ubi0: attached mtd1 (name "mtd=3", size 254 MiB)
ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
ubi0: VID header offset: 512 (aligned 512), data offset: 2048
ubi0: good PEBs: 2028, bad PEBs: 4, corrupted PEBs: 0
ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 80                                                  4999891
ubi0: available PEBs: 0, total reserved PEBs: 2028, PEBs reserved for bad PEB ha                                                  ndling: 36
Read 0 bytes from volume kernel to 800000
No size specified -> Using max size (1935360)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   ARM LEDE Linux-4.4.71
   Created:      2017-06-08  21:02:37 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1808348 Bytes = 1.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

After +-10 seconds the dockstar restart again and again. What do i wrong?
Fixed!!

I forget to run (to save the new param):
setenv bootargs ${console} ${mtdparts}
saveenv
Extra information, the variable line of the mtd is not correct. The correct string is:
setenv mtdparts mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),0x100000@0x100000(second_stage_uboot),-@0x200000(ubi)

Also when you add the new partition layout you need to erase the ubi nand first before new install:
nand erase.part ubi

Thanks for your help it works perfect now. And i hope that this information can be used for the dockstar manual :)
Re: LEDE on a dockstar device with now openwrt
November 13, 2017 07:20AM
@bobafetthotmail
Do you have some hints for putting Lede on a POGO E02 nand containing bodhis latest uboot + envs?
specially for the part "mtdparts" in the uboot envs.
The procedure should be nearly the same like dockstar but in my case the log tells me from broken pipes...

what have i done, whats working and whats not:
* updated uboot to the latest uboot.2017.07-tld-1.pogo_e02.mtd0.kwb + uboot.2016.05-tld-1.environment.img
* pogo can boot from a stick debian or lede-17.01.4-kirkwood-pogo_e02-initramfs-uImage
Lede boots with your "usb reset; fatload usb 0 0x800000 lede-kirkwood-pogo_e02-initramfs-uImage; bootm 0x800000" from bootloader
* not working is the sysupgrade for flashing Lede into nand.


Update: now it works
i got it.....
If i would read more carefully i wouldnt spend hours....
that was the trick (missing):
setenv bootargs ${console} ${mtdparts}

# in my case:
setenv bootargs_lede setenv bootargs $console $mtdparts
Now i have my Pogo E02 running with latest LEDE17.01.04 - perfect!
maybe i do a install step by step manual if anyone is interested.

the correct envs for Pogo E02:
# bootenvs for Pogo E02 based on uboot.2016.05-tld-1.environment:

setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)' 
setenv partition 'nand0,0' 
setenv set_bootargs_lede 'setenv bootargs console=ttyS0,115200 $mtdparts'
setenv bootcmd_lede 'run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000'
setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_lede'
setenv bootcmd_exec 'if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi'
saveenv
nand erase.part ubi

# when you change/add a new partition layout you always need to erase the ubi nand first before new install:
nand erase.part ubi


the install log after booting the initramfs from USB :
PogoE02> printenv mtdparts
mtdparts=mtdparts=orion_nand:0x100000@0x0(uboot),-@0x100000(ubi)
PogoE02> usb reset; fatload usb 0 0x800000 lede-kirkwood-pogo_e02-initramfs-uImage; bootm 0x800000
resetting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
reading lede-kirkwood-pogo_e02-initramfs-uImage
3219150 bytes read in 190 ms (16.2 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   ARM LEDE Linux-4.4.92
   Created:      2017-10-17  17:46:20 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3219086 Bytes = 3.1 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0x831 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.92 (buildbot@builds-02.infra.lede-project.org) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3103-1b51a49) ) #0 Tue Oct 17 17:46:20 2017
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: Cloud Engines Pogoplug E02
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:0x100000@0x0(uboot),-@0x100000(ubi)
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 249548K/262144K available (4082K kernel code, 142K rwdata, 652K rodata, 5128K init, 201K bss, 12596K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc04a7db4   (4736 kB)
[    0.000000]       .init : 0xc04a8000 - 0xc09aa000   (5128 kB)
[    0.000000]       .data : 0xc09aa000 - 0xc09cdbc8   ( 143 kB)
[    0.000000]        .bss : 0xc09cdbc8 - 0xc0a0027c   ( 202 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000010] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000085] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[    0.090090] pid_max: default: 32768 minimum: 301
[    0.090206] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090226] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090790] CPU: Testing write buffer coherency: ok
[    0.091144] Setting up static identity map for 0x81e0 - 0x821c
[    0.091390] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.095961] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.095989] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.096075] pinctrl core: initialized pinctrl subsystem
[    0.097150] NET: Registered protocol family 16
[    0.097520] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.098240] cpuidle: using governor ladder
[    0.098569] Feroceon L2: Enabling L2
[    0.098614] Feroceon L2: Cache support initialised.
[    0.098889] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.116444] SCSI subsystem initialized
[    0.117162] usbcore: registered new interface driver usbfs
[    0.117239] usbcore: registered new interface driver hub
[    0.117306] usbcore: registered new device driver usb
[    0.118114] clocksource: Switched to clocksource orion_clocksource
[    0.118996] NET: Registered protocol family 2
[    0.119597] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.119633] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.119663] TCP: Hash tables configured (established 2048 bind 2048)
[    0.119720] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.119742] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.119887] NET: Registered protocol family 1
[    0.206109] Crashlog allocated RAM at address 0x3f00000
[    0.218667] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.218682] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.221356] io scheduler noop registered
[    0.221370] io scheduler deadline registered (default)
[    0.222573] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.223134] irq: Cannot allocate irq_descs @ IRQ32, assuming pre-allocated
[    0.223485] irq: Cannot allocate irq_descs @ IRQ64, assuming pre-allocated
[    0.254874] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.257853] console [ttyS0] disabled
[    0.257925] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[    0.706274] console [ttyS0] enabled
[    0.711455] nand: Could not find valid ONFI parameter page; aborting
[    0.717887] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    0.724301] nand: Hynix NAND 128MiB 3,3V 8-bit
[    0.728776] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.736383] Scanning device for bad blocks
[    0.848772] 2 cmdlinepart partitions found on MTD device orion_nand
[    0.855070] Creating 2 MTD partitions on "orion_nand":
[    0.860252] 0x000000000000-0x0000000e0000 : "uboot"
[    0.866852] 0x000000100000-0x000008000000 : "ubi"
[    0.873473] libphy: orion_mdio_bus: probed
[    0.878426] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    0.886548] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:25:31:04:98:ae
[    0.895362] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.901929] ehci-pci: EHCI PCI platform driver
[    0.906450] ehci-platform: EHCI generic platform driver
[    0.911843] ehci-orion: EHCI orion driver
[    0.916015] orion-ehci f1050000.ehci: EHCI Host Controller
[    0.921572] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    0.929402] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[    0.948131] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    0.954862] hub 1-0:1.0: USB hub found
[    0.958841] hub 1-0:1.0: 1 port detected
[    0.963226] usbcore: registered new interface driver usb-storage
[    1.278127] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    1.430201] hub 1-1:1.0: USB hub found
[    1.434295] hub 1-1:1.0: 4 ports detected
[    1.718124] usb 1-1.4: new high-speed USB device number 3 using orion-ehci
[    1.910761] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[    1.917430] scsi host0: usb-storage 1-1.4:1.0
[    1.978126] rtc-mv f1010300.rtc: internal RTC not ticking
[    1.983653] i2c /dev entries driver
[    1.987870] orion_wdt: Initial timeout 21 sec
[    1.995631] marvell-cesa f1030000.crypto: CESA device successfully registered
[    2.003880] NET: Registered protocol family 10
[    2.009907] NET: Registered protocol family 17
[    2.014419] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    2.027114] 8021q: 802.1Q VLAN Support v1.8
[    2.033425] UBI error: no valid UBI magic found inside mtd1
[    2.039064] hctosys: unable to open rtc device (rtc0)
[    2.060155] Freeing unused kernel memory: 5128K
[    2.096871] init: Console is alive
[    2.100489] init: - watchdog -
[    2.110048] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.117236] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.127175] init: - preinit -
[    2.201936] random: jshn: uninitialized urandom read (4 bytes read, 4 bits of entropy available)
[    2.235489] random: jshn: uninitialized urandom read (4 bytes read, 4 bits of entropy available)
[    2.267338] random: jshn: uninitialized urandom read (4 bytes read, 5 bits of entropy available)
[    2.299747] random: jshn: uninitialized urandom read (4 bytes read, 5 bits of entropy available)
[    2.329434] random: jshn: uninitialized urandom read (4 bytes read, 5 bits of entropy available)
[    2.358720] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[    2.368637] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[    2.375749] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    2.396856] random: procd: uninitialized urandom read (4 bytes read, 5 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
[    3.167506] scsi 0:0:0:0: Direct-Access     Storage  Xtreamer         1.00 PQ: 0 ANSI: 0 CCS
[    3.177834] sd 0:0:0:0: [sda] 30703616 512-byte logical blocks: (15.7 GB/14.6 GiB)
[    3.186065] sd 0:0:0:0: [sda] Write Protect is off
[    3.191562] sd 0:0:0:0: [sda] No Caching mode page found
[    3.196911] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    3.207227]  sda: sda1
[    3.212442] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    5.445879] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[    5.455807] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    5.506810] procd: - early -
[    5.510207] procd: - watchdog -
[    6.327316] procd: - watchdog -
[    6.330696] procd: - ubus -
[    6.337876] random: ubusd: uninitialized urandom read (4 bytes read, 22 bits of entropy available)
[    6.383867] random: ubusd: uninitialized urandom read (4 bytes read, 22 bits of entropy available)
[    6.393188] random: ubusd: uninitialized urandom read (4 bytes read, 22 bits of entropy available)
[    6.402247] random: ubusd: uninitialized urandom read (4 bytes read, 22 bits of entropy available)
[    6.412219] procd: - init -
Please press Enter to activate this console.
[    6.506631] kmodloader: loading kernel modules from /etc/modules.d/*
[    6.515233] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    6.526772] ip_tables: (C) 2000-2006 Netfilter Core Team
[    6.536243] nf_conntrack version 0.5.0 (3979 buckets, 15916 max)
[    6.559937] xt_time: kernel timezone is -0000
[    6.570698] PPP generic driver version 2.4.2
[    6.576509] NET: Registered protocol family 24
[    6.583884] kmodloader: done loading kernel modules from /etc/modules.d/*
[    9.759314] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[    9.793128] device eth0 entered promiscuous mode
[    9.821720] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   10.738700] br-lan: port 1(eth0) entered forwarding state
[   10.744175] br-lan: port 1(eth0) entered forwarding state
[   10.788193] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   12.738124] 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.4, r3560-79f57e422d)
    \________\/    -----------------------------------------------------------

=== 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.
--------------------------------------------------

thanks to all posters above

joerg_999



Edited 15 time(s). Last edit at 04/26/2018 03:43AM by joerg_999.
Re: LEDE on a dockstar device with now openwrt - Question
December 27, 2017 09:28AM
Hi,

is it possible to start the LEDE rescue system (for installing or upgrading LEDE) from USB instead of TFTP when using Bodhi's current uboot?
I have working netconsole, but no installed TFTP server.

thanks,
Dieter
Re: LEDE on a dockstar device with now openwrt - Question
December 30, 2017 06:22AM
I set these variables (ethaddr already set) on my dockstar:
setenv mtdids=nand0=orion_nand
setenv console 'console=ttyS0,115200'
setenv mtdparts mtdparts=orion_nand:0x0xe0000(uboot),0x100000(uboot_env),0x0x200000(second_stage_uboot),0x0xfe00000(ubi)
setenv bootargs_lede ''
setenv bootcmd 'run bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000'
setenv bootargs ${console} ${mtdparts}
saveenv
and then:
DockStar> nand erase.part ubi
nand erase.part ubi

NAND erase.part: partition size too small (0)
DockStar>
With the revised mtdparts definition it worked:
DockStar> setenv mtdparts mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),0x100000@0x100000(second_stage_uboot),-@0x200000(ubi)
setenv mtdparts mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),0x100000@0x100000(second_stage_uboot),-@0x200000(ubi)
DockStar> nand erase.part ubi
nand erase.part ubi

NAND erase.part: device 0 offset 0x200000, size 0xfe00000
Skipping bad block at  0x03200000
Erasing at 0xffe0000 -- 100% complete.
OK

...but the sysupgrade wont work:
root@LEDE:/tmp# wget http://downloads.lede-project.org/releases/17.01.4/targets/kirkwood/generic/lede-17.01.4-kirkwood-dockstar-squashfs-sysupgrade.tar
Downloading 'http://downloads.lede-project.org/releases/17.01.4/targets/kirkwood/generic/lede-17.01.4-kirkwood-dockstar-squashfs-sysupgrade.tar';
Connecting to 148.251.78.235:80
Writing to 'lede-17.01.4-kirkwood-dockstar-squashfs-sysupgrade.tar'
lede-17.01.4-kirkwoo 100% |*******************************|  3310k  0:00:00 ETA
Download completed (3389440 bytes)
root@LEDE:/tmp# sysupgrade lede-17.01.4-kirkwood-dockstar-squashfs-sysupgrade.tar
Image metadata not found
Cannot save config while running from ramdisk.
Are there more steps needed for a first time installation? I use bodhis lates uboot.



Edited 3 time(s). Last edit at 12/30/2017 06:57AM by edinger.
Re: LEDE on a dockstar device with now openwrt - Question
March 08, 2018 12:56PM
I also have bodhi's latest uboot on my dockstar and was able to boot the uImage from a usb flash drive. The sysupgrade said it was successful, but would not boot from nand until I changed this:
setenv bootargs_lede setenv bootargs $console $mtdparts
saveenv
I believe this is because bootargs was set differently by set_bootargs and bootcmd for a multiboot setup:
printenv set_bootargs
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
printenv bootcmd
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_lede
printenv bootcmd_lede
bootcmd_lede=run bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000
Re: LEDE on a dockstar device with now openwrt - Question
March 08, 2018 04:08PM
dexter is correct. The bootargs need to be reset in the bootcmd_lede.

setenv bootargs_lede setenv bootargs $console $mtdparts

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: LEDE on a dockstar device with now openwrt - Question
April 16, 2018 04:15PM
edinger Wrote:
-------------------------------------------------------
> ...but the sysupgrade wont work:

try over luci a normal sysupgrade like on a router and you will be happy

--joerg_999
Re: LEDE on a dockstar device with now openwrt - Question
March 03, 2019 11:10PM
Has anyone tried to install OpenWrt 18.06.2?
At least it starts, I took the instructions for LEDE 17 -

modified the u-boot params
boot from USB flash drive using the uImage,
then sysupgrade:ed to 18.06.4

worked like a charm.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: