[Arm-netbook] 2.7.4 preproduction sample, 1.7 MD, Questions

Paul Boddie paul at boddie.org.uk
Sat Jul 18 18:19:37 BST 2020

On Friday, 10 July 2020 08:59:07 CEST Pablo Rath wrote:
> On Thu, Jul 09, 2020 at 11:43:58AM +0100, Luke Kenneth Casson Leighton 
> > 
> > yes, this is standard practice.  you create the link on the parent,
> > first, then it creates a question-mark, then you get an edit link.  if
> > you know what you're doing you can manually create edit links :)
> Thank you for the crash course. Worked... almost like... *magic*.
> I have created a subpage under a20 and will put everthing there and we
> can move individual sections later if necessary.

I think I had similar problems until I realised that it is all very "old-
school wiki", first creating links for new pages in existing pages, then 
getting the magic question mark, and then having the opportunity to create the 
new page. I suppose it encourages people to link to new content and to 
consider whether they really need a new page.

I saw that there is a section about legacy U-Boot in the page:


The experience I had with old U-Boot versions that were contemporary with 
older versions of GCC is that the compiler-tweaking headers from Linux 
generally spew out lots of errors with newer compilers. One apparent solution 
was to just copy in the header from a more recent version of Linux (or maybe 
U-Boot) which is what I did for the MIPS Creator CI20 U-Boot, copying from a 
more recent version of Linux:

cp ../CI20_linux-ci20-v3.18/include/linux/compiler-gcc.h include/linux

However, that doesn't seem to be sufficient here. The structure of the Linux 
headers have changed, and while newer U-Boot versions seem to have adopted 
this structure, it doesn't seem to be easy to introduce to the legacy U-Boot 
for the Allwinner boards.

So, what seems to be necessary is to get an older compiler and to use that 
instead. Since distributions retire older compilers regularly, I used 
Buildroot to create a suitable GCC 4.9 cross-compiler than can then build the 
legacy U-Boot. To make things complicated here, Buildroot also retires support 
for older compilers, so I had to find a version still supporting GCC 4.x that 
didn't also suffer from this issue:


Anyway, here are the commands I used:

git clone git://git.buildroot.net/buildroot
cd buildroot
git checkout 2018.08.4
make menuconfig

In the menu, the following settings were inspected/changed:

Target options
  Target Architecture (ARM (little endian))
  Target Binary Format (ELF)
  Target Architecture Variant
  Target ABI (EABIhf)
  Floating point strategy (NEON/VFPv4)
  ARM instruction set (ARM)

  GCC compiler Version (gcc 4.9.x)

To build the toolchain, run...

make toolchain

(Use -j <processes> for parallel builds, of course. You may need to install 
rsync if you haven't already done so. Other packages may also be necessary.)

Setting PATH to reference this toolchain in output/host/bin, you can now build 
the legacy U-Boot as follows:

git clone https://github.com/linux-sunxi/u-boot-sunxi.git
cd u-boot-sunxi
make CROSS_COMPILE=arm-linux- EOMA68_A20_config
make CROSS_COMPILE=arm-linux-

(Again, use -j <processes> to make this go faster. Note that Buildroot 
compilers tend to use their own naming, so it is arm-linux- and not arm-linux-
gnueabihf- that needs to be used.)

Here, the use of EOMA68_A20_config sets up a bootloader for SD cards, whereas 
EOMA68_A20_FEL_config would set up a USB-bootable payload. See here for all 
the details:


This should get you the u-boot-sunxi-with-spl.bin file that needs to be 

Hope this was helpful!


More information about the arm-netbook mailing list