Рет қаралды 11,589
We want to build a kernel and a root file system for a QEMU emulated board, where to run interesting binaries of our IoT device, but our device has a very old kernel, libraries, and packages. This means that we need to run an old Buildroot version or other old tools, that will not run on our current Linux desktop, but they will run on old Linux distributions.
To overcome this problem, in a simple and fast way, without the burden and overhead of a virtualization environment, we will introduce Docker, which can be configured to run older tools, transparently, on our modern Linux distribution.
This episode is about how to use Docker to build the emulation environment, using old tools, like old versions of Buildroot, that don't run on modern Linux distributions. We have to use a container environment, like Docker, or a more complex virtualization environment to solve this issue.
This argument, is not strictly related to hacking, but it is a very important tool, needed to move forward with the Buildroot installation, configuration, and generation of the kernel and the root file system for our QEMU based emulation environment.
Docker is a very useful tool that can be used in many different situations, it is a light and efficient tool, to package everything is needed to run complex tools in a well-defined environment; we can include an entire Linux distribution in a Docker image. It can be particularly useful in the embedded space where, often, there is the need to rebuild some software on devices that are on the field for many years and a very old toolchain is required.
It is an easy to use tool, but it is important to know some basic concepts that we will explore.
Useful Links
Docker container and scripts used in the video: github.com/digiampietro/hacki...
The files to build and run the Docker container shown on this episode: github.com/digiampietro/hacki...
Comparison of libc implementations for Linux: www.etalabs.net/compare_libcs....
uClibc a C library for developing embedded Linux systems: www.uclibc.org/
Docker, it can package an application and its dependencies in a virtual container that can run on any Linux server: www.docker.com/
Docker Hub, where to find and share Docker containers: hub.docker.com/
Channel's Author: www.makemehack.com/2020/02/a-...
Channel's Web Site: www.makemehack.com/
The sample router (Gemtek WVRTM-127ACN) on techinfodepot: en.techinfodepot.shoutwiki.com...
The sample router (Gemtek WVRTM-127ACN) reverse-engineered on GitHub, includes scripts to dump the EEPROM to a text file and to convert it back to binary file: github.com/digiampietro/hacki...
QEMU, the Quick EMUlator: www.qemu.org/
Buildroot, a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation: buildroot.org/