Installation procedure for mainline U-Boot

73 views
Skip to first unread message

Stefan Monnier

unread,
Aug 9, 2020, 4:20:57 PM8/9/20
to linux...@googlegroups.com
http://linux-sunxi.org/Bootable_SD_card says that to install U-Boot
coming wither from mainline of legacy should be done with:

dd if=u-boot-sunxi-with-spl.bin of=${card} bs=1024 seek=8

[ except for U-Boot v2013.07 or earlier. ]

But when I build U-Boot from the mainline's `master` branch, I don't get
any `u-boot-sunxi-with-spl.bin` file.

Did the procedure change? Where is it documented now?


Stefan

Milos Ladni

unread,
Aug 10, 2020, 2:38:53 AM8/10/20
to linux-sunxi
Hi Stefan,

i am not sure where is the issue but here are my tips how i built new meinline u-boot few months ago...
Install additional packages:
$ apt-get install swig python-dev python3-dev
Build HowTo:
$ git clone git://git.denx.de/u-boot.git
$ git checkout v2020.04                                                                                          # or whatever is latest
$ make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino_MICRO-eMMC_defconfig
$ make CROSS_COMPILE=arm-linux-gnueabihf- <board_name>_defconfig    # at this point i created new branch and create default configuration for my custom tcs-7Zoll device using the 'savedefconfig' method (this is only optional step).
$ make CROSS_COMPILE=arm-linux-gnueabihf- menuconfig                            # here you can check if SPL is turned on (it should be enabled by default)
$ make CROSS_COMPILE=arm-linux-gnueabihf-                                                   # voilaaa u-boot-sunxi-with-splbin is here

Milos

Stefan Monnier

unread,
Aug 10, 2020, 11:36:09 PM8/10/20
to linux...@googlegroups.com
> i am not sure where is the issue but here are my tips how i built new
> mainline u-boot few months ago...
> https://linux-sunxi.org/Mainline_U-Boot
> Install additional packages:
> $ apt-get install swig python-dev python3-dev
> Build HowTo:
> $ git clone git://git.denx.de/u-boot.git
> $ git checkout v2020.04
> # or whatever is latest
> $ make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino_MICRO-eMMC_defconfig

So far so good, this matches what I do (tho I'm building it on an armhf
box so I don't need to cross compile).

> $ make CROSS_COMPILE=arm-linux-gnueabihf- <board_name>_defconfig # at
> this point i created new branch and create default configuration for my
> custom tcs-7Zoll device using the 'savedefconfig' method (this is only
> optional step).

Can you provide some more details about what you did at this step?

> # voilaaa u-boot-sunxi-with-splbin is here

Oh, duh! Indeed it is built but on `v2020.04` (and earlier), it
appeared as:

BINMAN u-boot-sunxi-with-spl.bin

in `make`s output, whereas with `master` I instead see:

BINMAN all

and the lack of `u-boot-sunxi-with-spl.bin` in this output made me think
the file was not built. Sorry 'bout the noise. and Thanks!

[ So now I'm back at the other problem of creating the right
`sun5i-a10s-reko-smartbox.dts` and `A10s-reko-smartbox_defconfig` files
(see the "Submitting new A10s board" thread). ]


Stefan

Milos Ladni

unread,
Aug 11, 2020, 5:54:15 AM8/11/20
to linux-sunxi
Hi,
i am not sure for which board you are trying to compile but generally...
If you have yout custom board or want to create your custom default setup you can create new branch and execute:
$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make savedefconfig
This command will create defconfig file. After this you can copy defconfig to arch/arm/configs/ and rename it to your custom settings name.
As i said, this step is not related to you issue.

I just tryed to pull mainline u-boot and compile it from master branch for A20-OLinuXino_MICRO-eMMC_defconfig.
After compilation passed i also see 'BINMAN all' and i got u-boot-sunxi-with-spl.bin
Maybe your defconfig does not include spl support by default. For which board are you tring to compile u-boot?

Milos Ladicorbic

Stefan Monnier

unread,
Aug 11, 2020, 10:35:05 AM8/11/20
to linux...@googlegroups.com
> $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make savedefconfig
> This command will create defconfig file.

Could you take a look at my recent post on "Submitting new A10s board"
and answer there, since I think it will clarify what is my problem.


Stefan

Milos Ladni

unread,
Aug 12, 2020, 7:51:22 AM8/12/20
to linux-sunxi
Hi,

unfortunatelly i played with A10s long time ago and do not have experience with mainlune u-boot and A10s, only with mainline u-boot for A20 SoC.

If it's of any help to you, i just recompiled u-boot 2020-04 for 'A10s-OLinuXino-M_defconfig' and i got 'u-boot-sunxi-with-spl.bin' without problem.

Once when you have new 'u-boot-sunxi-with-spl.bin' compiled well. Maybe you can try to tune boot.scr for additional board parameters like rootfs partition etc.
For A20, i added additional setup for board booting by set boot.cmd and compile it to boot.scr by:
$ mkimage -C none -A arm -T script -d boot.cmd boot.scr

Milos
Reply all
Reply to author
Forward
0 new messages