Welcome! Log In Create A New Profile

Advanced

Booting Debian Kirkwood rootfs from latest Arch U-Boot

Posted by bodhi 
Re: Booting Debian rootfs from latest Arch U-Boot
September 15, 2015 07:44PM
ok nvm, I ran fsck and rebooted and got a dhcp IP, sweet.

dito Wrote:
-------------------------------------------------------
> ok so I was doing it all more complex that needed
> to be, just tar the image, copy uEnv sync and
> boot.
>
> It's booting up now :) Thank you so much. no DHCP
> address thou, I have to setup a static one.
>
> I'll go thru the guides, enable ssh and all my
> favorites packages now...
>
> do you want me to post something just out of
> curiousity or are we done here?
>
> BTW, I've used the previous uEnv, not the last
> one... not sure if it matters... I can try it
> thou..
> http://forum.doozan.com/read.php?3,23727,23812#msg
> -23812
Re: Booting Debian rootfs from latest Arch U-Boot
September 15, 2015 11:36PM
@dito,

We are done! thanks for your contribution :)

>
> BTW, I've used the previous uEnv, not the last
> one... not sure if it matters... I can try it
> thou..
> http://forum.doozan.com/read.php?3,23727,23812#msg
> -23812

It really does not matter, but the last one is a little more consistent with what we already have in the u-boot thread. So it is preferable.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
vtx
Re: Booting Debian rootfs from latest Arch U-Boot
September 16, 2015 09:33AM
Happy to see that's ok for dito

I'm still at the same point : it does not boot and my router does not give a dhcp lease to my pogoplug E02

Do I need a serial cable ?

Thanks
Re: Booting Debian rootfs from latest Arch U-Boot
September 16, 2015 09:51AM
did you have archlinux?
what's the status of the pogoplug light?
vtx
Re: Booting Debian rootfs from latest Arch U-Boot
September 16, 2015 10:05AM
I have 2 usb keys :

one with Arch Linux for ARM that boots and that I can SSH (green fixed led)

one with Debian rootfs 3.16 from bodhi with modified uEnv_arch_uboot_boot_debian.txt that doesn't seem to boot (no light and no dhcp lease)
Re: Booting Debian rootfs from latest Arch U-Boot
September 16, 2015 12:02PM
vtx,

> one with Arch Linux for ARM that boots and that I
> can SSH (green fixed led)

Boot into Arch and get the listing of your u-boot envs:
fw_printenv

And while you are in Arch, also get the dmesg output and post here.
dmesg


If you have serial console, post the entire bootlog.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
vtx
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
September 17, 2015 02:07AM
I have no serial console

[root@alarm alarm]# fw_printenv
bash: fw_printenv: command not found

[root@alarm alarm]# dmesg
[ 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.2.0-2-ARCH (builduser@leming) (gcc version 5.2.0 (GCC) ) #1 PREEMPT Mon Sep 7 03:47:39 MDT 2015
[ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine: Pogoplug E02
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] On node 0 totalpages: 65536
[ 0.000000] free_area_init_node: node 0, pgdat c07fcd4c, node_mem_map cfdba000
[ 0.000000] Normal zone: 576 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 65536 pages, LIFO batch:15
[ 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: 64960
[ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rw rootwait mtdparts=orion_nand:1M(u-boot),-(rootfs)
[ 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: 250672K/262144K available (5801K kernel code, 428K rwdata, 1684K rodata, 264K init, 712K bss, 11472K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xd0800000 - 0xff000000 ( 744 MB)
lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc07578f8 (7487 kB)
.init : 0xc0758000 - 0xc079a000 ( 264 kB)
.data : 0xc079a000 - 0xc08051d4 ( 429 kB)
.bss : 0xc08051d4 - 0xc08b746c ( 713 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
[ 13.197569] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[ 13.197756] Console: colour dummy device 80x30
[ 13.197783] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[ 13.287655] pid_max: default: 32768 minimum: 301
[ 13.287749] Security Framework initialized
[ 13.287825] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 13.287842] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 13.288547] Initializing cgroup subsys blkio
[ 13.288577] Initializing cgroup subsys memory
[ 13.288641] Initializing cgroup subsys devices
[ 13.288669] Initializing cgroup subsys freezer
[ 13.288690] Initializing cgroup subsys net_cls
[ 13.288708] Initializing cgroup subsys bfqio
[ 13.288726] Initializing cgroup subsys perf_event
[ 13.288747] Initializing cgroup subsys net_prio
[ 13.288826] CPU: Testing write buffer coherency: ok
[ 13.289270] Setting up static identity map for 0x81e0 - 0x8238
[ 13.291150] devtmpfs: initialized
[ 13.293504] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 13.293949] pinctrl core: initialized pinctrl subsystem
[ 13.294651] NET: Registered protocol family 16
[ 13.295116] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 13.317662] cpuidle: using governor ladder
[ 13.347660] cpuidle: using governor menu
[ 13.347809] Kirkwood: MV88F6281-A0, TCLK=200000000.
[ 13.347834] Feroceon L2: Enabling L2
[ 13.347873] Feroceon L2: Cache support initialised.
[ 13.348621] initial MPP regs: 01111111 11113322 00001111 00100000 00000000 00000000 00000000
[ 13.348649] final MPP regs: 01111111 11113322 00001111 00000000 00000000 00000000 00000000
[ 13.379150] vgaarb: loaded
[ 13.379476] SCSI subsystem initialized
[ 13.379656] libata version 3.00 loaded.
[ 13.379981] usbcore: registered new interface driver usbfs
[ 13.380058] usbcore: registered new interface driver hub
[ 13.380125] usbcore: registered new device driver usb
[ 13.380286] pps_core: LinuxPPS API ver. 1 registered
[ 13.380296] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 13.380330] PTP clock support registered
[ 13.381390] clocksource: Switched to clocksource orion_clocksource
[ 13.412842] FS-Cache: Loaded
[ 13.425969] NET: Registered protocol family 2
[ 13.426756] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[ 13.426795] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 13.426825] TCP: Hash tables configured (established 2048 bind 2048)
[ 13.426897] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 13.426919] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 13.427119] NET: Registered protocol family 1
[ 13.427179] PCI: CLS 0 bytes, default 32
[ 13.429227] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 13.442066] VFS: Disk quotas dquot_6.6.0
[ 13.442333] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 13.444377] jffs2: version 2.2. (NAND) \xffffffc2\xffffffa9 2001-2006 Red Hat, Inc.
[ 13.445437] fuse init (API version 7.23)
[ 13.452174] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[ 13.452197] io scheduler noop registered
[ 13.452211] io scheduler deadline registered
[ 13.452506] io scheduler cfq registered
[ 13.452997] io scheduler bfq registered (default)
[ 13.453005] BFQ I/O-scheduler: v7r8
[ 13.453219] mv_xor mv_xor.0: Marvell shared XOR driver
[ 13.492570] mv_xor mv_xor.0: Marvell XOR (Registers Mode): ( xor cpy )
[ 13.532577] mv_xor mv_xor.0: Marvell XOR (Registers Mode): ( xor cpy )
[ 13.532809] mv_xor mv_xor.1: Marvell shared XOR driver
[ 13.572577] mv_xor mv_xor.1: Marvell XOR (Registers Mode): ( xor cpy )
[ 13.612575] mv_xor mv_xor.1: Marvell XOR (Registers Mode): ( xor cpy )
[ 13.618076] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 13.619153] console [ttyS0] disabled
[ 13.639269] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33, base_baud = 12500000) is a 16550A
[ 14.165168] console [ttyS0] enabled
[ 14.182151] brd: module loaded
[ 14.191269] loop: module loaded
[ 14.195346] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[ 14.201818] nand: Hynix NAND 128MiB 3,3V 8-bit
[ 14.206286] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 14.213918] Scanning device for bad blocks
[ 14.295665] 2 cmdlinepart partitions found on MTD device orion_nand
[ 14.301975] Creating 2 MTD partitions on "orion_nand":
[ 14.307144] 0x000000000000-0x000000100000 : "u-boot"
[ 14.312641] 0x000000100000-0x000008000000 : "rootfs"
[ 14.325184] libphy: orion_mdio_bus: probed
[ 14.329406] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[ 15.412444] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:25:31:00:27:90
[ 15.421423] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 15.427986] ehci-pci: EHCI PCI platform driver
[ 15.432532] ehci-orion: EHCI orion driver
[ 15.436638] orion-ehci orion-ehci.0: EHCI Host Controller
[ 15.442112] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[ 15.449863] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[ 15.471420] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[ 15.478352] hub 1-0:1.0: USB hub found
[ 15.482213] hub 1-0:1.0: 1 port detected
[ 15.486796] usbcore: registered new interface driver uas
[ 15.492323] usbcore: registered new interface driver usb-storage
[ 15.498415] usbcore: registered new interface driver ums-alauda
[ 15.504458] usbcore: registered new interface driver ums-cypress
[ 15.510550] usbcore: registered new interface driver ums-datafab
[ 15.516662] usbcore: registered new interface driver ums_eneub6250
[ 15.522945] usbcore: registered new interface driver ums-freecom
[ 15.529027] usbcore: registered new interface driver ums-isd200
[ 15.535048] usbcore: registered new interface driver ums-jumpshot
[ 15.541217] usbcore: registered new interface driver ums-karma
[ 15.547150] usbcore: registered new interface driver ums-onetouch
[ 15.553365] usbcore: registered new interface driver ums-realtek
[ 15.559453] usbcore: registered new interface driver ums-sddr09
[ 15.565473] usbcore: registered new interface driver ums-sddr55
[ 15.571488] usbcore: registered new interface driver ums-usbat
[ 15.577766] mousedev: PS/2 mouse device common for all mice
[ 15.801419] usb 1-1: new high-speed USB device number 2 using orion-ehci
[ 15.953855] hub 1-1:1.0: USB hub found
[ 15.958001] hub 1-1:1.0: 4 ports detected
[ 16.241415] usb 1-1.1: new high-speed USB device number 3 using orion-ehci
[ 16.355016] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[ 16.361656] scsi host0: usb-storage 1-1.1:1.0
[ 16.591413] rtc-mv rtc-mv: internal RTC not ticking
[ 16.596455] i2c /dev entries driver
[ 16.600566] sdhci: Secure Digital Host Controller Interface driver
[ 16.606802] sdhci: Copyright(c) Pierre Ossman
[ 16.611246] sdhci-pltfm: SDHCI platform and OF driver helper
[ 16.617473] ledtrig-cpu: registered to indicate activity on CPUs
[ 16.623686] usbcore: registered new interface driver r8712u
[ 16.629536] gre: GRE over IPv4 demultiplexor driver
[ 16.634517] NET: Registered protocol family 17
[ 16.639037] Key type dns_resolver registered
[ 16.644363] registered taskstats version 1
[ 16.650529] Key type encrypted registered
[ 16.655210] console [netcon0] enabled
[ 16.658887] netconsole: network logging started
[ 16.663591] hctosys: unable to open rtc device (rtc0)
[ 16.669903] Waiting for root device /dev/sda1...
[ 17.362601] scsi 0:0:0:0: Direct-Access FLASH Drive SM_USB20 1100 PQ: 0 ANSI: 0 CCS
[ 17.372544] sd 0:0:0:0: [sda] 3915776 512-byte logical blocks: (2.00 GB/1.86 GiB)
[ 17.380218] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 17.385907] sd 0:0:0:0: [sda] Write Protect is off
[ 17.390742] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 17.391355] sd 0:0:0:0: [sda] No Caching mode page found
[ 17.396754] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 17.408017] sda: sda1 sda2
[ 17.413654] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 17.442537] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[ 17.464194] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 17.471984] VFS: Mounted root (ext3 filesystem) on device 8:1.
[ 17.486134] devtmpfs: mounted
[ 17.490007] Freeing unused kernel memory: 264K (c0758000 - c079a000)
[ 17.908625] NET: Registered protocol family 10
[ 17.931143] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 17.956144] random: systemd urandom read with 31 bits of entropy available
[ 17.979315] systemd[1]: systemd 225 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD +IDN)
[ 17.997804] systemd[1]: Detected architecture arm.
[ 18.022542] systemd[1]: Set hostname to <alarm>.
[ 18.842280] systemd[1]: display-manager.service: Cannot add dependency job, ignoring: Unit display-manager.service failed to load: No such file or directory.
[ 18.863157] systemd[1]: Reached target Encrypted Volumes.
[ 18.892014] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ 18.923294] systemd[1]: Created slice Root Slice.
[ 18.941883] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[ 18.971993] systemd[1]: Listening on Journal Socket.
[ 18.991766] systemd[1]: Reached target Remote File Systems.
[ 19.021810] systemd[1]: Listening on udev Kernel Socket.
[ 19.052636] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 19.081918] systemd[1]: Listening on Journal Socket (/dev/log).
[ 19.130191] systemd[1]: Reached target Swap.
[ 19.151958] systemd[1]: Listening on LVM2 metadata daemon socket.
[ 19.182184] systemd[1]: Listening on networkd rtnetlink socket.
[ 19.212637] systemd[1]: Created slice System Slice.
[ 19.235713] systemd[1]: Starting Setup Virtual Console...
[ 19.265151] systemd[1]: Created slice system-serial\x2dgetty.slice.
[ 19.300775] systemd[1]: Starting Journal Service...
[ 19.332850] systemd[1]: Created slice system-getty.slice.
[ 19.367647] systemd[1]: Mounting POSIX Message Queue File System...
[ 19.412047] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[ 19.666166] systemd[1]: Mounting Debug File System...
[ 19.705955] systemd[1]: Starting Apply Kernel Variables...
[ 19.887121] systemd[1]: Mounting Temporary Directory...
[ 19.942268] systemd[1]: Starting Remount Root and Kernel File Systems...
[ 19.968424] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[ 20.002141] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ 20.031786] systemd[1]: Reached target Paths.
[ 20.055615] systemd[1]: Mounting FUSE Control File System...
[ 20.092639] systemd[1]: Created slice User and Session Slice.
[ 20.121724] systemd[1]: Reached target Slices.
[ 20.142022] systemd[1]: Listening on udev Control Socket.
[ 20.178682] systemd[1]: Mounted Debug File System.
[ 20.201886] systemd[1]: Mounted FUSE Control File System.
[ 20.231796] systemd[1]: Mounted POSIX Message Queue File System.
[ 20.261774] systemd[1]: Mounted Temporary Directory.
[ 20.282806] systemd[1]: Started Journal Service.
[ 21.215424] systemd-journald[96]: Received request to flush runtime journal from PID 1
[ 22.184557] random: nonblocking pool is initialized
[ 28.618663] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 31.646310] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 31.656239] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
September 17, 2015 03:22AM
vtx,

The LED light kept blinking, then there was something wrong with your rootfs.

You should:

1. Set up netconsole (use the instruction at Arch site). Do this first if you can. This will make it easier to troubleshoot booting problem.
2. Make sure the Debian rootfs was created following the instruction very closely (single Ext3 partition, prepare this as root user, ....)
3. Following the instruction to redownload the env file inthe first post. And prepare the rootfs label for the rootfs.

If you still have trouble booting, post the entire log of how did you download rootfs, preparing it ... everything you can.

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

I'm trying to boot from the usb with rootfs installed. Extracted the archive, edited the fstab and copied the uEnv.txt and change the dtb to goflexhome.

Here's my nc log:

U-Boot 2016.09.01-1 (Oct 10 2016 - 23:11:39 -0600) Arch Linux ARM
Seagate GoFlex Home
gcc (GCC) 6.2.1 20160830
GNU ld (GNU Binutils) 2.27
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... 1 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: ST32000542AS Firm: CC38 Ser#: 5XW2PVMF
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)

USB device 0: 
    Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 2.0
            Type: Removable Hard Disk
            Capacity: 7445.7 MB = 7.2 GB (15248832 x 512)
... is now current device
usb found on device 0
Checking for: /boot/uEnv.txt ...
746 bytes read in 268 ms (2 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uenvcmd is set ...
** File not found /boot/zImage **
3821592 bytes read in 419 ms (8.7 MiB/s)
** Bad device :1 0x1c00000 **
** File not found /boot/initramfs-linux.img **
## Booting kernel from Legacy Image at 00810000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK

Regards.
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 10, 2019 12:40AM
Please post:

cat uEnv.txt

And interrupt netconsole at countdown, and

printenv
boot

Post the entire netconsole log here.

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



Edited 1 time(s). Last edit at 08/10/2019 12:43AM by bodhi.
Thank you for you help.

Here's the logs.

uEnv.txt

console=ttyS0,115200
uimage=/boot/uImage
initrd=/boot/uInitrd
fdt_file=/boot/dts/kirkwood-goflexhome.dtb
fdt_addr=0x1c00000
uimage_addr=0x800000
initrd_addr=0x1100000
loadfdt=ext2load ${type} ${disk}:1 ${fdt_addr} ${fdt_file}
loaduimage=ext2load ${type} ${disk}:1 ${uimage_addr} ${uimage}
loaduinitrd=ext2load ${type} ${disk}:1 ${initrd_addr} ${initrd}
set_bootargs=setenv bootargs console=$console root=LABEL=rootfs rootdelay=10 $mtdparts
load_debian=setenv type usb; setenv disk 0; echo Running loadfdt ...;run loadfdt; echo Running loaduinitrd ...;run loaduinitrd; echo Running loaduimage ...; run loaduimage
bootm=run load_debian; echo Booting from ${type} ${disk}:1 ...; run set_bootargs; bootm ${uimage_addr} ${initrd_addr} ${fdt_addr}

printenv

GoFlexHome> printenv
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
ethaddr=00:10:75:29:C1:4D
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-goflexhome.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)
ncargs=ignore_loglevel netconsole=6665@10.10.10.3/eth0,6666@10.10.10.4/
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; ide reset; for devtype in usb ide; 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;
stderr=nc
stdin=nc
stdout=nc

boot

GoFlexHome> boot
boot
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: ST32000542AS Firm: CC38 Ser#: 5XW2PVMF
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)

USB device 0: 
    Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 2.0
            Type: Removable Hard Disk
            Capacity: 7445.7 MB = 7.2 GB (15248832 x 512)
... is now current device
usb found on device 0
Checking for: /boot/uEnv.txt ...
747 bytes read in 279 ms (2 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uenvcmd is set ...
** File not found /boot/zImage **
3821592 bytes read in 429 ms (8.5 MiB/s)
** Bad device :1 0x1c00000 **
** File not found /boot/initramfs-linux.img **
## Booting kernel from Legacy Image at 00810000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 10, 2019 12:29PM
x010,

I'm on the road (in transit) so a little slow to help. But I will get to this when I can!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 10, 2019 01:22PM
No worries. Thank you for taking the time.
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 12, 2019 11:38PM
x010,

Looks like your uEnv.txt does not quite match with the current envs for this Arch u-boot version. The original post in this thread was for Arch u-boot 2014.x. Your current Arch u-boot is 2016.x

So this is new uEnv.txt content.

bootdir=/boot
bootfilem=uImage
fdtdir=/boot/dts
fdtfile=kirkwood-goflexhome.dtb
rdfile=uInitrd
root=LABEL=rootfs

Edit the /boot/uEnv.txt to have the above lines. And try booting with it.

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



Edited 1 time(s). Last edit at 08/13/2019 02:20AM by bodhi.
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 13, 2019 07:18AM
bodhi,

I've made a new uEnv.txt with just the above content but i still can't get it to boot.

Here's the new message that happens on boot.

USB device 0: 
    Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 2.0
            Type: Removable Hard Disk
            Capacity: 7445.7 MB = 7.2 GB (15248832 x 512)
... is now current device
usb found on device 0
Checking for: /boot/uEnv.txt ...
114 bytes read in 274 ms (0 Bytes/s)
Loaded environment from /boot/uEnv.txt
Checking if uenvcmd is set ...
** File not found /boot/zImage **
3821592 bytes read in 430 ms (8.5 MiB/s)
root has been defined by user
loading /boot/dts/kirkwood-goflexhome.dtb ...
10603 bytes read in 1124 ms (8.8 KiB/s)
7245696 bytes read in 543 ms (12.7 MiB/s)
Bad Linux ARM zImage magic!

Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 13, 2019 01:40PM
x010

> I've made a new uEnv.txt with just the above
> content but i still can't get it to boot.
>
> Here's the new message that happens on boot.
>
>
> USB device 0: 
>     Device 0: Vendor: Kingston Rev: PMAP Prod:
> DataTraveler 2.0
>             Type: Removable Hard Disk
>             Capacity: 7445.7 MB = 7.2 GB (15248832
> x 512)
> ... is now current device
> usb found on device 0
> Checking for: /boot/uEnv.txt ...
> 114 bytes read in 274 ms (0 Bytes/s)
> Loaded environment from /boot/uEnv.txt
> Checking if uenvcmd is set ...
> ** File not found /boot/zImage **
> 3821592 bytes read in 430 ms (8.5 MiB/s)
> root has been defined by user
> loading /boot/dts/kirkwood-goflexhome.dtb ...
> 10603 bytes read in 1124 ms (8.8 KiB/s)
> 7245696 bytes read in 543 ms (12.7 MiB/s)
> Bad Linux ARM zImage magic!
> 
>

I see, it still trying to load zImage. Let me take a closer look.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 13, 2019 02:34PM
x010,

Here is the revised uEnv.txt. Please try.


bootdir=/boot
bootfilem=uImage
fdtdir=/boot/dts
fdtfile=kirkwood-goflexhome.dtb
rdfile=uInitrd
root=LABEL=rootfs
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
startboot=usb start; ide reset; for devtype in usb ide; 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  bootm ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else  bootm ${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;

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 13, 2019 04:23PM
Hi bodhi,

Just tried the revised uEnv and i don't see the zImage error anymore but i still get the bad linux error.

usb found on device 0
Checking for: /boot/uEnv.txt ...
1262 bytes read in 279 ms (3.9 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uenvcmd is set ...
3821592 bytes read in 429 ms (8.5 MiB/s)
root has been defined by user
loading /boot/dts/kirkwood-goflexhome.dtb ...
10603 bytes read in 1123 ms (8.8 KiB/s)
7245696 bytes read in 546 ms (12.7 MiB/s)
Bad Linux ARM zImage magic!



Edited 1 time(s). Last edit at 08/13/2019 05:10PM by x010.
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 14, 2019 12:19AM
x010,

My bad (wrong approach)! Let me revise it again.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 14, 2019 03:37AM
x010,

Here is the revised /boot/uEnv.txt content:

bootdir=/boot
bootfilem=uImage
fdtdir=/boot/dts
fdtfile=kirkwood-goflexhome.dtb
rdfile=uInitrd
root=LABEL=rootfs
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}


To boot the Debian rootfs properly, an extra step is needed during netconsole boot.

Power up, interrupt netconsole at countdown, and enter this command (copy and paste to the u-boot prompt):

setenv startboot 'usb start; ide reset; for devtype in usb ide; 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  bootm ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else  bootm ${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;'

EDIT: see x010's post below for more info about the env size limit (startboot is too long, need to be broken up).

And then

boot

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



Edited 1 time(s). Last edit at 08/14/2019 12:49PM by bodhi.
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 14, 2019 07:57AM
bodhi,

After i copied the setenv command to the netconsole prompt i hit enter and i get a duplicated code display, after that i cannot boot or even get the help display.

I've attached a screenshot.

I tried to copy the setenv command to the uEnv.txt like so:

startboot=usb start; ide reset; for devtype in usb ide; 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  bootm ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else  bootm ${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;

But the same zImage magic error appeared.

Edit:

Nvm... After some experiments i discovered the u-boot has a line limit that doesn't let copy/paste the whole line of the setenv command.

After that it booted fine. Thank you for you trouble

PS: Can you tell me why adding the startboot at the uEnv doesn't boot the image and also if there's any way to override the line limit.



Edited 2 time(s). Last edit at 08/14/2019 11:16AM by x010.
Attachments:
open | download - Screenshot from 2019-08-14 13-56-38.png (82.3 KB)
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 14, 2019 12:46PM
x010,

> Nvm... After some experiments i discovered the
> u-boot has a line limit that doesn't let
> copy/paste the whole line of the setenv command.
>
> After that it booted fine. Thank you for you
> trouble
>

Cool!

> PS: Can you tell me why adding the startboot at
> the uEnv doesn't boot the image and also if
> there's any way to override the line limit.

The command line size limit is hardcoded so we can't do much about it other than breaking it up to 2, or 3 commands. Internally, it is OK to have a really long command. But this case seems to be the hush parser limitation, not envs tool.

You can try it in Debian using fw_setenv to see if it will be accepted. Ie. using a temporary name such as startboot_debian to see if it works.

The reason it does not work in uEnv.txt is because the uEnv.txt is loaded by this command itself! so startboot can not be redefined inside uEnv.txt.

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



Edited 1 time(s). Last edit at 08/14/2019 01:17PM by bodhi.
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 14, 2019 01:57PM
bodhi,

I've change the original Arch startboot to Debian via fw_setenv and added the a new startboot_arch so i can boot between distros. Everything works great.

Just a quick question is it possible to boot with systemd since i don't have bootargs on my fw_env?

Thank you for taking the time to help me out.



Edited 1 time(s). Last edit at 08/14/2019 07:50PM by x010.
Re: Booting Debian Kirkwood rootfs from latest Arch U-Boot
August 15, 2019 12:51AM
x010,

> Just a quick question is it possible to boot with
> systemd since i don't have bootargs on my fw_env?

Add this line to your uEnv.txt

mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs} init=/bin/systemd

In the later Debian version, they moved the systemd binary so if init=/bin/systemd does not enable booting systemd, search the forum for hints.

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



Edited 1 time(s). Last edit at 08/15/2019 12:52AM by bodhi.
Not working for me
November 24, 2019 01:55PM
Hi

I have installed uboot and arch sucessfully from this site [1] successfully. But now i want to use debian and have tried Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 from [2] with the revised uEnv.txt from this thread [3] but it does not work for me. The Pogoplug LED on the front is off and i cannot access it without working arch on a usb drive. What should i do now?

[1] https://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray#installation
[2] https://forum.doozan.com/read.php?2,12096
[3] https://forum.doozan.com/read.php?3,23727,88249#msg-88249
Re: Not working for me
November 24, 2019 04:45PM
Giang,

> I have installed uboot and arch sucessfully from
> this site [1] successfully. But now i want to use
> debian and have tried
> Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2
> from [2] with the revised uEnv.txt from this
> thread [3] but it does not work for me. The
> Pogoplug LED on the front is off and i cannot
> access it without working arch on a usb drive.
> What should i do now?

There are 2 different approaches:

1. Make Arch u-boot works for booting Debian rootfs using Env.txt.
2. Install my released u-boot while running Arch. And then shutdown, put in the Debian rootfs and start the box.

Number 1 is non-destructive and just remove the uEnv.txt will make it boot back to Arch. That's what you should do in case you change your mind about running Debian later.

But if you are absolutely sure about switching to Debian, then use number 2 to save time. And I will be able to support you if you have problem in the future.

=========

Assuming you choose approach number 1. There are different Arch u-boot versions in the last few years, so while in Arch, get these envs settings and post here:

fw_printenv


also post the content of uEnv.txt that you have created for booting Debian.

cat uEnv.txt

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

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: