Cubieboard A20 - Personalize e compile o kernel

De Área31 Hackerspace

Boot

Obtenha o bootloader:

wget http://area31.net.br/downloads/boot-cubieboard2.tar.bz2
mv /boot /boot-old && tar xjvpf boot-cubieboard2.tar.bz2 -C /

Compilação

Obtenha o MKIMAGE do u-boot

Obtenha o código fonte

cd /opt && git clone git://gitorious.org/u-boot-mkimage/u-boot-mkimage.git

Compile e instale

cd u-boot-mkimage && make
cd /usr/bin && ln -s /opt/u-boot-mkimage/mkimage mkimage


Obtenha o source do kernel 3.4 via GIT

git clone -b sunxi-3.4 https://github.com/linux-sunxi/linux-sunxi.git

Configure o kernel

Escolha o modelo

Modelo A20 (Cubieboard2 e CubieTruck)

make sun7i_defconfig

obtenha o .config do area31

wget http://area31.net.br/downloads/config-cubieboard2.gz
zcat config-cubieboard2.gz > /usr/src/linux/.config
make oldconfig

Personlize o kernel

make menuconfig

Compile o kernel

make uImage modules

ATENÇÃO

Algumas versões do kernel Linux retornam erro ao tentar gerar a uImage. Ex:

kankin-cubie-a20 linux # make uImage modules                                                                                                                                                                                                 
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
  Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/zImage is ready
multiple (or no) load addresses: 
This is incompatible with uImages
Specify LOADADDR on the commandline to build an uImage
/storage01/usr/src/linux-sunxi/arch/arm/boot/Makefile:79: recipe for target 'arch/arm/boot/uImage' failed
make[1]: *** [arch/arm/boot/uImage] Error 1
/storage01/usr/src/linux-sunxi/arch/arm/Makefile:305: recipe for target 'uImage' failed
make: *** [uImage] Error 2

Para sanar tal problema, tente gerar a imagem especificando a variável ${LOADADDR}:

make uImage LOADADDR=0x70008000


Instale o kernel

cp arch/arm/boot/uImage /boot/
make modules_install


fonte:

http://linux-sunxi.org/Linux_Kernel#Compilation
Cookies nos ajudam a entregar nossos serviços. Ao usar nossos serviços, você concorda com o uso de cookies.