Jump to content

[ODROID-HC2] where does u-boot look for necessary files and what filesystem type is needed ?


Go to solution Solved by g00d,

Recommended Posts

Posted

Hi all,

 

can anyone explain to me how the boot process of an ODROID-HC2 looks in detail, please? for example, my microSD card is /dev/mmcblk1 and it contains only one partition /dev/mmcbl1p1.

 

Questions:

 

a) I think the ODROID-HC2 can exclusively boot from a microSD card, is this correct? Without sdCard the boot process is not possible, right?

b) where exactly sits the bootloader? is it in a certain sector of the microSD card and if so where exactly and how long? or does the ODROID-HC2 trying to read at specific addresses and if so where?

c) can u-boot only process the first partition of the block device or would it be theoretically possible to have the /boot directory on /dev/mmcbl1p4 ?

d) does the partition that u-boot is looking for need to be formatted as ext4 or will ext3, ext2, vfat or even ntfs work, too ?

 

Looking for any helpful information. Thanks a bunch!

Posted

Hi Igor,

 

thanks for the information provided. I have done several tests by starting with a functional uSD card. The bootloader is on the uSD card but I have problems with the first partition. I tried several partition types and file system combinations. When the first partition is formatted as ext4 or ext2 and containing the /boot folder the boot process finishes successfully. However when I format this partition with 'mkfs.vfat' or 'mkfs.fat' or 'mkfs.fat -F 16' the boot process will fail. According to the boot log it seems that U-Boot is expecting a ext* file system.

 

Zitat

U-Boot 2017.05-armbian (Oct 08 2021 - 19:51:17 +0000) for ODROID-XU4

CPU:   Exynos5422 @ 800 MHz
Model: Odroid XU4 based on EXYNOS5422
Board: Odroid XU4 based on EXYNOS5422
Type:  unknown
DRAM:  2 GiB
MMC:   EXYNOS DWMMC: 0, EXYNOS DWMMC: 1
MMC Device 0 ( SD ): 59.5 GiB
Card did not respond to voltage select!
mmc_init: -95, time 11
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Press quickly 'Enter' twice to stop autoboot:  0
reading /boot.ini
13424 bytes read in 4 ms (3.2 MiB/s)
## Executing script at 43e00000
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading armbianEnv.txt
** Unable to read file armbianEnv.txt **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading zImage
** Unable to read file zImage **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading uInitrd
** Unable to read file uInitrd **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading .next
0 bytes read in 19 ms (0 Bytes/s)
Found mainline kernel configuration
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading dtb/exynos5422-odroidxu4.dtb
** Unable to read file dtb/exynos5422-odroidxu4.dtb **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!
Bad Linux ARM zImage magic!
reading /boot/boot.ini
13424 bytes read in 9 ms (1.4 MiB/s)
## Executing script at 43e00000
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading armbianEnv.txt
** Unable to read file armbianEnv.txt **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading zImage
** Unable to read file zImage **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading uInitrd
** Unable to read file uInitrd **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading .next
0 bytes read in 19 ms (0 Bytes/s)
Found mainline kernel configuration
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading dtb/exynos5422-odroidxu4.dtb
** Unable to read file dtb/exynos5422-odroidxu4.dtb **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!
Bad Linux ARM zImage magic!
reading /boot.scr
** Unable to read file /boot.scr **
## Executing script at 43e00000
** Invalid partition 2 **
## Executing script at 43e00000
** Invalid partition 2 **
## Executing script at 43e00000
** Invalid partition 2 **
## Executing script at 43e00000
mmc_init: -110, time 121
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
starting USB...
USB0:   USB EHCI 1.00
USB1:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
USB2:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... cannot reset port 1!?
1 USB Device(s) found
scanning bus 2 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 1 Ethernet Device(s) found

USB device 0: unknown device
Waiting for Ethernet connection... unable to connect.
BOOTP broadcast 1

 

I check boot.ini and to be sure I not only copied /boot folder to the partition 1 but also all the files additionally to the root of that partition. That way u-boot can look for the necessary files in / or in /boot but it didn't help. What am I missing here, how can I make the boot work successful by using vfat or fat16 ?

 

thanks a bunch

Did I miss anything or what else do I need to configure so

  • Solution
Posted

Me again. I figured out what the problem was and I was able to solve this like that:

 

the original /boot structure contains three symbolic links, in my case on the ODROID-HC2 (which is equal to odroidxu4):

 

dtb -> dtb-5.4.151-odroidxu4

uInitrd -> uInitrd-5.4.151-odroidxu4

zImage -> vmlinuz-5.4.151-odroidxu4

 

The default boot.ini is seeking for that link names but on the fat system it's not possible to have symbolic links. I just renamed (or one can simply copy) the existing three files like that:

 

dtb-5.4.151-odroidxu4 ---to---> dtb

uInitrd-5.4.151-odroidxu4 ---to---> uInitrd

vmlinuz-5.4.151-odroidxu4 ---to---> zImage

 

I also found out that /boot folder is NOT being red by boot process, it looks at the root folder for those files. So I "mv /boot/* /" moved the complete content of the /boot folder into the root. That way the boot process works like a charm.

 

Thank you Igor for assistance. Have a nice weekend

 



U-Boot 2017.05-armbian (Oct 08 2021 - 19:51:17 +0000) for ODROID-XU4

CPU:   Exynos5422 @ 800 MHz
Model: Odroid XU4 based on EXYNOS5422
Board: Odroid XU4 based on EXYNOS5422
Type:  unknown
DRAM:  2 GiB
MMC:   EXYNOS DWMMC: 0, EXYNOS DWMMC: 1
MMC Device 0 ( SD ): 59.5 GiB
Card did not respond to voltage select!
mmc_init: -95, time 12
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Press quickly 'Enter' twice to stop autoboot:  0
reading /boot.ini
13424 bytes read in 4 ms (3.2 MiB/s)
## Executing script at 43e00000
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading armbianEnv.txt
** Unable to read file armbianEnv.txt **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading zImage
7337840 bytes read in 489 ms (14.3 MiB/s)
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading uInitrd
13347465 bytes read in 872 ms (14.6 MiB/s)
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading .next
0 bytes read in 20 ms (0 Bytes/s)
Found mainline kernel configuration
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading dtb/exynos5422-odroidxu4.dtb
87877 bytes read in 37 ms (2.3 MiB/s)
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
Kernel image @ 0x40008000 [ 0x000000 - 0x6ff770 ]
## Loading init Ramdisk from Legacy Image at 42000000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    13347401 Bytes = 12.7 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 44000000
   Booting using the fdt blob at 0x44000000
   Using Device Tree in place at 44000000, end 44018744

Starting kernel ...

 

 

Posted

@Igor: I have one more question, maybe you can answer this, too? Is it possible to have u-boot look for 'foo.bar' instead of 'boot.ini' ? Is there any HowTo how this could be accomplished ?

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines