Skip to content

Instantly share code, notes, and snippets.

@chattama
Created August 24, 2012 00:11
Show Gist options
  • Save chattama/3443835 to your computer and use it in GitHub Desktop.
Save chattama/3443835 to your computer and use it in GitHub Desktop.
raspberry pi cross compile (kernel build)
cd ~/raspi
git clone https://github.com/raspberrypi/linux.git
wget http://xecdesign.com/downloads/linux-qemu/linux-arm.patch
patch -p1 -d linux/ < linux-arm.patch
cd ~/raspi/linux
make ARCH=arm versatile_defconfig
make ARCH=arm menuconfig
reference http://xecdesign.com/compiling-a-kernel/
add
> File systems --->
> <*> Ext3 journalling file system support
> <*> The Extended 4 (ext4) filesystem
> --- Native language support
> (utf8) Default NLS Option
> <*> Codepage 437 (United States, Canada)
> <*> ASCII (United States)
> <M> all other
> Userspace binary formats --->
> <*> Kernel support for MISC binaries
> () Default kernel command string
> [ ] VFP-format floating point maths
> General setup --->
> Cross-compiler tool prefix
> (/opt/cross/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-)
> [*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
> [*] Support initial ramdisks compressed using gzip
> [*] Support initial ramdisks compressed using bzip2
> [*] Support initial ramdisks compressed using LZMA
> [*] Support initial ramdisks compressed using XZ
> [*] Support initial ramdisks compressed using LZO
>
> System Type --->
> ARM system type (ARM Ltd. Versatile family) --->
> (X) ARM Ltd. Versatile family
>
> Bus support --->
> [*] PCI support
>
> Device Drivers --->
> Generic Driver Options --->
> [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs
>
> SCSI device support --->
> [*] SCSI low-level drivers --->
> <*> SYM53C8XX Version 2 SCSI support
>
> [*] USB support --->
> < > Synopsis DWC host support
>
> Graphics support --->
> <*> Support for frame buffer devices --->
> < > BCM2708 framebuffer support
>
> <*> MMC/SD/SDIO card support --->
> < > Secure Digital Host Controller Interface support
> < > SDHCI platform and OF driver helper
make ARCH=arm \
CROSS_COMPILE=/opt/cross/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-
make ARCH=arm \
CROSS_COMPILE=/opt/cross/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi- \
INSTALL_MOD_PATH=../install \
modules_install \
firmware_install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment