openSUSE:Efika

Jump to: navigation, search

About the Efika

The EFIKA 5200B is a Power Architecture tiny board from Genesi featuring the Freescale MPC5200B SoC.

File:Genesiwebaward.gif Genesi Web Award


openSUSE 11.1

For installation instructions, please refer to the 11.0 documentation. Here I only mention what changed from the previous release.

Making a zImage Kernel

Without a driver update you will need to create a working bootable image for the system. At the last step of the installation process it will count down from 10, to reboot the machine. Click STOP here. The countdown will halt.

Press CTRL+ALT+F2 to get to the emergency shell and remount the installation target as follows:

mount /dev/sdaX /mounts/instsys
mount /dev/sdaY /mounts/instsys/boot
mount -t proc none /mounts/instsys/proc
mount -o bind /dev /mounts/instsys/dev

Replace X and Y with your Root and Boot partitions respectively, assuming you used seperate boot and root partitions (this is really recommended and if you didn't accept the suggested partition layout from SUSE and created your own partitioning setup then please keep this in mind).

Now you can chroot into the working system and make your kernel:

chroot /mounts/instsys/ /bin/bash
cd /boot
mkzimage --vmlinux vmlinux --initrd initrd --board chrp --output zImage-`/sbin/get_kernel_version vmlinux`
ln -sf zImage-`/sbin/get_kernel_version vmlinux` zImage

Note the use of --board chrp - this is new! You will have to edit a small Forth script to enable sound to work. A DUD is available from (URL TBD). You can either put the boot arguments in here using..

\ FORTH

s" /builtin/sound" find-device
       \ Audio is on PSC2, just for informational purposes
       1 encode-int s" cell-index" property
device-end

." Booting openSUSE 11.1.. Please Wait.. "

s" hd:0 zImage root=/dev/sdaX" $boot

.. or you can embed them in the mkzimage command line, and just use zImage in the script.


Clean up behind yourself:

exit
umount /dev/sdaY
umount /dev/sdaX

You may now reboot and boot from the firmware into the installed system:

ok boot hd:0 zImage root=/dev/sdaX

or

ok boot hd:0 boot.forth

You may also mess with yaboot as with 11.0 if you wish, but I prefer this method.

openSUSE 11.0 on EFIKA 5200B

openSUSE 11.0 fully supports the EFIKA. To get started, you can download the DVD, or just a single small boot image from http://ftp.opensuse.org/pub/opensuse/distribution/11.0/repo/oss/suseboot/inst32 and point it at an openSUSE mirror (using ftp.opensuse.org makes the installation slow and unstable, especially around release time). inst32 is in the suseboot directory of the installation DVD. For advanced installation related boot parameters, take a look at the linuxrc documentation.

Installation Requirements

The official minimal RAM requirement is 256MB for the DVD and 512MB for the factory / ftp release. The EFIKA has 128MB, which means, that swap is a requirement for the installation process. The installer offers the following possibilities on boot before

  • use an existing swap partition (addswap=/dev/sda3 boot parameter)
  • create a swap file on an existing partition
  • turn a partition into a swap partition

If the HDD is still empty, then has two choices:

  • use an USB stick to create a swap file (slow)
  • use the rescue system for partitioning the HDD and creating a swap partition (needs to now some command line tools, like parted and mkswap, for parted see http://en.opensuse.org/PegasosQuickStart#parted)

By far the best way to partition is to boot a rescue system. This can be acheived by going through the menu as normal or if you copy the contents of an openSUSE "NET" CD to a USB key or use a USB CDROM drive, use the rescue=cd:/sr0 or rescue=hd:/sdb1 arguments when booting inst32.

Driver Update

A couple of smaller problems remained in the final version. These can be easily worked around by using a "Driver Update Disk" (DUD). Without it, no package selection is possible during installation, and no bootable kernel is created.

From an on-line installation, it can be used by adding the following boot parameter: dud=http://genesi.hu/dud.squash. It can also be downloaded from http://genesi.hu/dud.squash and loaded from the local network or an USB key. For a dud.squash file located on a USB key, try dud=hd:/sdb1/dud.squash. If you are booting using a local HTTP repository that you have control over, renaming it to "driverupdate" and putting it in the repository root (repo/oss or burned into the same position on a DVD) then it will be loaded automatically by the installer.

Booting

This DUD also creates a fix for the sound driver and a bootable kernel image with root= information embedded. Once the first stage of installation is over the machine reboots. Then the following commands can be used to boot the freshly installed OS:

boot hd:X boot/sound.forth
boot hd:X boot/zImage

Where X is the number of the / partition in the firmware.

Booting With Less Effort

Note you can automate booting further by adding the line

" hd:X boot/zImage" $boot

... to the bottom of sound.forth and setting the auto-boot, boot-file and boot-device environment variables.

Kernel Updates

When a kernel is updated by zypper it won't be automatically made into a zImage. The system will still boot since the zImage file is not touched by the kernel update process. To create a new zImage file for the new kernel revision, simply let the kernel update and when it's finished, use

mkzimage --vmlinux /boot/vmlinux --initrd /boot/initrd --output /boot/zImage-`/sbin/get_kernel_version /boot/vmlinux`

You can then link zImage to the new zImage-2.6.xx.xx-x.x-default file;

cd /boot
ln -sf zImage-`/sbin/get_kernel_version /boot/vmlinux` zImage

openSUSE 10.3 on EFIKA 5200B

openSUSE 10.3 fully supports the EFIKA. To get started, you can download the DVD, or just a single small boot image from http://ftp.opensuse.org/pub/opensuse/distribution/10.3/repo/oss/suseboot/inst32 and point it at an openSUSE mirror (using ftp.opensuse.org makes the installation slow and unstable). inst32 is in the suseboot directory of the installation DVD. For advanced installation related boot parameters take a look at the linuxrc documentation.

There are two known EFIKA specific problems:

  • sound is not configured automagically (you can still edit /etc/sysconfig/kernel to load modules, just add snd-mpc52xx-ac97 snd-mixer-oss to the "MODULES_LOADED_ON_BOOT" line). Be aware, that all sound is muted by default, use a mixer, like alsamixer, to unmute.
  • installer insists to use a CHRP boot partition / boot loader. The suggested CHRP boot partition can be safely deleted, discarding the warning, and the boot loader needs to be turned off on the expert page of the installer. For the second stage of installation one needs to use inst32 again for booting, then once installation is finished, mkzimage is to be used to create a bootable kernel (as root from the command line, do mkzimage --vmlinux /boot/vmlinux --initrd /boot/initrd --cmdline root=/dev/sdaX --output /boot/efika where X is the number of the root partition ).

The official minimal RAM requirement is 256MB for the DVD and 512MB for the factory / ftp release. The EFIKA has 128MB, which means, that swap is badly needed. There are a couple of possibilities, the installer offers all of these possibilities:

  • use an existing swap partition (addswap=/dev/sda3 boot parameter)
  • create a swap file on an existing partition
  • turn a partition into a swap partition

If the HDD is still empty, then has two choices:

  • use an USB stick to create a swap file (slow)
  • use the rescue system for partitioning the HDD and creating a swap partition (needs to now some command line tools, like parted and mkswap, for parted see http://en.opensuse.org/PegasosQuickStart#parted)

Please do not use software update during installation, as it has a huge bug: wants to install 64bit packages. Rather do the following as root, once the system is up and running:

First, make sure, that 64bit packages are not loaded, to work around a bug in zypper. Add the following lines to /etc/zypp/locks:

*64bit*
*ppc64*

Remove any 64bit packages left over:

rpm -e itrace
rpm -qa '*-64bit*' | xargs rpm -e --nodeps --noscripts
rpm -qa '*ppc64*' | xargs rpm -e --nodeps --noscripts

Then execute the following commands:

zypper -v up
cd /boot/
mkzimage --vmlinux vmlinux --initrd initrd --output efika

openSUSE 10.2 on EFIKA 5200B

Warning: the rest of this page is only for seasoned Linux users, for the rest, use 10.3 instead...

openSUSE 10.2 installer does not support (yet) the machine. The kernel included in the distribution does not know anything about the MPC5200B chip, as the necessary patches became available after openSUSE 10.2 was released.

Prebuilt kernels using patches from EFIKA website are now available for download (these are not 'official' openSUSE kernels, but provided by Genesi):

  • inst32 , the openSUSE install kernel
  • linux , kernel to boot EFIKA, once openSUSE 10.2 is installed
  • modules , kernel modules for the prebuilt EFIKA kernel

There are only minimal changes from the original kernel configuration, which enable the use of the MPC5200B SoC. This means, that use of the original openSUSE kernel modules should work fine. Still, to be on the safe side, modules built together with the EFIKA kernel are provided.

Installation

Even with an installation image (inst32) with all the necessary EFIKA drivers compiled into the kernel, using the installer does not work. So, this time another PowerPC computer with an installed openSUSE 10.2 is necessary. There are many ways to copy it over to the EFIKA's HDD. One is to copy the content of boot.ppc.iso (after loop mounting it) to an USB HDD or stick and also copy the EFIKA version 'inst32' there. The command to boot 'inst32' from the second partition of an USB HDD is:

boot scsi:1 path/to/inst32 linemode=0

Then choose to start 'rescue' from 'hard drive'. This gives all the tools necessary for partitioning and to copy files over the network or from the USB HDD to the 2.5" HDD. One can use nfs, rsync, or just a simple 'cp' command :-) One can use 'parted' for partitioning, and there are also tools to create filesystems. Make sure, that root is on an ext2 or ext3 partition.

Once it's on the HDD of EFIKA, there are a few things to prepare:

  • edit etc/fstab to pint directories to the correct partitions
  • copy the downloaded kernel in place
  • extract the modules in the lib/modules directory on the EFIKA HDD

When ready, simply reboot the EFIKA. If it's installed on /dev/sda3 and the kernel is in the boot directory, the command to boot it is:

boot hd:2 boot/linux root=/dev/sda3

Most probably it will try to start a graphical login screen but will fail. Just log in on the console and configure graphics and network:

  • sax2 -r can be used to set up the graphics card
  • yast2 lan can be used to set up netwroking

First network interfaces from the original installation must be removed (via-rhine and Marvell, in case of ODW), then an interface added, best to name it as 'eth0'.

You are ready now to use your EFIKA with openSUSE 10.2

Known problems

  • The 'Alt' keys don't work correctly when using 'inst32'. This means: no shortcut keys and changing screens does not work. In rescue mode it works only once: changing away from the console :-) Alt+Ctlr+Del does not work either...
  • 3D does not work, if 'dri' is enabled in xorg.conf, then OpenGL applications segfault.
  • Sound does not work, as sound patches are for a later kernel, and do not compile with 2.6.18.