U-boot Topics

From odroid US
Revision as of 12:46, 20 October 2013 by Osterluk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page is not a tutorial. It is just a place to document information about the odroid bootloader.

Here is a link to the HardKernel Project: http://dev.odroid.com/projects/4412boot/

source code

  • Hardkernel posted a project of 4412 (odroidu2 and some previous), see link above.
  • Link to pre-built blobs for u-boot. These are proprietary (Samsung) https://github.com/hardkernel/linux/tree/odroidxu-3.4.y/tools/hardkernel/u-boot-pre-built


    For 4412, the network is just recently available to u-boot. The smsc95xx driver is used, it is like USB/ethernet dongle -- not directly memory-mapped to processor, but forum member suriyan has ported USB stuff from the kernel into u-boot.


    Compile a u-boot script

    mkimage -T script -A arm -C none -n 'Boot script for odroid-u2' -d boot.txt boot.scr

    Abort boot at u-boot console

    For some SD-Card images, the u-boot bootdelay environment variable will already be set to non-zero. In this case, boot normally, get root and then use the reboot command (from the serial console). As the system starts up hit <cr> a bunch of times. If u-boot is checking for input, the boot will abort and then you will get to play.

    If you can't break in that way, try this:

  • Find the boot script source, for example boot.txt in the boot partition
  • Move it to your Debian/ubuntu host, if you can't run mkimage on odroid
  • Edit the script to set the bootdelay u-boot environment variable to some non-zero number
    set bootdelay 3
  • Compile the script as noted above, using mkimage and move the resultant boot.scr (my example) back to the boot partition
  • Reboot

    Flash Layout -- Android

    Odroid has 2Gbyte T-flash(removable) memory card for system area. Assume it has 3,862,528 blocks(sectors) and each block has 512bytes.
    Area Name Size in bytes From(sector #) To(Sector #) Partition Name
    eFuse 1K 3862526 3862527
    U-boot BL1 8K 3862510 3862525
    U-boot Envi. variables 16K 3862478 3862509
    U-boot BL2 512K 3861454 3862477
    Linux Kernel 4M 3853262 3861453
    EXT3 for Recovery System 256MB 2632272 3156560 mmcblkp3
    EXT3 for Android system 256MB 2102792 2632271 mmcblkp2
    EXT3 for Android user data 1GB 62 2102791 mmcblkp1
    Partition table / BPB 31K 0 61
    Reserved area will be used for other purpose in the future. Or you can also install E-boot and a WinCE image to activate multi OS booting

    Version Info

    The current version

    U-Boot 2010.12-svn (Dec 21 2012 - 19:44:04) for Exynox4412

  • Interestingly, the u-boot config is spelled differently than the current Samsung chip name
  • The eMMC Android version shipped from Hardkernel matches the version in odroidu2-ubuntu SD Card image

    odroid-x version

    U-Boot 2010.12-00000-gd359a3d-dirty (Sep 04 2012 - 09:38:51) for ODROID4412 This means there are at least two configurations is use -- and this one is older. I see that there are three mmc partitions defined and the kernel and initrd are loaded from the third instance.

    The u-boot banner show this. The platform resources are different from odroid-U2, so it is normal to expect this. The machine ID should be different from Exynos 4412 and Exynos 4412-prime processors.

    CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9]
    APLL = 1000MHz, MPLL = 800MHz
    DRAM:  1023 MiB
    PMIC VERSION : 0x00, CHIP REV : 2
    BL1 version: N/A (TrustZone Enabled BSP)

    The first partition is not a valid Linux partition as expected. The second is vfat and is used as boot partition. The third is ext4 and has the root file system

    Here is the default boot script

    cat boot.txt
    setenv initrd_high "0xffffffff"
    setenv fdt_high "0xffffffff"
    setenv bootcmd "fatload mmc 0:2 0x40007000 uImage; fatload mmc 0:2 0x42000000 uInitrd; fatload mmc 0:2 0x41f00000 board.dtb; bootm 0x40007000 0x42000000"
    setenv bootargs "console=tty1 console=ttySAC1,115200n8  root=UUID=c21f1426-e878-4f05-a063-0a9c5e4234d0 rootwait ro"


    fastboot does not seem to work

    The USB device node does not come up when fastboot started (on the target). Does not work for Android ICS or ubuntu (not surprising since the u-boot version is the same)

    fastboot does work with the odroid-x u-boot ( When I say it works, I mean the USB device shows up and fastboot responds to commands.

    Bus 002 Device 050: ID 18d1:0002 Google Inc. 

    I thought this should work, but no results were shown. (It could be due to my x86_64 Linux version of fastboot -- I haven't seen it actually work and I don't have fastboot for windows and the driver at this point)

    sudo fastboot getvar ver
    finished. total time: 0.003s

    fastboot partition information is wrong

    Since fastboot does not appear to work, this is not much of a problem now. This is what I see, the layout is for NAND, not SD-Card/eMMC

    # this is on my odroid-x 
    ODROID4412 # fastboot
    [Partition table on MoviNAND]
    ptn 0 name='fwbl1' start=0x0 len=N/A (use hard-coded info. (cmd: movi))
    ptn 1 name='bl2' start=N/A len=N/A (use hard-coded info. (cmd: movi))
    ptn 2 name='bootloader' start=N/A len=N/A (use hard-coded info. (cmd: movi))
    ptn 3 name='tzsw' start=N/A len=N/A (use hard-coded info. (cmd: movi))
    ptn 4 name='kernel' start=N/A len=N/A (use hard-coded info. (cmd: movi))
    ptn 5 name='ramdisk' start=N/A len=0x1000000(~16384KB) (use hard-coded info. (cmd: movi))
    OTG cable Connected!