tomazbracic
Hi,
I have:
- Raspberry CM4 8Gb, 32Gb eMMC
- CM4 IO expansion board
I would like to correctly flash CM4 and make it operational (without SD Card).
I was following or lets say combining few sources:
- https://qbereau.hashnode.dev/flashing-a-nerves-raspberry-image-from-sd-card-to-emmc
- https://forum.elixirforum.com/t/flashing-a-nerves-rpi-image-from-sd-card-to-emmc/49912
- https://www.digikey.es/es/maker/projects/how-to-flash-the-raspberry-pi-compute-module-4-cm4-emmc-with-an-os/3e33d2593b914a98bfe7cc08d4af5dbb
I ended up with a working CM4. I can use LAN and connect to it. So it kind of works. But I am confused with the partitioning on CM4. This is the output of cmd("df -h") command on it.
iex(1)> cmd("df -h")
Filesystem Size Used Available Use% Mounted on
/dev/root 28.3M 28.3M 0 100% /
devtmpfs 1.0M 0 1.0M 0% /dev
tmpfs 770.6M 8.0K 770.5M 0% /tmp
tmpfs 385.3M 4.0K 385.3M 0% /run
/dev/mmcblk0p1 18.7M 15.5M 3.1M 83% /boot
/dev/mmcblk0p3 510.0M 434.6M 75.4M 85% /root
tmpfs 1.0M 0 1.0M 0% /sys/fs/cgroup
So this /dev/mmcblk0p3 is to my understanding too small. Am I correct? It should be around 30Gb?
For instance… on my 16Gb SDCard on another Nerves system (plain RPi4 - SDCard, no eMMC) I can see this:
iex(5)> cmd("df -h")
Filesystem Size Used Available Use% Mounted on
/dev/root 28.3M 28.3M 0 100% /
devtmpfs 1.0M 0 1.0M 0% /dev
tmpfs 368.8M 8.0K 368.8M 0% /tmp
tmpfs 184.4M 4.0K 184.4M 0% /run
/dev/mmcblk0p1 18.7M 15.5M 3.1M 83% /boot
tmpfs 1.0M 0 1.0M 0% /sys/fs/cgroup
/dev/mmcblk0p3 14.5G 603.5M 13.9G 4% /root
So, what did I do wrong? I would really appreciate some feedback.
Thanks!
Tomaz
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted”
Version...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 4- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
quentin
Hi Thomaz,
Your problem might reside in your fwup.conf and fwup-revert.conf
You’ll see something like
define(APP_PART_COUNT, 1044480)You should try to increase it to
define(APP_PART_COUNT, 62914560)to make space for 30GB instead of 510MB.Not 100% sure but worth a look.
Hope it helps.
Quentin
tomazbracic
Hi Quentin,
I do have 1044480 set, but isn’t this expansion done automatically to the size of “disk”. At least I compared both installations CM4 and RPi4. On RPi4 with the same number it did expand to occupy the whole SD card. On CM4 eMMC it didn’t.
Hmm… any other idea perhaps?
ericr3r
Tomaz,
Are you using fwup to flash the nerves image directly on the CM4 or converting to an img file first?
I suspect that if you create an img file first, it is going to create a fixed size application partition. I’d recommend mounting the CM4 as an SD card and then run
fwup <your_nerves_app>.fwand select the eMMC chip as the destination.I don’t have direct experience with the CM4 but I believe that would work.
Eric
tomazbracic
Check for the solution here → Gist on my late Nerves activities - expand partition, burn .fw on another machine, scp issues, mTLS emqtt