ARM
嵌入式Linux
- Linux包括:
- bootload:开机启动初始化的一段代码
- u-boot:通用bootload
- 嵌入式Linux内核
- 文件系统
- bootload:开机启动初始化的一段代码
烧写不同的玩意
- 移植源代码
- 配置并且交叉编译
- 下载到开发板并烧写进去
Bootload烧写
- cd bootloader/u-boot/
- make distclean
- make mini2440_config
- make all
- ls -l u-boot.bin

- 进入MiniTools-20130513
- chmod u+x *
- sudo ./start.sh
- 格式化flash:勾上low format.....

- 开始烧写
- 开关拨打S1重启,按下enter

- 按q进入uboot的shell界面

更新内核(狭义的操作系统)
- 内核的基本功能:
- 进程调度
- 进程间通信(ipc)
- 内存管理
- 网络管理
- 移植自己的内核
- 将文件保存到src下
- tar zxvf linux........
- du -sm:查看大小(在目标文件夹下)
- make menuconfig
- 如果失败就是因为少一个库
- sudo apt-get install libncurses5-dev
- 手工配置内核
- System Type

- 空格选中



- device driver->Graphics support





- 查看配置文件
- ls -l .config
- 将配好的.config复制进该文件里
- cp config_mini2440_w35 .config
- ls -l .config
- make zImage
- 复制到tftpboot下
- cp arch/arm/boot/zImage /tftpboot/
- ping 192.168.0.1
- tftp 0x30008000 zImage

- nand erase 0x60000 0x500000

- nand write 0x30008000 0x60000 0x500000

- 重启板子看见一大串~

根文件系统
- 文件系统
- win:fat32,NTFS
- linux:ext3,ext4
- Embed:cramfs,jiffs/2,yaffs/2,nfs
- 文件系统基础内容
- 登录系统-(用户名,密码,配置文件)
- Host /etc/
- shell命令
- busybox
- 运行库
- 交叉编译库过来的
- GUI界面
- 登录系统-(用户名,密码,配置文件)
- 复制压缩包两个

-
解压mkyyaffs2image.tgz
-
sudo cp usr/sbin/mkyaffs2image-128M /usr/sbin/
-
sudo chmod 777 /usr/sbin/mkyaffs2image-128M
-
sudo tar zxvf rootfs_qtopia_qt4-20120626.tar.gz
-
删除冗余文件
- sudo rm -rf usr/local/Trolltech/
- sudo rm -rf root/Documents/
- sudo rm -rf opt/Qtopia/(图形界面)
-
cd home/plg
-
makdir mydir
-
进压缩文件目录
- sudo mkyaffs2image-128M rootfs_qtopia_qt4 rootfs.img^C
- ls -l rootfs.img
- sudo chmod 666 rootfs.img
- cp rootfs.img /tftpboot/
-
重启板子进入板子终端
-
看看网络还通不通
-
tftp 0x30008000 rootfs.img
Paste_Image.png
-
nand erase 0x560000 0x1344780
-
nand write.yaffs 0x30008000 0x560000 0x1344780
-
烧写完成后重启即可
网友评论