Welcome! Log In Create A New Profile

Advanced

Booting Arch with u-boot-2015.10-tld-1

Posted by sunspot 
Booting Arch with u-boot-2015.10-tld-1
February 21, 2016 07:47PM
Hi. Need a little help here.
I`ve followed the guide to install the 2015.10 uBoot on Pogo E02 and prepared the USB stick with unpacking Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 on it. Looking at the netconsole output the kernel is found buy the Pogo box but it doesn`t get assigned an IP so no way of pocking inside and see what went wrong.

[admin@WL-Asus root]$ nc -l -u -p 6666                                        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     51              7820901         00000000-01     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 232 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
3165342 bytes read in 381 ms (7.9 MiB/s)
loading uInitrd ...
7179935 bytes read in 501 ms (13.7 MiB/s)
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
10446 bytes read in 1092 ms (8.8 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.4.0-kirkwood-tld-1
   Created:      2016-02-22   0:38:45 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3165278 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.4.0-kirkwood-tld-1
   Created:      2016-02-19   7:33:04 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7179871 Bytes = 6.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...



Edited 1 time(s). Last edit at 02/22/2016 04:56PM by bodhi.
sunspot,

Netconsole only outputs this much. After the kernel begins starting, there will be no more outptut, unless Debian was setup to output more during kernel booting. And this requires the initrd image to be regenerated while Debian is running.

Try interrupting netconsole to print out the u-boot envs. Assuming the Pogo u-boot env ipaddr was set as 192.168.0.100, use this command:

nc -lup 6666 192.168.0.100 6666

Other things to check to make sure you have created the rootfs correctly:

- you were root user during the creation of the rootfs.
- the rootfs USB drive contains one and only one partition type Ext3
- the partition is labeled as rootfs

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Booting Arch with u-boot-2015.10-tld-1 (continued)
February 22, 2016 05:19AM
A little backstory: was initially running Linux-4.4.1-1-ARCH as per Jeff instructions, then decided to upgrade to new uBoot and found out the hard way that your uBoot somehow didn`t like ARCH. So in order to boot the box and flash moonman`s uBoot I`ve switched to Debian on USB stick.

So I should probably run something like
sudo chown root:root /
on some Linux machine, right?

Anyway this is what I have

PogoE02> printenv
printenv
arcNumber=3542
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=mw 0x800000 0 1; run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 0x1100000; fi; else if run load_dtb; then bootm 0x800000 - 0x1c00000; else bootm 0x800000; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
ethact=egiga0
ethaddr=00:25:31:04:4B:E8
if_netconsole=ping $serverip
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start
ipaddr=10.0.0.103
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device 0x1c00000 $dtb_file
load_initrd=echo loading uInitrd ...; ext2load $bootdev $device 0x1100000 /boot/uInitrd
load_uimage=echo loading uImage ...; ext2load $bootdev $device 0x800000 /boot/uImage
machid=dd6
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
nc_ready=1
ncip=10.0.0.1
partition=nand0,2
preboot=run preboot_nc
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if ext2load $dev $disknum:1 0x800000 /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
scan_ide=ide reset
scan_mmc=mmc rescan
scan_usb=usb start
serverip=10.0.0.1
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_loaded=0
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3118/131068 bytes



Edited 3 time(s). Last edit at 02/22/2016 05:08PM by bodhi.
sunspot,

You must be the rootf user while extracting the rootfs tarball. Either log in as root, or use su command to become root. If you only want to boot any Linux to reflash u-boot then that's it! follow the installation instruction very closely and it will boot Debian rootfs without changing u-boot envs.

OTOH, If you you want to boot Arch from my u-boot image, then set the DTB file path to the location of the DTB in Arch rootfs, and not using label, then it will boot Arch. Do it in netconsole:
setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts $custom_params'
setenv dtb_file /'boot/dtbs/kirkwood-pogo_e02.dtb'

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



Edited 1 time(s). Last edit at 02/22/2016 12:53PM by bodhi.
Re: Booting Arch with u-boot-2015.10-tld-1 (continued)
February 22, 2016 05:49PM
I`ve rechecked the USB stick under Oracle VM running Ubuntu. For some reason I couldn't paste the console output through the clipboard hence the screenshot.
My ARCH installation is lost, somehow my USB stick become corrupted after doing USB->image backup under windows, e2fsck showed tons of errors.
So I`ve reformatted the whole thing from scratch and now am trying to boot Ubuntu on Pogo E02.



Edited 1 time(s). Last edit at 02/22/2016 05:50PM by sunspot.
Attachments:
open | download - test.jpg (147.4 KB)
Re: Booting Arch with u-boot-2015.10-tld-1 (continued)
February 22, 2016 11:06PM
sunspot Wrote:
-------------------------------------------------------
> I`ve rechecked the USB stick under Oracle VM
> running Ubuntu. For some reason I couldn't paste
> the console output through the clipboard hence the
> screenshot.
> My ARCH installation is lost, somehow my USB stick
> become corrupted after doing USB->image backup
> under windows, e2fsck showed tons of errors.
> So I`ve reformatted the whole thing from scratch
> and now am trying to boot Ubuntu on Pogo E02.

There are a couple things wrong in the screenshot you've posted.

- You were not root.
- Your rootfs label is ROOTFS. Remember in Linux everything is case-sensitive. It must be rootfs.

Please follow the instruction exactly as it was written.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: