[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to add new platform flavours to linux-2.6 source code package?


I'm currently trying to adapt the debian-installer for some desktop
PowerPC machines (namely AmigaOne and Sam440ep), which are supported
in the Linux kernel tree, but not by Debian.
I thought it's best to add support for these platforms to the linux-2.6
Debian kernel package first (so that I don't need a lot of workarounds
to satisfy kernel-wedge). For this I modified the debian/config/
powerpc/defines file to look like this:

> [base]
> featuresets:
>  vserver
> flavours:
>  powerpc
>  powerpc-smp
>  powerpc64
>  book3s-amigaone
>  44x-sam440ep
> kernel-arch: powerpc
> [image]
> suggests: mkvmlinuz
> [powerpc_description]
> hardware: uniprocessor 32-bit PowerPC
> [powerpc-smp_description]
> hardware: multiprocessor 32-bit PowerPC
> [powerpc-smp_image]
> configs: powerpc/config.powerpc powerpc/config.powerpc-smp
> [powerpc64_description]
> hardware: 64-bit PowerPC
> [book3s-amigaone_description]
> hardware: uniprocessor Book3s (7xx/74xx) 32-bit PowerPC AmigaOne
> [book3s-amigaone_image]
> depends: uboot-mkimage
> configs: powerpc/config.book3s-amigaone
> [book3s-amigaone_build]
> image-file: arch/powerpc/boot/zImage
> [44x-sam440ep_description]
> hardware: uniprocessor 44x 32-bit PowerPC Sam440ep
> [44x-sam440ep_image]
> depends: uboot-mkimage
> configs: powerpc/config.44x-sam440ep
> [44x-sam440ep_build]
> image-file: arch/powerpc/boot/zImage

As you can see, I added two new flavors named book3s-amigaone and
44x-sam440ep. I thought it could be a good idea to prefix the flavour
name with the supported processor family, as AFAIK it is already done
for the MIPS architecture (4kc/5kc-malta?). Book3s are the 6xx/7xx/74xx
CPUs also supported by the powerpc flavour (their family name was
changed from PPC_6xx to PPC_BOOK3S in the kernel). Naturally 44x refers
to AMCC's 44x CPU family.

BTW: The AmigaOne needs its own flavour, because its platform code
uses a different DMA memory allocator, which is selected at compile
time. Just in case you wonder why...

Anyway, this seems to work fine, but still leaves some questions open
for me:

1. Documentation:
I looked at all the 'defines' files to understand their syntax and
to get an overview about all available keywords.
Nevertheless I would like to know, if there is a documentation
available that lists and explains all available keywords (if so, then
then some of the next questions are best answered with "RTFM"). I read
through the Debian kernel handbook, but that remains silent on this

2. 'image-file' keyword:
Does this keyword also affect the kernel image makefile target? I
specified arch/powerpc/boot/zImage for 'image-file', as I would
like to generate a platform specific cuImage.* file afterwards
(these U-boot images include a device-tree blob and a small boot-
wrapper so that newer kernels can be booted on old U-boot versions)
For this the kernel image needs to be generated with "make zImage".

3. 'configs' keyword:
Contrary to my expectations I had add 'configs' entries for my
flavours, whereas the normal powerpc and powerpc64 flavours don't need
it. Why can't the build system find my config.book3s-amigaone and
config.44x-sam440ep files automatically?

The biggest stumbling block at the moment is the kernel config itself.
The build process always stops with an error (about an invalid kernel
config), if I just copy the config.powerpc file and modify it for the
AmigaOne. I read something about a splitconfig script that should
create all the config fragments, but I can't find it anywhere. So how
do you create all the config fragments?

One last thing: the device tree source would need to be included in
the kernel package to create the cuImage file with the bootwrapper,
the device tree blob and the zImage (and the initrd), when the kernel
is installed or the initrd image is (re)generated. The device tree
sources are included in the Lenny powerpc kernel packages, but
disappeared from the Squeeze and Sid ones (the bootwrapper object
files are still there however).
Does anybody know why this happened and if it is possbile to include
the DT sources again? Should I file a bug report?

I hope you can give me some tips for my problems with the Debian
kernel package.

Thanks a lot!

best regards,


PS: Please put me on CC:, as I'm not (yet) subscribed to this mailing
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail

Reply to: