Welcome! Log In Create A New Profile

Advanced

Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood

Posted by sambul14 
Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
January 30, 2016 04:02PM
@bodhi

I decided to update to the latest ArchLinux ARM on the DockStart, and try your latest Uboot and default env files with it. But...after flashing 2015.10 Uboot and the envs, neither Arch 3.6, no Arch 4.3, and neither original Pogo OS preserved on Flash are able to boot. Had to open the box and run serial. Here's what transpired:

a) with original Pogo on Flash:

U-Boot 2015.10-tld-1 (Nov 06 2015 - 15:56:21 -0800)
Seagate FreeAgent DockStar

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB (ECC not enabled)
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'

no USB devices available
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide
Unknown command 'ide' - try 'help'
device ide 0:1
** Bad device ide 0 **
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
Scan device mmc
Unknown command 'mmc' - try 'help'
device mmc 0:1
** Bad device mmc 0 **
device mmc 1:1
** Bad device mmc 1 **
device mmc 2:1
** Bad device mmc 2 **
device mmc 3:1
** Bad device mmc 3 **
loading uImage ...
** Bad device usb 0 **
loading uInitrd ...
** Bad device usb 0 **
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
DockStar>


b) with old Arch 3.6

U-Boot 2015.10-tld-1 (Nov 06 2015 - 15:56:21 -0800)
Seagate FreeAgent DockStar

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB (ECC not enabled)
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     62              4720578         000e136b-01     83 Boot
  2     4720640         2097152         000e136b-02     83
  3     6817792         524288          000e136b-03     82
  4     7342080         495616          000e136b-04     0b
loading envs from usb 0 ...
2813 bytes read in 161 ms (16.6 KiB/s)
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
importing envs ...
## Info: input data size = 10477 = 0x28ED
" (type: m)lags type check failure for "ethaddr" <= "00:10:75:1A:07:CA
" into hash tableinsert "ethaddr=00:10:75:1A:07:CA
" into hash tableinsert "stderr=nc
" into hash tableinsert "stdin=nc
" into hash tableinsert "stdout=nc
" (type: i)lags type check failure for "serverip" <= "192.168.1.173
" into hash tableinsert "serverip=192.168.1.173
" (type: i)lags type check failure for "ipaddr" <= "192.168.1.201
" into hash tableinsert "ipaddr=192.168.1.201
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 145 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
3158896 bytes read in 353 ms (8.5 MiB/s)
loading uInitrd ...
** File not found /boot/uInitrd **
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
** File not found /boot/dts/kirkwood-pogo_e02.dtb **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.6.4-1-ARCH
   Created:      2012-10-29  16:22:43 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3158832 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    2.778155] rtc-mv rtc-mv: internal RTC not ticking
[    2.785883] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    3.632757] sd 0:0:0:0: [sda] No Caching mode page present
[    3.638911] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    3.648257] sd 0:0:0:0: [sda] No Caching mode page present
[    3.653778] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    3.666000] sd 0:0:0:0: [sda] No Caching mode page present
[    3.671556] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   12.798540] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   12.806866] [<c000d074>] (unwind_backtrace+0x0/0xe0) from [<c04366c4>] (panic+0x80/0x1dc)
[   12.815090] [<c04366c4>] (panic+0x80/0x1dc) from [<c05c1cec>] (mount_block_root+0x234/0x284)
[   12.823569] [<c05c1cec>] (mount_block_root+0x234/0x284) from [<c05c1ff8>] (prepare_namespace+0x15c/0x1bc)
[   12.833185] [<c05c1ff8>] (prepare_namespace+0x15c/0x1bc) from [<c05c1974>] (kernel_init+0x1bc/0x1fc)
[   12.842359] [<c05c1974>] (kernel_init+0x1bc/0x1fc) from [<c0009588>] (kernel_thread_exit+0x0/0x8)


c) with latest Arch 4.3

U-Boot 2015.10-tld-1 (Nov 06 2015 - 15:56:21 -0800)
Seagate FreeAgent DockStar

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB (ECC not enabled)
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            5242880         c3072e18-01     83
  2     5244928         524288          c3072e18-02     82
  3     6817792         1091584         c3072e18-03     0b
  4     5769216         1048576         c3072e18-04     83
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **
Unknown command 'ide' - try 'help'
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 113 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4518104 bytes read in 327 ms (13.2 MiB/s)
loading uInitrd ...
** File not found /boot/uInitrd **
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
** File not found /boot/dts/kirkwood-pogo_e02.dtb **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.3.3-1-ARCH
   Created:      2015-12-18   5:16:49 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4518040 Bytes = 4.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.3.3-1-ARCH (builduser@leming) (gcc version 5.3.0 (GCC) ) #1 PREEMPT Thu Dec 17 22:16:31 MST 2015
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Seagate FreeAgent DockStar
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
[    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: 119828K/131072K available (6499K kernel code, 538K rwdata, 1852K rodata, 300K init, 725K bss, 11244K 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 - 0xff000000   ( 872 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0830080   (8353 kB)
[    0.000000]       .init : 0xc0831000 - 0xc087c000   ( 300 kB)
[    0.000000]       .data : 0xc087c000 - 0xc090283c   ( 539 kB)
[    0.000000]        .bss : 0xc090283c - 0xc09b7d78   ( 726 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:114
[    0.000013] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.364025] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.364211] Console: colour dummy device 80x30
[    0.364239] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[    0.454108] pid_max: default: 32768 minimum: 301
[    0.454198] Security Framework initialized
[    0.454269] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.454287] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.455006] Initializing cgroup subsys io
[    0.455051] Initializing cgroup subsys memory
[    0.455115] Initializing cgroup subsys devices
[    0.455143] Initializing cgroup subsys freezer
[    0.455165] Initializing cgroup subsys net_cls
[    0.455184] Initializing cgroup subsys bfqio
[    0.455204] Initializing cgroup subsys perf_event
[    0.455226] Initializing cgroup subsys net_prio
[    0.455303] CPU: Testing write buffer coherency: ok
[    0.455748] Setting up static identity map for 0x81e0 - 0x8238
[    0.457608] devtmpfs: initialized
[    0.459942] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.460372] pinctrl core: initialized pinctrl subsystem
[    0.461151] NET: Registered protocol family 16
[    0.461619] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.484114] cpuidle: using governor ladder
[    0.514111] cpuidle: using governor menu
[    0.514273] Kirkwood: MV88F6281-A0, TCLK=200000000.
[    0.514298] Feroceon L2: Enabling L2
[    0.514337] Feroceon L2: Cache support initialised.
[    0.555631] vgaarb: loaded
[    0.555966] SCSI subsystem initialized
[    0.556478] usbcore: registered new interface driver usbfs
[    0.556555] usbcore: registered new interface driver hub
[    0.556616] usbcore: registered new device driver usb
[    0.556788] pps_core: LinuxPPS API ver. 1 registered
[    0.556798] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.556832] PTP clock support registered
[    0.557890] clocksource: Switched to clocksource orion_clocksource
[    0.596600] FS-Cache: Loaded
[    0.609740] NET: Registered protocol family 2
[    0.610537] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.610562] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.610582] TCP: Hash tables configured (established 1024 bind 1024)
[    0.610654] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.610677] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.610866] NET: Registered protocol family 1
[    0.611185] RPC: Registered named UNIX socket transport module.
[    0.611198] RPC: Registered udp transport module.
[    0.611205] RPC: Registered tcp transport module.
[    0.611212] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.613257] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.625901] VFS: Disk quotas dquot_6.6.0
[    0.626169] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.628304] FS-Cache: Netfs 'nfs' registered for caching
[    0.629212] NFS: Registering the id_resolver key type
[    0.629261] Key type id_resolver registered
[    0.629270] Key type id_legacy registered
[    0.629355] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.630443] fuse init (API version 7.23)
[    0.632776] aufs 4.3-20151116
[    0.638254] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.638278] io scheduler noop registered
[    0.638294] io scheduler deadline registered
[    0.638569] io scheduler cfq registered
[    0.639009] io scheduler bfq registered (default)
[    0.639018] BFQ I/O-scheduler: v7r8
[    0.639208] mv_xor mv_xor.0: Marvell shared XOR driver
[    0.679078] mv_xor mv_xor.0: Marvell XOR (Registers Mode): ( xor cpy )
[    0.679318] mv_xor mv_xor.1: Marvell shared XOR driver
[    0.719114] mv_xor mv_xor.1: Marvell XOR (Registers Mode): ( xor cpy )
[    0.724672] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.725779] console [ttyS0] disabled
[    0.745889] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33, base_baud = 12500000) is a 16550A
[    1.305136] console [ttyS0] enabled
[    1.323730] brd: module loaded
[    1.333917] loop: module loaded
[    1.338029] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xdc
[    1.344409] nand: Samsung NAND 512MiB 3,3V 8-bit
[    1.349093] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.356707] Scanning device for bad blocks
[    1.396051] Bad eraseblock 461 at 0x0000039a0000
[    1.560177] Bad eraseblock 2553 at 0x000013f20000
[    1.613121] Bad eraseblock 3186 at 0x000018e40000
[    1.628194] Bad eraseblock 3322 at 0x000019f40000
[    1.677342] Bad eraseblock 3905 at 0x00001e820000
[    1.696588] 4 cmdlinepart partitions found on MTD device orion_nand
[    1.702896] Creating 4 MTD partitions on "orion_nand":
[    1.708081] 0x000000000000-0x000000100000 : "u-boot"
[    1.713563] 0x000000100000-0x000000500000 : "uImage"
[    1.719027] 0x000000500000-0x000002500000 : "rootfs"
[    1.724500] 0x000002500000-0x000020000000 : "data"
[    1.737255] libphy: orion_mdio_bus: probed
[    1.741520] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    2.828823] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 52:3b:20:9c:11:51
[    2.837768] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.844364] ehci-pci: EHCI PCI platform driver
[    2.848910] ehci-orion: EHCI orion driver
[    2.853011] orion-ehci orion-ehci.0: EHCI Host Controller
[    2.858486] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[    2.866238] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[    2.887920] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[    2.894826] hub 1-0:1.0: USB hub found
[    2.898680] hub 1-0:1.0: 1 port detected
[    2.903230] usbcore: registered new interface driver uas
[    2.908759] usbcore: registered new interface driver usb-storage
[    2.914850] usbcore: registered new interface driver ums-alauda
[    2.920898] usbcore: registered new interface driver ums-cypress
[    2.926994] usbcore: registered new interface driver ums-datafab
[    2.933107] usbcore: registered new interface driver ums_eneub6250
[    2.939390] usbcore: registered new interface driver ums-freecom
[    2.945481] usbcore: registered new interface driver ums-isd200
[    2.951503] usbcore: registered new interface driver ums-jumpshot
[    2.957680] usbcore: registered new interface driver ums-karma
[    2.963615] usbcore: registered new interface driver ums-onetouch
[    2.969826] usbcore: registered new interface driver ums-realtek
[    2.975915] usbcore: registered new interface driver ums-sddr09
[    2.981935] usbcore: registered new interface driver ums-sddr55
[    2.987952] usbcore: registered new interface driver ums-usbat
[    2.994249] mousedev: PS/2 mouse device common for all mice
[    3.217921] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    3.370492] hub 1-1:1.0: USB hub found
[    3.374623] hub 1-1:1.0: 4 ports detected
[    3.657916] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[    3.771031] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[    3.777644] scsi host0: usb-storage 1-1.2:1.0
[    4.007913] rtc-mv rtc-mv: internal RTC not ticking
[    4.012965] i2c /dev entries driver
[    4.017102] sdhci: Secure Digital Host Controller Interface driver
[    4.023334] sdhci: Copyright(c) Pierre Ossman
[    4.027780] sdhci-pltfm: SDHCI platform and OF driver helper
[    4.034036] ledtrig-cpu: registered to indicate activity on CPUs
[    4.040256] usbcore: registered new interface driver r8712u
[    4.046099] gre: GRE over IPv4 demultiplexor driver
[    4.051071] NET: Registered protocol family 17
[    4.055659] Key type dns_resolver registered
[    4.061016] registered taskstats version 1
[    4.066939] Key type encrypted registered
[    4.071598] console [netcon0] enabled
[    4.075278] netconsole: network logging started
[    4.079984] hctosys: unable to open rtc device (rtc0)
[    4.086162] Waiting 10 sec before mounting root device...
[    5.008349] scsi 0:0:0:0: Direct-Access     JetFlash Transcend 4GB    1100 PQ: 0 ANSI: 4
[    5.017793] sd 0:0:0:0: [sda] 7909376 512-byte logical blocks: (4.04 GB/3.77 GiB)
[    5.025501] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    5.031540] sd 0:0:0:0: [sda] Write Protect is off
[    5.037104] sd 0:0:0:0: [sda] No Caching mode page found
[    5.042502] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    5.053894]  sda: sda1 sda2 sda3 sda4
[    5.061280] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   14.098153] VFS: Cannot open root device "LABEL=rootfs" or unknown-block(0,0): error -6
[   14.106191] Please append a correct "root=" boot option; here are the available partitions:
[   14.114669] 0100            8192 ram0  (driver?)
[   14.119364] 0101            8192 ram1  (driver?)
[   14.124009] 0102            8192 ram2  (driver?)
[   14.128697] 0103            8192 ram3  (driver?)
[   14.133339] 0104            8192 ram4  (driver?)
[   14.138024] 0105            8192 ram5  (driver?)
[   14.142670] 0106            8192 ram6  (driver?)
[   14.147317] 0107            8192 ram7  (driver?)
[   14.151984] 0108            8192 ram8  (driver?)
[   14.156631] 0109            8192 ram9  (driver?)
[   14.161296] 010a            8192 ram10  (driver?)
[   14.166031] 010b            8192 ram11  (driver?)
[   14.170784] 010c            8192 ram12  (driver?)
[   14.175517] 010d            8192 ram13  (driver?)
[   14.180271] 010e            8192 ram14  (driver?)
[   14.185006] 010f            8192 ram15  (driver?)
[   14.189762] 0800         3954688 sda  driver: sd
[   14.194404]   0801         2621440 sda1 c3072e18-01
[   14.199333]   0802          262144 sda2 c3072e18-02
[   14.204240]   0803          545792 sda3 c3072e18-03
[   14.209169]   0804          524288 sda4 c3072e18-04
[   14.214078] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   14.222379] CPU: 0 PID: 1 Comm: swapper Not tainted 4.3.3-1-ARCH #1
[   14.228671] Hardware name: Seagate FreeAgent DockStar
[   14.233764] [<c00105a8>] (unwind_backtrace) from [<c000da2c>] (show_stack+0x10/0x14)
[   14.241558] [<c000da2c>] (show_stack) from [<c00c9504>] (panic+0x88/0x200)
[   14.248468] [<c00c9504>] (panic) from [<c08322d4>] (mount_block_root+0x1a4/0x260)
[   14.255989] [<c08322d4>] (mount_block_root) from [<c083257c>] (mount_root+0xf0/0x11c)
[   14.263854] [<c083257c>] (mount_root) from [<c0832704>] (prepare_namespace+0x15c/0x1bc)
[   14.271895] [<c0832704>] (prepare_namespace) from [<c0831ebc>] (kernel_init_freeable+0x20c/0x25c)
[   14.280812] [<c0831ebc>] (kernel_init_freeable) from [<c062edc4>] (kernel_init+0x8/0xec)
[   14.288944] [<c062edc4>] (kernel_init) from [<c000a4d0>] (ret_from_fork+0x14/0x24)
[   14.296546] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   74.767912] random: nonblocking pool is initialized


The above shows that your default env doesn't work with Arch. Is DTB file required for Arch 4.3, and where to get it? Pls consider adding a separate section or thread about installing your Uboot for Arch, and adjusting default env respectively. Also important to explain how to preserve original Pogo recovery on Flash in this scenario, and add corresponding evns.

Re the above printout, what should I change to boot each of the above OSs?

----
moderator edit: made this its own thread.



Edited 5 time(s). Last edit at 01/30/2016 05:05PM by bodhi.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
January 30, 2016 05:01PM
sambul14,

> I decided to update to the latest ArchLinux ARM on
> the DockStart, and try your latest Uboot and
> default env files with it. But...after flashing
> 2015.10 Uboot and the envs, neither Arch 3.6, no
> Arch 4.3, and neither original Pogo OS preserved
> on Flash are able to boot.
>

Or course it does not work out of the box! because Arch uses a different convention for the location for the DTB. Don't ask me why :)

> a) with original Pogo on Flash:

This needs to have the correct envs to boot stock OS.

> b) with old Arch 3.6

Don't know about this version if it is FDT. Looks under boot to see if there is a device tree folder.

> c) with latest Arch 4.3

Interrupt serial console and:

setenv dtb_file /boot/dtbs/kirkwood-pogo_e02.dtb
boot

--------------
I've moved this to a new thread for issue booting Arch with my released u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 3 time(s). Last edit at 01/30/2016 05:09PM by bodhi.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
January 30, 2016 06:54PM
@bodhi

Sorry I was thinking my post was deleted. Meaning that my DockStar which is already toasty due to rubber insulator to protect USB cable instead of a normal CPU heatsink now becomes real toast ready to go. :) Btw, do you know any examples of placing a normal cooper heatsink on that CPU? Any drawbacks?

>Interrupt serial console and...

There's no DTB folder in Boot neither in Arch 3.6, no in 4.3. Arch 3.6 always booted without DTB. For 4.3, may be its supposed to be installed by Mainline Uboot installer that comes with Arch? I just unpacked Arch 4.3 tar to a USB thumb's 1st partition in a Linux Mint VM, as its much faster and always worked for me.

Where can I get this kirkwood-pogo_e02.dtb, and should it be renamed to kirkwood-dockstar.dtb or such?

What's the difference btw your Uboot version and the Mainline Uboot that's distributed on ArchLinux ARM site?



Edited 4 time(s). Last edit at 01/30/2016 07:15PM by sambul14.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
January 30, 2016 07:19PM
sambul14,

Ah! I forgot about the fact that Arch rootfs has no uInitrd, so the label rootfs can not be used.

With either 3.6 or 4.3 Arch rootfs. Boot, interrupt serial console and:

setenv dtb_file
setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts $custom_params'
boot

> What's the difference btw your Uboot version and
> that Mainline Uboot that's distributed on
> ArchLinux ARM site?

Most of the features are identical. The differences are:

1. my u-boot image supports jffs2 file system, which is what stock OS uses. And the installation procedure leaves stock OS intact. So you can boot back to stock.
2. Various additional minor features such as: usb_ready_retry env which help in USB HDD drives spin up.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
January 30, 2016 08:13PM
Now I'm in :), but no network. The adapter is recognized. May be Uboot env should enable DHCP or systemd services somehow? I added IP and Mac addresses in Uboot env, no joy. Btw, Mac is impossible to change in Linux after your default Uboot envs are flashed, had to do it in serial console.

[FAILED] Failed to start Login Service.
See 'systemctl status systemd-logind.service' for details.
[  OK  ] Started Permit User Sessions.
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Stopped Network Service.
         Starting Network Service...
[  OK  ] Stopped Login Service.
         Starting Login Service...
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Reached target Login Prompts.
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[  OK  ] Started Login Service.
[  OK  ] Stopped Network Service.
         Starting Network Service...
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[  OK  ] Stopped Network Service.
         Starting Network Service...
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[  OK  ] Stopped Network Service.
         Starting Network Service...
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[  OK  ] Stopped Network Service.
[FAILED] Failed to start Network Service.
See 'systemctl status systemd-networkd.service' for details.
[  OK  ] Reached target Network.
         Starting Network Name Resolution...
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
[  OK  ] Stopped Network Name Resolution.
         Starting Network Name Resolution...
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
[  OK  ] Stopped Network Name Resolution.
         Starting Network Name Resolution...
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
[  OK  ] Stopped Network Name Resolution.
         Starting Network Name Resolution...
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
[  OK  ] Stopped Network Name Resolution.
         Starting Network Name Resolution...
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
[  OK  ] Stopped Network Name Resolution.
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.

And with your above env mode, automatic multiboot will no longer work - correct?

What will happen with current envs, if I upgrade to Mainline Uboot now via Serial? It looksl the envs will be auto erased by that Uboot installer, and replaced with its own default envs?

Can I import my own envs file and how? How to make the envs img file, similar to yours default envs img?

This post says ArchLinux ARM also has DTB, but... it wasn't installed with the latest Arch distro??? Should I install Linux-kirkwood-dt package to enable DTB in Arch? Then your Uboot version should work OK without editing envs?

Can your Uboot enable CPU frequency scaling, or its not relevant to Uboot, and only starts after Linux launch controlled by the cpupower utils? It would be nice to have it running on the hot DockStar, but this feature probably requires modding DockStar DTB file to get enabled by Uboot? Is it available in Debian?



Edited 8 time(s). Last edit at 01/31/2016 10:46AM by sambul14.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
January 31, 2016 08:55AM
> May be Uboot env should enable DHCP or systemd services somehow? I added IP and Mac addresses in Uboot env, no joy

The only relevant env for network that u-boot "pass" to Linux is the MAC address. If the MAC address is valid, then you should look in your Arch rootfs to find problem with DHCP.

> And with your above env mode, automatic multiboot
> will no longer work - correct?

Not sure I understand the question.

>
> What will happen with current envs, if I upgrade
> to Mainline Uboot now via Serial? It looksl the
> envs will be auto erased by that Uboot installer,
> and replaced with its own default envs?
>

Yes

> Linux-kirkwood-dt package to
> enable DTB in Arch? Then your Uboot version should
> work OK without editing envs?

No. You still need to fix the DTB location and rootfs in bootargs in the envs.

> CPU frequency scaling

Not relevant in u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 01/31/2016 09:26AM by bodhi.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
January 31, 2016 10:40AM
bodhi Wrote:
-------------------------------------------------------

> Arch rootfs has
> no uInitrd, so the label rootfs can not be used.
>
> With either 3.6 or 4.3 Arch rootfs. Boot,
> interrupt serial console and:
>
>
> setenv dtb_file
> setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts $custom_params'
> boot
>

So your multiboot scanning script won't work after this correction? How to make it work, if several multi-partitioned USB and Sata drives are simultaneously attached to DockStar?

How to make own envs.img, so it can be flashed to NAND at once instead of entering line by line at Linux or Uboot prompt?



Edited 3 time(s). Last edit at 01/31/2016 10:50AM by sambul14.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
January 31, 2016 11:54AM
> So your multiboot scanning script won't work after this
> correction? How to make it work, if several
> multi-partitioned USB and Sata drives are
> simultaneously attached to DockStar?
>

True. For Debian there is no problem with using the rootfs label. The problem is with Arch rootfs out of the box.

You will need to either:

- Add initrd to Arch rootfs for booting with rootfs label, or
- Use PARTUUID for root device (this requires your disk to be GPT, and I would not recommend using this approach, it is not a robust method).

to make the multi-partition configuration booting works in any u-boot. So I would suggest go to Arch site and find the instruction about how add initrd to Arch rootfs.

> How to make own envs.img, so it can be flashed to
> NAND at once instead of entering line by line at
> Linux or Uboot prompt?

I would suggest using uEnv.txt to change u-boot envs first. After everything work, you can save them while in serial console. Also, another alternative is If you don't want to type in one-by-one then just put them in a text file and then copy/paste to Linux command line.

Don't need to do the env image generation, it is way overkill for your purpose.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
January 31, 2016 02:46PM
It looks like ArchLinux 4.3 introduced using initramfs-kirkwood.img at boot instead of initrd. It caused similar network access issues for other users. I'm getting:

[root@alarm mkinitcpio.d]# dmesg

[29.579634] MV-CESA:Could not register sha1 driver
[29.590677] MV-CESA:Could not register hmac-sha1 driver

May be this causes the network problems? I wonder whether initramfs-kirkwood.img should be referred to in Uboot envs, and how? Current Arch Uboot uses zImage to boot OS, and the .env is binary, so may be it refers to initramfs inside the binary file?

EDIT:
I enabled the network manually in Serial Console with commands below, but the puzzle remains, how to do it at boot?

ip link set eth0 up
dhcpcd eth0



Edited 6 time(s). Last edit at 01/31/2016 04:00PM by sambul14.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
January 31, 2016 03:25PM
sambul14,

> [29.579634] MV-CESA:Could not register sha1
> driver
> [29.590677] MV-CESA:Could not register hmac-sha1
> driver
> May be this causes the network problems?

No, it is not related. You can safely ignore these erorrs.

> I enabled the network manually with commands
> below, but the puzzle remains, how to do it at
> boot?
>
>
> ip link set eth0 up
> dhcpcd eth0
>

I think this question is best to ask at Arch site. They are using systemd, and we are using sysvinit in the latest rootfs (with which there is no network problem).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
January 31, 2016 05:38PM
I reflashed Uboot to corresponding ArchLinux ARM site version, updated install with pacman -Syu, but the same network problem persists.



Edited 2 time(s). Last edit at 01/31/2016 07:20PM by sambul14.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
January 31, 2016 06:30PM
sambul14 Wrote:
-------------------------------------------------------
> I reflashed Uboot to corresponding ArchLinux ARM
> site version, and the same network problem
> persists.

Of course, as I've said above, it is not u-boot related.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 05, 2016 09:41AM
@bodhi

You were right. The default dir "/" ownership was changed to Alarm in the distro. No way to decipher the failure cause from systemd logs. I finally fixed it as root with commands:

chown root /
chmod 755 /

> I think this question is best to ask at Arch site.

Lets hope questions are constructively answered there, and reported issues fixed. My assumption was, any distro in the official repo is tested before offering it to users. One can't miss such critical issue as lack of network access, because it bricks user devices since default Arch Uboot doesn't boot anymore to original Pogo OS on flash for recovery.



Edited 8 time(s). Last edit at 02/05/2016 12:55PM by sambul14.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 05, 2016 12:58PM
sambul14,

> Arch Uboot
> doesn't boot anymore to original Pogo OS on flash
> for recovery.

You can still set it up if you want to. Find the relevant links from our users TEN and restamp here in this forum. TEN did boot Arch with my u-boot image. To do this, you need a good Docksta/Pogo E02 stock NAND mtds images that somebody has installed Jeff's u-boot before.

You can't use Arch u-boot to boot stock, iirc.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 02/05/2016 02:31PM by bodhi.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 05, 2016 02:25PM
sambul14,

> Lets hope questions are constructively answered
> there, and reported issues fixed. My assumption
> was, any distro in the official repo is tested
> before offering it to users. One can't miss such
> critical issue as lack of network access, because
> it bricks user devices,

Let me also give you a constructive criticism :) never assume that some distro (e.g. Arch, or mine) isntallation has problem. Usually it's been tested pretty thorougly. So you should assume that you did make some mistake first, and then find out what's wrong.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 02/05/2016 02:26PM by bodhi.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 05, 2016 04:26PM
Assuming you have a DockStar box, you could install Arch distro yourself, and then we'd both assume you did something wrong because it won't let you in via SSH. :)I(: I was a bit busy with other things for a couple of years and needed some refresh, but I catch up fast.



Edited 8 time(s). Last edit at 02/05/2016 05:08PM by sambul14.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 05, 2016 05:43PM
sambul14,

>I finally
> fixed it as root with commands:
>
>
> chown root /
> chmod 755 /
>

A very common mistake: not being root while extracting the rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 06, 2016 12:45PM
@bodhi

> A very common mistake: not being root while extracting the rootfs.

Xmm... I extracted the rootfs as root (sudo su) in a Linux VM on a Windows PC, since a user wouldn't have write access to the disk selected. Its faster and makes more sense than downloading and extracting the tarball on a hardware challenged DockStar. Anyway my username in the VM is different from Alarm. I didn't chroot into the extracted rootfs to do any changes or checkups (may be I should). Are you implying that extracting the archive in a VM resulted in Arch / dir owned by Alarm? If yes - why, and where this username came from? Or / was captured by Alarm at connecting the thumb to DockStar? :)


> you need a good Dockstar/Pogo E02 stock NAND mtds images that somebody has installed Jeff's u-boot before.
> You can't use Arch u-boot to boot stock


Are you saying that Arch Uboot overwritten Pogo stock NAND mtds images at install, and they're no longer available? If I restore these images, then Arch Uboot will be overwritten, so I need to use your Uboot version instead?

How about Recovery Environment - is it different on this and Arch sites, and therefore Uboot version dependent?

Can you Uboot version start ArchLinux ARM kirkwood-dt kernel? It has an advantage of controlling CPU usage at idle.


> I've pushed new versions for NSA3xx to u-boot-kirkwood

With Arch current Uboot I'm not getting Netconsole Uboot output, but only kernel output. All Netconsole related commands are removed from its default env. I tried adding usual Netconsole envs to no avail. It appears the bootloader image may have Uboot Netconsole disabled. Can you suggest how to check and enable it, does it require recompiling Uboot? I'm not familiar with its sources to easily find the right settings and variables. Pls don't suggest to "ask on the other site", I'm aware of this option. This is my device, so I want to use Netconsole at boot.

[  802.082540] shutdown[1]: Detaching loop devices.
[  802.093791] shutdown[1]: All loop devices detached.
[  802.098748] shutdown[1]: Detaching DM devices.
[  802.103852] shutdown[1]: All DM devices detached.
[  802.110263] shutdown[1]: Rebooting.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.1-1-ARCH (builduser@leming) (gcc version 5.3.0 (GCC) ) #1 PREEMPT Tue Feb 2 07:05:54 MST 2016



Edited 10 time(s). Last edit at 02/06/2016 01:40PM by sambul14.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 06, 2016 02:54PM
sambul14,

> Xmm... I extracted the rootfs as root (sudo su) in
> a Linux VM on a Windows PC

I don't believe that you were root while extracting the rootfs. I could download Arch rootfs and see for myself :). But why don't you try again? It would be helpful to your sanity to go through the exercise exactly as the instruction stated (dont' do something that you think is equivalent, this is where mistakes are made most of the time).

This time make sure that you are logged in as root (sudo will not work).
whoami
Then extract with a tar command (no sudo, you are root)
tar xf .......

> Are you saying that Arch Uboot overwritten Pogo
> stock NAND mtds images at install, and they're no
> longer available?

Arch u-boot installation left the other mtds intact, just mtd0 is written. However, the rootfs mtd somehow has error after installation (according to our member TEN).

> If I restore these images, then
> Arch Uboot will be overwritten,

No need to restore mtd0, so no.

> so I need to use
> your Uboot version instead?
>

To load stock OS, u-boot needs to support jffs2. But, IIRC, Arch u-boot build does not have jffs2. I believe it was a concious decision made by Arch devs, not an oversight.

> How about Recovery Environment - is it different
> on this and Arch sites, and therefore Uboot
> version dependent?
>

Not version dependent, but modification to u-boot envs is needed to boot any rescue system (except when it was already taken care of by the u-boot author).

> Can you Uboot version start ArchLinux ARM
> kirkwood-dt kernel? It has an advantage of
> controlling CPU usage at idle.
>

Sure, it can boot most Linux distro that can run on these plugs. Again, u-boot envs need modification to do that.

> Can you suggest
> how to check and enable it, does it require
> recompiling Uboot?

The sure way to check for netconsole is set it up (add u-boot envs), and start connect serial console to watch it. Or if serial console is not available, use wireshark to monitor the netconsole output.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 06, 2016 03:19PM
@bodhi

Thanks for your prompt and accurate replies that tend to be "constructive". :) Anyway, user Alarm is not registered in my Linux VM, so it shouldn't capture "/" no matter whether the tarball was unpacked by root or another user under sudo su. Not sure if this Ubuntu distro even allows to login as root.

Here's what I had before installing Arch Uboot:

dev:    size        erasesize   name    (original Pogo)
mtd0: 00100000 00020000 "u-boot" 
mtd1: 00400000 00020000 "uImage" 
mtd2: 02000000 00020000 "rootfs" 
mtd3: 1db00000 00020000 "data"

and after:

dev:    size        erasesize  name   (Arch Uboot)
mtd0: 00100000 00020000 "u-boot"
mtd1: 1ff00000 00020000 "rootfs"
# no mtd2 and mtd3

That seems to mean the entire NAND was completely overwritten, probably with zImage.

My serial output shows Uboot messages, but Netconsole doesn't, so despite I added netconsole=on and all "missing" envs and commands, it appears disabled in Uboot in contrast with this: "Arch Linux ARM carries forward the Arch Linux philosophy of simplicity and user-centrism, targeting and accommodating competent Linux users by giving them complete control and responsibility over the system."

Do you know if current DockStar Uboot from the ArcLinux ARM repo is the same as Uboot 2015.10 released by moonman? If not, where to download moonman's Uboot version (not sources)? what are the differences btw Arch's and moonman's, yours and moonman's Uboot versions?

Does your Uboot version have Uboot Netconsole enabled?

Is it possible to temporary comment out envs with "#" or similar sign instead of deleting them?



Edited 11 time(s). Last edit at 02/06/2016 05:58PM by sambul14.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 06, 2016 04:58PM
sambul14,

In Ubuntu, you can become root with su.

> dev: size erasesize name (Arch
> Uboot)
> mtd0: 00100000 00020000 "u-boot"
> mtd1: 1ff00000 00020000 "rootfs"
> # no mtd2 and mtd3
>
> That seems to mean the entire NAND was completely
> overwritten, probably with zImage.

No. The mtds content are still the same, until you use it with the new definition. The Arch installation did not overwrite anything other than mtd0, last time I looked. Redefining mtd parts does not touch them in anyway until you actually access them.

Arch zImage resides in the external rootfs, not in NAND. But it is all academic, we knew that the rootfs mtd is messed up, so regardless what happened, you need to restore stock OS (i.e. restore mtd1 and mtd2), if you want to boot stock.

> Do you know if current DockStar Uboot from the
> ArcLinux ARM repo is the same as
> released by
> moonman? If not, where to download
> moonman's Uboot version (not sources)?

I don't know the answer.

> what are
> the differences btw Arch's and moonman's, yours
> and moonman's Uboot versions?

Somewhere in the forum I wrote about the differences.

> Does your Uboot version have Uboot Netconsole
> enabled?

Yes.

> Is it possible to temporary comment out envs with
> "#" or similar sign instead of deleting them?

No. Testing various u-boot envs settings should be done in serial console and not save them until they are correct.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 07, 2016 11:20AM
Apparently, Arch Uboot is now updated via repo.

root@alarm etc# pacman -S uboot-dockstar
warning: uboot-dockstar-2015.10-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) uboot-dockstar-2015.10-1

Total Installed Size:  0.63 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) reinstalling uboot-dockstar                  [######################] 100%
A new U-Boot version needs to be flashed to NAND.
Do you want to do this now? [y|N]
y
Erasing 128 Kibyte @ 60000 -- 100 % complete
Erasing 128 Kibyte @ c0000 -- 100 % complete
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 6 at offset 0xc0000
root@alarm ~#

> you need a good Dockstar/Pogo E02 stock NAND mtds images that somebody has installed Jeff's u-boot before.

Did you mean that download link? Its dead... These links are still alive.



Edited 3 time(s). Last edit at 02/07/2016 05:31PM by sambul14.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 08, 2016 07:41AM
After replacing bodhi's Uboot version with moonman's Arch Uboot 2015.10, I'm having a problem with Netconsole. If its up on a PC, Serial Console doesn't show up the wait prompt at boot and Uboot initial output, and neither Netconsole. Its also impossible to interrupt the process and send commands neither in Serial, no in Netconsole. I used ASUC and Netcat in Windows, and Netcat in Ubuntu VM with the same result, despite the VM has a separate IP, and firewalls are off. On a PC I can see only kernel output. All Netconsole settings are correct, I only changed server IPs to one local to direct Uboot and kernel outputs to the same console.

I guess, may be log level is set to minimal in Uboot if server IP is up? Is there a way to set Uboot log level to max? Or what should I look at to fix that? Now I can see Uboot Serial wait prompt only if disable PC network adapter.

Envs

ipaddr=192.168.2.29
ncip=192.168.2.27
ncipk=192.168.2.27

Serial Console output:

U-Boot 2015.10-1 (Nov 28 2015 - 01:53:40 -0700) Arch Linux ARM
    Seagate FreeAgent DockStar

    SoC:   Kirkwood 88F6281_A0
    DRAM:  128 MiB (ECC not enabled)
    WARNING: Caches not enabled
    NAND:  512 MiB
    In:    serial
    Out:   serial
    Err:   serial
    Net:   egiga0
    88E1116 Initialized on egiga0
    Using egiga0 device
    host 192.168.2.27 is alive
    Uncompressing Linux... done, booting the kernel.
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpuset
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 4.4.1-1-ARCH (builduser@leming) (gcc version 5.3.0 (GCC) ) #1 PREEMPT Tue Feb 2 07:07:27 MST 2016
    [    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] debug: ignoring loglevel setting.
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] On node 0 totalpages: 32768
    [    0.000000] free_area_init_node: node 0, pgdat c0927b8c, node_mem_map c7ed9000
    [    0.000000]   Normal zone: 288 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: 32480

Ubuntu Netconsole output:

[  186.975003] EXT4-fs (sda1): re-mounted. Opts: data=ordered
    [  186.980640] shutdown[1]: Unmounting /oldroot.
    [  187.042987] shutdown[1]: Remounting '/' read-only with options 'mode=755'.
    [  187.050682] shutdown[1]: Remounting '/' read-only with options 'mode=755'.
    [  187.057838] shutdown[1]: All filesystems unmounted.
    [  187.062880] shutdown[1]: Deactivating swaps.
    [  187.067506] shutdown[1]: All swaps deactivated.
    [  187.072403] shutdown[1]: Detaching loop devices.
    [  187.083766] shutdown[1]: All loop devices detached.
    [  187.088734] shutdown[1]: Detaching DM devices.
    [  187.093824] shutdown[1]: All DM devices detached.
    [  187.100472] shutdown[1]: Rebooting.
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpuset
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 4.4.1-1-ARCH (builduser@leming) (gcc version 5.3.0 (GCC) ) #1 PREEMPT Tue Feb 2 07:07:27 MST 2016
    [    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] debug: ignoring loglevel setting.
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] On node 0 totalpages: 32768
    [    0.000000] free_area_init_node: node 0, pgdat c0927b8c, node_mem_map c7ed9000
    [    0.000000]   Normal zone: 288 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: 32480

If I set ncip and ncipk to different IPs, it works in Linux once a secondary virtual adapter eth0:1 is created with kernel IP, but a Windows PC would require 2 physical network adapters for such setup. Is there a way to change envs to have both Uboot and kernel outputs directed to the same server IP? Or it requires editing sources and recompiling Uboot?

Alternatively, any way to add a secondary virtual network adapter with a different IP in Windows?

root@alarm ~]# fw_printenv
bootcmd=run startboot;run bootubi
bootdir=/boot
bootfilem=uImage
bootfilez=zImage
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
console=ttyS0,115200
ethact=egiga0
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-dockstar.dtb
ipaddr=10.10.10.3
loadaddr=0x810000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
ncip=10.10.10.5
ncipk=10.10.10.4
netconsole=on
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then  setenv stdin nc; setenv stdout nc;  setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
startboot=usb start; for devtype in usb; do  setenv devnum 0; while ${devtype} dev ${devnum}; do  echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then  load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then  echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi;  run mainargs; if run loadfdt; then  if run loadrd; then  bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else  bootz ${loadaddr} - ${fdtaddr}; fi; else  if run loadrd; then echo Booting uImage with initrd;  bootm ${loadaddr} ${rdaddr}:${filesize}; else  bootm ${loadaddr}; fi; fi; else  echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
ethaddr=00:11:63:1A:02:UA
root@alarm ~]#



Edited 6 time(s). Last edit at 02/08/2016 09:03AM by sambul14.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 08, 2016 02:38PM
There is no need to use a second adapter. Do this

On the netconsle server PC (Ubuntu or Windows) that has the serverip 192.168.2.27, open 2 terminal shells.

- 1st terminal running putty or picocom, to monitor serial console (something similar to this command)

picocom --b 115200 --f n --p n --d 8 /dev/ttyUSB0


- 2nd terminal running nc to listen and control netconsole (netcat has various format so use what worked before):

nc -lup 6666 192.168.2.29

Power up the Dockstar, you will see the input/output alternating. When serial console says " host 192.168.2.27 is alive", you can use netconsole to interrupt u-boot. All output will go here until the kernel starts.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 02/08/2016 02:39PM by bodhi.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 08, 2016 03:17PM
Thanks. I can see Uboot output this way in Netconsole in Windows, but not kernel output. Any way to see both in Windows? I could see both outputs before with Jeff's Uboot in one ASUC terminal in Windows, if ncip and ncipk were assigned the same IP.

I wonder if changing env commands can alter moonman's Uboot version logic? There's no plausible explanation why Uboot and kernel outputs must be assigned different IPs despite they don't overlap in time with each other. And why it should be fixed in Uboot logic instead of given to user choice?

The problem is, adding a 2nd virtual network interface is possible, but not a trivial well documented daily job for Windows users, while its a basic one command routing in Linux. :)



Edited 1 time(s). Last edit at 02/08/2016 03:19PM by sambul14.
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 08, 2016 03:39PM
sambul14,

> There's no
> plausible explanation why Uboot and kernel outputs
> must be assigned different IPs despite they don't
> overlap in time with each other. And why it should
> be fixed in Uboot logic instead of given to user
> choice?

U-boot ipaddr and Linux IP address should be identical. You can use static IP to make sure that it is so.

cat /etc/network/interfaces
auto lo eth0
iface lo inet loopback
iface eth0 inet static
        address 192.168.2.29
        netmask 255.255.255.0
        gateway 192.168.2.1

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
February 08, 2016 07:40PM
sambul14,


> I don't believe that you were root while
> extracting the rootfs. I could download Arch
> rootfs and see for myself :). But why don't you
> try again? It would be helpful to your sanity to
> go through the exercise exactly as the instruction
> stated (dont' do something that you think is
> equivalent, this is where mistakes are made most
> of the time).
>
> This time make sure that you are logged in as root
> (sudo will not work).
>
> whoami
>
> Then extract with a tar command (no sudo, you are
> root)
>
> tar xf .......
>
>

Have you tried this?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
June 21, 2016 06:22AM
Hello, Bodhi!

Thanks for all of your efforts in creating a powerful U-Boot for Kirkwood devices! I have had two Pogoplug V4 Mobiles running very well with earlier versions of your U-Boot and ArchLinux, but today I updated one of them to 2016.05 and noticed that my ArchLinux would not boot, just like the first poster in this topic. I applied your fix:

setenv dtb_file
setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts $custom_params'
boot

With this fix my ArchlLinux boots fine again and everything works well, if I boot from USB. However, I noticed in your fix that since you specify a root device /dev/sda1, mmc booting will not work. Since I want usually to boot from an SD card, I changed my set_bootargs environment variable to:

setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootdelay=10 $mtdparts $custom_params'

Now mmc booting works fine. But it looks like some changes will be needed to the environment variables to allow for automatic booting from either USB or mmc depending on which device is installed. Your earlier versions of environment variables allowed for that and worked well. I just pass this along to you in case you plan on updating U-Boot for ArchLinux in the future. Modifying U-Boot is something I have little experience with, so I am a little uncertain at this stage what would need to be changed in other environment variables to reenable multiple booting like before. If I come up with something, however, I will let you know.

Thanks!
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
June 21, 2016 04:05PM
mandm,

> Your earlier versions of environment
> variables allowed for that and worked well.

> I just
> pass this along to you in case you plan on
> updating U-Boot for ArchLinux in the future.
> Modifying U-Boot is something I have little
> experience with, so I am a little uncertain at
> this stage what would need to be changed in other
> environment variables to reenable multiple booting
> like before. If I come up with something, however,
> I will let you know.
>

I think it was just a coincidence that your old configuration that allowed mutiple-partition booting. With Arch Linux out of the box, you can't really ensure booting the correct root partition. Arch does not provide initrd, so with just uImage or zImage, u-boot can find the kernel fine. However, without initrd, the kernel has to rely on the hardcode root=/dev/sda1 or /root=/dev/mmcblk0p1parameter to find the correct rootfs. There is no way around it.

So, to make sure that multiple-partition works, you need use of these 2 approaches:

1. Create the initrafms (could be just a small and simple one), and then use the root=LABEL=rootfs argument in bootargs. This is already done with the new u-boot default envs. I think Arch probably alread have this initrd file somewhere in the rootfs, or as a separate download, IIRC. So you can use the root=LABEL=rootfs approach without much trouble.

or

2. Use PARTUUID for root device in the bootargs. I don't recommend this approach because it is inferior to the LABEL approach.


Did you flash the new default envs, and what is your current u-boot envs look like?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Arch Linux ARM with 2015.10-tld-1 U-Boot for Kirkwood
June 22, 2016 04:32PM
Follow up on number 1 above:

To boot with rootfs label in Arch:
Quote
moonman

initramfs-linux.img needs to be under /boot

So initramfs-linux.img is now an extra kernel file provided by Arch Linux ARM.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 06/22/2016 11:31PM by bodhi.
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: