Edited by pgauret at 2015-5-3 20:26
Looks like we can use the source code posted by Allwinner on Github for H3 boards.
Where I am at the moment:
- Successfully compiled u-boot (however not tested yet).
- Successfully compiled Linux 3.4 kernel and booted it.
Build environment
I am using a Ubuntu 12.04 virtual machine as the Allwinner code requires the older gcc 4.6 to build.
apt-get install libncurses5-dev
apt-get install gcc-4.6-arm-linux-gnueabihf g++-4.6-arm-linux-gnueabihf
ln -s /usr/bin/arm-linux-gnueabihf-gcc-4.6 /usr/bin/arm-linux-gnueabihf-gcc
ln -s /usr/bin/arm-linux-gnueabihf-gcov-4.6 /usr/bin/arm-linux-gnueabihf-gcov
ln -s /usr/bin/arm-linux-gnueabihf-g++-4.6 /usr/bin/arm-linux-gnueabihf-g++
ln -s /usr/bin/arm-linux-gnueabihf-cpp-4.6 /usr/bin/arm-linux-gnueabihf-cpp
u-boot
cd ~/opi
mkdir -p tools/pack/chips/sun8iw7p1/bin/
git clone
https://github.com/allwinner-zh/bootloader
cd bootloader/u-boot-2011.09
chmod +x mkconfig
chmod +x tools/scripts/*
Edit
arch/arm/cpu/armv7/config.mk and replace references to
-msoft-float by
-mfloat-abi=hard -mfpu=vfpv3
make CROSS_COMPILE=arm-linux-gnueabihf- sun8iw7p1_config
make CROSS_COMPILE=arm-linux-gnueabihf-
cd ..
Linux kernel
cd ~/opi
git clone
https://github.com/allwinner-zh/linux-3.4-sunxi
cd linux-3.4-sunxi/
curl -L -o arch/arm/mach-sunxi/power/brom/gen_check_code 'https://github.com/allwinner-zh/linux-3.4-sunxi/raw/9b373011c2717c072c8d20505f15fadad4239c0e/arch/arm/mach-sunxi/power/brom/gen_check_code'
curl -L -o arch/arm/mach-sunxi/pm/standby/gen_check_code 'https://github.com/allwinner-zh/linux-3.4-sunxi/blob/9b373011c2717c072c8d20505f15fadad4239c0e/arch/arm/mach-sunxi/pm/standby/gen_check_code?raw=true'
chmod +x arch/arm/mach-sunxi/power/brom/gen_check_code arch/arm/mach-sunxi/pm/standby/gen_check_code
Copy the attached .config file (silly forum does not allow attaching file without zipping it)
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j5 uImage modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules_install
TODO:
- Test u-boot
- Complete linux kernel configuration (current config has no networking). I'd like to restart from a default Ubuntu or Debian kernel config baseline and add the relevant sunxi options.