임 베 디 드 리 눅 스 의 우리 줄 - Linux - 2.6.30.4 2440 에서 의 이식 파일 시스템
이식 환경
1. 작업 디 렉 터 리 준비 및 작업 디 렉 터 리 진입
#mkdir my2440
#cd my2440
2. 커 널 에 Yffs 패 치 를 쳐 서 커 널 이 Yffs 에 대한 지원 을 합 니 다.
#tar -zxvf cvs-root.tar.gz
#cd cvs/yaffs2/
#./patch-ker.sh c /root/my2440/linux-2.6.30.4/
3. 커 널 을 설정 하여 Yffs 2 파일 시스템 에 대한 지원 을 합 니 다.설정 후 커 널 을 다시 컴 파일 하여 개발 판 에 다운로드 합 니 다.
File systems --->
< > Second extended fs support
< > Ext3 journalling file system support
< > The Extended 4 (ext4) filesystem
< > Reiserfs support
< > JFS filesystem support
< > XFS filesystem support
< > OCFS2 file system support
< > Btrfs filesystem (EXPERIMENTAL) Unstable disk format
[*] Enable POSIX file locking API
[*] Dnotify support
[*] Inotify file change notification support
[*] Inotify support for userspace
[ ] Quota support
Kernel automounter support
Kernel automounter version 4 support (also supports v3)
FUSE (Filesystem in Userspace) support
Caches --->
CD-ROM/DVD Filesystems --->
<*> ISO 9660 CDROM file system support
[ ] Microsoft Joliet CDROM extensions
[ ] Transparent decompression extension
< > UDF file system support
DOS/FAT/NT Filesystems --->
<*> MSDOS fs support
<*> VFAT (Windows-95) fs support
(437) Default codepage for FAT
(iso8859-1) Default iocharset for FAT
< > NTFS file system support
Pseudo filesystems --->
[*] Miscellaneous filesystems --->
--- Miscellaneous filesystems
< > ADFS file system support (EXPERIMENTAL)
< > Amiga FFS file system support (EXPERIMENTAL)
< > Apple Macintosh file system support (EXPERIMENTAL)
< > Apple Extended HFS file system support
< > BeOS file system (BeFS) support (read only) (EXPERIMENTAL)
< > BFS file system support (EXPERIMENTAL)
< > EFS file system support (read only) (EXPERIMENTAL)
<*> YAFFS2 file system support
-*- 512 byte / page devices
[ ] Use older-style on-NAND data format with pageStatus byte
[ ] Lets Yaffs do its own ECC
-*- 2048 byte (or larger) / page devices
[*] Autoselect yaffs2 format
[ ] Disable lazy loading
[ ] Turn off wide tnodes
[ ] Force chunk erase check
[*] Cache short names in RAM
<*> Journalling Flash File System v2 (JFFS2) support
(0) JFFS2 debugging verbosity (0 = quiet, 2 = noisy)
[*] JFFS2 write-buffering support
[ ] Verify JFFS2 write-buffer reads
[*] JFFS2 summary support (EXPERIMENTAL)
[ ] JFFS2 XATTR support (EXPERIMENTAL)
[ ] Advanced compression options for JFFS2
<*> Compressed ROM file system support (cramfs)
SquashFS 4.0 - Squashed file system support
[ ] Additional option for memory-constrained systems
< > FreeVxFS file system support (VERITAS VxFS(TM) compatible)
< > Minix file system support
< > SonicBlue Optimized MPEG File System support
< > OS/2 HPFS file system support
< > QNX4 file system support (read only)
<*> ROM file system support
RomFS backing stores (Block device-backed ROM file system support) --
< > System V/Xenix/V7/Coherent file system support
< > UFS file system support (read only)
< > NILFS2 file system support (EXPERIMENTAL)
[*] Network File Systems --->
Partition Types --->
-*- Native language support --->
< > Distributed Lock Manager (DLM) --->
4. busybox 를 컴 파일 하여 파일 시스템 을 만 드 는 데 필요 한 프로그램
1) busybox 소스 코드 를 압축 해제 하고 Makefile 을 수정 하여 ARM 플랫폼 으로 컴 파일 합 니 다.
#tar -jxvf busybox-1.13.0.tar.tar
#cd busybox-1.13.0
#gedit Makefile
한 164 줄 에서 CROSS 로 변경COMPILE = arm - linux -, 189 줄 ARCH = arm
2) busybox 옵션 을 설정 합 니 다. 아래 에 주의 할 부분 만 표시 되 어 있 고 기본 값 이 없 으 면 됩 니 다.
#make menuconfig
Busybox Settings --->
General Configuration --->
Buffer allocation policy (Allocate with Malloc) --->
[*] Show verbose applet usage messages
[*] Store applet usage messages in compressed form
[*] Support --install [-s] to install applet links at runtime
[*] Enable locale support (system needs locale for this to work)
[*] Support for --long-options
[*] Use the devpts filesystem for Unix98 PTYs
[*] Support writing pidfiles
[*] Runtime SUID/SGID configuration via /etc/busybox.conf
[*] Suppress warning message if /etc/busybox.conf is not readable
(/proc/self/exe) Path to BusyBox executable
Build Options --->
[*] Build BusyBox as a static binary (no shared libs)
[*] Build with Large File Support (for accessing files > 2 GB)
Installation Options --->
[ ] Don't use /usr
Applets links (as soft-links) --->
(./_install) BusyBox installation prefix
Busybox Library Tuning --->
(6) Minimum password length
(2) MD5: Trade Bytes for Speed
[*] Faster /proc scanning code (+100 bytes)
[*] Command line editing
(1024) Maximum length of input
[*] vi-style line editing commands
(15) History size
[*] History saving
[*] Tab completion
[*] Fancy shell prompts
(4) Copy buffer size, in kilobytes
[*] Use ioctl names rather than hex values in error messages
[*] Support infiniband HW
Linux Module Utilities --->
(/lib/modules) Default directory containing modules
(modules.dep) Default name of modules.dep
[*] insmod
[*] rmmod
[*] lsmod
[*] modprobe
--- Options common to multiple modutils
[ ] Support version 2.2/2.4 Linux kernels
[*] Support tainted module checking with new kernels
[*] Support for module.aliases file
[*] Support for module.symbols fileLinux System Utilities --->
3) busybox 컴 파일 및 설치, 설치 완료 후
busybox-1.13.0/_install / 디 렉 터 리 에서 생 성: bin, linux rc, sbin, usr
#make
#make install
5. 파일 시스템 구축 시작
1) 디 렉 터 리 루트 - 2.6.30.4 를 새로 만 들 고 busybox - 1.13.0 /install / 디 렉 터 리 에서 생 성: bin, linux rc, sbin, usr 를 복사 하고 이 디 렉 터 리 에서 파일 시스템 에 필요 한 다른 디 렉 터 리 를 만 듭 니 다.
#mkdir root-2.6.30.4
#cp -rf busybox-1.13.0/_install/* root-2.6.30.4/
#cd root-2.6.30.4/
#mkdir dev etc home lib mnt opt proc tmp var www
2) 각 디 렉 터 리 에 파일 시스템 에 필요 한 디 렉 터 리 나 파일 을 추가 하고 언급 되 지 않 은 것 은 추가 하지 않 아 도 됩 니 다.여러 파일 의 권한 을 주의 하 십시오. 777, 명령: \ # chmod 777 파일 이름 으로 변경 하 는 것 을 권장 합 니 다.
"dev" 디 렉 터 리, 두 개의 장치 파일 만 들 기:
#mknod console c 5 1
#mknod null c 1 3
"etc" 디 렉 터 리, 각종 프로필 을 만 들 고 내용 을 추가 합 니 다. 목록 이 없 으 면 추가 하지 않 아 도 됩 니 다.
boa / boa. conf: boa WEB 서버 설정 파일 이 비어 있 습 니 다.
그룹: 시스템 사용자 그룹 프로필, 내용 은 다음 과 같 습 니 다.
root:*:0:
daemon:*:1:
bin:*:2:
sys:*:3:
adm:*:4:
tty:*:5:
disk:*:6:
lp:*:7:lp
mail:*:8:
news:*:9:
uucp:*:10:
proxy:*:13:
kmem:*:15:
dialout:*:20:
fax:*:21:
voice:*:22:
cdrom:*:24:
floppy:*:25:
tape:*:26:
sudo:*:27:
audio:*:29:
ppp:x:99:
500:x:500:plg
501:x:501:fa
inittab: 시스템 init 프로 세 스 설정 파일, 내용 은 다음 과 같 습 니 다.
# /etc/inittab
::sysinit:/etc/init.d/rcS
console::askfirst:-/bin/sh
::ctrlaltdel:/sbin/reboot
::shutdown:/bin/umount -a -r
mime. types: 잠시 비어 있 습 니 다.
passwd: 시스템 암호 파일, 내용 은 다음 과 같 습 니 다.
root::0:0:root:/:/bin/sh
ftp::14:50:FTP User:/var/ftp:
bin:*:1:1:bin:/bin:
daemon:*:2:2:daemon:/sbin:
nobody:*:99:99:Nobody:/:
sky::502:502:Linux User,,,:/home/sky:/bin/sh
rc. d / init. d / httpd: 내용 은 다음 과 같 습 니 다.
#!/bin/sh
base=boa
# See how we were called.
case "$1" in
start)
/usr/sbin/$base
;;
stop)
pid=`/bin/pidof $base`
if [ -n "$pid" ]; then
kill -9 $pid
fi
;;
esac
exit 0
sysconfig / 호스트 이름: 호스트 이름 파일, 내용 은 다음 과 같 습 니 다.
MY2440
fstab: 시스템 마 운 트 파일 시스템 목록, 내용 은 다음 과 같 습 니 다.
# device mount-point type options dump fsck order
none /proc proc defaults 0 0
none /dev/pts devpts mode=0622 0 0
tmpfs /dev/shm tmpfs defaults 0 0
init. d / rcS: 시스템 시작 로드 항목 은 다음 과 같 습 니 다.
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
runlevel=S
prevlevel=N
umask 022
export PATH runlevel prevlevel
#
# Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
#
/bin/mount -t proc none /proc
/bin/mount -t tmpfs none /tmp
/bin/mount -t tmpfs none /var
/bin/mkdir -p /var/log
/bin/hostname -F /etc/sysconfig/HOSTNAME
mdev. conf: mdev 장치 설정 파일 이 비어 있 습 니 다.
net. conf: 네트워크 프로필, 잠시 비어 있 습 니 다.
profile: 사용자 환경 프로필, 내용 은 다음 과 같 습 니 다.
# Ash profile
# vim: syntax=sh
# No core files by default
#ulimit -S -c 0 > /dev/null 2>&1
USER="`id -un`"
LOGNAME=$USER
PS1='[\u@\h \W]\# '
PATH=$PATH:/usr/local/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
HOSTNAME=`/bin/hostname`
export USER LOGNAME PS1 PATH LD_LIBRARY_PATH
resolv. conf: DNS 프로필, 내용 은 다음 과 같 습 니 다.
nameserver 61.144.56.100
"home" 디 렉 터 리: sky 디 렉 터 리 를 만 듭 니 다. etc 디 렉 터 리 passwd 파일 의 sky 와 대응 합 니 다.
"lib" 디 렉 터 리: 이 안에 있 는 것 은 모두 라 이브 러 리 파일 입 니 다. 교차 컴 파일 러 의 라 이브 러 리 파일 디 렉 터 리 에서 직접 복사 합 니 다.
#cp -f /usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/lib/*so* lib/ -a
6. Yffs 제작 도 구 를 사용 하여 컴 파일 하여 구 축 된 파일 시스템.먼저 mkyaffs2mage. tgz (이 도 구 는 친절 하 게 제공 되 며, 그들의 사이트 에서 다운로드 할 수 있 습 니 다) 를 풀 면 개발 호스트 의 / usr / sbin / 디 렉 터 리 에 자동 으로 압축 을 풀 수 있 습 니 다.컴 파일 후 생 성 된 파일 시스템 미 러
root - 2.6.30.4. bin 도 이 디 렉 터 리 에 있 습 니 다.
#tar -zxvf mkyaffs2image.tgz
#mkyaffs2image root-2.6.30.4/ root-2.6.30.4.bin
7. 파일 시스템 미 러 를 개발 판 에 다운로드 하여 테스트 합 니 다. 사용 상황 은 다음 과 같 습 니 다.
끝 말
현재 파일 시스템 이 성공 적 으로 이식 되 었 고 한 장의 커 널 이식 을 더 해 개발 판 이 실 행 될 수 있 게 되 었 다.그러나 각종 외부 설 비 는 아직 정상적으로 사용 되 지 못 하고 후속 장 은 각종 설비 의 구동 을 점차적으로 이식 하여 보완 할 것 이다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.