############################################################
## Create a linux system for my SKY2440 Board
##
## SKY2440 Board info:
## CPU : ARM9, S3C2440AL, 400HMz
## SDRAM : 64MB
## FLASH : NAND 64MB, NOR 2MB
## NETWORK: DM9000 100MB
## OTHER : 3" LCD + Touch Screen, 1.1 Host/Slave USB,
## 3 LEDs, 4 Buttons, 3 Serial, 2 ADC,
## Audio Input/Output, SD/MMC Interface,
## Camera Interface, etc.
##
## 2009-01-18 by fi9
##
############################################################
## make a build env
1) install a debian linux in your computer (PC, MAC, etc.)or virtual computer (like VMware, virtual PC, etc.)
you can just install a mini debian linux, then install something what is you need in next work. (binutils, gcc, etc.)
2) install and configure any server. (like nfs, tftp, ssh, samba, etc.)
# apt-get install tftpd tftpd openssh-server samba nfs-user-server
3) make builder for arm
############################################################
## building u-boot (1.3.2)
1)
2)
3)
############################################################
## building linux kernel (2.6.25)
1) edit Makefile
ARCH ?= arm
CROSS_COMPILE ?= arm-linux-
2) patch
3) configure
$ make menuconfig
4) building
$ make uImage
############################################################
## using bootloader
1) download and write kernel in nand
tftpboot 0x32000000 uImage;
nand erase 0x000e4000 0x200000;
nand write 0x32000000 kernel $(filesize);
2) boot kernel from nand
setenv bootcmd 'nand read 0x32000000 kernel 0x200000; bootm 0x32000000'
3) rootfs from mtdblock
setenv bootargs noinitrd init=/linuxrc console=ttySAC0 root=/dev/mtdblock2
4) rootfs from nfs
setenv bootargs noinitrd init=/linuxrc console=ttySAC0 root=/dev/nfs rw nfsroot=192.168.2.200:/tftpboot/rootfs ip=192.168.2.100:192.168.2.200:192.168.2.111:255.255.255.0
5) rootfs from ramdisk
setenv bootargs noinitrd init=/linuxrc console=ttySAC0 root=/dev/ram rw
############################################################
## building busybox (1.12)
1) configure
$ make menuconfig
2) building
$ make clean
$ make CROSS_COMPILE=arm-linux- install
############################################################
## create a filesystem(rootfs)
0) before working
# mkdir /tftpboot/rootfs
# cd /tftpboot/rootfs
# mkdir dev bin sbin lib mnt usr proc home etc var
# cp -a busybox/_install/* .
@@copy other files to current dir@@
# cd -
1) create ramdisk
# dd if=/dev/zero of=ramdisk bs=1k count=16384;
# mke2fs ramdisk;
# mkdir /tmp/ramdisk;
# mount -o loop ramdisk /tmp/ramdisk;
# cp -a /tftpboot/rootfs/* /tmp/ramdisk;
# umount /tmp/ramdisk;
# rm -rf /tmp/ramdisk;
# gzip -9 ramdisk;
2) test ramdisk
# gunzip ramdisk.gz
# mount -o loop ramdisk /mnt
# ls -al /mnt
# umount /mnt
# gzip -9 ramdisk
3) create jffs2/jffs3
4) create yaffs
半年多来一直在忙着公司的路由器项目,说真的,在这项目中没有从中学到什么,用的都是一些旧东西,至少对我来说。在这半年多里又在计算机这块绕了一个圈,结果一事无成。最近想想,还是脚踏实地地进步,从半年前买的板子开始吧。
工作N多年了,懂的东西不少,可是忘记的东西也很多。作为开发人员如果没有自己的一套信息库那是不行,以前一直有构建自己的信息库,方便自己查询与及和他们共享、分享。慢慢来吧, |