[U-Boot] linux-sunxi/u-boot-sunxi is no longer supported, time to switch to upstream u-boot

Hans de Goede hdegoede at redhat.com
Sat Dec 20 19:27:11 CET 2014


Hi All,

There are 3 topics which I would like to cover in this mail:

1) Switching over to upstream u-boot for the linux-sunxi project
2) How to build upstream u-boot for use with linux-sunxi sunxi-3.4 kernels
3) Adding more boards to upstream u-boot


1. Switching over to upstream u-boot for the linux-sunxi project
================================================================

Upstream u-boot has had sunxi support for a while now, and has slowly been
gaining a lot of features over the linux-sunxi/u-boot-sunxi version at:
https://github.com/linux-sunxi/u-boot-sunxi/

Some of the new features supported upstream are booting from usb, booting from
sata (ahci) and full sun6i (A31) support including SPL support. Also upstream
u-boot supports using hdmi out + an usb keyboard as u-boot console, so that
one does not need to solder a serial console to things like hdmi tv-dongles.

Upstream u-boot also has full sun8i (A23) support in the pipeline including
SPL support.

One of the things which has stopped people from switching to upstream u-boot
so far is that upstream u-boot did not work with the linux-sunxi sunxi-3.4
kernels, but current upstream u-boot git master:
http://git.denx.de/?p=u-boot.git;a=summary

Now also has support for booting older kernels, so it is time that we
stop maintaining linux-sunxi/u-boot-sunxi and start focussing all our
efforts on upstream u-boot.


2. How to build upstream u-boot for use with linux-sunxi sunxi-3.4 kernels
==========================================================================

Here are some example instructions on how to build upstream u-boot for
the Cubietruck:

git clone git://git.denx.de/u-boot.git
cd u-boot
make -j4 CROSS_COMPILE=arm-linux-gnu- Cubietruck_defconfig
# If you want to use an upstream kernel the next steps can be skipped (*)
make -j4 CROSS_COMPILE=arm-linux-gnu- menuconfig
#  select "ARM architecture" -> "Enable workarounds for booting old kernels"
#  exit & save
make -j4 CROSS_COMPILE=arm-linux-gnu- spl/menuconfig
#  select "ARM architecture" -> "Enable workarounds for booting old kernels"
#  exit & save
# skip to here if you're using an upstream kernel
make -j4 CROSS_COMPILE=arm-linux-gnu-

And now you will have a u-boot-sunxi-with-spl.bin to dd to your sdcard as
usual.

If you look in the upstream configs directory you will already find
defconfig files for a lot of popular boards there, replace
Cubietruck_defconfig with the one for your board to build u-boot for your
board.

See below for instructions on how to add a new board if your board is
missing.

*) These steps can be skipped too when using sun4i (A10) or sun5i (A10s / A13)
with a current linux-sunxi/stage/sunxi-3.4 kernel.


3. Adding more boards to upstream u-boot
========================================

If you own a board which is already supported in linux-sunxi/u-boot-sunxi,
and is not yet upstream, please add support for it, there are 3 simple steps
to add a new board to upstream u-boot, see below. If you've any trouble with
this, but are willing to be listed as a contact person for this board let me
know and I'll create a patch adding the board for you to test.

1) Add the dram_foo.c file for your board from
linux-sunxi/u-boot-sunxi/board/sunxi to upstream u-boot/board/sunxi and add a
line for it to u-boot/board/sunxi/Makefile, see existing lines there for how
this should look.

2) Create a configs/foo_defconfig file for your board, take a look at
configs/Cubietruck_defconfig for an example, typically all the options
found in linux-sunxi/u-boot-sunxi/boards.cfg for the board go in the
CONFIG_SYS_EXTRA_OPTIONS field, except for the boardname define, which
gets replaced with a line like this:

+S:CONFIG_TARGET_CUBIETRUCK=y

3) Add an entry for the board to board/sunxi/MAINTAINERS, with yourself as
contact person for the board. For upstream u-boot we want to have a contact
person for each supported board, so that users have someone to mail who owns
the actual board in case of questions. This is also why we've not simply
copied all the boards from linux-sunxi/u-boot-sunxi to upstream u-boot.

Regards,

Hans


More information about the U-Boot mailing list