# apt-get install gcc-arm-linux-gnueabihf ncurses-dev uboot-mkimage build-essential git
# Older (prior to 2013): apt-get install gcc-4.6-arm-linux-gnueabi ncurses-dev uboot-mkimage build-essential git
if you want to use GPIOs for instance they are not enabled by default and you can do this by adding:
SUN4I_GPIO_UGLY = y inside .config
then you can contiue with:
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage 在这里需要注意的是标记的地方不能少 否则编译错误
when this finish‘s you will have uImage ready and you can build the kernel modules:
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=out modules
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=out modules_install
Disk /dev/sdX: 2001 MB, 2001731584 bytes
42 heads, 41 sectors/track, 2270 cylinders, total 3909632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0×00000000
Device Boot Start End Blocks Id System
/dev/sdX1 2048 34815 16384 83 Linux
/dev/sdX2 34816 3909631 1937408 83 Linux
# gunzip -c /home/user/olinuxino/mele_debian_armhf_minimal.cpio.gz | cpio -i where "user" is the user name of your root user
# cd ..
# sync
# umount /mnt
# cd uboot-allwinner/
# dd if=spl/sunxi-spl.bin of=/dev/sdX bs=1024 seek=8
# dd if=u-boot.bin of=/dev/sdX bs=1024 seek=32
# sync
# umount /mnt
and copy the Kernel modules for partition 2 # mount /dev/sdX2 /mnt
# cd ..
# cp -a linux-allwinner/out/lib/modules/3.0.42+/ /mnt/lib/modules/.
# umount /mnt
那么现在你有一个已经准备引导debian的sd卡了Linux Sunxi to build latest Kernel yourself
U-boot to build community U-boot
Building bootable Debian SD card for A13-OLinuXino Original step by step instructions how to make SD card image with above Kernel and U-boot
Forum post with yet another more up to date explanation how to build SD card
原文地址:http://blog.csdn.net/u011401496/article/details/44856589