CubieTruck U-Boot problem

This forum is for supported devices using an ARMv7 Allwinner SoC.

CubieTruck U-Boot problem

Postby tinx » Thu Apr 02, 2015 4:48 pm

Hi community,

I tried installing ALARM on my CubieTruck via microSD according to this guide several times. I also used boot.scr, script.bin and u-boot-sunxi-with-spl.bin from this package and confirmed that the files on the sdcard are resembling those in the source tgz.

Now, when I try booting from microSD, u-boot is executing the script and then first looking for a zImage, which is not existent. Then it should boot uImage, which is not happening. I have not the slightest idea why.

I took a screen shot from the booting attempt:

boot_very_small.jpg
screen shot of the booting attempt
boot_very_small.jpg (208.64 KiB) Viewed 9208 times


Please help.


Kind regards

tinx
tinx
 
Posts: 9
Joined: Thu Apr 02, 2015 4:01 pm

Re: CubieTruck U-Boot problem

Postby krabat » Tue Apr 07, 2015 1:09 pm

Setting up my Cubietruck according to the official installation instructions as well I don't see the problem you describe. Boot messages are
$this->bbcode_second_pass_code('', '
SCSI: SUNXI SCSI INIT
SATA link 0 timeout.
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst
Net: dwmac.1c50000
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... cannot reset port 1!?
1 USB Device(s) found
USB1: USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0...
Found U-Boot script /boot/boot.scr
805 bytes read in 121 ms (5.9 KiB/s)
## Executing script at 43100000
** File not found /boot/zImage **
3327680 bytes read in 372 ms (8.5 MiB/s)
44640 bytes read in 133 ms (327.1 KiB/s)
## Booting kernel from Legacy Image at 48000000 ...
Image Name: Linux-3.4.103-5-ARCH
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3327616 Bytes = 3.2 MiB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
[...]
')where those files of size 3327680 and 44640 bytes that get loaded after U-Boot (rightly) fails to load zImage are uImage and script.bin.

To further track the issue I'd suggest you interrupt U-Boot's autoboot as told by its messages and try to have a look at your SD card by commands like
$this->bbcode_second_pass_code('', '
# ls mmc 0:1
# ls mmc 0:1 boot
')to see whether the other files needed are recognized. More information about available commands is provided by typing 'help' at U-Boot's prompt.

Actually I think this looks like a problem with the SD card. Specifications of the one you're using?
krabat
 
Posts: 57
Joined: Wed Jun 04, 2014 8:03 pm

Re: CubieTruck U-Boot problem

Postby tinx » Wed Apr 08, 2015 1:41 pm

Hi,

thanks for the answer. Sadly, stopping autoboot via USB keyboard does not work. I now installed ALARM on HDD booting via NAND. But I'm not quite happy with it because I'd rather use a fully OSS boot process via microSD. After installing and configuring all services necessary I will give it another try installing u-boot on microSD.

The microSD card I am using is a SanDisk 2GB. No other information is available., but I used it some times to install systems on a desktop/laptop computer via USB adaptor.

Kind regards,

tinx
tinx
 
Posts: 9
Joined: Thu Apr 02, 2015 4:01 pm

Re: CubieTruck U-Boot problem

Postby WarheadsSE » Wed Apr 08, 2015 2:20 pm

The newer uboots should be able to load directly from SATA, if that is your end-goal.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: CubieTruck U-Boot problem

Postby tinx » Wed Apr 08, 2015 3:56 pm

Upgrading via pacman corrupted my boot process. I tried booting from another microSD. On this SD uImage was found, but booting the kernel did not go well. The displayed image splintered and moved around on the monitor. Then the process got stuck.

boot2_verysmall.jpg
boot2_verysmall.jpg (219.92 KiB) Viewed 9039 times
tinx
 
Posts: 9
Joined: Thu Apr 02, 2015 4:01 pm

Re: CubieTruck U-Boot problem

Postby krabat » Wed Apr 08, 2015 9:35 pm

$this->bbcode_second_pass_quote('tinx', 'S')adly, stopping autoboot via USB keyboard does not work.
Some weeks ago an issue regarding recent U-Boot and USB keyboards was discussed on that Google "mailing list". Could be related.
You may want to consider buying one of those USB to serial adaptors. It's hardly possible to handle Cubietruck well without it anyway right now, imo.

In your latest screenshot both kernel and script.bin get loaded. Assuming you didn't change the configuration otherwise this suggests there does exist a problem regarding the other SD card.

Using boot.{txt,scr} from package uboot-cubietruck sunxi kernel falls back to some emergency shell here. This seems to be related to the address the kernel gets loaded at. You may try a boot.cmd
$this->bbcode_second_pass_code('', '
env set bootargs console=$console rootwait panic=10 root=/dev/mmcblk0p1 rw hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1920x1080i60
env set bootm_boot_mode sec
ext4load mmc 0:1 $kernel_addr_r boot/uImage
ext4load mmc 0:1 $fdt_addr_r boot/script.bin
bootm $kernel_addr_r
')('env set bootargs...1080i60' in one line) that has be to converted into a boot.scr by mkimage
$this->bbcode_second_pass_code('', '
$ mkimage -C none -A arm -T script -d boot.cmd boot.scr
')which is e. g. available from package uboot-tools on Arch Linux [ARM].

@WarheadsSE
Sure. But as long as there seem to be problems regarding the SD card he'd still have to copy the SPL onto the NAND. And there aren't any tools available to do this from a running Linux system, are there?
krabat
 
Posts: 57
Joined: Wed Jun 04, 2014 8:03 pm

Re: CubieTruck U-Boot problem

Postby tinx » Fri Apr 10, 2015 8:24 am

Thanks, your script works (I changed 'env set' to 'setenv', I don't know if it matters), but it doesn't change much. Probably because of 'disp.screen0_output_mode=EDID:1920x1080i60' the displayed image is noch corrupted anymore, but it doesn't go past 'Starting kernel...'. I also tried different kernels but it doesn't help. I think it's a u-boot problem still.
tinx
 
Posts: 9
Joined: Thu Apr 02, 2015 4:01 pm

Re: CubieTruck U-Boot problem

Postby krabat » Fri Apr 10, 2015 5:44 pm

$this->bbcode_second_pass_quote('tinx', 'I') changed 'env set' to 'setenv', I don't know if it matters
No, they do the same thing. IIRC the former is some kind of successor of the latter which may get deprecated some time.
Same thing with fooprint vs. 'print foo' btw.

$this->bbcode_second_pass_quote('tinx', 'I') think it's a u-boot problem still.
Well, not that sure.
After all we seem to use same U-Boot and kernel packages which are booting here. Maybe you tweaked some setting and forgot about it while tracing the apparent SD card problem?
Not that easy to trace via Forum, though...
krabat
 
Posts: 57
Joined: Wed Jun 04, 2014 8:03 pm
Top

Re: CubieTruck U-Boot problem

Postby tinx » Fri Apr 10, 2015 6:54 pm

$this->bbcode_second_pass_quote('', 'M')aybe you tweaked some setting and forgot about it while tracing the apparent SD card problem?

Sadly, no. I just followed the guide and then began to try tweaking things to get past the errors.

Edit:
I flashed this image onto the CubieTruck using PhoenixSuite. It boots an old version of ALARM with a custom kernel. Then, extracting latest tar.gz root filesystem onto /dev/sda1, copying over kernel's modules, and changing uEnv.txt on /dev/nanda accordingly, worked. No LAN initially but should be fixable.

Sadly, after replacing uImage with the ArchLinuxARM-sun7i-latest / linux-sun7i-3.4.103-5-armv7h one broke the system again. No video output, neither HDMI nor D-Sub (apart from a rhythmic flashing line on the latter). No network access either. I'm lost...

Edit 2:
I tried the same procedure again w/o changing to the newer kernel. Network can be manually brought up after modprobing sunxi_gmac. Sadly persisting static IP address following this guide does not work. But executing systemctl start network@eth0 after reboot manually works. Why so?

Edit 3:
After updating to dan-and's kernel 3.4.106 it seems to work. Network gets up on boot and above mentioned static IP configuration works also. Still not from microSD, though.
tinx
 
Posts: 9
Joined: Thu Apr 02, 2015 4:01 pm
Top


Return to Allwinner

Who is online

Users browsing this forum: No registered users and 25 guests