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

ArchLinuxARM (also referred to as alarm) is a complete Linux distribution which runs happily on all iMX233-OLinuXino boards.

RootFS

This section explains how to generate a fresh alarm root file system. This will be useful for boards which lack internet connectivity and cannot install packages themselves or for occasions where a custom image is needed on many boards.

If this is not the case, please use the official install instructions.

Generating an alarm rootfs requires an alarm host -- this can happen on an olinuxino itself, or a different (possibly more powerful) arm computer with arch installed.

  • Clone https://github.com/OLIMEX/archlinuxarm-olinuxino:
  • Modify scripts/distro-builder and the other files in this directory as needed. TODO: elaborate
  • Run ./distro-builder <rootfs-location>
  • Optionally add your files/software/data to the generated rootfs directory and repackage the tar.gz archive.
  • Extract the generated rootfs on your SD card. Make sure to flash the same kernel on the first partition, or modules will fail to load. TODO: elaborate

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