$ ls -l /dev/ttyUSB0
$ sudo chmod 666 /dev/ttyUSB0
$ minicom
重新打开一个终端
$ watch sudo ifconfig eth0 192.168.0.1
[root@FriendlyARM /]# ifconfig eth0 192.168.0.230
[root@FriendlyARM /]# ping 192.168.0.1
$ sudo service tftpd-hpa restart
$ netstat -anu|grep 69
新开终端
$arm-linux-gcc -v
- bootloader migration
Embed Linux:
(1) bootloader: u-boot
(2) linux kernel
(3) root file system
migration:
(1) get source code, modify code
(2) configuration and compile
(3) download and fire into board
$ cd sq1612/
$ cp ~/ForStudent/Src/bootloader.tar .
$ tar xvf bootloader.tar
-boot@MINI2440]#
$ cd bootloader/u-boot/
$ make distclean
$ make mini2440_config
$ make all
$ ls -l u-boot.bin
usb cable
$ cd ~/ForStudent/MiniTools-20130513
$ sudo ./start.sh
$ cd ~/sq1612/
Switch to NOR, restart board.
$ cd ~/sq1612/
Switch to S2, restart board.
Enter your Selection:q
[u-boot@MINI2440]#
- Linux kernel
kernel:
(1) process schedule
(2) ipc
(3) memory management
(4) network
$ cd ~/sq1612/
$ cp ~/ForStudent/Src/linux-2.6.32.2.tar.gz .
$ tar zxvf linux-2.6.32.2.tar.gz
$ cd linux-2.6.32.2/
$ du -sm
$ make menuconfig
$ sudo apt-get install libncurses5-dev
$ make menuconfig
5.3 手工定制Linux内核
System Type --->
ARM system type (ARM Ltd. Versatile family) --->
Samsung S3C2410, S3C2412,
S3C2413, S3C2440, S3C2442, S3C2443│
S3C2440 Machines --->
[ ] FriendlyARM Mini2440 development board (NEW)
Device Drivers --->
Graphics support --->
Support for frame buffer
devices --->
LCD select (3.5 inch 320X240
TFT Landscape LCD) ---
(X) 3.5 inch 240X320 Toppoly LCD
$ ls -l .config
$ cp config_mini2440_w35 .config
$ make zImage/ 或是make -i zImage
$ ls -l arch/arm/boot/zImage
$ cp arch/arm/boot/zImage /tftpboot/
[u-boot@MINI2440]# ping 192.168.0.1
[u-boot@MINI2440]# tftp 0x30008000 zImage
[u-boot@MINI2440]# nand erase 0x60000
0x500000
[u-boot@MINI2440]# nand write 0x30008000 0x60000 0x500000
Failed to execute /linuxrc.
Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option.
Root file system
file system:
Win: fat32, NTFS
Linux: ext3,ext4
Embed: cramfs, jiffs/2,yaffs/2,nfs
basic file system:
(1) configuration file. (device,user/pwd,init)
Host /etc/
(2) shell command (operation and management)
busybox
(3) run library
cross compiler
(4) GUI interface
(5) necessary application program
$ cp ~/ForStudent/Src/rootfs_qtopia_qt4-20120626.tar.gz .
$ cp ~/ForStudent/Src/mkyaffs2image.tgz .
$ tar zxvf mkyaffs2image.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
$ cd rootfs_qtopia_qt4/
$ sudo du -sm
$ sudo rm -rf usr/local/Trolltech/
$ sudo du -sm
$ sudo rm -rf root/Documents
$ sudo du -sm
$ sudo rm -rf opt/Qtopia/
$ sudo du -sm
$ cd home/plg/
$ mkdir mydir
$ vi myfile
$ cp ~/sq1612/02/hello2 .
$ cd ../../..
$ sudo mkyaffs2im$ cd 04/age-128M rootfs_qtopia_qt4 rootfs.img
$ ls -l rootfs.img
$ sudo chmod 666 rootfs.img
$ cp rootfs.img /tftpboot/
[u-boot@MINI2440]# ping 192.168.0.1
[u-boot@MINI2440]# tftp 0x30008000 rootfs.img
Bytes transferred = 20203392 (1344780 hex)
[u-boot@MINI2440]# nand erase 0x560000 0x1344780
[u-boot@MINI2440$ cd 04/]# nand write.yaffs 0x30008000 0x560000 0x1344780
reset board.
[root@FriendlyARM /]# cd home/plg/
[root@FriendlyARM plg]# cat myfile
[root@FriendlyARM plg]# ./hello2