Page Actions
Wiki Actions
User Actions
Submit This Story

Efika MX Smartbook

The Efika MX Smartbook is a Freescale i.MX51 based netbook made by Genesi, see for more information. barebox runs on the Smartbook and can boot the kernel from various sources.

Preparing barebox for the Efika MX Smartbook

export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabi-
make efika-mx-smartbook_defconfig
Preparing a SD card

The barebox binary can be written flat on a SD card. The partition table will be lost then, but the SD card will need a special partitioning anyway which will be added later. Assuming the SD card is found under /dev/sdd use the following to write barebox to the SD card:

cat barebox-flash-image > /dev/sdd

The SD card is ready to start now, however, we add a partition for storing the kernel and another one for the rootfs. The following example uses standard fdisk, but you can use any other partition tool. The only important thing is that barebox needs space of 1MiB before the first partition begins.

sascha@farnsworth:~ sudo fdisk /dev/sdc

Command (m for help): o
Building a new DOS disklabel with disk identifier 0x7163d279.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-1953791, default 2048): +1M
Last sector, +sectors or +size{K,M,G} (2048-1953791, default 1953791): +127M

Command (m for help): n
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p
Partition number (1-4, default 2): 2
First sector (262144-1953791, default 262144): 262144
Last sector, +sectors or +size{K,M,G} (262144-1953791, default 1953791): 
Using default value 1953791

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))

Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 83

Command (m for help): w

Create filesystems on the partitions. The first partition should either be VFAT or EXT. barebox can read/write VFAT and read EXT partitions. The second partition can be of any type Linux can handle, we'll use ext2 here:

mkfs.vfat /dev/sdd1
mkfs.ext2 /dev/sdd2

Copy the Kernel and eventually the devicetree blob (dtb) to the first partition:

mount /dev/sdd1 /mnt
cp /some/kernel/zImage/or/uImage /mnt/linuximage
cp /some/dtb /mnt/oftree
cp barebox-flash-image /mnt/barebox
umount /mnt

Copying barebox to the SD card is not necessary, you'll only need it if you want to copy barebox to the internal SPI NOR flash later.

Copy your favourite root filesystem to the second partition.

That's it. The card is now ready for booting.

Starting barebox on the Efika MX Smartbook

By default the Smartbook starts from the internal SPI NOR flash, but this can be changed to the left SD card slot with DIP switches. The DIP switches are under the Keyboard. See for how to remove the keyboard. Under the keyboard you should find 4 DIP switches in a row. They should have the setting '1000' for internal SPI NOR flash. Change them to '0011' to boot from SD card. After inserting the SD card and powering on the Laptop it should start. Unfortunately the Smartbook does not have a standard serial port, but it has a debug port which also is located under the keyboard. There are debug boards available which have a serial port. If you don't have this you can either boot blindly or connect some a 3.3V USB to serial converter to pins FIXME.

By default barebox will start the kernel from the source it has booted from. This means that if you boot from SD card barebox will start the kernel from the SD card. If you boot from internal SPI NOR flash barebox will start the kernel found on the internal flash harddisk.

Storage devices on the Efika MX Smartbook

The Smartbook comes with several storage devices which can be used for storing barebox, kernel and rootfs.

device devicename under barebox
Internal SPI NOR flash /dev/m25p0
Internal flash harddisk /dev/ata0
left SD card slot /dev/mmc_left
back Micro SD card slot /dev/mmc_back

If a device has partitions they will be named /dev/<basename>.x with x counting from 0. The one thing special about the SPI NOR flash: since it's a raw flash device it has to be erased before rewriting it using the 'erase' command (which takes a devicename or a partition as argument).

Filesystems on storage devices

There are several automountpoints created for the different devices. This means that if you access a automountpoint the corresponding device will be detected and mounted automatically. The following automountpoints exist:

mountpoint device
/mnt/internal-hd0.0 /dev/ata0.0
/mnt/internal-hd0.1 /dev/ata0.1
/mnt/mmc-left.0 /dev/mmc_left.0
/mnt/mmc-back.0 /dev/mmc_back.0
/mnt/tftp TFTP server

If you need more you can add them to /env/init/automount. The last one is for network booting from a TFTP server, see Networking below.

boot devices

barebox can boot the kernel from arbitrary devices. There are three default boot entries configured already. These can be started with 'boot <name>'.

name kernel oftree
hd-internal /mnt/internal-hd0.0/linuximage /mnt/internal-hd0.0/oftree
mmc-left /mnt/mmc-left.0/linuximage /mnt/mmc-left.0/oftree
net TFTP server: <user>-linux-efikasb TFTP server: <user>-oftree-efikasb

If you need more or different entries you can create them under /env/boot/ by using the existing ones as templates, see cp.

Kernel boot arguments can be added either in the boot entries above (and will be effective to this entry only), or to /env/config (which will be used for all entries).


global linux.bootargs.dyn.myargs="debug"


global linux.bootargs.myargs="log-buf-len=1M"

see global for more information.


The Efika MX Smartbook does not have an ethernet connector, but a ASIX or SMC95xx compatible USB ethernet dongle can be used. Edit your network settings in /env/network/eth0:


# ip setting (static/dhcp)

# static setup used if ip=static

# MAC address if needed

# put code to discover eth0 (i.e. 'usb') to /env/network/eth0-discover

As you see by default barebox uses DHCP for networking, but you can change it to static IP settings. If you stick with DHCP the only important setting is 'serverip' which should point to your TFTP server.

If everything is configured correctly you can access the files from the TFTP server under /mnt/tftp/:

cp /mnt/tftp/linuximage /

Due to the automountpoint barebox will detect and configure a USB ethernet dongle automatically in the background.

The 'net' boot entry expects certain filenames on the TFTP server. They are:


User is set to 'none' by default, this can be changed in /env/config

Editing the environment

barebox has a builtin editor, see edit. After editing a file the environment must be saved to make the environment persistent using the saveenv command.

Important files in the environment:

/env/config general config settings, username, autoboot timeout, …
/env/init/* init scripts, automatically executed during startup
/env/boot/* boot entries, one entry per file
/env/network/eth0 network settings
Menu support

Many functions can also be accessed from a menu. This can be accesed by hitting the 'm' key during autoboot countdown or by typing 'exit' in the shell.

Storing barebox in internal SPI NOR flash

To be done later. Although it *should* work it is currently untested.

Kernel support for the Efika MX Smartbook

As of Linux 3.7 there currently is no recent kernel support for the smartbook. This hopefully changes soon, but now there only is a relatively old kernel without devicetree support available, The factory installed kernel is found under mnt/internal-hd0.0/uImage. This can be started with the hd-internal boot entry, but the path has to be adjusted:

boards/efikasb.txt · Last modified: 2012/12/13 22:41 by Sascha Hauer     Back to top