tomazbracic

tomazbracic

Flashing Nerves to CM4's eMMC directly - wrong size partitions?

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:

  1. https://qbereau.hashnode.dev/flashing-a-nerves-raspberry-image-from-sd-card-to-emmc
  2. https://forum.elixirforum.com/t/flashing-a-nerves-rpi-image-from-sd-card-to-emmc/49912
  3. 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

First Post!

quentin

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

Where Next?

Popular in Questions Top

chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
New
nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New

We're in Beta

About us Mission Statement