I recently picked up a Compute Module 4 Lite, not realizing that the
device is unable to boot from SD card. This is on me and my stupidity,
but I assumed that it would be able to boot from USB and what I can see appears to confirm this.
I'm using a CM4 8GB Wireless board on a MCUZone CM4-4G carrier board
w/LTE modem. I have an official RPi power supply connected, and I have network and HDMI cables connected. I've grabbed the latest release from
the Pi OS page and flashed it to a USB stick that I know will boot other machines, using Win32DiskImager.
So, what I get here is the machine goes through some text on screen and
then it appears to restart, and I get the rainbow splash screen right
after a bit of activity on the USB stick.
It simply sits there and does nothing past this. I've tried using both
the 32 and 64 bit images, different USB sticks, different power supplies including powering it from a big powered commercial USB hub that has
amps to spare. I'm missing something here, or I got a bad board. I'm
hoping someone has some insight into what I'm doing wrong.
I recently picked up a Compute Module 4 Lite, not realizing that the
device is unable to boot from SD card. This is on me and my stupidity,
but I assumed that it would be able to boot from USB and what I can see appears to confirm this.
I'm using a CM4 8GB Wireless board on a MCUZone CM4-4G carrier board
w/LTE modem. I have an official RPi power supply connected, and I have network and HDMI cables connected. I've grabbed the latest release from
the Pi OS page and flashed it to a USB stick that I know will boot other machines, using Win32DiskImager.
So, what I get here is the machine goes through some text on screen and
then it appears to restart, and I get the rainbow splash screen right
after a bit of activity on the USB stick.
It simply sits there and does nothing past this. I've tried using both
the 32 and 64 bit images, different USB sticks, different power supplies including powering it from a big powered commercial USB hub that has
amps to spare. I'm missing something here, or I got a bad board. I'm
hoping someone has some insight into what I'm doing wrong.
That's what my Pi 4 did on one version of Bookworm.
Try a different version
On 1/5/2024 05:13, The Natural Philosopher wrote:
That's what my Pi 4 did on one version of Bookworm.
Try a different version
From what I understand, the Compute Module 4 cannot boot from SD card because it's literally missing the connections to the card - the card
slot is only there so you can load the Pi OS onto the built-in eMMC.
It's designed to boot from eMMC. If I'd paid attention, I would have
picked up the 8GB eMMC version instead, but after waiting for a year I
took what I could get.
If you put a card in, it doesn't do anything. As far as the eeprom, that shouldn't be an issue past 2021 or so - I can see it trying to boot from
the flash stick, and I did try it without the modem as well.
The version of (official) OS is the only thing I did not try, if I have
time I'll download the second-to-last version and try it this weekend. I
did try the Armbian version, but I don't know that it specifically
states CM4 compatibility.
Ok, I do see the lite version SHOULD boot from uSD, so perhaps this is a problem with the actual OS version as well. There's also this little bit
of info with some changes to config.txt:
https://www.waveshare.com/wiki/Wrote_Image_for_Compute_Module_Boards_Lite_version
which I'll try.
I don't have a lot of information on the carrier itself, that seems to
be somewhat lacking. Maybe the carrier is bad, being a Super High
Quality Much Goodly Chinese device, who knows? There are reviews of it
out there, but no real hard information. I'll dig into that as well.
The local Micro Center has a cheap carrier in stock of a different
style, so I'm going to pick up one of those this weekend and give that a
try as well, but I'll grab an older OS first to see how that goes.
Bryan <pbyabmle@4wrd.cc> wrote:
On 1/5/2024 05:13, The Natural Philosopher wrote:
> That's what my Pi 4 did on one version of Bookworm.
> Try a different version
From what I understand, the Compute Module 4 cannot boot from SD card
because it's literally missing the connections to the card - the card
slot is only there so you can load the Pi OS onto the built-in eMMC.
It's designed to boot from eMMC. If I'd paid attention, I would have
picked up the 8GB eMMC version instead, but after waiting for a year I
took what I could get.
You have it backwards: the Lite version has no eMMC which is why the
official I/O board has an SD card socket to boot the Pi:
"MicroSD card socket for Compute Module 4 Lite (without eMMC) variants" https://www.raspberrypi.com/products/compute-module-4-io-board/
If you have a non-Lite board there's a way to flash the eMMC externally (via USB I think). If there is onboard eMMC the SD slot is not connected to the Pi (or maybe to the second MMC channel, not sure).
If you put a card in, it doesn't do anything. As far as the eeprom, that
shouldn't be an issue past 2021 or so - I can see it trying to boot from
the flash stick, and I did try it without the modem as well.
I wonder if there is something odd about the way they've wired the SD slot
on your board? Maybe it needs a jumper or something? What does the documentation for your board say?
The version of (official) OS is the only thing I did not try, if I have
time I'll download the second-to-last version and try it this weekend. I
did try the Armbian version, but I don't know that it specifically
states CM4 compatibility.
There can sometimes be firmware issues that means third party OSes won't
boot on new variants of the same board like CM4 because of minor hardware differences, but these are usually ironed out fairly soon after release.
Theo
If you have a non-Lite board there's a way to flash the eMMC externally (via >USB I think). If there is onboard eMMC the SD slot is not connected to the >Pi (or maybe to the second MMC channel, not sure).
Bryan <pbyabmle@4wrd.cc> wrote:
Ok, I do see the lite version SHOULD boot from uSD, so perhaps this is a
problem with the actual OS version as well. There's also this little bit
of info with some changes to config.txt:
https://www.waveshare.com/wiki/Wrote_Image_for_Compute_Module_Boards_Lite_version
which I'll try.
This in config.txt:
dtoverlay=dwc2,dr_mode=host
(there should not be a dot on the end)
overrides the USB 2 port into host mode, ie to accept USB sticks etc. I suppose that could be a reason why your CM4 won't USB boot. Ordinarily the port can detect whether to be in host or device more via the 5th pin on the micro USB connector, which is tied low in an OTG adapter to force host mode. Maybe your board doesn't do this correctly? Of course, if you can't boot
you can't read config.txt to force the port to the right direction, so
you'd have to rely on the pin being tied low.
Even without this, and even with no SD, I'd expect to see some sign of life on the HDMI: the Pi4 should display a 'BIOS' style boot screen that says
what it's trying to boot from.
I don't have a lot of information on the carrier itself, that seems to
be somewhat lacking. Maybe the carrier is bad, being a Super High
Quality Much Goodly Chinese device, who knows? There are reviews of it
out there, but no real hard information. I'll dig into that as well.
The local Micro Center has a cheap carrier in stock of a different
style, so I'm going to pick up one of those this weekend and give that a
try as well, but I'll grab an older OS first to see how that goes.
Good plan. Once you can get anything working, you can then take deltas against the setup you have to narrow down the problem. If absolutely
nothing works then there are few clues.
Theo
On 1/5/2024 11:11, Theo wrote:
Bryan <pbyabmle@4wrd.cc> wrote:
Ok, I do see the lite version SHOULD boot from uSD, so perhaps this is a >>> problem with the actual OS version as well. There's also this little bit >>> of info with some changes to config.txt:
https://www.waveshare.com/wiki/Wrote_Image_for_Compute_Module_Boards_Lite_version
which I'll try.
This in config.txt:
dtoverlay=dwc2,dr_mode=host
(there should not be a dot on the end)
overrides the USB 2 port into host mode, ie to accept USB sticks etc. I
suppose that could be a reason why your CM4 won't USB boot.
Ordinarily the
port can detect whether to be in host or device more via the 5th pin
on the
micro USB connector, which is tied low in an OTG adapter to force host
mode.
Maybe your board doesn't do this correctly? Of course, if you can't boot >> you can't read config.txt to force the port to the right direction, so
you'd have to rely on the pin being tied low.
Even without this, and even with no SD, I'd expect to see some sign of
life
on the HDMI: the Pi4 should display a 'BIOS' style boot screen that says
what it's trying to boot from.
I don't have a lot of information on the carrier itself, that seems to
be somewhat lacking. Maybe the carrier is bad, being a Super High
Quality Much Goodly Chinese device, who knows? There are reviews of it
out there, but no real hard information. I'll dig into that as well.
The local Micro Center has a cheap carrier in stock of a different
style, so I'm going to pick up one of those this weekend and give that a >>> try as well, but I'll grab an older OS first to see how that goes.
Good plan. Once you can get anything working, you can then take deltas
against the setup you have to narrow down the problem. If absolutely
nothing works then there are few clues.
Theo
Some success here. I'm using the Bullseye version presented on the RPi
OS page, instead of whatever the latest is.
I set the other carrier board up, it's marked as being made by
"bigtreetech" and looks like a regular Pi once assembled. Trying the SD
card in it's slot, I see the same things as with the other board,
according to my router it's been offered an address - this happens over
and over. No boot happens.
I took the SD card and put it in a USB reader, put it in a USB port on
this carrier, and it booted. That would seem to indicate that the
MCUZone carrier that I hoped to use is incapable of booting from USB - I assume the rainbow splash screen is a kernel panic at this point.
(I can't see anything visual on the bigtreetech carrier, it has
micro-HDMI and I can't find my adapters.)
Going back to the MCUZone carrier, I put the known good card in the SD
slot. Here's what I see:
https://pic8.co/a/d697dd4c-18c1-42c7-90e9-2fcf8d7d931c/
The device eventually gets an address like it's waiting for something
else, and does this over and over, never booting. I should mention this carrier has a run/boot jumper, this is in the boot position. Putting it
in the run position (I assume, it's not clear) gives me a black screen
and nothing else. Putting the card in the known good reader gives me the
same rainbow screen.
One thing I notice is the boot order, which has a "1" for SD card at the
end of the list. However, I also see "SD card not detected" - is it
possible that the boot order needs to be changed so it's looking for the
SD card first? Doing this is something I'd have to research before attempting.
In any event, the MCUZone device won't boot from USB, and none of them
boot from SD at this point.
In article <lUt*kvGzz@news.chiark.greenend.org.uk>,
Theo <theom+news@chiark.greenend.org.uk> wrote:
If you have a non-Lite board there's a way to flash the eMMC externally (via >USB I think). If there is onboard eMMC the SD slot is not connected to the >Pi (or maybe to the second MMC channel, not sure).
There's a tool called rpiboot that you use to flash a CM4. Most carrier boards have a switch or jumper to enable or disable eMMC boot. Set it to disabled, then connect it in to your computer. Running rpiboot sends over a small program that causes the CM4's eMMC storage to show up as a USB storage device. At this point, you can use the RPi Imager, dd, or whatever to blast software onto it the same way you'd load up a MicroSD (or SD) card for other Raspberry Pis. When done, unplug it, set the switch or jumper back to enabled, and power it back up.
But looking a little closer, it looks like it's trying all the boot
devices from right to left - it doesn't see the SD card so it goes to
the next one. So it probably won't matter if I change the boot order,
it would just never get to the SD card.
Bryan <pbyabmle@4wrd.cc> wrote:
But looking a little closer, it looks like it's trying all the boot
devices from right to left - it doesn't see the SD card so it goes to
the next one. So it probably won't matter if I change the boot order,
it would just never get to the SD card.
As I mentioned in my other post, I'd boot from USB and try upgrading the bootloader in EEPROM on the board:
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-boot-eeprom
I also note there are some CM4 specific settings: https://www.raspberrypi.com/documentation/computers/compute-module.html#cm4bootloader
On 1/6/2024 06:31, Theo wrote:
Bryan <pbyabmle@4wrd.cc> wrote:
But looking a little closer, it looks like it's trying all the boot
devices from right to left - it doesn't see the SD card so it goes to
the next one. So it probably won't matter if I change the boot order,
it would just never get to the SD card.
As I mentioned in my other post, I'd boot from USB and try upgrading the
bootloader in EEPROM on the board:
https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-boot-eeprom
I also note there are some CM4 specific settings:
https://www.raspberrypi.com/documentation/computers/compute-module.html#cm4bootloader
I found out why my device won't see the SD card. But first:
I can't update the onboard eeprom without using the imaging tool, that's apparently by design. The CM4 won't let you touch that stuff because
it's "impossible to remove the eMMC if something goes wrong." Makes
sense, but still a PITA for those of us not using the thing in production.
However, the real reason I'm having all these issues is because, after inspection, my vendor sent me the 8GB eMMC version instead of the no
eMMC version I asked for. That sucks because I don't really want storage
I can't ever change because it likes to go bad, but there it is.
I believe the reason the device won't USB boot on the MCUZone carrier is because it is indeed going into panic at boot - I've seen some
information about the USB device on this being problematic.
My next step is to try and flash the eMMC on this one the see what
happens. I'll let you know.
I downloaded the image, unzipped it, and SCP'd it over to the Pi. I then
used these instructions to flash the Pi, and it booted with no external devices. Yay!
For now, I'm going to use this as-is, as I need the 4G modem to replace
some old 2G stuff that's offline in a few months here in the USA.
Otherwise, I will probably look to purchase a real Lite version at some
point in the future and pass this board on to someone who would like,
but can't afford one.
Bryan <pbyabmle@4wrd.cc> wrote:
I downloaded the image, unzipped it, and SCP'd it over to the Pi. I then
used these instructions to flash the Pi, and it booted with no external
devices. Yay!
For now, I'm going to use this as-is, as I need the 4G modem to replace
some old 2G stuff that's offline in a few months here in the USA.
Otherwise, I will probably look to purchase a real Lite version at some
point in the future and pass this board on to someone who would like,
but can't afford one.
Glad you got it sorted. One thing you can do, at the expense of a slightly non-standard setup, is to keep your /boot partition on the eMMC, and set config.txt to use a root partition on your USB. So most of your OS
lives on the USB and only the kernel, firmware and device trees live on the eMMC. That means you aren't limited by the eMMC size for your OS install.
To do this you flash the OS to your USB as well as the eMMC, then boot the
Pi from eMMC and alter:
root=/dev/mmcblk0p2
to
root=/dev/sda2
in config.txt. You'll also need to amend /etc/fstab on the USB to match.
Theo
Sysop: | Weed Hopper |
---|---|
Location: | Clearwater, FL |
Users: | 14 |
Nodes: | 6 (0 / 6) |
Uptime: | 231:43:45 |
Calls: | 55 |
Calls today: | 1 |
Files: | 50,127 |
D/L today: |
34 files (4,425K bytes) |
Messages: | 275,362 |