Odroid U3 Kernel Upgrade + Docker

I wrote this back in January 2017. Since then I had not much time to work on the Odroid - however, user hexdump did just came up with a new repo, supporting the Odroid U3 with Kernel 5.4.x - you can find the overview over his awesome work here and the repo with complete releases (i.e. Ubuntu Bionic or Debian Buster i.e. odroid_u3-armv7l-debian.img.gz) here

I am using an trusty old Odroid U3 which I acquired years ago. With its SAMSUNG Exynos 4412 Cortex-A9 Quad Core 1,7 Ghz, 1MB L2 cache and 2 GB of RAM, this little puppy was an real beast - compared to the Raspberry Pi 1 at that time. However, Hardkernel did drop the support - again, which left the Users back with very old Kernel versions. However, thanks to some users and the fact that all needed support for the Exynos is now included in the current kernel - well, we can build our own. This write up is the distilled result of days of work and a lot of research - and the work of other people which I found on the net (which I will try to give proper credits at the right locations :)).

EDIT: I upgraded the Kernel Configuration GIST for my Kernel Config + Docker on 10.02.2017. Thanks to an E-Mail from Tobias Jakobi I found the pieces I missed about adding the Kernel Internal Fanservice into the Config. This works now, however - I still like my tweaked program a bit better, as it cools the system more aggressivly, while the kernel default one is a lot more silent, but runs in the 80's°C while mine will stay at 70° on max load.

It is important that these instructions, especially if it comes down to installing stuff - is written for the usage of eMMC memory, NOT THE SDCARD! Also, there be dragons and something could go wrong - so please, as usual, advance at your own pace and risk! 🙂

0.) Get an Serial Interface for 1.8V
Important. The UART is 1.8V LVTTL ONLY! If you connect 3.3V or 5V, you'll blow the U3! I used an regular 5V TTL USB Adapter as well as an Sparkfun BiDir Level Converter: https://www.sparkfun.com/products/12009 With that set to 1.8V from the UART of the U3, it worked flawlessly with the usual 115000 BAUD.

Pinout:
http://odroid.com/dokuwiki/doku.php?id=en:u3_hardware

_____UART____
|Pin 4 - GND|
|Pin 3 - RXD|
|Pin 2 - TXD|
|Pin 1 - VCC|
___________|
1.8V LVTTL

1.) Build U-Boot
A lot of stuff is taken from here, thanks a lot for your great work, SnakeBite!
We asume you're working as root, as all this stuff will need root rights :).

# update your packages
apt-get update
# needed for building u-boot
apt-get install device-tree-compiler
# get ODROID signed u-boot
wget http://odroid.in/guides/ubuntu-lfs/boot.tar.gz
tar xzf boot.tar.gz
# get patched u-boot & build for the U3
git clone https://github.com/tobiasjakobi/u-boot
cd u-boot
make odroid_config
make
#copy fresh u-boot to ODROID directory
cp u-boot-dtb.bin ../boot/u-boot.bin
cd ../boot
## install on SDCard - not what we want, just as an remark for me
#bash sd_fusing.sh /dev/mmcblk0

Copy the needed files (u-boot.bin, E4412_S.bl1.HardKernel.bin, bl2.signed.bin, E4412_S.tzsw.signed.bin) to your PC, reboot your Odroid U3 into fastboot via connecting the UART to the U3 and aborting the boot. After that, you can issue the fastboot command on the UART. The U3 will now wait for filetransfer over the Micro USB Port, which you'll need to connect to your PC. Also, for the sake of an easy upgrade, use an Linux PC (more infos here: http://odroid.com/dokuwiki/doku.php?id=en:u3_building_u-boot ).

# install needed programs
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot
# and - being in the right folder, start the transfer
# u-boot.bin install
sudo fastboot flash bootloader u-boot.bin
# bl1.bin install
sudo fastboot flash fwbl1 bl1.HardKernel
# bl2.bin install
sudo fastboot flash bl2 bl2.HardKernel
# tzsw.bin install
sudo fastboot flash tzsw tzsw.HardKernel
# If installation is done, you can reboot your ODROID-U3 with fastboot.
sudo fastboot reboot

You should now have a more recent U-Boot install.

Old: U-Boot 2010.12-svn (May 12 2014 - 15:05:46) for Exynox4412
New: U-Boot 2016.11-rc3-g8a65327 (Jan 07 2017 - 23:00:56 +0100)

By the way, we needed to download this boot.tar.gz, because it contains the keys needed to sign our new U-Boot install. More Infos about U-Boot and Keys: https://github.com/dsd/u-boot/blob/master/doc/README.odroid

The Installation of a more recent U-Boot version was necessary to facilitate the boot of the to-be-build new Kernel zImage with bootz.

1b.) eMMC recovery in case something goes wrong:
http://forum.odroid.com/viewtopic.php?f=53&t=969
DL the tool [ exynos4412_emmc_recovery_from_sd_20140629.zip ]

  1. Prepare a microSD card and flash the attached image.
  2. Insert microSD into U2/U3, disconnect eMMC
  3. Turn on U2/U3 and wait for a few seconds and blue LED will blink.
  4. Plug your eMMC module into U2/U3
    4b - wait 10 seconds!
  5. Plug micro-USB cable into U2/U3 and connect other side to your PC USB host or ODROID's USB host port. (This is a trigger to start the recovery)
  6. After recovery process (only a few seconds), the blue LED will turn off automatically.
  7. Finish. Install OS on your eMMC with as usual.

2.) Building Next Kernel for Odroid U3 with eMMC
And now to start the real work:

apt-get update
apt-get install live-boot u-boot-tools
cd ~
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git linux_odroid
cd linux_odroid
# we could make an default config, but this is not needed, we take rglinuxtech config in the next step
# make exynos_defconfig
# Odroid Config Kernel 4.4 from http://rglinuxtech.com/?p=1656
curl -o .config http://pastebin.com/raw/NveRajaZ
# Or you can use my Config which enables Docker as well (Gist at the End of the page)
curl -o .config https://gist.githubusercontent.com/nmaas87/81818c1db9dc292a4c21125bd2602658/raw/7e4e14fa15d7c68b177f31b9e2348d62c52cf83c/u3_docker_config
make menuconfig
make prepare modules_prepare
make -j4 bzImage modules dtbs
make modules_install
cp arch/arm/boot/dts/exynos4412-odroidu3.dtb /media/boot/exynos4412-odroidu3_next.dtb
cp arch/arm/boot/zImage /media/boot/zImage_next
cp .config /boot/config-`cat include/config/kernel.release`
update-initramfs -c -k `cat include/config/kernel.release`
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/initrd.img-`cat include/config/kernel.release` /boot/uInitrd-`cat include/config/kernel.release`
cp /boot/uInitrd-`cat include/config/kernel.release` /media/boot/
cd /media/boot/
vi boot.txt
# now we have to rework the boot.txt / config
# comment out the old values and set in the new ones
# please do NOT copy blindly, you need to adjust the zImage, uInitrd and eyxnos4412***.dtb file names according to your system!
setenv initrd_high "0xffffffff"
setenv fdt_high "0xffffffff"
#setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootm 0x40008000 0x42000000"
setenv bootcmd "fatload mmc 0:1 0x40008000 zImage_next; fatload mmc 0:1 0x42000000 uInitrd-4.10.0-rc2-next-20170106-v7; fatload mmc 0:1 0x44000000 exynos4412-odroidu3_next.dtb; bootz 0x40008000 0x42000000 0x44000000"
#setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=/dev/mmcblk0p2 rootwait ro mem=2047M"
setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=/dev/mmcblk1p2 rootwait ro mem=2047M"
boot

#After you have done that, write the commands to the boot.scr file
mkimage -C none -A arm -T script -d boot.txt boot.scr
# sync and reboot and it should work
sync
reboot now

With this in mind I really upgraded my system from kernel 3.8.13 from 2015 - to the most recent 4.10.0-rc2 next Kernel 🙂

Old: Linux odroid 3.8.13.30 #1 SMP PREEMPT Fri Sep 4 23:45:57 BRT 2015 armv7l armv7l armv7l GNU/Linux
New: Linux odroid 4.10.0-rc2-next-20170106-v7 #3 SMP PREEMPT Mon Jan 9 19:17:32 CET 2017 armv7l armv7l armv7l GNU/Linux

2b.) FAN does not work, warning!
The CPU Fan does somehow not work right out of the box, so we will now enable it manually. [EDIT, with the new Kernel Config it works out of the box, but you can still decide to use this software to have a more aggressiv cooling :)]

# Fan to full speed
echo 255 > /sys/devices/platform/pwm-fan/hwmon/hwmon0/pwm1
# Read out current temperature in °C
cat /sys/devices/virtual/thermal/thermal_zone0/temp

To get things working again, I forked and updated the odroidu2 fan tool. Install it via:

git clone --depth 1 https://github.com/nmaas87/odroidu2-fan-service.git
cd odroidu2-fan-service
make
# install it as upstart service, i.e. < Ubuntu 16.04
make usi
# install it as systemd, i.e. Ubuntu 16.04 / Xenial
make systemd
reboot

Useful Commands:

# Read max CPU Speed:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
# Get current CPU Speed:
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
# Torrture Test:
openssl speed -multi 4

2c.) Upgrade to Xenial
As I upgraded to Xenial with do-relase-upgrade, I had some problems:

Authentication Problem:
It was not possible to authenticate some packages. This may be a transient network problem. You may want to try again later. See below for a list of unauthenticated packages. create /etc/update-manager/release-upgrades.d/unauth.cfg with

[Distro]
AllowUnauthenticated=yes

After upgrade, remove this file.
from: http://askubuntu.com/questions/425355/error-authenticating-some-packages-while-upgrade

After that, apt-get clean did not work:
apt-get clean
W: Problem unlinking the file apt-fast - Clean (21: Is a directory)

Solution was:

rm -rf /var/cache/apt/archives/apt-fast

from: http://askubuntu.com/questions/765274/error-problem-unlinking-in-apt-get-clean

2d.) MAC address changes every reboot:
One solution, which did not work, was following:

rm /etc/smsc95xx_mac_addr

from: http://forum.odroid.com/viewtopic.php?f=7&t=1070

Which worked better, was to really set the MAC address to a static value:
add in /etc/network/interfaces

auto eth0
iface eth0 inet dhcp
hwaddress ether bb:aa:ee:cc:dd:ff

from: http://forum.odroid.com/viewtopic.php?f=111&t=8198

2e.) Control the CPU speeds via cpufrequtils:

apt-get install cpufrequtils
vi /etc/default/cpufrequtils

ENABLE="true"
GOVERNOR="ondemand"
MAX_SPEED=1704000
MIN_SPEED=200000

However, I chose "performance" as GOVERNOR and a MIN_SPEED=800000

from: http://forum.odroid.com/viewtopic.php?f=65&t=2795

2f.) Install Docker
If you chose my .config with Docker enabled, you can install Docker with a fast
curl -sSL https://get.docker.com/ | sh
Thanks a lot to the Guys over at Hypriot, I took their RPi Kernel Configs as an example and merged those with the U3 Configs to get to this results. And yes, AUFS is still missing but... it is ok 😉

Additional stuff:
- Gist of my Kernel Config: https://gist.github.com/nmaas87/81818c1db9dc292a4c21125bd2602658

Following sites helped:
- https://blogs.s-osg.org/install-ubuntu-run-mainline-kernel-odroid-xu4/
- http://rtisat.blogspot.de/search/label/odroid-u3
- https://github.com/umiddelb/armhf/wiki/How-To-compile-a-custom-Linux-kernel-for-your-ARM-device
- http://rglinuxtech.com/?p=1622
- http://rglinuxtech.com/?p=1656
- http://forum.odroid.com/viewtopic.php?f=81&t=9342

31 thoughts on “Odroid U3 Kernel Upgrade + Docker

  1. Thank you, no I would not mind at all, however, the kernel was on the RC stage and not stable, also it is now some months old and I doubt that I would get zipped everything together for use. So I would really recommend building your own kernel as shown in the tutorial - that way it should work better and you will faster access to it. Also, I have no access to the Odroid at the moment :(.

  2. Thanks for all! I was able to upgrade my system following your guide. I have an Odroid U3 with latest 4.12-rc kernel and u-boot 2017-05! I have write an spanish guide on my blog, trasteandoarduino.com. I have upgraded kernel first, and before reboot, I upgraded u-boot.

  3. Awesome! Thank you for your cool project and callback :)! Very nice work indeed and happy that it turned out good :)! Have a nice day!

  4. Thank you so much. The odroid u3 is still a reasonably powerful ARM machine, but I can't do everything I'd like to with it because of the old kernel. This looks like a lot of work which I won't have time foroon, like upgrading u-boot. Hopefully I can spend a weekend on it soon and report back another success story. 🙂

  5. The Odroid U3+ is, as far as I know, not really existing. However, some companies out there sold the Rev. 0.5 of the Odroid U3 as "U3+" - instead of the Rev. 0.3 of the original model.
    That being said, I think it should work as only small difference are between the boards as far as I know :). Just try it out ;)!

  6. Hi Nico, thanks for the encouragement to try it out, unfortunately I am a newbie with Odroid kernel configuration, being more used to the 'plug and pray' user interface.
    Considering that I am using a standard U3+ (original board) would I need the alternate power supply first? Before starting the Kernel Configuration?

    ' 0.) Get an Serial Interface for 1.8V
    Important. The UART is 1.8V LVTTL ONLY! If you connect 3.3V or 5V, you'll blow the U3!'

  7. Hi Roy,

    well first thing you should check, would be what type of Odroid you have. The U3 has been discontinued in 2015 and has not be available on the market for years, due to the fact that the chip that is used in production is not made anymore. So the most important thing is to check, if you got a U3 like this one - or not. Most probably you got an Odroid C1+ - which is the only one in the more recent Odroid series with a plus behind it. This configuration here won't work on that Odroid. Additionally, this configuration only works if it is done with an Odroid U3 with an eMMC module attached to it - no Sdcard Support for the OS installation.

    I power the Odroid itself by its barel connector with the original power supply. The text you quoted goes for the UART TTL device: You need an 1.8V TTL Serial USB Adapter to configure the Odroid. Mostly only 3.3V or 5V adapters are sold - so you need to try to get onto one of the last ones from hardkernel like this one or have to build it yourself. Connecting the Odroid Serial connector with anything other than 1.8V will damage the chip irreversibly.

  8. Hi Nico,

    Yes it is definitely like the one in the pic, including the heatsink, only difference is that it has ODROID-U3+ silkscreen printed on the left edge of the pcb, closest to the ethernet connector.

    Pity I cannot attach a pic to confirm this with you.
    It has 3xUSB ports one that is vertical and two stacked on each other horizontally. On the same side as the USB ports are: power socket, micro-HDMI followed by a Micro-USB 2.0 port In that order. On the other side of the pcb is a socket that looks like a mini-jack socket.

    I will order the connector.

    Thanks for the quick response.

    Kind regards,
    Roy

  9. Thank you for the efforts.
    Used the 4.10er kernel sources and your kernel-config with docker support. Kernel builds and starts on my U3 (rev 0.5), but I got 3 big problems:
    - The display manager doesn't start anymore.
    [drm:exynos_drm_framebuffer_init] *ERROR* Non-contiguous GEM memory is not supported.
    - eth0 disappeared. No network anymore.
    - "reboot" hangs after "[ OK ] Reached target Shutdown."
    Unfortunately i have these effects with all kernel-configs i found for the U3, told to work propperly.
    I am really desperate.
    I found some hints, that the DRM problem has to do with the IOMMU. I also used U3 kernel-configs where the graphics works, but the mouse cursor is invisible.
    Is there anyone out there, who has working kernel sources and a kernel config for a kernel >= 4.4 for an Odroid U3?
    Currently the only working kernel i have is the latest Hardkernel stock kernel (3.18something) and the one installable via apt from "meveric" (same kernel version).

    🙁

  10. Hi Thorsten,

    looks like Tobias Jakobi did build 4.13 and 4.14 for the X2 and mentions that it could be working on the U3 as well.
    However, he - and neither I - did try it.

    http://linux-exynos.org/wiki/Hardkernel_ODROID-X2
    https://github.com/tobiasjakobi/linux-odroid-public/tree/odroid-4.14.y
    https://github.com/tobiasjakobi/odroid-environment/blob/master/sourcecode/system/vanilla-4.14-debug.conf

    Also, there seems to be ArchLinux working on it with a 4.15 kernel - however, you will be forced to use Arch then:
    https://forum.armbian.com/topic/3518-which-image-should-i-install-on-odroid-u3-community-exynos4412/?tab=comments#comment-51619
    Linux odroid-u3 4.15.11-1-ARCH #1 SMP Tue Mar 20 00:23:08 UTC 2018 armv7l GNU/Linux

    Good luck

  11. hi Nico,

    I am still toying with the idea of exploring your hack. The components are still available on Odroid website, but I am still daunted by the level of skill and knowledge needed to get my U3+ working again. Would be achievable by someone with some electrical hobby experience but no programming knowledge? Would it be easier if you could share the image that could be copied onto an EMMC card? What would be the best way to proceed?

    I am planning to order the following to resurrect my u3:
    USB -UART
    Cooling Fan
    Wireless dongle
    hdmi cable
    Are there any other items I should order?
    There is mention of a voltage controller board,

    I look forward to your reply.

  12. The Sparkfun Bidirectional Level Converter was for attaching a standard 5V TTL Serial to USB converter to the Odroid. I used the Level Converter to decrease the voltage level to 1.8V from the 5V Serial and the other way round, so that the TTL Serial USB was supplied with 5V Signal and the Odroid with 1.8V - I needed to use that, as I did not order the specially made USB Serial Converter Hardkernel does sell.

    If you want to play with the Odroid U3 and want an easy way, then you should stick with Hardkernels provided images.

    If you want something more recent, go to https://forum.armbian.com/topic/3518-which-image-should-i-install-on-odroid-u3-community-exynos4412/?tab=comments#comment-51619 and play with the Arch supplied image.

    I will not upload my image, as it is over 16 GB in size and is not intended for being used as a normal SBC, but as a headless server for special use cases.

    Also keep in mind that the Odroid U3 series is EoL. The best source of information and help is Hardkernels U3 forum: https://forum.odroid.com/viewforum.php?f=75 - other than pointing to that, I won't be able to help.

  13. Thank you for the links Nico.
    I will do more reading and hopefully get the U3 up and running. I stil have the original 8gb memory cards that were used with the U3. Would they be adequate or would you recommend 16gb?

  14. Hi Nico,
    thanks for the reply and the hints.
    Yes, i already found the sources of Tobias and did a lot of build runs 🙂
    I built with Tobias 4.14.y-sources and your docker enabled config and at least i could solve two problems:
    - CONFIG_EXYNOS_IOMMU=y has to be set to get rid of the DRM error. The display manager starts fine now.
    - The eth0 reappears after configuring the interface at /etc/network/interfaces.

    I also tried to build a 4.15.2 with a ARCHlinux-config i found there, but this kernel stops working after several minutes.

    Two problems still reside:
    - On the HDMI my mouse cursor is now invisible.
    - a "sudo reboot" still hangs after "Reaching target shutdown" (i can overcome this by using "sudo shutdown -f", but with 3.8 this works great and should also with 4.14)

    So the adventure of building a more recent working kernel for the U3 is going on 😀

    Any hints are welcome...

    Regards, Thorsten

  15. Wow, thats awesome to hear! I hope you'll get everything up and running - would also love to get a newer version onto mine Odroid, but I am currently not able to dedicate any time to this project :(. So - good luck :)!

  16. Hi,
    I've a U3+ unused and I want to upgrade and setup as internal server in my home network.
    I've tried to upgrade the kernel following your instruction
    but after the reboot the system hang with problem regarding emmc reading (I've a 8gb EMMC)
    Below the serial log from the flashing via fastboot and then what happen after the reboot.
    Please note that if I use the procedure (http://forum.odroid.com/viewtopic.php?f=53&t=969) to recovery the eMMC, everything works fine.

    U-Boot 2010.12-svn (May 12 2014 - 15:05:46) for Exynox4412

    CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9]

    APLL = 1000MHz, MPLL = 880MHz

    DRAM: 2 GiB

    PMIC VERSION : 0x00, CHIP REV : 3

    TrustZone Enabled BSP

    BL1 version: 20121128

    Checking Boot Mode ... EMMC4.41

    REVISION: 2.0

    Manufacture ID 0x11 [ 7456MB ]

    NAME: S5P_MSHC4

    MMC Device 0: 7456 MB

    MMC Device 1: 0 MB

    MMC Device 2 not found

    *** Warning - using default environment

    USB3503 NINT = OUTPUT LOW!

    ModeKey Check... run normal_boot

    No ethernet found.

    Hit any key to stop autoboot: 1 0

    Exynos4412 #

    Exynos4412 #

    Exynos4412 #

    Exynos4412 #

    Exynos4412 #

    Exynos4412 #

    Exynos4412 # fastboot

    [Partition table on MoviNAND]

    ptn 0 name='fwbl1' start=0x1 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=0x0(~16777216KB) (use hard-coded info. (cmd: movi))

    ptn 6 name='system' start=0x1 len=0x0(~1077609984KB)

    ptn 7 name='userdata' start=0x1 len=0x0(~-2147389952KB)

    ptn 8 name='cache' start=0x1 len=0x0(~137567232KB)

    ptn 9 name='fat' start=0x1 len=0x0(~15472640KB)

    Insert a OTG cable into the connector!

    OTG cable Connected!

    Fastboot disconnect detected

    Insert a OTG cable into the connector!

    OTG cable Connected!

    Starting download of 483654 bytes

    downloading of 483654 bytes finished

    flashing 'bootloader'

    eMMC OPEN Success.!!

    !!!Notice!!!

    !You must close eMMC boot Partition after all image writing!

    !eMMC boot partition has continuity at image writing time.!

    !So, Do not close boot partition, Before, all images is written.!

    writing bootloader..device 0 Start 62, Count 2048

    MMC write: dev # 0, block # 62, count 2048 ... 2048 blocks written: OK

    completed

    eMMC CLOSE Success.!!

    Initialize ENV Area!

    MMC write: dev # 0, block # 2423, count 32 ... 32 blocks written: OK

    partition 'bootloader' flashed

    Starting download of 15360 bytes

    downloading of 15360 bytes finished

    flashing 'fwbl1'

    eMMC OPEN Success.!!

    !!!Notice!!!

    !You must close eMMC boot Partition after all image writing!

    !eMMC boot partition has continuity at image writing time.!

    !So, Do not close boot partition, Before, all images is written.!

    writing FWBL1 ..device 0 Start 0, Count 30

    MMC write: dev # 0, block # 0, count 30 ... 30 blocks written: OK

    completed

    eMMC CLOSE Success.!!

    partition 'fwbl1' flashed

    Starting download of 16384 bytes

    downloading of 16384 bytes finished

    flashing 'bl2'

    eMMC OPEN Success.!!

    !!!Notice!!!

    !You must close eMMC boot Partition after all image writing!

    !eMMC boot partition has continuity at image writing time.!

    !So, Do not close boot partition, Before, all images is written.!

    writing BL2 ..device 0 Start 30, Count 32

    MMC write: dev # 0, block # 30, count 32 ... 32 blocks written: OK

    completed

    eMMC CLOSE Success.!!

    partition 'bl2' flashed

    Starting download of 159744 bytes

    downloading of 159744 bytes finished

    flashing 'tzsw'

    eMMC OPEN Success.!!

    !!!Notice!!!

    !You must close eMMC boot Partition after all image writing!

    !eMMC boot partition has continuity at image writing time.!

    !So, Do not close boot partition, Before, all images is written.!

    writing 0 TrustZone S/W.. Start 2110, Count 312

    MMC write: dev # 0, block # 2110, count 312 ... 312 blocks written: OK

    completed

    eMMC CLOSE Success.!!

    partition 'tzsw' flashed

    resetting ...

    reset...

    U-Boot 2018.07-rc1-g77a1142eb0 (Apr 18 2019 - 17:44:43 +0200)

    CPU: Exynos4412 @ 1 GHz
    Model: Odroid based on Exynos4412
    Board: Odroid based on Exynos4412
    Type: u3
    DRAM: 2 GiB
    LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling
    LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling
    LDO21@TFLASH_2.8V: set 2800000 uV; enabling
    MMC: sdhci@12530000 - probe failed: -19

    Loading Environment from MMC... *** Warning - No MMC card found, using default environment

    Failed (-5)
    Net: No ethernet found.
    Autobooting in 0 seconds, press twice to stop.
    ** Bad device mmc 0 **
    ** Bad device mmc 0 **
    ** Bad device mmc 0 **
    ** Bad device mmc 0 **
    Odroid #

  17. Hi Hunty,

    seems like your newly flashed uboot version does not recognize your eMMC.
    Maybe there is a bug in that version, which I don't know.
    I found my old compiled u-boot.bin and uploaded it here for reference, maybe that does work: https://we.tl/t-KUFhmiCIEM

    Best regards,

    Nico

  18. Hi Nico,
    thanks for helping me.

    Here the result using your uboot file

    U-Boot 2016.11-rc3-g8a65327 (Jan 07 2017 - 23:00:56 +0100)

    CPU: Exynos4412 @ 1 GHz
    Model: Odroid based on Exynos4412
    Board: Odroid based on Exynos4412
    Type: u3
    DRAM: 2 GiB
    LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling
    LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling
    LDO21@TFLASH_2.8V: set 2800000 uV; enabling
    MMC: EXYNOS DWMMC: 0
    *** Warning - bad CRC, using default environment

    Net: No ethernet found.
    Autobooting in 0 seconds, press twice to stop.
    reading boot.scr
    380 bytes read in 1 ms (371.1 KiB/s)
    ## Executing script at 42000000
    reading zImage
    2352272 bytes read in 85 ms (26.4 MiB/s)
    reading uInitrd
    2127570 bytes read in 76 ms (26.7 MiB/s)
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!
    Odroid #

  19. Thanks for this detailed guide.

    I have an Odroid U2 and I'm wondering whether upgrading U-Boot and the kernel will work for that with this guide as well.

    On the Odroid forums I got the impression that the U2/U3 are very similar and lots of tutorials work the same with both.

    Assuming that it'd generally work, would I be able to update to the latest kernel (say 5.x) or are there any limitations to that?

    That comment of José (Jun 11, 2017):
    "... I have upgraded kernel first, and before reboot, I upgraded u-boot. ..."
    ... made me wonder whether I could maybe skip the whole UART thing and upgrade U-Boot from the booted Odroid? Or did I get this wrong?

    Thanks again for helping with keeping this neat old powerful device alive.

  20. Well, the U2/U3 are very similiar, so it could work - I never owned a U2 so never looked into it.
    It could be that it would also work with the latest kernel version, but its basically just a cycle of creating new kernel configs, building the kernel, installing it and testing - and then rinse and repeat. I was looking into that some half a year ago or so and saw that there were problems with the graphics unit, i think - but if you i.e. would not need graphics - it could still be a thing. But, as said, it could work if no serious flaw comes up and needs patching - just a thing on how much effort one wants to apply :).

    The U-Boot is upgraded via fastboot, so pluging in the Odroid like an android phone and flashing the bootloader from another pc. But you cannot interupt the boot and change into fastboot without the uart - so it is written in my blog entry, but as I have not done this in ages, idk. Basically you always want a uart as its the primary console and if something breaks (and that will happen) you won't be able to find out what broke and why.

  21. Thanks.

    I'm considering buying such a 1.8V USB-uart adapter.

    This one here is probably the product with the bast capabilities but at USD 50 it's also the most expensive:
    https://www.crowdsupply.com/pylo/muart

    This here is the original adapter from odroid. It's the least expensive at USD 24 but it's also only useful for working with the odroid:
    https://www.pollin.de/p/odroid-usb-uart-module-schnittstellenkarte-810326

    And there's this one at USD 29 which is a lot more versatile than the previous and not much more expensive.
    https://uk.farnell.com/ftdi/mm232r/dev-module-usb-to-serial-uart/dp/1146037

    Considering that I have zero experience with UART/TTY and so on, would you suggest I buy the special Odroid adapter because it'll just work and be one thing less I'll have to worry about?

    Or would you say the mm232r module is most likely going to work fine and if I buy that, in the end I'll have a more versatile device that I might be able to use for something else in the future?

  22. Well, that is up for you to decide.
    The mm232r should work and be a future investment.
    I just used an stupid 5V TTL USB device from china and paired it with a bi-directional level converter for some bucks ( https://www.sparkfun.com/products/12009 ). you just need to provide the 1.8V from the Odroid to the "LV" (Low Voltage "+" Terminal) and the GND LV with the GND of the Odroid - and the "HV" (High Voltage "+" Terminal) with the +5V or what your USB TTL Converter uses and the GND HV with the GND from that TTL USB Converter and you're good. Its a hack, but cheap.

  23. I'm back at my project: Upgrading U-Boot and Kernel on my Odroid U2

    So far, I haven't done anything except reading.

    Now I'm wondering about the kernel compilation.
    Let's assume I manage to successfully upgrade U-Boot. And with the hardware of the U2 being practically the same as with the U3.

    The kernel compilation config you used was for 4.4 ... 4.4 is nice with long term support and all. But if I want to compile 4.19 or newer .. is there even a chance for it to work with the old (4.4) config from http://rglinuxtech.com/?p=1656 ?
    Or is the compilation of 4.19 or newer with this old config certainly going to fail? Because it's simply too old and missing some new options that need to be set?

    Thanks.

  24. I cannot answer that question. It is possible that it will break, i.e. before the update on 10.02.2017 with the private Mail by Tobias Jakobi I was not able to make the Fan spining by itself, so its i.e. possible that with the new version and possible unchecked or changed kernel configs, that the fan will not spin and under bad conditions (the U3 gets quickly hot under load) burn out. But then again, you could quickly overcome this by attaching the fan to an external power supply or get other cooling solutions there. It could be possible to get it working on 4.19 or newer, but I seriously don't know and want to state that it could - in the worst cirumstances - physically destroy the Odroid, like when the fan does not work, you use the wrong type of uart with more than 1.8 volts and numerous other things which I forgot. So, try at your own risk, you will learn a lot during that exercise 🙂

  25. I'm quite sure the fan not spinning would be the least of my problems. The U2 is only has passive cooling per default and so far it hasn't ever gotten too hot even under full load (transcoding video files with handbrake using 4 cores).

    Not using a UART with more than 1.8 V is also something I can control pretty well. So I regard that as a non issue.

    I was just wondering if my efforts in compiling the kernel would most likely be a waste of time. (Except for stuff I learn by doing it)

    With regular desktop applications which use various config files to store settings it usually works fine when there's an update. A newer application version can in most cases parse the old config file and just take what's still compatible, everything new gets set to a default value and the application works.
    Since I have no idea about kernel compilation (yet) I'm wondering whether the kernel devs use the same paradigm here: do they make new kernels (mostly) backward compatible to old compile configs?
    Is there any chance for me to be able to just take the config of 4.4 and use it to compile a kernel say 5.xx in 2 years? ... without becoming a full blown kernel nerd.
    Or am I on a lost mission here?

    I just read about the "make oldconfig" ... seems like I could at least run that to not run into the biggest problems.

  26. Yeah, the make oldconfig would be a good starter along with the 4.4 config. And then its going to ask what it shall do with the newly added parameters - like including in kernel, building as module or ignoring. Probably it will work fine with most of them just ignored. However, if it hits some part of the hardware (like one i2c temp sensor, cpu hardware relevant stuff etc) it would be needed.

    I cannot answer your question, there is no gurantee it will work or not.

    Maybe try to get more info at the odroid forums like here: https://forum.odroid.com/viewtopic.php?f=13&t=33613 or this post: https://www.dannykorpan.de/2019/03/07/mainline-kernel-on-odroid-u3/

    Best of luck!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.