Building Custom Kernel RPMS
Deepak Saxena
dsaxena at laptop.org
Fri Dec 19 14:32:35 EST 2008
Hi,
I've added a new feature to the OLPC kernel tree that should make
building custom kernel RPMs from our git tree a bit simpler for
anyone who wants to do so. Basically once you have the git tree
checked out and have commited your changes, you can run
'make olpc-kernel-rpm' from the top of the kernel directory
to build src, binary kernel, debuginfo, devel, and kernel-header
RPMs that will be found in the "olpc/RPMs" directory of the
kernel.
Note that you must commit changes first and the command will
not run if you have uncommited changes or untracked files in
your repository. This is done b/c the script uses the tree's
HEAD commit ID for naming the kernel and w/o this precaution,
we could end up with two kernel RPMs floating around that
have the same commit ID but differing source trees. Note also
that this command only works on testing (8.2) and master (joyride)
kernel branches and not the stable (8.1) branch.
Note that this still requires a Fedora/RHEL system to build
kernels, or a functioning mock/chroot setup (untested so far).
I have tested on F10 and FC6 systems. Please let me know if
you have any problems on other systems.
I will update Wiki with these directions.
# make olpc-kernel-rpm
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/lex.zconf.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# NOTE: You can ignore the following error...I need to make
# it not run a silentdefconfig first.
#
scripts/kconfig/conf -s -o arch/x86/Kconfig
***
*** You have not yet configured your kernel!
*** (missing kernel .config file)
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
CLEAN scripts/basic
CLEAN scripts/kconfig
CLEAN include/config
...
Wrote: /mnt/filer/dsaxena/olpc-2.6/olpc/SRPMS/kernel-2.6.25-20081219.1.olpc.deab9f6.src.rpm
Wrote: /mnt/filer/dsaxena/olpc-2.6/olpc/RPMS/i586/kernel-2.6.25-20081219.1.olpc.deab9f6.i586.rpm
Wrote: /mnt/filer/dsaxena/olpc-2.6/olpc/RPMS/i586/kernel-devel-2.6.25-20081219.1.olpc.deab9f6.i586.rpm
Wrote: /mnt/filer/dsaxena/olpc-2.6/olpc/RPMS/i586/kernel-headers-2.6.25-20081219.1.olpc.deab9f6.i586.rpm
Wrote: /mnt/filer/dsaxena/olpc-2.6/olpc/RPMS/i586/kernel-debuginfo-common-2.6.25-20081219.1.olpc.deab9f6.i586.rpm
Wrote: /mnt/filer/dsaxena/olpc-2.6/olpc/RPMS/i586/kernel-debuginfo-2.6.25-20081219.1.olpc.deab9f6.i586.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.60442
+ umask 022
+ cd /mnt/filer/dsaxena/olpc-2.6/olpc/BUILD
+ cd kernel-2.6.25
+ rm -rf /var/tmp/kernel-2.6.25-20081219.1.olpc.deab9f6-root
+ exit 0
Thanks,
~Deepak
More information about the Devel
mailing list