Miscellaneous Useful Stuff

Building linux-linaro[-core-tracking] kernel by hand, putting it into the hwpack and writing it to the SD

Assumptions:

  • linaro-image-tools installed

  • the commands are executed from the root of the kernel source tree
  • the output directory for the kernel build is ../out
  • $BOARD_CONFIG - the relevant config fragment for the board, e.g. omap4.conf (see linaro/configs contents)
  • $KERNEL_VERSION - the kernel version. E.g. 3.8-rc6-my_usb_patches_to_test 8 $ORIGINAL_HWPACK - path to the hwpack for the same board downloaded from s.l.o/quantal/hwpacks. E.g. ~/slo-hwpacks/hwpack_linaro-panda_20130224-256_armhf_supported.tar.gz
  • $FIT_METADATA - *must* be chosen so that the resulting kernel image filename matched the "kernel_file:" pattern from the $ORIGINAL_HWPACK's manifest. E.g. linaro-omap

Just in case:

rm -rf ../out/*
rm -f ../out/.*
make mrproper

Create the config file from the config fragments:

ARCH=arm scripts/kconfig/merge_config.sh -O ../out linaro/configs/linaro-base.conf linaro/configs/ubuntu-minimal.conf linaro/configs/$BOARD_CONFIG

Build and package the kernel (assuming a 4-core build machine):

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=../out KERNELVERSION=$KERNEL_VERSION-$FIT_METADATA KERNELRELEASE=$KERNEL_VERSION-$FIT_METADATA KBUILD_DEBARCH=armhf -j4 deb-pkg

Replace the linux-image package in the hwpack with the one just has been built ($NEW_LINUX_IMAGE_DEB):

pushd ..; linaro-hwpack-replace -t $ORIGINAL_HWPACK -p $NEW_LINUX_IMAGE_DEB -r linux-image -d; popd

The hwpack created can be put together with a rootfs to flash an SD card or create an eMMC image for the board.

Flashing SD card with linaro-media-create

A few examples to copy&paste

linaro-media-create --mmc /dev/sdb --dev panda \
--hwpack /home/ynk/linaro/panda/hwpack_linaro-panda_20130311-1911_armhf_supported.tar.gz \
--binary /home/ynk/linaro/s.l.o-rootfs/developer/linaro-quantal-developer-20130305-296.tar.gz \
--debug

Flashing Snowball's on-board eMMC with linaro-media-created and riff

The example to copy&paste the commands from

Updating the ll or llct tree

ll-fold.sh linux-linaro-core-tracking --recordunresolved --no-tagging
ll-fold.sh linux-linaro-core-tracking --recordunresolved new
git checkout -b ll_20130221.0 ll-20130221.0

Creating the linux-linaro kernel release

N.B. Make sure linux-linaro.manifest/linux-linaro[-core-tracking] tips point to the proper version (ll-fold.sh must be made to take care of that)

  1. Go to https://launchpad.net/linaro-linux-baseline/+milestone/<RELEASE> (where <RELEASE> is e.g. 13.01), and press "Create release" button

  2. tag the release:

    git tag linux-linaro-<kernel version>-<release> <the tree to tag>
    E.g.

    git tag linux-linaro-3.8-rc4-2013.01 ll-20130125.0
  3. Create the tar.bz file:

    git archive --format tar --prefix linux-linaro-<kernel version>-<release>/ linux-linaro-<kernel version>-<release> | bzip2 > ../linux-linaro-<kernel version>-<release>.tar.bz2
    E.g.

    git archive --format tar --prefix linux-linaro-3.8-rc4-2013.01/ linux-linaro-3.8-rc4-2013.01 | bzip2 > ../linux-linaro-3.8-rc4-2013.01.tar.bz2
  4. Create the properly named copy of the pinned manifests used for linux-linaro and the corresponding linux-linaro-core-tracking.


    E.g.

    cd linux-linaro.manifest
    git checkout linux-linaro
    cp manifest.pin ../linux-linaro-3.8-rc4-2013.01.manifest
    git checkout linux-linaro-core-tracking
    cp manifest.pin ../linux-linaro-core-tracking-3.8-rc4-2013.01.manifest
  5. Upload the tar.bz2 archive and the manifest to the

https://launchpad.net/linaro-linux-baseline/+milestone/<RELEASE>

AndreyKonovalov/Recipes (last modified 2013-03-15 19:27:25)