Before building the root file system, compile busybox first.
Check the readme to see if there is any information on how to compile it. There is some introduction about busybox, such as what is busybox.
How to use busybox.
I didn't see any explanation on how to compile. Looking at the install file, I can see that the method of compiling busybox is similar to compiling the Linux kernel, which is to configure first and then compile with make. It should be noted that if you execute make install directly, it will be installed on the PC by default. We need to specify the installation address additionally.
That is, execute the make CONFIG_PREFIX=/path/from/root install after # and install it to the location we specified.
Execute make menuconfig in the busybox directory and perform the configuration first.
We want to compile for embedded systems, so let's configure the cross-compilation compiler first. There is no cross-compilation setting in the busybox configuration item, so let's take a look at the Makefile.
Generally speaking, cross-compiled variables all start with CROSS. Search for CROSS and you will find a CROSS_COMPILE variable.
No option to configure CROSS_COMPILE was found, so we configure it directly here, or we can execute make CROSS_COMPILE=arm-linux-. Both methods are the same, configuring CROSS_COMPILE to arm-linux-.
Then there is a tab completion function, which is not available in busybox by default. We need to set it up so that it will be more convenient to operate busybox in the future. The path to this function is as follows:
Busybox Settings
Busybox Library Tuning
Tab completion
Then, we use two sources of C library, one is glibc and the other is uclibc. When using glibc, there will be a warning message if it is statically linked.
In make menuconfig, set this item to empty, indicating that it is not selected.
After the configuration is complete, you can compile it. Note that you need to use the make option in the install file and change the address to the place you want to download.
Create a 046 folder to store the files after busybox is installed.
Execute the following command in the busybox directory.
make CONFIG_PREFIX=/home/book/Desktop/test/046_first_fs/ install
Check the 046 folder and you will find that there is already a bin directory.
As you can see, they are all links to busybox.
Looking at linuxrc, I see that it is also a link to busybox.
Previous article:1_5.4.2_Root file system_Analysis of init process for building root file system_P
Next article:1_5.4.4_Root file system_Building the root file system_Building the root file system_P
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- Analysis of the structure and working principle of single chip microcomputer serial communication
- [Synopsys IP Resources] How to fully support electric vehicle virtualization verification from system to software
- Basic functions of linear charger
- "Playing with the board" + servo experiment based on STM32F030Disco
- A place that I don't understand
- [Hua Diao Experience] 12 Building the Arduino development environment for ESP32C3
- 08. Anlu SparkRoad Domestic FPGA Evaluation [Learning] VGA Display
- Chuanglong Technology Allwinner A40i Development Board Review 3 Installation of Linux SDK and Lessons Learned
- What are the two chips with silkscreen SI4GK and S551J?
- Problems with sensor acquisition circuits