Home > AMLogic, Android, Linux, Testing > U-Boot and Linux Source Code for ODROID-C1 Board Has Been Released

U-Boot and Linux Source Code for ODROID-C1 Board Has Been Released

December 16th, 2014 Leave a comment Go to comments

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.

ODROID-C1-Linux

  1. Download Linaro GCC 4.7 toolchain from Linaro or Odroid website.
  2. 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/

  3. 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

  4. To apply change, log out and log in, or run:
  5. 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)

  6. Both Linux and Android Linux are available, and depending on which kernel should want to get checkout the code from the right branch:

    or
  7. I selected the Linux branch. Time to configure the build for ODROID-C1:
  8. Install u-boot-tools for mkimage, and build the kernel image
  9. And the device tree file for ODROID-C1:
  10. 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:
  11. 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.

  1. MIchele
    December 16th, 2014 at 21:01 | #1

    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?

  2. December 16th, 2014 at 21:21 | #2

    @MIchele
    You need an existing bootable eMMC / SD card pre-load with Android or Ubuntu image.

  3. linuxium
    December 17th, 2014 at 11:34 | #3

    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.

  4. December 17th, 2014 at 14:01 | #4

    @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.

  5. Photon
    December 18th, 2014 at 06:31 | #5

    i’d donate if someone will port the full Ubuntu to CX-S859 (S805) box

  6. noderat
    December 20th, 2014 at 18:42 | #6

    So since the mk808b plus is m805 will the s805 sources still work without modification? What are the actual differences between the SoCs?

  7. December 20th, 2014 at 18:57 | #7

    @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.

  8. Thomas
    April 16th, 2015 at 16:41 | #8

    Where do you doing all these steps ?
    On the odroid itself or on another Linux installation ?

  9. April 16th, 2015 at 16:45 | #9

    @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.

  1. January 4th, 2015 at 02:51 | #1