Trying to support ODROID-XU for Home Assistant OS

Hi, i’m an owner of a ODROID-XU. This board was the first of the XU’s line and uses a Samsung Exynos5410 SoC (unlike XU4’s Exynos5422). During the last three months i’ve anaged to get Home Assistant Supervised with the odroid-xu machine supervisor on unsupported distro (Archlinux ARM) with mainline kernel (5.9.1) using quite old U-Boot bootloader (u-boot v2012.07 based on smdk5410 config).

Recently i’ve wondered if it was possible to port XU to create an image of the OS as an hobby/education project (just as i’ve done it with the supervised version). So i’ve browsed the development repository and found that OS is built using buildroot cross-compilation tool. So as i didn’t know anything about it i’ve studied a little bit both documentation and navigating directories and files which ODROID-XU4 image is built.

I knew that the compiling the kernel would not be a problem because XU it is already working with mainline (Kernel was compiled with GCC 10.2.0) and Hass Supervised, so i’ve clone the repo and started to duplicate the files and folder of XU4 and study each piece of configuration and definitions. My idea is to create an odroidxu-defconfig based on odroidxu4-defconfig and generate a working system (with XU binaries, partitions and so on).

My main problem now is that this board has an very old u-boot bootloader, which was compiled with an old compiler too. I tried to compile everything but i’ve got an expected compiling error due to toolchain versions headers (that uboot has compiler-gcc4.h but gcc settings in defconfig are newer):

/operating-system-dev/buildroot/output/build/uboot-odroid-v2012.07/include/linux/compiler-gcc.h:87:1: fatal error: linux/compiler-gcc8.h: No such file or directory
 #include gcc_header(__GNUC__)
 ^~~~

My question is how can i modify a defconfig flags to use both a toolchain version to build kernel and another to build u-boot for compatibility. I was wondering if generating the zImage, and modify my boot.ini file to match uboot-boot.ush script could be enough, but i don’t think it’s that easy. It would be great to know the config files relationship and their buildroot workflow to see how can split the kernel vs uboot compilations while maintaining compatibility.

EDIT: Currently i’ve modified this files to make it compatible with my board (according to boot partition tables, custom uboot repo and other tweaks based on XU4 configs and my Arch kernel compiled flags). Below are the custom folders and files shared on google drive.

  1. operating-system/buildroot/board/hardkernel/odroidxu/
  • boot.ini
  • genimage.cfg
  • post-image.sh
  1. operating-system/buildroot-external/configs/
  • odroid_xu_defconfig
  1. operating-system/buildroot-external/board/hardkernel/odroid-xu/
  • hassos-hook.sh
  • meta
  • boot.boot.ush
  • uboot.config
  1. /operating-system-dev/buildroot-external/package/hardkernel-boot/
  • Config.in
  • hardkernel-boot.mk

During the course of these days i’ve found that to having those u-boot capabilities, i would need a recent version of it. Results that for Exynos5410 the support was dropped out early due to some sillicon bug that crippled its full power (big.LITTLE disabled). The rest of the Exynos5 family is mainly supported with newer u-boot version. So the job i’m currently doing is studying the old branches and the new ones on devices so i can compare the changes required to at least start to debug and try to port those shared definitions (at SoC and board level).

As i encountered a lot of incompatibility that needs to be supported at XU u-boot, i’ll close this topic.