Mini2440 system transplantation chapter rootfs production

Publisher:AningmengLatest update time:2016-12-01 Source: eefocusKeywords:mini2440 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  1.  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










Keywords:mini2440 Reference address:Mini2440 system transplantation chapter rootfs production

Previous article:Mini2440 system transplantation chapter init startup process
Next article:Mini2440 system transplantation kernel startup process

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号