基于PXA255的嵌入式Linux应用平台的构建

时间:2012-03-22来源:网络

为了建立根文件系统,可以利用BusyBox工具,在网上下载最近版本busybox-1.1.0.tar.gz,一些主要步骤如下:

#tar zxvf busybox-1.1.0.tar.gz

#cd busybox-1.1.0

#make menuconfig

在build Options菜单下,可以选择静态库编译方式

[*]Build BusyBox as a static binary (no shared libs)

还需要使用带glibc库支持的交叉编译器arm-linux-gcc

[*]Do you want to build BusyBox with a Cross Compiler?

/usr/local/hybus-arm-linux-R1.1/bin/arm-linux-

在installation Options中选安装路径,默认是_install目录

[*]Don't use /usr

(./_install)BusyBox installation prefix

之后选择一些需要的编译命令后就可以编译BusyBox了。

#make dep

#make

#make install

完成后生成_install目录,目录下有bin linuxrc sbin目录,下面介绍对根文件系统的进一步配置:

建立etc目录

#mkdir etc

建立rc文件,内容如下:

#!/bin/sh

hostname XScale

mount -t proc proc /proc

cat /etc/motd

改变rc属性

#chmod 777 rc

建立inittab文件,主要内容如下:

::sysinit:/etc/init.d/rcS

::askfirst:/bin/sh

tty1::respawn:/sbin/getty 38400 tty1

tty2::respawn:/sbin/getty 38400 tty2

::restart:/sbin/init

::ctrlaltdel:/sbin/reboot

::shutdowm:/bin/umount -a -r

::shutdowm:/sbin/swapoff -a

在init.d目录下,建立rc文件的符号连接文件rcS

1 2 3 4

关键词: 嵌入式Linux Bootloader Linux内核

加入微信
获取电子行业最新资讯
搜索微信公众号:EEPW

或用微信扫描左侧二维码

相关文章

查看电脑版