Hardkernel ODROID-C1 board, a more powerful $35 alternative to the Raspberry Pi, garnered a lot of attention when it was announced last week. At the time source code was not available, but as scheduled, U-boot and Linux source code is now available, and the full Android SDL should be released on February 2015. Instructions to get the code, and build both Linux and U-boot are available on ODROID-C1 Wiki, and I’ve just given a try to Linux instructions myself to see if I would encounter any issues in Ubuntu 14.04.
- Download Linaro GCC 4.7 toolchain from Linaro or Odroid website.
- Install the toolchain. They install it on /opt/toolchain, but instead I’ve installed in ~/opt/toochain, so I don’t need superuser permissions:
mkdir -p ~/opt/toolchains
tar xvf gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.bz2 -C ~/opt/toolchains/ - Add the following lines to ~/.bashrc
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
export PATH=~/opt/toolchains/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin:$PATH - To apply change, log out and log in, or run:
1source ~/.bashrc - Double check Linaro GCC 4.7 is installed properly:
arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/home/jaufranc/opt/toolchains/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/../libexec/gcc/arm-linux-gnueabihf/4.7.3/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/gcc-linaro-4.7-2013.04/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-linux-gnueabihf --prefix=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install --with-sysroot=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc --enable-languages=c,c++,fortran --enable-multilib --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard --with-pkgversion='crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04' --with-bugurl=https://bugs.launchpad.net/gcc-linaro --enable-__cxa_atexit --enable-libmudflap --enable-libgomp --enable-libssp --with-gmp=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-mpfr=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-mpc=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-ppl=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-cloog=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-libelf=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-host-libstdcxx='-L/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static/lib -lpwl' --enable-threads=posix --disable-libstdcxx-pch --enable-linker-build-id --enable-gold --with-local-prefix=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc --enable-c99 --enable-long-long --with-mode=thumb
Thread model: posix
gcc version 4.7.3 20130328 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) - Both Linux and Android Linux are available, and depending on which kernel should want to get checkout the code from the right branch:
1git clone https://github.com/hardkernel/linux.git -b odroidc-3.10.y-android
or
1git clone https://github.com/hardkernel/linux.git -b odroidc-3.10.y - I selected the Linux branch. Time to configure the build for ODROID-C1:
12cd linuxmake odroidc_defconfig - Install u-boot-tools for mkimage, and build the kernel image
12sudo apt-get install u-boot-toolsmake uImage -j8 - And the device tree file for ODROID-C1:
12make meson8b_odroidc.dtdmake meson8b_odroidc.dtb - I’ve stopped there, but if you have a board you’ll want to copy / flash the files arch/arm/boot/uImage and arch/arm/boot/dts/amlogic/meson8b_odroidc.dtb to a bootable eMMC or SD card
- For Linux – Copy uImage and meson8b_odroidc.dtb to the FAT32 partition of your boot device, replacing the existing files
- For Android – Use fast boot as follows:
123sudo apt-get install android-tools-fastbootsudo fastboot flash boot <path/of/your/uImage>sudo fastboot flash dtb <path/of/your/meson8b_odroidc.dtb>
- Have fun 🙂
This source code release for ODROID-C1 should also open the way for Linux Kernel ports, and Ubuntu / Debian or other Linux distributions for other Amlogic S805 devices such as MK808B Plus, MXQ S85, or MINIX NEO X6.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
I don’t understand the latest step.
About Android flashing, if I have an empty eMMC or SD Card, should I still use fastboot or should I create manually the partitions and then copy the files over there?
@MIchele
You need an existing bootable eMMC / SD card pre-load with Android or Ubuntu image.
Regarding the device tree commands, I there must be a typo as I cannot find the file ‘meson8b_odroidc.dts’ however file ‘meson8b_odroidc.dtd’ does exist and ‘make meson8b_odroidc.dtd’ followed by ‘make meson8b_odroidc.dtb’ works, creating ‘./arch/arm/boot/dts/amlogic/meson8b_odroidc.dtb’ as required.
@Ian W MORRISON (Linuxium)
Thanks. Actually, I had troubles to complete the tutorial yesterday because github was too slow. I’ve corrected this mistakes, and added a few more steps for tools installation.
i’d donate if someone will port the full Ubuntu to CX-S859 (S805) box
So since the mk808b plus is m805 will the s805 sources still work without modification? What are the actual differences between the SoCs?
@noderat
I always thought it was based on S805, but some sources indicate it’s M805, the tablet version of the SoC instead…
I can’t see any board pictures to confirm that however. I’m not sure how much difference there is between M805 and S805.
Where do you doing all these steps ?
On the odroid itself or on another Linux installation ?
@Thomas
In a Linux computer with an Intel/AMD processor.
You could also do it inside the ODROID-C1 without the cross-compiler, but just gcc instead. It would just take a bit more time.