From: "Tomaž Šolc" <tomaz.solc@klevio.com>
To: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Accessing MMC/SD card storage on Raspberry Pi
Date: Mon, 11 Feb 2019 16:09:09 +0100 [thread overview]
Message-ID: <eb738c4f-0594-566f-e3e8-67e71d3b3b32@klevio.com> (raw)
Dear all,
I've been trying to set up Barebox on a Raspberry Pi Compute Module 3.
After some small fixes (see below) I've got 2019.01.0 to boot to a
command line on the serial port. However I can't get access to the MMC
storage to load a kernel ("no /dev/disk0.0. using default env")
Looking at the source, it seems that a "bcm2835-sdhost" driver is
missing (bcm2835_mci seems to only be used for the other SDIO interface
towards the wireless interface on other R. Pis) Is MMC storage indeed
not supported on R. Pi at the moment or am I missing something?
Thanks
Tomaž
A list of things I needed to do to boot on R. Pi CM3, just in case it's
useful for someone else:
Add board rev 10 to rpi_models_new_scheme in rpi-common.c
Note that rpi_model_init() segfaults if board rev is not found in the
list because model remains NULL.
Use device tree in bcm2837-rpi-cm3-io3.dts. Most importantly, this
disables the bcm2835_mci driver, which otherwise hangs on boot (I'm
guessing unsuccessfully trying to init the empty SDIO bus where there
would otherwise be a wireless interface on R.Pi 3.).
diff -ru a/arch/arm/boards/raspberry-pi/rpi-common.c
b/arch/arm/boards/raspberry-pi/rpi-common.c
--- a/arch/arm/boards/raspberry-pi/rpi-common.c 2019-02-07
15:37:49.181360164 +0100
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c 2019-02-11
08:48:36.000000000 +0100
@@ -175,6 +175,7 @@
RPI_MODEL(0, "Unknown model", NULL),
RPI_MODEL(BCM2836_BOARD_REV_2_B, "2 Model B", rpi_b_plus_init),
RPI_MODEL(BCM2837_BOARD_REV_3_B, "3 Model B", rpi_b_plus_init),
+ RPI_MODEL(10, "Compute Module 3", NULL),
RPI_MODEL(BCM2835_BOARD_REV_ZERO, "Zero", rpi_b_plus_init),
RPI_MODEL(BCM2835_BOARD_REV_ZERO_W, "Zero W", rpi_b_plus_init),
};
@@ -251,6 +252,9 @@
static void rpi_model_init(void)
{
+ if (!model)
+ return;
+
if (!model->init)
return;
diff -ru a/arch/arm/dts/bcm2837-rpi-3.dts b/arch/arm/dts/bcm2837-rpi-3.dts
--- a/arch/arm/dts/bcm2837-rpi-3.dts 2019-01-14 09:05:44.000000000 +0100
+++ b/arch/arm/dts/bcm2837-rpi-3.dts 2019-02-11 09:49:55.000000000 +0100
@@ -1,4 +1,5 @@
-#include <arm64/broadcom/bcm2837-rpi-3-b.dts>
+//#include <arm64/broadcom/bcm2837-rpi-3-b.dts>
+#include <arm/bcm2837-rpi-cm3-io3.dts>
/ {
chosen {
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2019-02-11 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-11 15:09 Tomaž Šolc [this message]
2019-02-12 11:22 ` Roland Hieber
2019-02-12 15:31 ` Tomaž Šolc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eb738c4f-0594-566f-e3e8-67e71d3b3b32@klevio.com \
--to=tomaz.solc@klevio.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox