How to flash the eMMC on a Raspberry Pi Compute Module 4
Вставка
- Опубліковано 4 сер 2024
- How do you flash a new OS onto the eMMC built into a Compute Module 4?
It's simple! In this video, I'll show you how. And for those who don't like watching videos, here's a blog post that goes along with the video: www.jeffgeerling.com/blog/202...
Here's the usbboot download link: github.com/raspberrypi/usbboot
Here's the Raspberry Pi Foundation's official documentation for Flashing the Compute Module eMMC: www.raspberrypi.org/documenta...
Support me on Patreon: / geerlingguy
Sponsor me on GitHub: github.com/sponsors/geerlingguy
#RaspberryPi #ComputeModule
Contents:
00:00 - CM4 with eMMC vs CM4 Lite
00:15 - Set J2 jumper for eMMC MSD
01:10 - Download usbboot
01:25 - Windows setup
01:49 - Mac / Linux setup
02:39 - Flashing Pi OS to eMMC
02:50 - Other tricks like EEPROM - Наука та технологія
So basically: 1: mount the CM4 and eval board as a drive. 2: flash the drive as you normally would.
Thanks for the multi-OS instructions!
Thank for another great tutorial Jeff.
Thanks Jeff! Very helpful while I'm getting my CM4 / PiCam up and running 😀
Thanks for the video Jeff! You are definitely my go-to guy for this sort of thing. I am revisiting this video because my last CM4 board was bad. I returned it to PiShop, they verified it was bad, and sent me a brand new CM4 AND CM4 IO board (just in case). This was the first time I ever had a Pi device that was bad out of dozens of picos, RPi 1-5's, zeros, etc. Kudos to PiShop for taking care of it for me!! I hope this go around is a lot easier than my last try. The bad CM4 was intermittent (bad eMMC maybe) so it worked, then didn't, did, then didn't again. Anyway just sharing. Thank you!
Glad Pi Shop got it sorted for you! That is stellar service!
Short but very helpful !
awesome =) Good starting point for my compute module which arrived today :D
Great video. One amendment is that a brand new compute module 4 has unformatted eMMC, and will not show up as a drive. You will need to use something like gParted to format the eMMC and upload the raspberry pi image via balena Etcher, or Raspberry Pi Imager.
Thank you! This saved me so much time setting up a CM4 to use on a Manta 3D controller board.
Your posts are awesome.
Awesome! ...wish I had any idea when mine was arriving.
OMG after years,yes I said years I got my CM4 working I tried on iMac,Windows 10 and believe me I got it to work on a Pi Top Ceed using a RPI 3B+on my Mac I kept getting the waiting message & didnt know what to do so i switched to my Pi Top Ceed and got same message so i searched the Web and someone wrote to pull the wire connecting the two it didnt work so i switched wires and Bam it worked, why years taken off my life just came back!!Thank You Jeff & the Internet..
Excellent tutorial!
So useful. Thanks so much
Hi Jeff your videos are great.
Question for you when I disable the MMC and connect to the slave USB, run RPI boot and look at the display output of the RPI CM4 it says their a USB Hx error and doesn’t recognize the MMC drive, however if I boot via a USB SD it sees it, and will boot from a USB SD card, but can’t flash the MMC even though it’s sees the MMC partitions any ideas why I can’t use the slave USB to flash and setup the MMC?
Hey Jeff my question is I have the the one with the Emmc 16gb on it. But I would love to boot from a flash drive instead how can we do that?
In terms of time, it takes just as long as flashing a micro SD card with Etcher? Or does the onboard eMMC write faster than a micro SD card? Is there a better way to format and write the eMMC for factory production (assuming we can get Pi CM4 in the future)?
Thanks bro!
You made that sound pretty easy.
It gets easier the 50th time you do it :D
Hi Jeff, Its very nice video. Which OS is good in performance as I am looking for development of IoT gateway. I saw there are multiple OS available in raspbian OS. If any good OS which you have test the performance then its helpful for me.
Thanks Jeff, do you have a tutorial on how to do a full backup / restore of the CM4 eMMC (official IO board)?
Jeff, I have flashed the emmc on CM4 as suggested in the video, I have ran into a no hdmi audio situation on HDMI0. No audio devices are getting configured. I tried pairing a logitech bluetooth speaker but it failed to connect. NO SOUND :(
Jeff, you just saved my f###ing day :D now I'll be able to have fun with my tofu board + pikvm + sim card....
At 1:45, when you say "plugged in and powered up", is that with the nPIBOOT jumper still in place, or removed?
Could the same program be used to update an SD-card in a Raspberry Pi Zero?
Hey Jeff, Jeff here got a Turing 2 on order will you be able to flash with that? Just curious if that will be possible. Thank You have a great week
Jeff , you're the best
No _you're_ the best!
@@JeffGeerling yes I'm , cause I watch your channel
Will this work with the custom Saturn mini PCB with cm4?
Hi, can i use the waveshare mini base board for fash the eMMC? were find info abour it? thanks for the video
Any chance you can demo using the Seeedstudio dual Ethernet board for flashing the eMMC?
Ah! Fixed it. I put the CM4 module on a different kind of I/O board and was able to get a USB connection and flash the OS once again😁.
I wonder if it's not easier to use a live boot USB drive, and simply install it to the EMMC?
Jeff how do you enter any commands when your usb is off by default you say to mount the boot volume or refresh the eMMC storage,just run sudo ./rpiboot but how my mouse & keyboard are off by default????
Is it possible to develop a carrier board that could handle power, data and video through one usb c port?
Only if you can only buy one
> newark: More stock available to supplier lead times which is approximately 6/7/21
Do you live in mexico?
i cloned the sd card which has image of rpi 4 and and create a shrink image from it , will it work on cm4 if i flashed it into emmc the same way u told?
Hi mate, is it possible to do the same thing with the dell wyse thin client 3030 N06D with 4gb of eMMC Flash storage? I will like to use it in the place of a Raspberry pi to run klipper, but not enough storage for Debian install.
Hey.
Thanks.
Hi Jeff, thanks for this video i can flash my CM4 smoothly two months ago, but then I tried again today and somehow the driver installer for RPIBoot BMC2711 from github doesn't work like before. weird
life saver!
Nice video! Also, you don't need to specify the version of libusb library to install, there's a wrapper with an easier to remember name "libusb-dev" ;)
Good point... I think I must've just run through it at a point where that was the recommended version, and I've never updated my notes since!
"Till next time, I am Jeff Gerling" Can't wait to find out who you are going to be in the next video! ;-p
I can't wait either!
Fuck Yeah Jeff!! Worked perfectly. Thanks homie
Hi 😊 first time Noob with Linux & with pi zw can you turn the emmc in to swap mamory? If so what's the limit ?ps is it faster than sd mamory? 😊Ok thanks for your time have a good one
Hey Jeff, have a DeskPi Mini Cube for Raspberry Pi Compute Module 4 (CM4), is it possible to use it to Flash the eMMC with the OS? Or do i need the IO Board from Raspberry Pi, or some other item?
hello,can you give us a vedio about how to update the eeprom on cm4!
Because on the cm4 "rpi-eeprom-update is not enabled by default on CM4. Run with -h for more information.",I do not know how to update it!
Hey Jeff can you attached one or more compute modules to a RPi4, and aggregate the CPU power? I am thinking of making a low cost network mgmt device, based on Zabbix.
No, unfortunately they don't quite work that way (though it would be pretty awesome!).
Did you DIY the jumper thingy yourself?
Just a quick question: Did you have to make a change to /boot/config.txt to get the USB 2.0 port on the CM4IO board to work? Or does it work out of the box? Thx for making the videos!
I have a blog post just for you! www.jeffgeerling.com/blog/2020/usb-20-ports-not-working-on-compute-module-4-check-your-overlays
@@JeffGeerling Excellent!!! Thx you 🙂
@@JeffGeerling Hi, man! Thanx for all your videos and so simple instructions! I'm lame at all this RPi stuff yet, so I'll ask few silly questions:
If my CM4 has a built-in eMMC then does it means that using an SD card is useless inside CM4IO + CM4 eMMC setup?
Will I be able to make a dual-boot on eMMC? I have the max. of 32 Gb eMMC. It seems that was a right choice.
P.S. I've blamed myself few times that I've didn't bought a simple Raspberry Pi 4B+ instead of this combo! :)) Firstly I've got a very stiff sockets combination between them so I've got few silver hairs when finding a way to install this CM4 into CM4IO. And now I understand that I've ordered this combo because "wow, eMMC and SD Card and full size HDMI ports for practically the same price as Rpi 4B+!" :D
Now I think that the only good reason to have it is that it has a big board and probably this will make it less hot.
I've bought Waveshare's USB3.1 Hub and I guess now that I will have only USB 2.0 speeds out of it.
Another silly question: what if eMMC will become corrupted? Is it basically the same memory as in SD Card or much more "long-life"?
How did you get your zsh shell to show the apple logo? Is that a theme in ommyzsh?
It's a special character in my PS1: github.com/geerlingguy/dotfiles/blob/master/.zshrc#L16 (Shift + Option + K on a Mac).
I think I have broken my cm4 I have ha yellow, I followed your guide a couple of times before as my ha won’t factor reset but this time I tried and I can’t do the same magic would it possible for any help please
Is it not possible to do this from a booted SD card?
What minimum eMMC and Ram size of CM4 do you recomment for the "usual" project? This is so I can price out a project. Thx
I like 4GB RAM and 16 GB eMMC as a sweet spot. Only get more if you know you'll need it.
nice video
I had problems. Cm4 wasn't seated properly and my micro usb cord was actually broken. After plugging in a new cord to the USB 3 (blue) flash was successful.
can I boot from usb even If I dont have emmc ? (this model: CM4108000 )
Thank you. How Can i enable the USB ports for a keyboard ?
Oops, in fact i have forgot to unplug the micro usb connector. It's fine now !
Can the cm4 boot with nvme?
And if so. How?
mine stops at the black screen 2 pcs both the same weird early 4 gig got a lite 4gb with no eemc runs great on wave share board 8 gig with emmc for my automotive application if it ever gets here ! will try the NVMe on this just a decent little PC
Do you have any other providers which are providing compute io board other than raspberry pi foundation?
Suppliers are supposed to be getting them in stock, but from the ones I know, they said they are starting to see Compute Modules in stock, but no IO boards currently :(
Please test a modern sound card on the cm4. We know we can do the same with a usb dac, but we wanna see overkill ;)
I have done this successfully a few times. Your video was a great help. However, this last time I had a power failure during the img flash and now rpiboot just hangs waiting for the connection. If I take the jumper off, it tries to boot, but hangs (incomplete img) It does seem to get part-way through a normal boot but not far enough for any intervention. Any ideas? All the online help starts with "Jumper and connect with rpiboot..." Alas, despite trying all the methods I could find (even reading the instructions), rpiboot will wait to the end of time (or the end of my patience, at least).
Hi! Was this problem caused by a power failure fixed? Sorry if I'm touching a painful topic!
Hi, do I need to remove the jumper at 0:31 once I'm done flashing the board?
Ok ChatGPT says yes. This makes perfect sense, I just wanted to be sure.
Jeff, looking for IO board where I can use nvme and multiple compute modules to build a powerful desktop. I am amazed with Mac m1 chip. If I closely look, the compute module is close to m1 chip architecture. So if can stack 4 compute modules with io board where it can acts a multiple core os, where I get 32 gb of ram and 16 core processor which may also compute with Mac book. First is it possible the way I think? If so how the io board should be built where it has come storage. The way I think, using master and slave or master and nodes Architechure the way liver eyes work, can we build something where my primary module has raspberry os with UI while other nodes has only core os and each application is running on nodes and master render the ui while execution happens on the nodes.
Unfortunately that's now how the clustering of multiple Pis work-you can run a workload across Pis if it can be split up, but adding Pis to each other doesn't combine all their CPU, RAM, and GPU together so it can be used like one big unit.
I would love to see a video on how to update the EEPROM, I can't find a definitive simple guide anywhere.
Same here. Is there a way to update EEPROM just from CM4 itself, like on usual RP board, or does it involve rpiboot and flashing again? Confusing...
This would be super helpful =
what if your eMMC doesnt show up as a disk? running cm4 with 16gb eMMC an 8Gb ram on windows to flash but pi imager isnt finding the cm4 as a disk
My rpiboot.exe is stuck in "waiting for BCM2835/6/7/2711..." state. Should I try to re-install CM4 physically?
I've tried two different cables, all applications were run in the Administrator mode.
I've tried two releases of USBBoot - the latest and v2021.07.01 (it's marked as Verified). With a little difference in the messages but it ends with the same "waiting..." state.
BCM2711 Boot device is detected. It works only with some old USB2.0 external hub or through USB3.1 port on the PC. Otherwise - no connection at all.
I'm on Win7. The system is pretty stable but I've had an issue with non-detecting my Behringer Neutron synthesizer for STM32 online firmware update procedure (they don't provide .hex unfortunatelly). Maybe these issues aren't connected though.
Can a USB eMMC adapter be used instead of the CM board?
Unfortunately no, as the eemc on the pi compute module is non removable.
I knew you know the answer
getting error "Waiting for BCM2835/6/7/2711"
Flashing Raspberry PI CM 4 board bricked my Dell Laptop. Any ideas why it happened?
help me brother, i unfortunately formatted the drive. that pop up which u entered cancel. what to do bro.
trying to do this but usb boot isnt working on my windows 11 machine nothing is dettected just get RPiBoot driver install returned 0 on Windows 11/10
I just tried this on Mint xfce 21.2 and had to install libc6 dev 1st with apt-install otherwise it would fail when I typed "make"
Late to the party here.. and wondering if you may have an idea for the problem I have.
I have the dfrobot board, and a cm4. The df board doesn't seem to power on at all using any usb-c cables I have. Is there something I need to do before it will power on? Or have I got a dead board here..
If its a "pitray" make sure the "boot emmc" switch is in the ON position if booting from a microSD card or eMMC and the OFF position if trying to flash the onboard eMMC... It makes no sense but its the opposite of what you would think it would be.
I am looking forward to make a custom pcb for an old atom netbook (samsung n150) , i have only designed basic pcbs for power supplies & other simple things .. this is going to be a hard thing for me but the compute module 4 should give a new life to an aging atom cpu that can't even run chrome .
as in you rip out the old motherboard and replace it with a custom pcb ?
maybe look for the the design files for the cm4 dev-board and remove any hardware you would not need.
@@jyvben1520 yup i am looking at all the pin outs and chips i need for lcd , keyboard , trackpad , battery and usb ports .. + i will keep the pci 1x slot in form of m.2 so i can just remove the ram hatch and connect a m.2 to pcie board and use the 1x slot for experiments . i will reuse the existing cpu cooler and battery & it will take a lot of prototyping . i will first get the laptop keyboard , trackpad , lcd and battery working before implementing rpi compute module .
If only we could simply plug a sd card and use a neat little program to flash the emmc from the sdcard.
i am unable to download rpiboot.exe as mentioned. File is unable to run.
When do I remove the jumper
You're a good egg, Jeff.
Final got a 4gb ram 16gb ermc CM4 and popped it in the Raspi IO board. Hoping to convert my Open Media Vault on a Raspi 4B over to the CM4. Got a cheap SSD PCI-E board on the way. Cheap one to experiment with. Sure would like to find an at least dual SSD port to use. Now, I don't really need the speed increase of the CM4 and PCI-E compared to the Raspi 4B and USB (getting about 113\mbs xfer on home network)...I'm not dealing with video like you or anything like that. I just wanna see it work...lol. you know how it is... obviously.
So..if you or anyone else can recommend a SSD dual port card or better... A PCI-E expansion riser would be cool...right. I'd appreciate it. Im checked out your website and the list of cards you got working but can't find any actual available...bummer.
Anyway...thanks man. Dig the way you make easy buttons for us geek tweakers. Cheers!
I think the best option could be like an IO Crest board like amzn.to/43gAZFE with two ports - that is, if you want SATA.
For dual NVMe, it's a little harder. There are a few boards that split a single PCIe lane into two or four, but those kind of boards can get a bit pricey.
@@JeffGeerling Thanks Jeff. Yea, that really is the rub eh.. splitting the lane...I suppose. And...I'm doing this with no particular need. Not even making the "check out what I just got working" videos like you...lol. which...we all enjoy and appreciate.
I've got OMV installed on the new CM4 on the Raspi IO board. Kinda cool seeing how fast the thing boots to Bullseye or OMVs Debian. Seems even faster than an SSD to USB 3 on the Raspi 4B. Guess that makes sense.
I can always run two OMV servers. I have like 50+ devices on the network with all the Home Assistant IoT stuff...what another server lol. Use a 2TB SSD on the new OMV and have like 4TB slower access storage on my existing OMV.
PEOPLE...if you need SSDs or have a future project in mind...it's a buyers market! Seems they are the one thing manufacturers have an overstock of and they are super cheap! Like 2TB Western Digital for under $120. Can find slower cheaper 2TB for under $85 on Amazon. Crazy!
Thanks Jeff!
what append if i accidentally formatted the drive D:?
FYI, you also need brew install pkg-config
Hi Jeff. I'm stuck. I was able to flash the Raspberry Emmc on Pi Compute Module 4 but its not detecting a keyboard. I am aware that you must add a line to the config.txt file to power the USB hub. This is where I become stuck. On rpiboot I can see a config.txt file which I have edited and included the txt to enable power to the USB hub. However, I think that it might be the wrong config.txt file as it's not working. I think I need to access the config.txt file in the boot folder but I am unable to access or view same from within windows 10.
I've loaded other Raspberry OS systems and the keyboard lights up but an error is showing on the screen that it doesn't detect the keyboard. Thanks in advance.
You'll need to do this: www.jeffgeerling.com/blog/2020/usb-20-ports-not-working-on-compute-module-4-check-your-overlays
And it has to be in the boot/config.txt file when you mount the eMMC onto another computer like your Windows 10 computer.
@@JeffGeerling Hi Jeff. I am not seeing the boot/config.text file on my Windows computer when I mount the eMMC. Sorry for all of this. I am a newbie to Raspberry Pi. There is no boot folder on the mounted eMMC disk
Wouldn't it be easier to just have a sd card image that boots and installs the system on the emmc storage?
You can't use the micro SD slot and eMMC at the same time. The micro SD slot is only intended for use with the CM4 lite versions. However, starting from a USB drive should work, and flashing the eMMC maybe also.
@@R4C3R I wasn't aware of that limitation, sorry. But for USB to work the emmc needs to be clean otherwise it will boot. In theory one could create a boot image for usb that after installing the OS automatically changes the boot order so that later installs work. But that's probably more work than what it saves.
You lost me at 2:17. I'm very new to all this and am tryin to install from a Raspberry Pi 400. HOW do I make sure that I'm in the correc directory?
It's nice having such tutorial videos, but where the h**k can we get a rpi4 compute module and its board ?
No availability anywhere.
I'm still doing all these videos with pre-production units... I ordered two more on launch day, and am still waiting for them (no ship date yet on my order at the Pi Hut).
Is there a way to flash multiple compute modules at once?
Heh, multiple a computers and multiple io boards!
I think there was some volume flashing utility or setup mentioned in the Pi forums once, though.
@@JeffGeerling so a fleet of flashed compute modules running PI OS or Windows 11 it is I guess
@@JeffGeerling figured it out. There’s two pins ( on the carrier board ) that if jumped tells the computer it’s just an sd card. Then you can use balena etcher to flash them all at once.
Now to remix the open source carrier board so I can daisy chain them with the usb c; basically make a usb c hub/ carrier board.
2 cameras on the cm4?
There are two camera connectors exposed on the CM4IO board.
@@JeffGeerling Yeah, i know. I’m just dropping a hint, that setting it up should be your next vid ;)
You are the best (First)
wut
Mac Users: If you get the error "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun", when building usbboot, you need to install Xcode command line with "xcode-select --install"
Hi Jeff, not the most relevant video to ask this question but nonetheless. Are you familiar with the block chain technology at all and what would you say your interest in it is? I have a project I'm working on although distribution of the ledger is the primary bottle neck right now as I am thinking of trying to experiment on a network of PI 4. Just interested to hear from you.
My biggest problem: Where do I get a jumper from?
it's really weird that there are so many extra steps to doing this, especially installing brew..
this doesn‘t worm for me on a M1 macbook.
also not working on a regular MacBook. `make` results in an error
0:22
Now say that 5 times, fast.
Too bad the product doesn’t actually exist, because it seems pretty sweet. I ordered mine within days of the announcement and Newark won’t ship it for 7 months - and they’re RPF’s main US partner. That’s not production backlog; that’s a product that shouldn’t have been announced yet.
Great tutorial, but I think this process should be enhanced on next version... it is really awful 😣
It would be really nice if it were just a little GUI app that worked like the Pi Imager. Open it up, plug in the CM, click 'mount' or whatever.
No bloopers? No recommendation.
Ha! They'll return. I only had one little gaffe in this one, surprisingly, but I don't feel like a 3 minute video does the bloopers justice.
The only reason for disliking this is when you find that you can't get the Wireless 8gb RAM/32gbEMMC RPI4 CM or it's host board Anywhere until after the new year. I'm NOT interested in buying 200 of them either. Other than that? Great information.
It's useful advice regardless of whether you can get the modules. Pretty much all recently released tech items are difficult to get, whether they be Pi Compute Modules, graphics cards, CPUs or games consoles. None of that is Jeff's fault!
Right? There were like 3 module configs that were gonna be the bulk of the orders. They could have prioritized production of those first.
I'm trying to put out a bunch of content so that when people finally do get theirs (I'm still doing all this with a preproduction copy... waiting for my order from The Pi Hut still!), they'll be able to get up and running quickly and learn from my mistakes.
@@johnm2012 Not blaming Jeff. Blaming the Hype Machine. Jeff consistently produces excellent content. It's just frustrating when I go to burn plastic and find that I am thwarted by Covidiocy and supply chain throttling.
@@JeffGeerling Calm thyself Kimosabe. Your work is not in question. I too suffer from slow delivery from Pishop, PiHut, Canakit, Sparkfun and Amazon. Frustration #Over9000 !
who disliked 😒😡?
no one
I generally let Red Shirt Jeff take care of the dislikes.
@@JeffGeerling oh no
ı realize why his shirt is red X]
Sorry, i just have to, FIRST
I already feel bad for it xD
@@TechyGuy17 enraged red Jeff is already en route to your place ;-)
@@jyvben1520 Oh god no, my role model is on the way to kill me :(
@@TechyGuy17 maybe not, might just split your tv ... free double vision ... ;-)
@@jyvben1520 That would be cool tho, hope he signs one of the halves xD