Skip to content
kikcho edited this page Sep 4, 2012 · 5 revisions

Rebuilding the kernel and rootfs for use with alarm

Kernel

Note: I've only managed to build kernel26-olinuxino natively. If there's a trick for using makepkg in a cross-compile environment, please let me know.

To rebuild the kernel, on an ARM computer with archlinux-arm installed:

  • install base-devel: pacman -S base-devel

  • Checkout alarm's PKGBUILDs git repository: git clone git://github.com/archlinuxarm/PKGBUILDs.git

  • Either make a copy of PKGBUILDs/core/kernel26-olinuxino or branch. This is optional, but recommended.

  • Run makepkg in this directory -- this will start a build, cloning the git repo, patching and compiling. This will show if dependencies are missing, system requirements are met, etc.

  • Inside it, there's a PKGBUILD file -- the script which prepares the source, compiles and builds a binary package for pacman. See the docs, of which there is plenty.

  • To alter the .config file, if you have one prepared otherwise, just replace core/kernel26-olinuxino/config with yours, run makepkg -g, use its output to replace the checksums in PKGBUILD and rebuild with makepkg

  • To run menuconfig (or friends), edit the PKGBUILD and find the following:

    # Configure the kernel. Replace the line below with one of your choice.
    #make menuconfig # CLI menu for configuration
    #make nconfig # new CLI menu for configuration
    #make oldconfig # using old config from previous kernel version
    

    Uncomment the preferred method, save and run makepkg.

  • You may optionally increase pkgrel in the build script.

  • Use your newly generated kernel26-olinuxino-2.6.35.3-<pkgrel>-arm.pkg.tar.xz with pacman: pacman -U kernel26-olinuxino-2.6.35.3-<pkgrel>-arm.pkg.tar.xz

Clone this wiki locally