- Linux
- Step-by-Step guide to building an ODROID-XU3/4 Kernel
- Download the cross tool chain package
- Copy the cross tool package to /opt/toolchains
- Add Path in your environment file
- Check the tool-chain path to check it is set up correctly.
- Linux
- Partition Contents
- Currently Supported Linux Distributions
- HDMI Support On Linux
- DisplayPort Support on Linux
- Kernel Sources
- Kernel Rebuild Guide
- 3.10.y & 4.9.y
- odroidxu3-3.10.y
- odroidxu4-4.9.y
- Native-build
- Cross-build
- Headless Setup with Ubuntu Mate
- Assumptions
- Boot the ODROID and find IP address
- By GUI
- By console command
- Login using SSH
- Setup Ubuntu Mate local auto-login
- VNC Remote Desktop
- Change resolution
- Change resolution in xorg.conf
- Change resolution in boot.ini
- Start VNC server and connect
- Install x11vnc server as a service
- Troubleshooting
- OS Installation Guide
- Preparing a memory card
- Operating Systems we’re providing
- OS Installation Guide
- Preparing a memory card
- Operating Systems we’re providing
- Getting Started With Ubuntu 18.04 On The ODROID-XU4: A Beginner’s Guide
- Installation
Linux
How to download and compile the Linux system kernel for ODROID-XU3/4. Generic Linux system needs gcc version 4.9 to build the Kernel.
Step-by-Step guide to building an ODROID-XU3/4 Kernel
Download the cross tool chain package
Copy the cross tool package to /opt/toolchains
If the ‘/opt/toolchains’ directory does not exist in host pc, then create the directory.
Add Path in your environment file
/.bashrc file to add a new path with editor (gedit or vi)
To apply this change, login again or restart the .bashrc
Check the tool-chain path to check it is set up correctly.
Linux
Linux ODROID-XU3/4 works as follow:
It must have at least two partitions. First Partition must be a FAT32/EXT4 partition. Second Partition can be whatever the Filesystem that your kernel supports (must be built in).
Note: It is possible to use the first partition as ext4, however it is strongly not recommended due to Windows Users losing the capability of changing boot.ini
Partition Contents
Currently Supported Linux Distributions
Note: More distribution support will come with time.
HDMI Support On Linux
HDMI support should work out-of-box for everyone including framebuffer console. If you experience any issue, please contact us on ODROID Forums
On the provided Ubuntu image there are several examples on how to configure the HDMI to your specific resolution or even lock to a certain resolution. You can check the configuration file on /media/boot/boot.ini of the Ubuntu Image
DisplayPort Support on Linux
For displayport configuration, please follow this guide Displayport Guide on ODROID Forums
Kernel Sources
Kernel sources for ODROID-XU3/4 is on our Github. Branch are odroidxu3-3.10.y or odroidxu4-4.9.y defconfig are odroidxu3_defconfig or odroidxu4_defconfig
Kernel Rebuild Guide
You must complete these steps on the ODROID-XU3/4 board. You can compile kernel & dtb images on the host PC using the cross compiler but you cannot create uInitrd ramdisk image on the host PC since the binary files in ramdisk image. Refer to current root file system during the executing ‘update-initramfs’ command.
Please follow the instructions below to rebuild the Linux Kernel for ODROID. Those instructions cover native build of the Kernel.
3.10.y & 4.9.y
odroidxu3-3.10.y
odroidxu4-4.9.y
Do changes if you need/want:
Build Kernel and Modules:
This explanation assumes that your USB memory CARD reader is assigned at /dev/sdb. Be careful!
Install zImage & DTB file:
Copy .config to /boot for initramfs creation:
Install new uInitrd:
Your new kernel should be installed. Note for your own convenience we provide daily builds of Linux kernel that can be easily installed on Supported distros by using a ODROID Utility.
Native-build
This guide is only for the NATIVE BUILD.
run it on the board.
Installing building tools
You have to install some building tools and related packages.
Download and build the kernel source.
Updating Kernel and DTB (Device Tree Blob)
Please note that native kernel compile on ODROID-XU4 will take about 25 minutes.
Updating root ramdisk (Optional)
Before you start with new Linux kernel v4.14
You would check all necessary files are in place as below before reboot. The file size would differ.
Cross-build
This guide is only for the CROSS BUILD.
run it on the Ubuntu desktop.
Installing required packages
You will need install required packages before you start to build Linux kernel on your Ubuntu desktop. You will need install required packages before you start to build Linux kernel on your Ubuntu desktop.
Download the cross toolchain
In order to add the toolchain path to PATH, paste below lines to $HOME/.bashrc.
Download and Build Kernel
Updating Kernel and DTB (Device Tree Blob)
This explanation assume that your USB memory CARD reader is assigned at /dev/sdc. Be careful!
A partition for kernel, dtb and initrd is necessary. Run fdisk and create a root partition (partition 1).
If you plan to have your rootfs on the sdcard on another partition you can put a minimum of +60M for the last sector of this root partition.
Change type to FAT16 (“t” option, value 6) and type “w” to save changes. Format it with mkfs.vfat /dev/sd 1 and put your kernel, dtb, boot.ini and initrd there.
1. Plug the Boot-Device(eMMC or SD) into the USB memory CARD reader and Connect the USB memory CARD reader to your HOST PC(Linux OS ).
2. Copy the zImage and DT((exynos5422-odroidxu?.dtb) to the FAT partition(1st partition) in the Boot-Device.
3. Copy the driver modules to the EXT4 partition(2nd partition) in the Boot-Device.
Headless Setup with Ubuntu Mate
This is a step-by-step guide of how to test ODROID boards.
It assumes that you want to run headless, that is, access it via network connections without a keyboard or display.
This guide is based on Hardkernel’s Ubuntu Mate environment.
Assumptions
You HAVE:
You do NOT have:
Boot the ODROID and find IP address
Connect the ODROID to a spare Ethernet port on your switching hub using an Ethernet cable.
Insert the SD card (or eMMC) into the ODROID-XU4.
Turn on the ODROID-XU4 and it will run the root file system resizing process automatically.
After resizing process, it will shutdown and the blue LED is off within 5
20 seconds.
Press power button again and the heartbeat blue LED keeps flashing.
By GUI
By console command
Ping scan to update ARP table:
Check the ODROID-XU4 IP address: (NOTE: “00:1e:06” is start MAC address for ODROID boards.)
Login using SSH
On your Linux PC, type “ssh odroid@xxx.xxx.xxx.xxx”, where “xxx.xxx.xxx.xxx” is the IP address you discovered in the previous step.
It will then prompt for your password.
Type in the default password: odroid
Setup Ubuntu Mate local auto-login
In a headless system, you may want to let the X server automatically login. This is done differently in various versions of Ubuntu, unfortunately. For Ubuntu Mate 18.04, create a new file in /etc/lightdm/lightdm.conf.d/12-autologin.conf using
. The file should look as follows. Substitute your chosen userid :
Then, you can restart the X server with :
Ubuntu Mate will then no longer prompt for user login.
VNC Remote Desktop
Connect to the ODROID-XU4 using SSH.
Install VNC server using apt package management. At the first boot, the dpkg lock may be in use, and you might not be able to run apt update while initial updates run in the background. If you run into this, you can initiate a second reboot, which will wait for a while until these updates load, and then run :
Connect to the ODROID-XU4 VNC server from your Linux PC.
Change resolution
There are several methods you can use to change the resolution. Both involve editing configuration files.
Change resolution in xorg.conf
You can change resolution by editing /etc/X11/xorg.conf file.
Append this to the end. See DefaultDepth and Virtual parts.
Change resolution in boot.ini
Instead of editing xorg.conf, you can also choose to setup headless mode for the integrated GPU at boot time. When no display is attached, the GPU will default to 1024×768. You can force it to another resolution.
Uncomment the following line to select 1920×1080 for example. You can choose another mode, but make sure to choose one that’s listed as “no_edid” in the comments :
And also change :
Start VNC server and connect
Install x11vnc server as a service
Once you have the x11vnc server running successfully, you may want to run it as a service so that it automatically starts on boot. If so, create a new file called /etc/systemd/system/x11vnc.service using the command
The file should look as follows. You may edit your userid, port, and password file.
Then, add it as a systemd service, and start it :
Troubleshooting
If you face a problem with starting VNC server using command the below,
You can try out by finding out exact paths for those parameters, -display and -auth.
Enter the following command to find out current running X-window with its parameters.
From that results, :0 is the current display on the board and /var/run/lightdm/root/:0 is the current auth file path. So you can enter,
OS Installation Guide
Preparing a memory card
Here are the minimum requirements of each operating system.
To insert a memory card into your computer, you need a memory card reader to work with that.
You can purchase OS preinstalled eMMC / microSD cards from https://www.hardkernel.com/product-category/memories/.
When you choose a memory card, please keep in mind that you should check the product name carefully to choose a proper memory card for your board.
Operating Systems we’re providing
We’re providing Ubuntu Mate as well as Android for each ODROID board.
Ubuntu Mate is one of the most famous Linux distribution provides a graphical desktop environment. It is lightweight, fast, and customizable at your taste. If you want to get more information, please visit Ubuntu Mate websites: https://ubuntu-mate.org/
Ubuntu Minimal is for those who want to use the board as a headless server like a NAS, a website hosting server or a media player, even a simple classic game emulator. Or, it could be a remote build machine too.
Android is the most popular mobile platform in the world. You can use Android to get the easy interface for any of diverse use.
OS Installation Guide
Preparing a memory card
Here are the minimum requirements of each operating system.
To insert a memory card into your computer, you need a memory card reader to work with that.
You can purchase OS preinstalled eMMC / microSD cards from https://www.hardkernel.com/product-category/memories/.
When you choose a memory card, please keep in mind that you should check the product name carefully to choose a proper memory card for your board.
Operating Systems we’re providing
We’re providing Ubuntu Mate as well as Android for each ODROID board.
Ubuntu Mate is one of the most famous Linux distribution provides a graphical desktop environment. It is lightweight, fast, and customizable at your taste. If you want to get more information, please visit Ubuntu Mate websites: https://ubuntu-mate.org/
Ubuntu Minimal is for those who want to use the board as a headless server like a NAS, a website hosting server or a media player, even a simple classic game emulator. Or, it could be a remote build machine too.
Android is the most popular mobile platform in the world. You can use Android to get the easy interface for any of diverse use.
Getting Started With Ubuntu 18.04 On The ODROID-XU4: A Beginner’s Guide
The ODROID-XU4 is basically a heterogeneous multi-processing Octa-core Linux Computer. Offering open source support, the board can run various flavors of Linux, including the latest Ubuntu 18.04 and the latest versions of Android. By implementing the eMMC 5.0, USB 3.0 and Gigabit Ethernet interfaces, the ODROID-XU4 boasts amazing data transfer speeds, a feature that is increasingly required to support advanced processing power on ARM devices. This allows users to truly experience an upgrade in computing, especially with faster booting, web browsing, networking, and 3D games. For more technical details about the board please visit Hardkernel’s product specifications page at https://goo.gl/bQ5szX.
ODROID XU4 supports the Linux Kernel 4.14 LTS and can run the latest Ubuntu 18.04 fairly well. In this step-by-step guide we will see how to install and run this OS on the board together with some must have applications as well as the pros and cons of running such an OS on this device.
The required materials for running Ubuntu 18.04 on an ODROID-XU4 are:
It is time to start with the installation procedure.
Installation
First, download the Ubuntu 18.04 (20180501) operating system from the Hardkernel website at https://goo.gl/ErjTVT. Make sure to wait for the complete download. You can download the image from Hardkernel’s wiki page at https://goo.gl/JYvNGY.
Ubuntu 18 is among us!
To install, or “flash”, Ubuntu 18.04 to the memory card, we recommend using Etcher, as described at http://bit.ly/2f61k5x. You can download etcher from https://etcher.io/.
Figure 01 — Etcher
Etcher works on Mac OS, Linux and Windows, and is the easiest option for most users. Etcher also supports writing OS images directly from the zip file, without any unzipping required. To install the OS on an eMMC module, you will need an eMMC module reader (https://goo.gl/A5LVTR) and a USB multi reader (http://goo.gl/fMfjZr) to connect it to your PC.
At first boot, “mind the gap”. According to Hardkernel’s Wiki, the RootFS Auto-resize feature has changed. Once everything is done after auto-resize, the power will turn off automatically. Wait a couple of minutes, and press the power button if the blue LED is off. The image boots within 30-40 seconds and Figure 2 shows our freshly Ubuntu 18.04 with Mate desktop.
Figure 02
The first thing to do is to adjust the time and date. From the menu, click Administration—>Time and Date, as shown in Figure 3.
Figure 03
Next, update system and kernel software. Do not forget dist-upgrade (the password is “odroid”): Then, install your preferred language (mine is Greek), and finally add the Keyboard Accessibility Status to the panel, as shown in Figures 4 — 7.
Figure 04
Figure 05
Figure 06
Figure 07
Installing applications and testing performance Hardkernel’s Ubuntu 18.04 image comes preinstalled with many applications, such as Chromium browser, Thunderbird (email client), LibreOffice, and MPV media player, just to name a few and of course Kodi. Nevertheless, some more are needed for a fully desktop OS experience.
Install SMPlayer, one of the best players in Linux. So from the console just type: and then select Menu→ Sound and Video—> SMPlayer from the menu, as shown in Figure 8.
Figure 08
Install GIMP the top graphics editor for Linux, which executes fast and runs well: Figure 09
You can also test 3D graphics using glmark2-es2 and es2gears with spectacular results: Figure 10
Figure 11
Finally, we tested the WebGL function within the Chromium browser going to the WebGL sample page at http://webglsamples.org/. We got almost 30FPS with 500 fish in the tank at the aquarium test available at http://webglsamples.org/aquarium/aquarium.html, which is a satisfactory experience for such a “small” board.
Figure 12
According to Hardkernel’’s wiki page (https://goo.gl/wuV9Vx) the following issues should be taken into account:
1. Mali GPU access could be blocked by a recent Canonical’s EGL package. In that case, you need to install Mali driver manually. 2. VLC does not start due to a video driver compatibility issue. The reason is that VLC does not support a generic ARM Linux platform well. Recent updates made it even worse. I tried a H.264 file on Kodi and it worked without any problem. However, MPEG4/MPEG2 files do not play well with hardware decoder. I had a lot of crashes. The OS itself has nothing to do with it. It is part of the programs that run on it. Some investigation revealed that Ubuntu 18.04 uses Kodi with hardware accelerated ffmpeg backend rather than the MFC hardware decoder backend from Oversun. The ffmpeg implementation does not seem to run very stable, while the MFC backend in Kodi up to version 17.6 did work pretty well. Older versions of Ubuntu such as the 16.04 image might still use the version of Kodi that uses MFC backend rather than ffmpeg and with that run more stable. We will have to wait until Hardkernel fixes the issue. 3. The first time launching of Chromium takes around one minute due to internal initialization process. After that, it starts in 1-2 seconds. 4. Some UASP capable USB-to-SATA bridge controllers are not compatible. If your external HDD is not working properly, according to Hardkernel, add its VID/PID in boot.ini. Boot arguments to disable the UAS function something like this: 5. Change CPU governor to “ondemand”, run this command, and reboot: $ echo ‘GOVERNOR=»ondemand»‘ | sudo tee /etc/default/cpufrequtils; systemctl mask ondemand; Then, install the “h264ify” extension from the Chrome Web Store for Chrome browser, which can improved the Youtube video quality on Chromium browser can be improved a lot. 720p/30fps videos are fine with the extension.
Figure 13