This is a draft page.


This demo is a reference for how to implement Ubuntu RootFS on Altera SoC. Linaro will provide prebuild ARM based ubuntu image for developer, and you can use this image for Altera SoC.This Image does not has Desktop, but you can see console in DVI output.

Board Setup

sodia photo top.png
  • MSEL (J7)
    You need to set MSEL is FPP mode for FPGA configuring from HPS. Please set MSEL as follows:

msel table.PNG   MSEL.png
    For SD Card Boot. You need to set BSEL & CSEL as follows:

bsel table.PNG

csel table.PNG
  • USB-UART Connector (CN11)
    Use as console. Please connect to host PC using usb cable.

  • SD Card Slot (CN13)
    Please insert prepared SD card before power on.

  • DVI Out (CN9)
    Use as display output. Please connect to display using DVI cable (720p).

Prebuild SD Card Image

Item Download Note
All In One SD Card Image sodia_ubuntu_nano_trusty.tar.gz

From Linux PC:
$ sudo dd if=xxx.img of=/dev/sdx bs=1M or
$ sudo dd if=xxx.img of=/dev/mmcblkx bs=1M

From Windows PC:
You can use Win32DiskImager tool

Please refer to following page:

Individual Components

Item Download Note
HW Reference Design Sodia DVI Example Design This Reference Desing is using VIP core, this will need a license to compile a HW Design.
Linaro Ubuntu Nano Root File System Linaro Download Page
Linux Kernel Soruce

Download Snapshot from GitHub:

You can also use git clone. Please refer to following link:
- Building Kernel & U-Boot Separately From Git Trees

zImage zImage Prebuild Linux Kernel Image (3.10-ltsi)
  • Enable Framebuffer Driver
  • Enable CMA Settings
Preloader preloader-mkpimage.bin Genereted by v15.1.1
U-Boot u-boot.img Genereted by v15.1.1
DeviceTree Blob soc_system.dtb Genereted by v15.1.1
U-Boot Script u-boot.scr Configure FPGA from U-Boot & Release a bridge reset before Linux boot
FPGA Configuration Image data soc_system.rbf Compressed RBF


Setup Build Tool Chain

In case the Linux kernel git trees are directly used, the build toolchain has to be manually downloaded. You need to setup cross compiler as follows:

$ cd ~
$ wget
$ tar xjf gcc-linaro-arm-linux-gnueabihf-4.8-2013.12_linux.tar.bz2
$ export CROSS_COMPILE=~/gcc-linaro-arm-linux-gnueabihf-4.8-2013.12_linux/bin/arm-linux-gnueabihf-

 Note: It seems, above version is already removed. So you can use newer version as follows, but this tool version is not tested:
$ wget

Build Linux Kernel for DVI output system

This section presents instructions on how to compile the Linux kernel.

$ git clone
$ cd linux-socfpga
$ git checkout -b test_branch ACDS15.1_REL_GSRD_PR
$ export CROSS_COMPILE=~/gcc-linaro-arm-linux-gnueabihf-4.8-2013.12_linux/bin/arm-linux-gnueabihf-
$ export ARCH=arm
$ make socfpga_defconfig
$ make menuconfig

Added Framebuffer Driver:
Device Drivers → Grapics support → Support for frame buffer devices
00 fb.png

Check on Altera VIP Frame Reader framebuffer support
01 fb.png

Enable CMA Option for contignous memory allocation for framebuffer
Device Drivers → Generic Driver Oprions
02 cma.png
  • Check Contignous Memory Allocator
  • Size in Mega Bytes = 512

$ make zImage 

Some of the files that are created:
File Description
vmlinux Linux Kernel ELF file
arch/arm/boot/zImage Linux Kernel image

Extract Ubuntu Nano RootFS

$ sudo tar zxf linaro-trusty-nano-20141024-684.tar.gz

"binary" directory are created. You need do this step as superuser.

Added User Specific Settings to RootFS

For example, if you want you use DHCP. You need to modify /etc/network/interfaces as follows:

Open /etc/network/interfaces file as superuser. You can use any editor for this step.

$ sudo gedit binary/etc/network/interfaces

Added following statement for DHCP.

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

You may customize even further if required.

Creating SD Card Imate

For SD Card Image creation, you can use "" python script that is provided from RocketBoards to simplify SD image creation. This script can be downloaded from here. Sample usage is as follows. You can specify files and size for each partitions for your system requirement.

$ sudo ~/  \
-f \
-P preloader-mkpimage.bin,u-boot.img,num=3,format=raw,size=10M,type=A2 \
-P binary/*,num=2,format=ext3,size=2900M \
-P zImage,u-boot.scr,soc_system.rbf,soc_system.dtb,num=1,format=vfat,size=500M \
-s 4G \
-n sodia_sd_card_image.bin

Note: You can download individual compornents from Individual Components sectionor you can create those binaries by yourself.

Give us your feedback

© 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Privacy.