1 Development Environment
Host: Ubuntu14.04 (32bit)
Development Board: Mini2440
kernel:2.6.39.4
busybox:1.24.2
2 Creating a directory
(1) Create the root directory Rootfs, which is the directory to be ported to the Mini2440 Development Board:
mkdir Rootfs
(2) Enter
Rootfsand create a table of contents
bin、
Dev、
etc、
usr、
Lib、
Sbin、
proc、
Usr/bin、
Usr/sbin、
Usr/lib:
CD rootfs
mkdir bin Dev etc usr lib sbin proc mkdir usr/bin usr/sbin usr/lib
Note:bin and sbin are not created and are created automatically when you install BusyBox below.
3 cross-compile and install BusyBox
Download BusyBox and unzip, and then configure and cross-compile, see "Ubuntu14.04 Cross compile BusyBox".
4 Building etc directory
According to reference [2], you can refer to the examples/bootfloppy/etc directory in the BusyBox source code to create an embedded Linux system etc directory. or download this pre-designed etc.tar.gz directly.
5 Building Lib directory
The contents of this directory is not necessary, when making RAMDisk root file system (see "Mini2440 ramdisk Root File System"), in order to reduce the volume, the directory is empty.
5.1 Install kernel module
After compiling the Linux kernel, perform the following command to install the kernel module into rootfs/lib :
Make Modules_install arch=arm Install_mod_path=/home/liyihai/mini2440/rootfs
When you are done, you will be
Rootfs/libThe directory generates a
ModulesDirectory that contains the module contents of a specific version of the kernel.
5.2 Installing the compilation Library
Copy the library files from the cross-compilation tool to the rootfs/lib directory.
6 making image files
As needed, the above content is packaged into different types of image files, such as YAFFS2,JFFS2 and so on.
6.1 YAFFS2 Image making
Download the Mkyaffs2image tool, and then:
./mkyaffs2imge Mini2440/rootfs Mini2440_rootfs.img
6.2 RAMDisk Image making
See "Mini2440 ramdisk Root file System" for details.
reference materials
[1] Root file system making-et5
[2] using BusyBox to make embedded Linux root file system
[3]cramfs format root file system production
[4] Cramfs Making method
[5] BusyBox make embedded Linux Cramfs root file system detailed
[Production of 6]YAFFS2 file system]
[7] Step by step to make YAFFS/YAFFS2 root file system (four)---the construction of etc, Dev and other remaining directories
[8]linux yaffs2 Root file system manufacturing process
[9] A method of making YAFFS2 embedded file system
[Usage of 10]mkyaffs2image
[11] Elaborate root file system
[12]linux system porting and root file system fabrication
[13]mini2440 Build Root file system