H3 boards with Allwiner source code
Edited by pgauret at 2015-5-3 20:26Looks 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.
magicse replied at 2015-8-3 07:56
Some question
In docs of Orange Pi say next ->
SD Card Layout
Because that sd card layout is wrong.
bootloader is at 8x1024
u-boot is at 16400*1024
first partition starts at 20480x1024
@ghl.bhrt
zhao_steven replied at 2015-5-3 09:20
I will upload u-boot and kernel source to github orangepi-xunlong in a week. I am testing lubuntu an
Steven forgot to say in a week next year!
;P
don't believe it!
This is the official link:https://github.com/allwinner-zh/bootloader/tree/master/basic_loader
There are no others!
Booting from sdcard, just replaced uImage. Not sure making this work is worth pursuing now that Steven has released SDK. I will upload u-boot and kernel source to github orangepi-xunlong in a week. I am testing lubuntu and raspbian. a great YEAH!! to both of you.
PS. Come on customs please releases my board :@ Hi pgauret,
how are you booting this?..sdcard or eMMC?...are you using the old debian image and just replacing uImage?
Kudos by the way,
CK
Android 4.2 SDK for H3?or the sameAndroid 4.2 SDK for Orange Pi/mini Pi codekipper replied at 2015-5-4 15:20
Hi pgauret,
how are you booting this?..sdcard or eMMC?...are you using the old debian image and just ...
Sorry for late reply. For the moment just replacing uImage, couldn't yet build a working u-boot from the SDK sources.
@pgauret
u-boot needs to be "updated" with sys_config.bin and written on 16400.
bs=1k seek=16400 fritz replied at 2015-5-16 16:14
@pgauret
u-boot needs to be "updated" with sys_config.bin and written on 16400.
bs=1k seek=16400
Thanks Fritz, this is indeed a step I was missing.
Which board name do you use to build sys_config.bin?I have the following available:
defaultdolphin-cmcc-wasu-p1dolphin-p1dolphin-perffpga
Edited by fritz at 2015-5-16 18:12
dolphin-p1, but I have the right one for pi plus extracted ;)
....and look at sun8iw7p1.h ->#define CONFIG_EXTRA_ENV_SETTINGS
before you build u-boot.