ARch linux fails to boot on Odroid like board with DTB file

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

ARch linux fails to boot on Odroid like board with DTB file

Postby ajiratech » Sun Sep 03, 2017 5:07 pm

I'm using ann Odroid C2 image to boot a Amlogic Reference board P200 into Arch linux. If I provide dtb.img file on the bootable media then the boot process hangs after loading kernel. It doesn't matter which dtb file I provide (I've tried several and I'm sure that atleast one of them should have worked). But If were to remove the dtb.img file then the boot process is able complete the boot and provide me login prompt and work quite well.

The issue that I am trying to resolve is that when I do not provide dtb file and the system boots and works well, but it has no sound cards installed, I've verified that using alsa-utils.

The bootable partition does contain a few DTB files in folders "dtb" and "dtbs", but I don't think it is picking up a file from there.

Successful completion of booting into Arch linux when no DTB file is specified.

Code: Select all
reading s905_autoscript
962 bytes read in 25 ms (37.1 KiB/s)
## Executing script at 01020000
########## cmd=setenv m "1080p60hz"
setenv m_bpp "32"
setenv loadaddr "0x11000000"
setenv dtb_loadaddr "0x1000000"
setenv initrd_loadaddr "0x13000000"
setenv condev "console=ttyS0,115200n8 console=tty0 no_console_suspend consoleblank=0"
setenv bootargs "root=LABEL=ROOTFS rootflags=data=writeback rw ${condev} hdmimode=${m} m_bpp=${m_bpp} fsck.repair=yes net.ifnames=0 elevator=noop mac=00:15:18:01:81:31"
setenv boot_start booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
if fatload usb 0 ${initrd_loadaddr} uInitrd; then if fatload usb 0 ${loadaddr} Image; then if fatload usb 0 ${dtb_loadaddr} dtb.img; then run boot_start; else store dtb read $dtb_loadaddr; run boot_start;fi;fi;fi;
if fatload mmc 0 ${initrd_loadaddr} uInitrd; then if fatload mmc 0 ${loadaddr} Image; then if fatload mmc 0 ${dtb_loadaddr} dtb.img; then run boot_start; else store dtb read $dtb_loadaddr; run boot_start;fi;fi;fi;

reading uInitrd
3845086 bytes read in 4118 ms (911.1 KiB/s)
reading Image
13281080 bytes read in 14082 ms (920.9 KiB/s)
reading dtb.img
** Unable to read file dtb.img **
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
read emmc dtb
      Amlogic multi-dtb tool
      Single dtb detected

## Loading init Ramdisk from Legacy Image at 13000000 ...
   Image Name:   Ramfs
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    3845022 Bytes = 3.7 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
      Amlogic multi-dtb tool
      Single dtb detected
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
board_usb_stop cfg: 0
   Loading Ramdisk to 73b17000, end 73ec1b9e ... OK
   Loading Device Tree to 000000001fff4000, end 000000001ffff1dc ... OK
signature:
fdt_instaboot: get header err

Starting kernel ...
<..... continues to boot successfully, but in the end I do not get any sound cards installed>




Boot process hangs after "Starting kernel ... " when a DTB file is provided. (I've tried several different ones

Code: Select all

scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
reading s905_autoscript
962 bytes read in 25 ms (37.1 KiB/s)
## Executing script at 01020000
########## cmd=setenv m "1080p60hz"
setenv m_bpp "32"
setenv loadaddr "0x11000000"
setenv dtb_loadaddr "0x1000000"
setenv initrd_loadaddr "0x13000000"
setenv condev "console=ttyS0,115200n8 console=tty0 no_console_suspend consoleblank=0"
setenv bootargs "root=LABEL=ROOTFS rootflags=data=writeback rw ${condev} hdmimode=${m} m_bpp=${m_bpp} fsck.repair=yes net.ifnames=0 elevator=noop mac=00:15:18:01:81:31"
setenv boot_start booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
if fatload usb 0 ${initrd_loadaddr} uInitrd; then if fatload usb 0 ${loadaddr} Image; then if fatload usb 0 ${dtb_loadaddr} dtb.img; then run boot_start; else store dtb read $dtb_loadaddr; run boot_start;fi;fi;fi;
if fatload mmc 0 ${initrd_loadaddr} uInitrd; then if fatload mmc 0 ${loadaddr} Image; then if fatload mmc 0 ${dtb_loadaddr} dtb.img; then run boot_start; else store dtb read $dtb_loadaddr; run boot_start;fi;fi;fi;

reading uInitrd
3845086 bytes read in 4108 ms (913.1 KiB/s)
reading Image
13281080 bytes read in 14048 ms (922.9 KiB/s)
reading dtb.img
34437 bytes read in 102 ms (329.1 KiB/s)
## Loading init Ramdisk from Legacy Image at 13000000 ...
   Image Name:   Ramfs
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    3845022 Bytes = 3.7 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
      Amlogic multi-dtb tool
      Single dtb detected
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
board_usb_stop cfg: 0
   Loading Ramdisk to 73b17000, end 73ec1b9e ... OK
   Loading Device Tree to 000000001fff4000, end 000000001ffff684 ... OK
signature:
fdt_instaboot: get header err

Starting kernel ...

uboot time: 33624199 us
<  hangs at this point >



Can someone help me figure out which dtb file is it using when I do not provide a dtb file in root folder of bootable partition ?

Based on the logs it seems it is picking up file from location 0x1000000

reading dtb.img
** Unable to read file dtb.img **
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
ajiratech
 
Posts: 4
Joined: Tue Aug 22, 2017 5:59 am

Re: ARch linux fails to boot on Odroid like board with DTB f

Postby rontant » Mon Sep 04, 2017 1:14 am

isn't there a line in /boot/boot.ini that specifies which dtb to load?

Code: Select all
load mmc 0:1 ${dtb_loadaddr} /boot/dtbs/meson64_odroidc2.dtb
Rock 64, Odroid XU4, Raspberry Pi 3, Pogo 4, Pogo Pink E02, Goflex
rontant
 
Posts: 19
Joined: Sat May 27, 2017 1:10 am
Location: Singapore

Re: ARch linux fails to boot on Odroid like board with DTB f

Postby ajiratech » Tue Sep 05, 2017 6:03 am

When I do successfully boot without providing a dtb file in "root" directory of "boot" partition, I checked and I do not see a "boot.ini" file here under /boot.

Per the boot logs I attached earlier, it seems that uboot calls upon "s905_autoscript" and that script specifies the location of dtb file with command 'setenv dtb_loadaddr "0x1000000" '

Here is the complete script (s905_autoscript):

Code: Select all
'VsX@UU3Xzsetenv m "1080p
setenv m_bpp "32"
setenv loadaddr "0x11000000"
setenv dtb_loadaddr "0x1000000"
setenv initrd_loadaddr "0x13000000"
setenv condev "console=ttyS0,115200n8 console=tty0 no_console_suspend consoleblank=0"
setenv bootargs "root=LABEL=ROOTFS rootflags=data=writeback rw ${condev} hdmimode=${m} m_bpp=${m_bpp} fsck.repair=yes net.ifnames=0 elevator=noop mac=00:15:18:01:81:31"
setenv boot_start booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
if fatload usb 0 ${initrd_loadaddr} uInitrd; then if fatload usb 0 ${loadaddr} Image; then if fatload usb 0 ${dtb_loadaddr} dtb.img; then run boot_start; else store dtb read $dtb_loadaddr; run boot_start;fi;fi;fi;
if fatload mmc 0 ${initrd_loadaddr} uInitrd; then if fatload mmc 0 ${loadaddr} Image; then if fatload mmc 0 ${dtb_loadaddr} dtb.img; then run boot_start; else store dtb read $dtb_loadaddr; run boot_start;fi;fi;fi;


The location you specified for dtb, does have the dtb file you mentioned. But I don't see it being explicitly called anywhere.

ls /boot/dtbs
meson64_odroidc2.dtb
ajiratech
 
Posts: 4
Joined: Tue Aug 22, 2017 5:59 am

Re: ARch linux fails to boot on Odroid like board with DTB f

Postby rontant » Wed Sep 06, 2017 12:54 am

What about /boot/boot.txt? Please download again the tarball for Odroid C2 and look for either /boot/boot.txt or /boot/boot.ini. It's there.
Rock 64, Odroid XU4, Raspberry Pi 3, Pogo 4, Pogo Pink E02, Goflex
rontant
 
Posts: 19
Joined: Sat May 27, 2017 1:10 am
Location: Singapore

Re: ARch linux fails to boot on Odroid like board with DTB f

Postby ajiratech » Wed Sep 06, 2017 4:37 pm

Thanks rontant.


I downloaded the latest image and You are correct, the tar ball does have boot.txt and boot.ini in it.
I wrote this image on the SD card using these instructions.

https://archlinuxarm.org/platforms/armv ... /odroid-c2

But for some reason, I can't get the board to boot using this. It displays the message "** Unrecognized filesystem type **" and then goes on to try booting from alternative methods. I think I didn't install this right so I'm going to check forums for correct install procedure.

I'll come back and provide an update once I figure out how to get a fresh install.

P.S. - I thought the image I was using was downloaded from Archlinux, but I may have been wrong. I think the older image I'm using is from another ROM developer on the android boxes forums.
ajiratech
 
Posts: 4
Joined: Tue Aug 22, 2017 5:59 am

Re: ARch linux fails to boot on Odroid like board with DTB f

Postby rontant » Thu Sep 07, 2017 1:16 am

I don't know how different your board is to Odroid C2 but it maybe worthwhile to look into the Odroid C2 tarball for a script file called /boot/sd_fusing.sh.
Rock 64, Odroid XU4, Raspberry Pi 3, Pogo 4, Pogo Pink E02, Goflex
rontant
 
Posts: 19
Joined: Sat May 27, 2017 1:10 am
Location: Singapore


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 1 guest