MicroSUSE System Builder's Guide

Şuraya atla: kullan, ara

Building A Minimal i386 System

These are the steps required to build a minimal system for an i386 PC-like target.

  1. Become the root user.
  2. Create a temporary directory.
  3. Unpack the following tarballs in your temporary directory: (Depending on whether you have built the MicroSUSE distribution manually or are using the RPMs, the target system packages can be found in tarballs/i386 or /usr/lib/microsuse/i386/target.)
    1. root-i386.tar
    2. busybox-i386.tar
    3. kernel-qemu-i386.tar
  4. Move the kernel image (bzImage-<kernel version>-qemu-i386) out of your temporary directory.
  5. Create an ext2 filesystem image by running these commands:
    1. dd if=/dev/zero of=ususe.img bs=1M count=2
    2. mkfs.ext2 -N 512 ususe.img
  6. Mount your filesystem image and copy all files from your temporary directory onto it, then unmount it.

Et voila, you're done. If you have QEMU installed, you can run your system like so:

qemu-system-i386 -hda ususe.img -kernel <path to the kernel image>/bzImage-<kernel version>-qemu-i386 -append root=/dev/hda

Building A Minimal ARM System

Building a system for an Integrator/CP board with an ARM 926 CPU is a little bit more tricky than building for a plain old PC, depending on whether you want your console on the UART or the LCD. Here's how it works:

  1. Become the root user.
  2. Create a temporary directory.
  3. Unpack the following tarballs in your temporary directory: (Depending on whether you have built the MicroSUSE distribution manually or are using the RPMs, the target system packages can be found in tarballs/arm or /usr/lib/microsuse/arm/target.)
    1. root-arm.tar
    2. busybox-arm.tar
    3. kernel-qemu-arm.tar
  4. Move the kernel image (zImage-<kernel version>-qemu-arm) out of your temporary directory.
  5. Now, depending on whether you want your console on the serial line or on the LCD panel, you have to do these steps:
    • Serial console:
      1. Create a device node for the serial console:
        mknod <your directory>/dev/ttyAMA0 c 204 64
      2. Make sure Busybox init starts a getty on that console by editing etc/inittab in your temporary directory and replacing the line that says
        #ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100
        with one that says
        ttyAMA0::respawn:/sbin/getty -L ttyAMA0 115200 vt100
      3. To be able to log on as root (which is what you will want to do as the system does not have any other users), you also have to edit etc/securetty, adding a line that says
        ttyAMA0
        at the bottom.
    • Framebuffer console:
      1. Create a device node for the FB console:
        mknod <your directory>/dev/tty1 c 4 1
  6. Create an ext2 filesystem image by running these commands:
    1. dd if=/dev/zero of=ususe.img bs=1M count=2
    2. mkfs.ext2 -N 512 ususe.img
  7. Mount your filesystem image and copy all files from your temporary directory onto it. Unmount your filesystem image.

Phew, that's it. Again, if you have QEMU installed, you can test your system like this:

Serial console:

qemu-system-arm -kernel <path to the kernel image>/zImage-<kernel version>-qemu-arm -initrd ususe.img -nographic -append console=ttyAMA0

Framebuffer console:

qemu-system-arm -kernel <path to the kernel image>/zImage-<kernel version>-qemu-arm -initrd ususe.img -append console=tty1

Note that you need a QEMU build newer than version 0.8.0 for this to work!

We have built a "hardfloat" system here. If you want to build a system that does not require an FPA or an FP emulator, you can simply use the arm_nofpu instead of the arm tarballs.