PINE64

Full Version: U-Boot for A64 git
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
To make clear what Allwinner did to U-Boot I started a Git repository forked from mainline.

See https://github.com/longsleep/u-boot-pine64 

Branch pine64-hacks has applied the BSP changes on top of mainline 2014.07 tag and contains various required backports and fixes for Pine64 on top.

Disk image test releases for Pine64

I publish disk images which combine U-Boot, Kernel with a minimal initrd as base image for Linux distributions and for testing. **These images are for developers** and  are build with my set of Pine64 image building tools from here.

Download images: https://www.stdin.xyz/downloads/people/l...64-images/

Boot log for comparison: https://www.stdin.xyz/downloads/people/l...OOTLOG.txt

Release history:

**20160207-1**
- Initial public release with patched mainline Kernel

**20160221-3**
- Linux Kernel 3.10 based on BSP (see here)
- HDMI support
- MMC support
- USB support
- Ethernet support (with hack to force 100M)
- Wifi suport
- Enabled various Kernel settings for distribution and software support

**20160221-4**
- Updated initrd so it can boot /sbin/init on the second partition if found and executable

**20160227-1**
- Linux Kernel 3.10 based on BSP 1.2 (see here)
- ATF was cleaned up and Kernel is now entered in EL2 (see here)
- Device tree was updated to reflect changes in BSP 1.2 based Android builds
- Ethernet 1000M works
- Virtualization works (see KVM)

**20160304-1**
- Linux Kernel 3.10 security fixes CVE-2013-7446, CVE-2015-8543, CVE-2016-0728 backported (thanks to )
- Linux Kernel now has a tag (3.10.65-2-pine64)
- Added NFS support to Kernel
- Enabled GPIO via sysfs
- Enabled tun, loop and nbd devices
- Device tree was updated to improve thermal throttling situation
- Device tree was updated to get better 1000M Ethernet speeds and compatibility

**20160306-1**
- U-Boot now supports booti arm64 booting (enabled by default)
- Updated U-Boot defaults to boot with booti + Kernel Image and initrd (deprecating Android boot)
- Changed default locations of Kernel and Initrd to match what latest Linux distributions expect
- U-Boot now has a tag (v2014.07-1-pine64)
- U-Boot now loads initrd.img in default environment
- U-Boot now supports additional bootargs in default environment
- U-Boot now passes ethernet mac address to Kernel if found in environment

**20160311-1**
- Additional CPU frequencies were added to device tree

**20160319-1**
- Added Pine64 model detection. Will now boot with different device trees for Pine64 / Pine64 plus by default
- U-Boot updated to v2014.07-3-pine64
- Kernel and device trees updated to 3.10.65-3-pine64

**20160403-2**
- Kernel updated to 3.10.65-4-pine64

**20160423-1**
- U-Boot updated to  v2014.07-4-pine64
- U-Boot built-in default environment now supports boot.scr from first mmc partition
- Enable UART2, UART3, UART4 (Thanks to Martin Ayotte)
- Kernel updated to 3.10.65-7-pine64

**20160618-1**
- U-Boot updated to v2014.07-6-pine64
- Kernel updated to 3.10.102-0-pine64
- ATF updated to 1.0-0-pine64
- U-Boot and ATF are now compiled with gcc 5.3
- Initrd has been updated

**20170311-1**
- U-Boot updated to v2014.07-7-pine64
- Kernel updated to 3.10.105-0-pine64
- Initrd has been updated
- U-Boot now exposes sunxi_flash as USB mass storage device (via sunxi_ums cmd, thanks to Kamil Trzcinski)
- U-Boot now detects Pinebook based based on the boot disk (emmc, thanks to Kamil Trzcinski)
- U-Boot now exposes the boot key status as boot_key variable (thanks to Kamil Trzcinski)

Released images are signed with a detached GPG signature (.asc) signed by my personal key 0x090EF0DB. Get the key and verify that the download is intact and unmodified.
Code:
gpg --keyserver keyserver.ubuntu.com --recv-keys 090EF0DB
gpg --with-fingerprint simpleimage-pine64-*.xz.asc

To update both Kernel an U-Boot to the latest releases, run the following commands (as root):
Code:
bash <(curl -s https://raw.githubusercontent.com/longsleep/build-pine64-image/master/simpleimage/platform-scripts/pine64_update_uboot.sh)
bash <(curl -s https://raw.githubusercontent.com/longsleep/build-pine64-image/master/simpleimage/platform-scripts/pine64_update_kernel.sh)
and reboot.

Cheers,
Simon
I made good progress. If you want to have a adventure, see https://github.com/longsleep/build-pine64-image and build U-Boot, ATF, Kernel and Initrd yourself. Proprietary parts used as binary blob (due to lack of full source) are boot0 and SCP firmware - everything else is compiled from source.

Full boot log of what you get:
http://paste.ubuntu.com/14966003/



This is work in progress and i will be adding more docs over the next couple of days.
Nice! Thanks for putting these on github.
I have started publishing images:

https://www.stdin.xyz/downloads/people/l...64-images/

Download from there to see what the current status is. I will release and publish new images when there is progress on either U-Boot or Kernel.

To flash the image, try something like this:
Code:
~$ xzcat simpleimage-pine64-20160207-1.xz|pv|sudo dd of=/dev/sdX bs=1M oflag=sync

Replace /dev/sdX with wherever your SDcard is. Check twice,
if you have the wrong device you might overwrite your harddisk.

The folder also contains a full boot log (BOOTLOG.txt) for you to compare with your own testing and a README.txt with some more instructions (Linux only).

Images are signed with a detached GPG signature (.asc) signed by my personal key 0x090EF0DB. Get the key and verify like this:
Code:
gpg --keyserver keyserver.ubuntu.com --recv-keys 090EF0DB
gpg --with-fingerprint simpleimage-pine64-20160207-1.xz.asc
(02-07-2016, 11:44 AM)longsleep Wrote: [ -> ]I made good progress. If you want to have a adventure, see https://github.com/longsleep/build-pine64-image and build U-Boot, ATF, Kernel and Initrd yourself. Proprietary parts used as binary blob (due to lack of full source) are boot0 and SCP firmware - everything else is compiled from source.

Full boot log of what you get:
http://paste.ubuntu.com/14966003/



This is work in progress and i will be adding more docs over the next couple of days.

I have been trying to recreate the image and I stumbled on building u-boot (https://github.com/longsleep/u-boot-pine64.git):

Code:
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
  GEN     include/autoconf.mk.dep
In file included from include/linux/compiler.h:40:0,
                 from include/linux/byteorder/little_endian.h:12,
                 from /home/dev/Repositories/build-pine64-image/u-boot-pine64/arch/arm/include/asm/byteorder.h:29,
                 from include/compiler.h:112,
                 from include/image.h:19,
                 from /home/dev/Repositories/build-pine64-image/u-boot-pine64/include/common.h:94:
include/linux/compiler-gcc.h:93:30: fatal error: linux/compiler-gcc5.h: No such file or directory
compilation terminated.
...

I tried both the Ubuntu gcc for arm, and also the one from Linaro.
On the Internet it suggests to use the gcc4 version of the file. However, there is a preprocessor error when making the change.
(02-08-2016, 04:48 PM)taros Wrote: [ -> ]I tried both the Ubuntu gcc for arm, and also the one from Linaro.
On the Internet it suggests to use the gcc4 version of the file. However, there is a preprocessor error when making the change.

What version of the gcc-arm-linux-gnueabihf toolchain is that? I use gcc-arm-linux-gnueabihf 4:4.8.2-1 as in the Ubuntu repository (on trusty). So you should try with 4.8 as well and i guess it will work. Let me know.

Update: I see now that i should add some details about the toolchains. For U-Boot and ATF use gcc-arm-linux-gnueabihf 4.8. For Kernel and Busybox use gcc-aarch64-linux-gnu 5.2. Kernel and Busybox might work with older version as well, but i did not test. You cannot compile U-Boot with anything newer than 4.8. I will add details to the docs asap.
(02-08-2016, 05:17 PM)longsleep Wrote: [ -> ]
(02-08-2016, 04:48 PM)taros Wrote: [ -> ]I tried both the Ubuntu gcc for arm, and also the one from Linaro.
On the Internet it suggests to use the gcc4 version of the file. However, there is a preprocessor error when making the change.

What version of the gcc-arm-linux-gnueabihf toolchain is that? I use gcc-arm-linux-gnueabihf 4:4.8.2-1 as in the Ubuntu repository (on trusty). So you should try with 4.8 as well and i guess it will work. Let me know.

Update: I see now that i should add some details about the toolchains. For U-Boot and ATF use gcc-arm-linux-gnueabihf 4.8. For Kernel and Busybox use gcc-aarch64-linux-gnu 5.2. Kernel and Busybox might work with older version as well, but i did not test. You cannot compile U-Boot with anything newer than 4.8. I will add details to the docs asap.

I built ATF using 
http://releases.linaro.org/14.07/compone...nux.tar.xz as mentioned here: https://github.com/apritzel/arm-trusted-...r-guide.md.

uboot built fine with arm-linux-gnueabihf gcc version 4.7.3 on ubuntu 14.04.3 using the standard apt-get package gcc-4.7-arm-linux-gnueabihf

Haven't been able to test it yet, as I'm downloading the insufferable lichee BSP.

Any possibility you could upload the three BSP files needed by u-boot-postprocess.sh?
(02-08-2016, 05:17 PM)longsleep Wrote: [ -> ]
(02-08-2016, 04:48 PM)taros Wrote: [ -> ]I tried both the Ubuntu gcc for arm, and also the one from Linaro.
On the Internet it suggests to use the gcc4 version of the file. However, there is a preprocessor error when making the change.

What version of the gcc-arm-linux-gnueabihf toolchain is that? I use gcc-arm-linux-gnueabihf 4:4.8.2-1 as in the Ubuntu repository (on trusty). So you should try with 4.8 as well and i guess it will work. Let me know.

Update: I see now that i should add some details about the toolchains. For U-Boot and ATF use gcc-arm-linux-gnueabihf 4.8. For Kernel and Busybox use gcc-aarch64-linux-gnu 5.2. Kernel and Busybox might work with older version as well, but i did not test. You cannot compile U-Boot with anything newer than 4.8. I will add details to the docs asap.

I used gcc 5.2.1 (arm-linux-gnueabihf-gcc-5 (Ubuntu 5.2.1-22ubuntu1) 5.2.1 20151010).
I now switched to gcc-4.8-arm-linux-gnueabihf and trying now again.

For the selected compiler to work, it needs a symlink or better use update-alternatives. This is because the compiler has a "-4" appended to the name which messed up cross-compiling.
(02-08-2016, 11:08 PM)patrickhwood Wrote: [ -> ]Haven't been able to test it yet, as I'm downloading the insufferable lichee BSP.

Any possibility you could upload the three BSP files needed by u-boot-postprocess.sh?

Yeah i guess i can. In fact i just did. Pull and check the blobs folder Smile - The scripts have been updated to use the stuff from there. It is no longer required to get the Lichee.

Cheers
Simon
The instructions habe been updated and they now support building images based on the BSP Kernel which has  working MMC, USB and Ethernet drivers.

Similar to the U-Boot Tree, i now also have a Kernel Tree based on the Linux sources in the BSP at https://github.com/longsleep/linux-pine6...ne64-hacks - it is up to you which Kernel you experiment with.
Pages: 1 2 3 4