Skip to content

Instantly share code, notes, and snippets.

@cmicali
Created June 10, 2013 14:57
Show Gist options
  • Save cmicali/5749384 to your computer and use it in GitHub Desktop.
Save cmicali/5749384 to your computer and use it in GitHub Desktop.
#!/bin/bash -e
# Note: You need to have these packages installed (assuming Ubuntu 12.10)
# apt-get install build-essential gcc-arm-linux-gnueabi git lzop u-boot-tools
# Build the kernel
make -j 8 CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm uImage dtbs modules
rm -rf dist
mkdir dist
mkdir dist/boot
# Install modules to the dist directory
make -j 8 CROSS_COMPILE=arm-linux-gnueabi- ARCH=arm modules_install INSTALL_MOD_PATH=dist
# Copy the uImage to dist
cp arch/arm/boot/uImage dist/boot
cp arch/arm/boot/dts/am335x-bone.dtb dist/boot
cp arch/arm/boot/dts/am335x-boneblack.dtb dist/boot
# Tar the output to
cd dist
tar cvzf kernel.tar.gz *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment