Contents

Preamble

This article is just for my notes. Use it on your own risk! It later will be a full description about how to build a SLACKpad Linux distribution from scretch.

Buildsystem

Preamble

SlackPAD linux uses the same Buildsystem as Slackware Linux does. You can call it old and not flexible redundant or what ever you want but I am like it very much. The reason to use this Buildsystem and not OE for creating SlackPAD linux is easy. Openembedded is too much Debian like and I want to create a Slackware like System. Writing patches for OE to support Slackware like distribution targets would be possible but too much work. Also all the recipies are Debian like. A Package is splitted in a lot of Packages while Slackwares philosophie is to have one Package for one Sourcefile. So I would need to rewrite a lot of packages. The way to handle different init skrips is not solved jet.

Also Patrik is able to keep the Slackware distribution as only one person. I beliefe that no one is willing to help pushing SlackPAD so I decided that the buildsystem must be simpe and able to be handeld by only one person. Please just don't use it if you don't like it but don't complain about it.

How does it work?

The buildsystem basicaly is not real a buildsystem. It is a loose amount of SlackBuilds. SlackBuilds are simple shell skrips which contains all the neccessary instruktions to build a Slackware Package.

A Slackware Package it self is a simple gziped tar file (.tgz) which contains a install script called .doinst. It is called after it got untard via Slackwares installpkg. It also contains a file called slackdesc which contains a description about the package. That's it simple but verry usefull. No dependency tracking ;). If you like Slackware you know why you love this and why it is a feature not having dependency tracking! There is also no database about the installed packages. If you install a file it will create a simple textfile in /var/log/packages/packagename. Quite simple but efficient! It also makes it quite easy to create a build with all packages "installed" without the need to realy install them.

How to create a SlackBuild?

Text comes later.

Toolchain

I decided to switch from crosstool to CLFS description about how to build the toolchain. It is allways well tested and researched so I think it is a good decition to build it like they do. I have just not the time to find out all the needed cheats to compile gcc.


Old stuff just there to have a quick view to the commands

Toolchain

A Toolchain is the first thing you will need to crosscompile. Crosscompile means that you compile on a Host System which has a different hardware architecture. Eg. you are compiling for arm, SIMpad has a arm processor, on a i86 machine.

Getting and compiling the toolchain

Download the toolchain parts

Compile the toolchain

For my first tryings I use this compiling instructions (they are taken from here):

   1. cd [binutils-build]
   2. [binutils-source]/configure --target=arm-elf \
      --prefix=[toolchain-prefix] --enable-interwork --enable-multilib \
      --with-float=soft
   3. make all install
   4. export PATH="$PATH:[toolchain-prefix]/bin"
   5. cd [gcc-build]
   6. [gcc-source]/configure --target=arm-elf \
      --prefix=[toolchain-prefix] --enable-interwork \
      --enable-multilib --with-float=soft \
      --enable-languages="c,c++" \
      --with-newlib --with-headers=[newlib-source]/newlib/libc/include
   7. make all-gcc install-gcc
   8. cd [newlib-build]
   9. [newlib-source]/configure --target=arm-elf \
      --prefix=[toolchain-prefix] --enable-interwork \
      --enable-multilib --with-float=soft
  10. make all install
  11. cd [gcc-build]
  12. make all install
  13. cd [gdb-build]

Kernel

Vanilla patch sets

I now have a SVN at Sourceforge. There are the newest Kernel Patches available!

Vanilla

I have started to play with 2.6.19.1. For the first trys I will use a vanilla Kernel. Later I will try to release a patch set. The first target is to get zeckes mq200 driver working. A working Framebuffer is really needed.

Download the Kernel

Grab the Kernel from here:

Integrate drivers from Zeckes git Tree

  • First off all it will be the best to reed $Kernelsource/Documentation/kbuild/*
  • copy the drivers/video/mq200 stuff to the corresponding 2.6.19.1 dir (create one)
  • delete the mq200/simpad* stuff
  • edit mq_skeleton.c (delete) #include <linux/config.h> (no longer needed)
... 
* published by the Free Software Foundation.
 */

#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/fb.h>
#include <linux/types.h>
#include <linux/spinlock.h>

#include "mq200_data.h"
...
  • edit Makefile (remove some stuff from it)
# Makefile for mq200 video driver
# 4 Aug 2003, Holger Hans Peter Freyther
# Your Date, your name //replace this Line with the right Date and your Name

obj-$(CONFIG_FB_MQ200)           += mq_skeleton.o mq_external.o
  • edit drivers/video/Makefile (add one entry). This will tell the Kbuild system to go to the mq200 directory
...
obj-$(CONFIG_FB_PM3)              += pm3fb.o

obj-$(CONFIG_FB_MQ200)            += mq200/
obj-$(CONFIG_FB_MATROX)           += matrox/
...
  • Now we need to tell the Config System that there is a new option
  • edit drivers/video/Kconfig add a entry
...

config FB_S3TRIO
        bool "S3 Trio display support"
        depends on (FB = y) && PPC && BROKEN
        help
          If you have a S3 Trio say Y. Say N for S3 Virge.

config FB_MQ200
        bool "MQ200 Driver"
        depends on (FB = y) && ARM && ARCH_SA1100
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        help
         This is a MQ200 driver tested only on Simens SIMpads. You may need to
         boot your SIMpad with a 2.4 SIMpad Kernel first in order to use this
         driver. This is also needed if the SIMpad lost his power
         connection (empty accu or accu disconnect).

config FB_SAVAGE
        tristate "S3 Savage support"
...

Change the default defconfig

  • make defconfig simpad_defconfig ARCH=arm CROSS_COMPILE=arm-elf-
  • make menuconfig ARCH=arm CROSS_COMPILE=arm-elf-
  • Device Drivers -> Graphics support ->
  • y on MQ200 framebuffer support (there will be a [*] then)
  • exit and save
  • cp .config arch/arm/configs/simpad_defconfig
  • make mrproper

Build a Patchset

  • mv linux-2.6.19.1 to linux-2.6.19.1.vanilla/
  • untar a fresh linux-2.6.19.1
  • diff -uNr linux-2.6.19.1.vanilla/ linux-2.6.19.1 | gzip -c -9 > linux-2.6.19.1.SIMpad.mq200.patch.gz

Patch a Vanilla Kernel

  • zcat linux-2.6.19.1.SIMpad.mq200.patch.gz | patch -p0 2>&1 | tee patch.out

Compile the Kernel

  • make defconfig simpad_defconfig ARCH=arm CROSS_COMPILE=arm-elf-
  • make zImage ARCH=arm CROSS_COMPILE=arm-elf-


Zeckes Git Kernel

This is Zeckes git tree Kernel. The latest one is a 2.6.18-rc3. Zecke is no longer developing SIMpad stuff. Atm I am trying to understand what he has done exactly.

Getting Zeckes git tree

If this will fail you can also do

Compile the Kernel

  • cd ../Zeckes.Kernel.git.tree
  • make defconfig simpad_defconfig ARCH=arm CROSS_COMPILE=arm-elf-
  • make menuconfig ARCH=arm CROSS_COMPILE=arm-elf-
  • Device Drivers -> Graphics support ->
  • y on MQ200 framebuffer support (there will be a [*] then
  • exit and save
  • make zImage ARCH=arm CROSS_COMPILE=arm-elf-

Handhelds.org Kernel

Getting Handhelds.org Kernel

  • export CVSROOT=:pserver:anoncvs@cvs.handhelds.org:/cvs
  • cvs login
    • Password is anoncvs
  • cvs checkout linux/kernel26 (to get the newest version which is broken for SIMpads atm)
  • cvs co -r K2-6-12-hh3 linux/kernel26 (to get a older revision)
    • to see possible targets cd to the checkouted dir and do
    • cvs status -v Makefile
    • you then can do a cvs up -r "tag-name/or/versionumber" to switch between the stuff

Compile the Kernel

Atm I had not found a Version which I was able to compile. But I was not long searching.

Booting the Kernel

Change /dev entrys

This step is needed because newer Kernels use udev Boot a 2.4 as normal (eg. Familiar 0.8.4) then do:

# cd /
# mkdir /test
# mount -o bind / /test/
# cd /test/dev
# rm null
# mknod -m 660 console c 5 1 
# mknod -m 660 null c 1 3
# mkdir fb
# mknod fb/0 c 29 0
# cd /
# umount /test
# rmdir /test

With CF Card

boot> pcmcia detectboot 
boot> pcmcia insert
boot> boot vfat zImage <args if needed>
or
boot> vfat zImage mtdparts=sa1100:0x00040000@0x00000000(bootldr)ro,0x01f80000@0x00080000(root) noinitrd root=/dev/mtdblock1 init=/bin/sh rootfstype=jffs
to get a root shell on serialport

Over Serial

Unfortuntly I have lost my notes about that but I will try to figure it out.

Driver not working?

If you boot your SIMpad and there is a crapy Tux boot a 2.4 Kernel first. This will bring the SIMpad in a state where the 2.6 driver will work. You have to do this everytime your SIMpad was disconnected from its accu.

Unsorted Stuff(just to don't forget the stuff)

SLACKpads first targets

  • SLACKpad basic concept
  • Stability over usability!!!! And over nice useless features!!!!
  • help the SIMpad to become what it is -> a WebPad!
    • getting a Browser working which is really usable!
    • Maybe a "presurf proxy" will help
    • getting a EMail Client working
  • helP the SIMpad to become a Ebook reader!
    • PDF viewing without resetting

SSL

http://www.peersec.com/

This page was last modified 23:58, 6 July 2007. | This page has been accessed 10,335 times. | About OpenSIMpad.org
Designed by Anna Boheim | Powerd by mediawiki