FL2440
来源:互联网 发布:c语言whilet--的用法 编辑:程序博客网 时间:2024/05/21 05:08
Linux系统在执行一条命令时,默认会到/bin、/sbin、/usr/bin、/usr/sbin这些路径下找,如果找不到则提示command not found,当然我们也可以
通过PATH环境变量告诉系统其它命令存放的路径。现在根文件系统树下这些路径里并没有Linux系统相关命令。
[shun@localhost ~]$ cd ~/fl2440/
[shun@localhost fl2440]$ ls
3rdparty bootloader crosstool driver images linux program
[shun@localhost fl2440]$ cd 3rdparty/
[shun@localhost 3rdparty]$wgethttps://busybox.net/downloads/busybox-1.27.1.tar.bz2
[shun@localhost 3rdparty]$tar -xjf busybox-1.27.1.tar.bz2
[shun@localhost 3rdparty]$cd busybox-1.27.1
[shun@localhost busybox-1.27.1]$ ls
applets coreutils loginutils README
applets_sh debianutils mailutils runit
arch docs Makefile scripts
archival e2fsprogs Makefile.custom selinux
AUTHORS editors Makefile.flags shell
busybox examples Makefile.help sysklogd
busybox.links findutils make_single_applets.sh testsuite
busybox_unstripped include miscutils TODO
busybox_unstripped.map init modutils TODO_unicode
busybox_unstripped.out INSTALL networking util-linux
Config.in libbb printutils
configs libpwdgrp procps
console-tools LICENSE qemu_multiarch_testing
[shun@localhost busybox-1.27.1]$make menuconfig #然后进行相应的设置
编译并安装busybox:
[shun@localhost busybox-1.27.1]$make && make install
切换到根文件系统树路径下,创建符号链接指向busybox程序:
[shun@localhost busybox-1.27.1]$ cd ../../linux/rootfs/
[shun@localhost rootfs]$ ls
apps bin data dev etc info lib linuxrc mnt proc root sbin sys tmp usr var
[shun@localhost rootfs]$ ln -s bin/b
base64 busybox
[shun@localhost rootfs]$ ln -s bin/busybox init
[shun@localhost rootfs]$ ls
apps bin data dev etc info init lib linuxrc mnt proc root sbin sys tmp usr var
列出根文件系统目录树下的Linux命令,这些命令其实都是符号链接到busybox:
[shun@localhost busybox-1.27.1]$ ls ../../linux/rootfs/bin/
ash cttyhack fatattr iostat lzop nice rpm su
base64 date fdflush ipcalc mkdir pidof run-parts sync
busybox dd fgrep kbd_mode mknod ping scriptreplay tar
cat df fsync kill mktemp ping6 sed touch
chattr dmesg getopt link more pipe_progress setarch true
chgrp dnsdomainname grep linux32 mount printenv setpriv umount
chmod dumpkmap gunzip linux64 mountpoint ps setserial uname
chown echo gzip ln mpstat pwd sh usleep
conspy ed hostname login mt rev sleep vi
cp egrep hush ls mv rm stat watch
cpio false ionice lsattr netstat rmdir stty zcat
[shun@localhost busybox-1.27.1]$
创建/dev路径下的设备节点
Linux下所有的东西都是文件,其中设备也是当作文件来处理。/dev路径下存放所有的Linux的设备文件,我们需要使用root权限执行mknod命令在这
里创建系统启动必须的设备文件节点,其他的设备节点将有mdev动态创建。
[shun@localhost ~]$ cd fl2440/linux/rootfs/
[shun@localhost rootfs]$ ls
apps bin data dev etc info init lib linuxrc mnt proc root sbin sys tmp usr var
[shun@localhost rootfs]$ sudo mknod -m666 dev/null c 1 3
[shun@localhost rootfs]$ sudo mknod -m666 dev/console c 5 1
[shun@localhost rootfs]$ sudo mknod -m666 dev/ttyS0 c 4 64
[shun@localhost rootfs]$ ls -l dev/
total 0
crw-rw-rw-. 1 root root 5, 1 Nov 6 21:03 console
crw-rw-rw-. 1 root root 1, 3 Nov 6 21:03 null
crw-rw-rw-. 1 root root 4, 64 Nov 6 21:04 ttyS0
[shun@localhost rootfs]$
[shun@localhost rootfs]$
创建/var路径下的文件
[shun@localhost rootfs]$ ln -s /tmp var/log
[shun@localhost rootfs]$ ln -s /tmp var/run
[shun@localhost rootfs]$ ln -s /tmp var/tmp
[shun@localhost rootfs]$ ls -l var/
total 0
lrwxrwxrwx. 1 shun shun 4 Nov 6 21:08 lock -> /tmp
lrwxrwxrwx. 1 shun shun 4 Nov 6 21:08 log -> /tmp
lrwxrwxrwx. 1 shun shun 4 Nov 6 21:08 run -> /tmp
lrwxrwxrwx. 1 shun shun 4 Nov 6 21:09 tmp -> /tmp
[shun@localhost rootfs]$
阅读全文
0 0
- FL2440
- FL2440 +Jlink V8 使用
- FL2440更换NANDFLASH
- FL2440 adc 实验
- fl2440按键驱动
- FL2440温度传感器实验
- 移植madplay到FL2440
- fl2440文件系统的制作
- FL2440下触摸屏校准
- FL2440下触摸屏校准
- FL2440 NAND 读写实验
- 移植boa到fl2440
- 移植ssh到fl2440
- fl2440按键中断驱动
- 关于FL2440 Uboot问题
- FL2440 Uboot移植问题
- FL2440 ADC 数据采样
- fl2440 uboot 移植总结
- C++猜数字游戏
- Bear and Blocks CF-574D(类似dp+思维)
- Topological Sorting
- js的类型检测
- C/C++ 撸一段流行的观察者模式
- FL2440
- 树上方法总结 LCA 树上倍增 树链剖分 树的直径 重心
- 表单验证
- nexus配置以及部署在tomcat中
- 各种语言注释标注总结
- nginx源码阅读(十).ngx_event_core_module模块
- C和C++的区别
- Spark基础
- 【我的Java笔记】常用类_Math & System