Skip to content

binfmt errors (and mitigation) #48

@seanboyce

Description

@seanboyce

Hello!

When I ran the default podman command for licheerv nano, I encountered a few problems. I'm using the 'fix' branch (although the problem exists in master too, I think). I've managed to mitigate them, by entering the container image and modifying it.

  1. Issue: binfmt is not mounted. This one is easy, I just entered the container and ran:
    mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc

echo 1 > /proc/sys/fs/binfmt_misc/status

  1. binfmt doesn't have binaries for the architecture riscv64. This one was tougher.

First, I installed the binaries via:
apt-install qemu-system-misc

Then, the system still could not find them, so I registered them manually with:

echo ':qemu-riscv64:M::\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/libexec/qemu-binfmt/riscv64-binfmt-P:OCPF' > /proc/sys/fs/binfmt_misc/register

After this, it would try and build.

  1. OpenSBI patch fails to apply correctly and the build halts.

This may have been caused by my mildly ham-fisted attempt to fix things. I resolved it by deleting the OpenSBI directory, re-cloning it into that directory, entering it, and executing:

git checkout 216793f

Then I re-ran the makefile from within the container, and it eventually spat out an image, which seems to boot. I'm having some problems with RNDIS DHCP not working, but that seems unrelated to the above, and I bet it will work fine when I switch to serial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions