swishy

swishy

Kia ora All, I’m currently porting nerves to the Khadas VIM3 board and have got to the point its booting fine however fwup appears to be corrupting the written image - I have tested both fwup 1.13.2 and fwup 1.14.0 -

Khadas VIM3 (AMLogic A311D)
Mainline U-Boot 2024.01 (512-byte offset for SD card)
MBR partition layout with bootloader at sector 1 (512-byte offset)

Kernel panics with VFS: Unable to mount root fs on unknown-block(179,2)

The generated .fw image however contains a mountable squashfs filesystem
Corruption appears to occur with both mix burn and mix firmware.image - file headers appear intact but data is corrupted on raw_write() to root partition after byte 35 onward. Its reproducible using both zip and xz compression.

At the moment I’m getting a boot-able image by extracting the generated .fw file and using dd to write to sdcard

e.g. dd if=/dev/sda2 of=/tmp/extracted.img bs=512 count=524288

Passing the following in target.ex to use xz compression

config :nerves, :firmware,
mksquashfs_flags: [“-no-xattrs”, “-quiet”, “-comp”, “xz”]

I’m assuming its something stupid I’m doing, any insights would be appreciated.

Dale.

Showing Posts 1 to 9

lawik

lawik

Nerves Core Team

How are you flashing the device?

Does it show up as a USB mass storage device or how sre you using fwup/dd to write to it?

fhunleth

fhunleth

Co-author of Nerves

Hi @swishy,

It would be helpful if you could sharing your project that reproduces the issue.

Normally when people report corruption issues, they’re due to having some other part of the fwup.conf overwrite the part that’s getting corrupt. That’s what I’d check.

Using xz or gzip for SquashFS compression shouldn’t make a difference, but I’d stick with gzip to minimize the number of changes you’re making.

swishy

swishy OP

Yeah USB mass storage device at the moment and mix burn to write image to sdcard card - as mentioned uboot / boot sector are written fine root fs ends up corrupted so having to manually write using dd at correct offset.

swishy

swishy OP

I’ll get the repo public later today - just cleaning up a couple of hard codes in the boot configuration so they are following nerve conventions correctly :slight_smile:

swishy

swishy OP

ok repository is available here ST8VRT / nerves_system_vim3 · GitLab

fhunleth

fhunleth

Co-author of Nerves

Thanks. I just tried your repository and got an error when running fwup due to the U-Boot environment block and U-Boot image overlapping. I know this isn’t the problem that you reported, but I wanted to get a clean image before checking anything. I sent you a PR to fix the overlap.

swishy

swishy OP

awesome thanks for that - not quite sure why I haven’t hit it as I have rebuilt the image about 2.5k times to date lol

swishy

swishy OP

Ok funny story - fresh checkout with your fix and it now boots fine using mix burn :melting_face: , feel like the cache gremlins have bitten me again lol

lawik

lawik

Nerves Core Team

Glad to see it got resolved :slight_smile:

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
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
nseaSeb
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
RemyXRenard
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
velrest
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
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
samoloth
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
FlyingNoodle
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

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
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
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
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
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews