制作最小linux
安装交叉编译工具
cp /usr/local/arm
cp /mnt/hgfs/vm-share/arm-linux-gcc-4.3.2.tar.gz ./
tar -xvf arm-linux-gcc-4.3.2.tar.gz
export PATH=$PATH:/usr/local/arm/4.3.2/bin
安装打包工具
cp /mnt/hgfs/vm-share/linux_tools.tgz /
cd /
tar -xvf linux_tools.tgz
编译busybox
mkdir /home/minilinux
cd /home/minilinux
cp /mnt/hgfs/vm-share/busybox-1.22.1.tar.bz2 ./
tar -xvf busybox-1.22.1.tar.bz2
cd busybox-1.22.1
make menuconfig
Busybox Settings
-> Build Options
-> Cross Compiler prefix
输入arm-none-linux-gnueabi-
Busybox Settings
-> Installation Options
-> Busybox installation prefix
输入../system
make
make install
完善系统
https://files-cdn.cnblogs.com/files/greene/完善系统需要的文件.zip
cd /home/minilinux/system
mkdir dev etc lib mnt proc sys tmp var
cd etc
mkdir init.d rc.d
cd rc.d
mkdir init.d
cd /home/minilinux/system/var
mkdir lib lock log run tmp
cd /home/minilinux/system/etc
cp /mnt/hgfs/vm-share/eth0-setting ./
cp /mnt/hgfs/vm-share/passwd ./
cp /mnt/hgfs/vm-share/profile ./
chmod 755 eth0-setting passwd profile
cd /home/minilinux/system/etc/init.d
cp /mnt/hgfs/vm-share/ifconfig-eth0 ./
cp /mnt/hgfs/vm-share/rcS ./
chmod 755 ifconfig-eth0 rcS
cd /home/minilinux/system/etc/rc.d/init.d
cp /mnt/hgfs/vm-share/netd ./
chmod 755 netd
cd /home/minilinux/system/lib
cp /usr/local/arm/arm-2009q3/arm-none-linux-gnueabi/libc//lib/* ./
打包系统
make_ext4fs -s -l 314572800 -a root -L linux system.img system