What to do with a .bin image?

Hi everyone! I'm trying to virtualize a Linksys Ea8100 v1 image and I downloaded the files from the OpenWRT repository. They are .bin files, so how can I make a VM out of them? Am I missing something?

Unless you have an emulator of the EA8011v1 itself, you can't virtualize a device specific image file.

You probably want to look here:
https://openwrt.org/docs/guide-user/virtualization/start

Keep in mind that virtualizing OpenWrt can be tricky -- usually the virtualization hypvervisor/supervisor/host OS is the biggest challenge to properly configure.

Oh, okay, thanks! So, the problem is that I have to build osmud, and I can't do it on a generic Linux machine because I have problems with json-c. I've read that building it on a openwrt built image should do the job, so I'm trying to do it. I wanted to virtualize that router because I need to do some tries before the physical router arrives

If you're going to be fully compiling your own code+images, you'll need to setup the build system/toolchain. It's available and documented for Linux/Mac OS/WSL. You can even setup a VM for building OpenWrt, if you want.

https://openwrt.org/docs/guide-developer/toolchain/start

WRT virtualizatoin, you can run things like VirtualBox or VMWare on most platforms (and other virtualized environments) running on top of those same OS's. In the case of virtualizing OpenWrt, you'll create a VM specifically for OpenWrt... so you'll probably be looking at an x86 based image for virtualizing and so you'll build osumd or any other packages you need for x86 if you want to play with it in the VM, or you can just build it for your Linksys device and install the image/packages when you get the device.

Perfect! I'll do my tries with the x86 one and the real implementation with the physical router. Just one more question (I'm a newbie in OpenWRT, so I really need some help): when the physical router arrives, I'll have to install OpenWRT and then cloning osmud repo in it and build, or I have to build osmud package in another location (e.g. a Docker img) and then pass it to the router? I tried to understand what's written in the osmud Github repository, but I didn't understand well this part.

openwrt isn't made to be built on openwrt, you'll have to compile it elsewhere.

there's however Building / Compiling OpenWrt ON OpenWrt - A Howto

1 Like

As @frollic has stated, building OpenWrt on OpenWrt isn't really intended, although it is possible provided enough storage and ram (i.e. x86 or SBCs like the Rasperry Pi 4 or 5 and similar).

Practically speaking, you'll need to setup the build environment on an x86 system - just set the target appropriately and the build system will be setup to 'cross compile' for your desired target platform. This will allow you to build the osmud package as well as any dependencies. From there, you can copy the files over and install on your router. That said, be sure that osmud will fit within the footprint (storage, RAM, processing power) of your target router.

You're going to have a bit of a learning curve to get the build system running and then build the specific packages that you need... be sure to read the documentation and take your time. You can ask questions about the build system in the developers section, but osmud specific things should probably be asked of the maintainers of that code.

Thank you all! I'll do my best :smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.