Skip to contentSkip to conversation

FEL mode broken since "sunxi: Move all boards to the driver-model"

U-Boot Ian Campbell 4 participants 6 messages Jun 26, 2015 – Jul 3, 2015

lore
Share & tools
lore
#0 lore raw

Hi Hans,

Sorry for only just noticing this, but it looks like FEL mode doesn't work on my cubietruck since this commit. I get the SPL output:

U-Boot SPL 2015.04-00665-gb6006ba (Jun 26 2015 - 20:38:50)
DRAM: 2048 MiB

CPU: 912000000Hz, AXI/AHB/APB: 3/2/2

But then nothing.

Or have I missed some change in how I should be using it?

Later versions (with CONFIG_FEL gone) exhibit similar behaviour when using the new "spl fel" method too, so I got that memo at least...

u-boot-sunxi.git#next has the issue too.

Do you know what this is likely to be or shall I try and find some time to investigate?

Ian.

#1 lore raw

Hi,

Quoted 10 lines · Ian Campbell

Hi Hans,

Sorry for only just noticing this, but it looks like FEL mode doesn't work on my cubietruck since this commit. I get the SPL output:

U-Boot SPL 2015.04-00665-gb6006ba (Jun 26 2015 - 20:38:50)
DRAM: 2048 MiB

CPU: 912000000Hz, AXI/AHB/APB: 3/2/2

But then nothing.

Right, that is expected, all the "fel spl" command does is load the spl, you need to do something like this to fel boot:

sudo ~hans/bin/fel version
echo Write SPL
sudo ~hans/bin/fel spl u-boot-sunxi-with-spl.bin echo Exec SPL
sudo ~hans/bin/fel exe 0x2000
sleep 0.5
echo Write u-boot
sudo ~hans/bin/fel write 0x4a000000 u-boot-dtb.bin echo Exec u-boot
sudo ~hans/bin/fel exe 0x4a000000

Are you doing that ? Also note that you now need to use u-boot-dtb.bin not u-boot.bin .

Quoted 8 lines

Or have I missed some change in how I should be using it?

Later versions (with CONFIG_FEL gone) exhibit similar behaviour when using the new "spl fel" method too, so I got that memo at least...

u-boot-sunxi.git#next has the issue too.

Do you know what this is likely to be

See above.

Quoted 2 lines

or shall I try and find some time
to investigate?

If that is not it it would be greay if you can find some time to investigate this.

Regards,

Hans

#2 lore raw
Quoted 8 lines · Hans de Goede

Hi,

Quoted 5 lines · Ian Campbell

Hi Hans,

Sorry for only just noticing this, but it looks like FEL mode doesn't work on my cubietruck since this commit. I get the SPL output:

Quoted 8 lines
Quoted 5 lines

U-Boot SPL 2015.04-00665-gb6006ba (Jun 26 2015 - 20:38:50)
DRAM: 2048 MiB

CPU: 912000000Hz, AXI/AHB/APB: 3/2/2

But then nothing.

Right, that is expected, all the "fel spl" command does is load the spl,

Ah, I had (na?vely?) expected that since it took u-boot-sunxi-with-spl.bin as an argument it would do the second half too.

I would have expected this to become necessary at with "sunxi: Support the FEL boot mode in the regular u-boot build" rather than at "sunxi:
Move all boards to the driver-model".

Anyway, I'll try your suggested path tonight. I'm pretty certain that'll end up being it.

Quoted 2 lines

Also note that you now need to use
u-boot-dtb.bin not u-boot.bin .

Noted, I probably would have got that wrong too, so thanks.

Ian.

#3 lore raw

[U-Boot] FEL mode broken since

Quoted 8 lines · Ian Campbell <ijc+uboot <at> hellion.org.uk> writes:

I would have expected this to become necessary at with "sunxi: Support the FEL boot mode in the regular u-boot build" rather than at "sunxi:
Move all boards to the driver-model".

Anyway, I'll try your suggested path tonight. I'm pretty certain that'll end up being it.

Quoted 7 lines
Quoted 2 lines

Also note that you now need to use
u-boot-dtb.bin not u-boot.bin .

Noted, I probably would have got that wrong too, so thanks.

Ian.

I've fooled myself on this too - and thought it to be a problem in the SPL -> main U-Boot transition. Of course I had not adapted my FEL script, and missed the u-boot-dtb.bin requirement.

After the necessary adjustments U-Boot (v2015.07-rc2) starts just fine via FEL. This should probably be improved in sunxi-tools, so the 'fel' utility gracefully handles both parts of the u-boot-sunxi-with-spl.bin.

Regards, B. Nortmann

#4 lore raw
In reply to Hans de Goede
Quoted 2 lines · Hans de Goede

Right, that is expected, all the "fel spl" command does is load the spl, you need to do something like this to fel boot:

This worked, thanks. Couple of notes:

Quoted 4 lines

sudo ~hans/bin/fel version
echo Write SPL
sudo ~hans/bin/fel spl u-boot-sunxi-with-spl.bin

FWIW also works with spl/sunxi-spl.bin.

Quoted 2 lines

echo Exec SPL
sudo ~hans/bin/fel exe 0x2000

Doesn't seem to be needed, it's done part of the above the above spl command.

Quoted 5 lines

sleep 0.5
echo Write u-boot
sudo ~hans/bin/fel write 0x4a000000 u-boot-dtb.bin echo Exec u-boot
sudo ~hans/bin/fel exe 0x4a000000

I think it ought to be possible to update the usb-boot script to use "fel spl" and relax the SPL size restriction in that script accordingly, I'll take a look.

Ian.

#5 lore raw

Hi Ian / Hans,

Quoted 25 lines · Ian Campbell
Quoted 2 lines · Hans de Goede

Right, that is expected, all the "fel spl" command does is load the spl, you need to do something like this to fel boot:

This worked, thanks. Couple of notes:

Quoted 4 lines

sudo ~hans/bin/fel version
echo Write SPL
sudo ~hans/bin/fel spl u-boot-sunxi-with-spl.bin

FWIW also works with spl/sunxi-spl.bin.

Quoted 2 lines

echo Exec SPL
sudo ~hans/bin/fel exe 0x2000

Doesn't seem to be needed, it's done part of the above the above spl command.

Quoted 5 lines

sleep 0.5
echo Write u-boot
sudo ~hans/bin/fel write 0x4a000000 u-boot-dtb.bin echo Exec u-boot
sudo ~hans/bin/fel exe 0x4a000000

Quoted 5 lines

I think it ought to be possible to update the usb-boot script to use "fel spl" and relax the SPL size restriction in that script accordingly, I'll take a look.

Ian.

It would be nice to have a doc/README.sunxi or similar which describes how to use FEL and how to create a bootable SD card.

Regards,
Simon