Home Home > 2012 > 01 > 19 > running openSUSE on ARM
Sign up | Login

running openSUSE on ARM

January 19th, 2012 by

This week I finally got my genesi efika MX box. By default it has on old Ubuntu version installed on its internal IDE-attached 8GB SSD. It features 512 MB RAM and a 800 MHz ARMv7 CPU.

Using a HDMI-cable and an HDMI-DVI-Adaptor I got it connected to a monitor, plugged in a USB keyboard+mouse and it pretty much worked out of the box with WLAN,Ethernet,X11 (except for a bug that causes it to force you to change PW on every console login). How boring.

Having read about recent progress with openSUSE on ARM I wanted the excitement of running it on this box.

Michal’s image and script (now in alpha) was very helpful to get me started within 15 minutes.

If you have any (e.g. x86) openSUSE system running, there is another easy way to create a working ARM chroot-environment:

zypper ar http://download.opensuse.org/repositories/openSUSE:/Tools:/Unstable/openSUSE_12.1/openSUSE:Tools:Unstable.repo
zypper install qemu osc
osc co openSUSE:Factory:ARM bash
cd openSUSE:Factory:ARM/bash
edit bash.spec # add lines with your packages like BuildRequires: zypper,vim
osc build –no-verify –clean standard armv7l

If it worked well, /var/tmp/build-root/ should contain a chroot environment. E.g. you can run

file /var/tmp/build-root/bin/bash
/var/tmp/build-root/bin/bash: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, BuildID[sha1]=0xed9ca12f44c8591560d780cf807b6b6cf8ca8873, stripped

I partitioned my SD-card into two partitions. The first one for /boot with ext2 (needs only 150MB) and the second one for / to contain the rootfs. Be sure to have barrier=0 in your fstab for all ext[34] partitions so that writing to SD will not be as slow. The default U-Boot configuration first checks on the first partition of an SD-card for boot.scr which is a uImage-formatted version of a U-boot script. I copied all of Ubuntu’s /boot and /lib/modules/, slightly adapted their boot.script file to have root=/dev/mmcblk0p2 and uImage/uInitrd-2.6.31.14.26-efikamx as kernel/initrd, dropped “quiet splash” and added “console=ttymxc0,115200″ to see more of the boot and ran a line from another helpful site:

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n “my boot script” -d boot.script boot.scr
echo mxc0:S12345:respawn:/sbin/agetty -L 115200 ttymxc0 vt102 >> /etc/inittab # for serial console

However, this failed to boot. Using the serial debug console, I could see U-boot trying to load the boot.scr but it was thinking it was zero bytes for some strange reason. Re-creating my /boot partition as a raw copy of /dev/sda1 with my adaptions ontop finally gave me an SD-card that just boots openSUSE Factory on ARM with framebuffer console on HDMI/DVI.

Find more ARM-related info on our openSUSE ARM Portal

Both comments and pings are currently closed.

2 Responses to “running openSUSE on ARM”

  1. for reference – serial bootloader output, that can even help you make bootable SD-card images without debug board:

    U-Boot 2009.01-2.0.6-efikamx (Nov 02 2010 – 17:13:53)

    CPU: Freescale i.MX51 family 3.0V at 800 MHz
    mx51 pll1: 800MHz
    mx51 pll2: 665MHz
    mx51 pll3: 216MHz
    ipg clock : 66500000Hz
    ipg per clock : 665000000Hz
    uart clock : 66500000Hz
    cspi clock : 54000000Hz
    Board: MX51 Efika MX 3.0 [POR]
    DRAM: 512 MB
    JEDEC ID: 0xbf:0x25:0x4a
    Reading SPI NOR flash 0x40000 [0x10000 bytes] -> ram 0x975f06e8
    .SUCCESS

    *** Warning – bad CRC, using default environment

    In: serial
    Out: serial
    Err: serial
    board id: 1.0.1, rev1.3
    Boot Source: SPI NOR FLASH BOOT
    Boot Cmd: for device in “mmc ide”; do if strcmp ${device} == mmc; then; mmcinit; setenv units “0 1″; else; setenv units “0”; fi; for interface in ${units}; do if strcmp ${device} == mmc; then mmcprobe ${interface}; else; ide reset; fi; for fs in “ext2 fat”; do setenv loadcmd “${fs}load ${device} 0:1″; if ${loadcmd} ${scriptaddr} boot.scr; then; if imi ${scriptaddr}; then; autoscr ${scriptaddr}; fi; fi; done; done; done;
    Hit any key to stop autoboot: 0
    U-Boot#printenv
    bootdelay=3
    baudrate=115200
    loadaddr=0x90007FC0
    firmware_version=20101102171353
    uboot_addr=0x00000000
    uboot_size=0x00040000
    env_addr=0x00040000
    kerneladdr=0x90007FC0
    scriptaddr=0x91000000
    ramdiskaddr=0x92000000
    console=ttymxc0,115200
    model=mx
    bootcmd=for device in “mmc ide”; do if strcmp ${device} == mmc; then; mmcinit; setenv units “0 1″; else; setenv units “0”; fi; for interface in ${units}; do if strcmp ${device} == mmc; then mmcprobe ${interface}; else; ide reset; fi; for fs in “ext2 fat”; do setenv loadcmd “${fs}load ${device} 0:1″; if ${loadcmd} ${scriptaddr} boot.scr; then; if imi ${scriptaddr}; then; autoscr ${scriptaddr}; fi; fi; done; done; done;
    stdin=serial
    stdout=serial
    stderr=serial

    Environment size: 706/65532 bytes
    U-Boot#

  2. hron84

    The barrier=0 can help in case of CF card too? We’d like use this for our embedded solution.