Make a root file system
1. Create a directory
2. Create necessary device files
3. Install the required shared libraries
4. Install init files, shells and various Linux commands, provided by busybox
5. Create and edit configuration
1.1. Create a directory
mkdir rootfs
cd rootfs
mkdir bin sbin dev lib etc root usr proc mnt tmp
mkdir usr/bin usr/lib usr/sbin lib/modules
1.2. Create device files
cd dev
mknod -m 666 console c 5 1
mknod -m 666 null c 1 3
1.3. Copy library files/lib
cp /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/lib /lib/
1.4. Compile and install kernel modules
cd linux-2.6.29
make modules
make modules_install INSTALL_MOD_PATH=/rootfs/lib/modules
1.5. bin, busybox package
Open Makefile
Modify #CROSS_COMPILE?= to: CROSS_COMPILE?=arm-linux-
Modify ARCH?=$(SUBARCH) to: ARCH?=arm
make menuconfig
Busybox setting
build options
build busybox as a static binary //Not selected, use dynamic compilation
Installation Options
make
make install
1.6. Configuration files/etc
1.6.1. /etc/inittab
#/etc/inittab
::sysinit:/etc/init.d/rcSttySAC0
::askfirst:-/bin/sh
::ctrlaltdel:/sbin/reboot
::shutdown:/bin/umount-ar
After entering, save it.
Explanation: #/etc/inittab
::sysinit:/etc/init.d/rcS //The rcS script is executed when the system starts
ttySAC0::askfirst:-/bin/sh //The terminal uses serial port 0
::ctrlaltdel:/sbin/reboot // Pressing ctr+alt+del will execute the reboot command
::shutdown:/bin/umount-ar //Shutdown will execute the umount command -a means download all file systems
1.6.2. /etc/init.d/rcS
#!/bin/sh
ifconfig eth0 192.168.1.17
mount-a
After entering, save it.
Note: #!/bin/sh//# represents a comment
ifconfig eth0 192.168.1.17 //Configure the network card IP address, static, each time the machine is turned on, the Linux system (startup) will be automatically
The IP address of the distribution board is configured as follows:
mount-a //Mount all file systems
1.6.3. /etc/fstab
device | mount-point | type | options | dump | fsck | order |
proc | /proc | proc | defaults | 0 | 0 | |
tmpfs | /tmp | tmpfs | defaults | 0 | 0 | |
Previous article:Mini2440 system transplantation chapter init startup process
Next article:Mini2440 system transplantation kernel startup process
- 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
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- TI Cup 2019 National Undergraduate Electronic Design Competition Retest Notice (Retest List Has Been Announced):
- TMS320F280049C Study Notes 15 DAC
- What if the uploaded image is not used? See here
- [Xingkong Board Python Programming Learning Main Control Board] Flip Tomato Clock
- Help
- How to send more than 20 bytes of data at a time with blue_nrg
- I stayed up late to sort it out. Here is the servo information on the national competition list.
- How to make an overvoltage protection circuit?
- Transient Analysis in Modern Power Electronics
- What is the GPIO level status of Espressif ESP8266?