Skip to contentSkip to conversation

Issues compiling barebox on raspberry pi

DISCUSSION [email protected] 4 participants 4 messages Oct 17, 2018 – Oct 18, 2018 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello,

please direct questions to the barebox mailing list (CCed), there are more people there who can answer you :-)

Quoted 10 lines · Kai Che

Dear Mr. Roland Hieber,

I'm an electrical engineering student currently writing my master thesis and my topic is about enabling secure boot for the barebox bootloader with a TPM 2.0.

Unfortunetly, I am really struggling with booting barebox on raspberry pi 2 and 3.

I followed the documentation on: https://www.barebox.org/doc/latest/boards/bcm2835.html#raspberry-pi and did the following steps:

1. git clone https://git.pengutronix.de/git/barebox (I tried with master, next and stable/v2018.09 branches)

Unfortunately the documentation was updated before the respective patch series was merged. If you pull the branch v2018.04.0/topic/rpi from
git://git.pengutronix.de/rhi/barebox, you should get a barebox-raspberry-pi-3.img. (I think that branch should also be able to be rebased onto the current master, but I have not tested that.)

The rest of your steps below look fine to me.

- Roland

Quoted 30 lines

2. export ARCH=arm and export CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-

3. make rpi_defconfig

4. make => generates the images barebox-raspberry-pi-1.img and barebox-raspberry-pi-2.img but no barebox-raspberry-pi-3.img!

5. copy barebox-raspberry-pi-2.img to SD card and rename to barebox.img

6. create config.txt with kernel=barebox.img enable_uart=1 dtoverlay=pi3-miniuart-bt

7. turn on raspberry pi (connected with HDMI and UART) but it gets stuck at the rainbowscreen with no UART output.

=> But booting with the default image from NOOBS is working perfectly.

My PC is set up with gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) and I tried with Raspberry Pi 2 Model B, Raspberry Pi Zero W and Raspberry Pi 3 Model B.

Do you have any idea why it is not working? Am I using a wrong compiler version?

Could you maybe provide me with a working barebox-raspberry-pi-2.img and barebox-raspberry-pi-3.img for testing?

Thank you very much.

Best Regards

Kai Che

Mixed Mode GmbH Lochhamer Schlag 17 D-82166 Gräfelfing/München Tel. +49 / 89 / 89 86 8-200 Fax +49 / 89 / 89 86 8-222 http://www.mixed-mode.de Mixed Mode - Ihr Partner für Embedded & Software Engineering! ------- Ein Unternehmen der PIXEL Group Mixed Mode GmbH Sitz der Gesellschaft: Gräfelfing Amtsgericht: München HRB 130778 Geschäftsführer: Helmut Süßmuth, Paul Privler ------- Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet. Über das Internet versandte Emails können leicht unter fremden Namen erstellt oder manipuliert werden. Aus diesem Grunde bitten wir um Verständnis, dass wir zu Ihrem und unserem Schutz die rechtliche Verbindlichkeit der vorstehenden Erklärungen und Äußerungen ausschließen.

Signature · 9 lines
Roland Hieber                     | [email protected]     |
Pengutronix e.K.                  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

Hello,

Am Mittwoch, 17. Oktober 2018, 14:27:00 CEST schrieb [email protected]:

Quoted 5 lines

Unfortunately the documentation was updated before the respective patch series was merged. If you pull the branch v2018.04.0/topic/rpi from
git://git.pengutronix.de/rhi/barebox, you should get a barebox-raspberry-pi-3.img. (I think that branch should also be able to be rebased onto the current master, but I have not tested that.)

FWIW, the series is based on barebox v2018.04.0. I tried rebasing (already a few weeks ago), but it does not even rebase cleanly on top of v2018.05.0.

Greets
Alex

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#3 lore raw

Hi,

Am Mittwoch, den 17.10.2018, 14:45 +0200 schrieb Alexander Dahl:

Quoted 11 lines

Hello,

Am Mittwoch, 17. Oktober 2018, 14:27:00 CEST schrieb [email protected]:

Quoted 5 lines

Unfortunately the documentation was updated before the respective patch series was merged. If you pull the branch v2018.04.0/topic/rpi from
git://git.pengutronix.de/rhi/barebox, you should get a barebox-raspberry-pi-3.img. (I think that branch should also be able to be rebased onto the current master, but I have not tested that.)

FWIW, the series is based on barebox v2018.04.0. I tried rebasing (already a few weeks ago), but it does not even rebase cleanly on top of v2018.05.0.

I've already rebased this series on top of the current release. Just waiting for some test results before sending out to the list again.

Regards,
Lucas

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#4 lore raw
In reply to [email protected]

Hello,

I'm trying to compile barebox on the raspberry pi 3 model B and after booting the pi with the barebox-raspberry-pi-3.img I get the following error:

barebox 2018.04.0-g9b6b12471 #2 Thu Oct 18 14:33:09 CEST 2018

Board: RaspberryPi 3 Model B
bcm2835_mci 3f300000.sdhci: registered as 3f300000.sdhci bcm2835-gpio 3f200000.gpio: probed gpiochip-1 with base 0 malloc space: 0x0fefe700 -> 0x1fdfcdff (size 255 MiB)
mci0: detected SD card version 2.0
mci0: registered disk0
environment load /boot/barebox.env: No such file or directory Maybe you have to create the partition.
running /env/bin/init...

Hit any key to stop autoboot: 0
booting 'net'
ifup: No such file or directory
running automount command 'ifup -a && mount -t tftp $global.net.server /mnt/tftp' failed
ifup: No such file or directory
running automount command 'ifup -a && mount -t tftp $global.net.server /mnt/tftp' failed
ip_route_get: No such file or directory
ifup: No such file or directory
running automount command 'ifup -a && mount -t tftp $global.net.server /mnt/tftp' failed
ifup: No such file or directory
running automount command 'ifup -a && mount -t tftp $global.net.server /mnt/tftp' failed
ifup: No such file or directory
running automount command 'ifup -a && mount -t tftp $global.net.server /mnt/tftp' failed
ifup: No such file or directory
running automount command 'ifup -a && mount -t tftp $global.net.server /mnt/tftp' failed
ifup: No such file or directory
running automount command 'ifup -a && mount -t tftp $global.net.server /mnt/tftp' failed
open: No such file or directory
could not open /mnt/tftp/none-linux-rpi: No such file or directory
ERROR: Booting 'net' failed: No such file or directory
booting 'net' failed: No such file or directory
boot: No such file or directory
barebox@RaspberryPi 3 Model B:/

The pi doesn't accept any keyboard input and is "stuck" at this stage.

How and where can I get the barebox.env file?

Thanks very much and best regards,

Kai Che

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox