Server Environment Setup
1. Configuring the TFTP server
1.1. Set TFTP directory
Vim/etc/xinetd.d/tftp
Server_args =-S .../tftp
Disable = no
1.2. Start the TFTP service
/etc/init.d/xinetd restart
2. Configure Server for NFS
2.1. Set NFS Directory
Vim/etc/exports
.../nfs * (Rw,sync,no_root_squash)
2.2. Start the NFS service
/etc/init.d/nfs restart
Bootloader Environment Construction
1. Unzip the bootloader
Tar zxvf uboot_mini2440.tar.gz
2. Clear Bootloader
CD uboot_mini2440
Make Distclean
3. Configure Bootloader
Make Mini2440_config
4. Compiling bootloader
Make Arch=arm cross_compile=arm-linux-
5. Download bootloader
Insmod Usb.ko
./DNW U-boot.bin 30008000
6. Setting the network environment variable
Setenv ethaddr 12:34:56:78:9A:BC
setenv ipaddr 192.168.1.230
Setenv ServerIP 192.168.1.xxx
Saveenv
7. Test network connectivity
Ping 192.168.1.xxx
8. Setting the Startup environment variable
8.1. Set tftp download and boot kernel
setenv bootcmd tftp 31000000 uimage \; Bootm 31000000
8.2. Setting up NFS mount root file system
setenv Bootargs noinitrd console=ttysac0,115200 init=/init root=/dev/nfs rw nfsroot=192.168.1.101:.../rootfs ip= 192.168.1.230:192.168.1.101:192.168.1.1:255.255.255.0::eth0:off
Saveenv
ROOTFS Environment Construction
1. Create a system directory
mkdir Rootfs
CD Rootfs
mkdir bin Dev etc lib mnt proc sbin sys tmp usr var
mkdir usr/bin usr/lib Usr/sbin lib/modules
2. Create a Device file
CD Dev
Mknod-m 666 Console C 5 1
Mknod-m 666 NULL C 1 3
3. Add a configuration file
Tar zxvf etc.tar.gz
CP-RF etc/* rootfs/etc/
4. Add System Tools
4.1. Unzip the BusyBox
Tar zxvf busybox-1.13.3.tar.gz
4.2. Clear BusyBox
Make Distclean
4.3. Configure BusyBox
CD busybox-1.13.3
Make Menuconfig
BusyBox Settings->build Options->[*]build BusyBox as a static binary
BusyBox settings->build options-> (arm-linux-) Cross compiler prefix
BusyBox settings->installation Options->[*]don ' t use/usr
BusyBox settings->installation options-> (.../rootfs) busybox installation prefix
4.4. Compiling BusyBox
Make
4.5. Installing BusyBox
Make install
Kernel Environment Construction
1. Unzip the kernel
Tar zxvf linux-mini2440.tar.gz
2. Clear kernel
CD linux-mini2440
Make Distclean
3. Configure kernel
3.1. Load the configuration file
Make Menuconfig Arch=arm
Load an alternate configuration File->.config->exit->save
3.2. Configuration file System
Make Menuconfig Arch=arm
General setup->[]initial RAM filesystem and RAM disk
File systems->[*]network file Systems->[*]root file system on NFS
4. Compiling kernel
4.1. Copy the Mkimage tool
CP .../uboot_mini2440/tools/mkimage/bin
4.2. Compiling kernel
Make Uimage arch=arm cross_compile=arm-linux-
5. Compiling the kernel module
Make Modules Arch=arm cross_compile=arm-linux-
6. Installing the kernel module
Make Modules_install arch=arm Install_mod_path=.../rootfs
7. Copy the image to the TFTP directory
CP Kernel/arch/arm/boot/uimage .../tftp
8. Copy the Rootfs to the NFS directory
CP rootfs/* .../nfs-rf
[Country EMBED strategy] [102] [Kernel-driven development environment construction]