Linux trainning notes

(0) Setup share folder between Window & Ubuntu
sudo mkdir /mnt/share
sudo mount -t vboxsf ubuntu_share /mnt/share


(1) Install version control system
sudo apt-get install subversion
sudo apt-get install git git-core

(2) Install, configure & run TFTP server
sudo apt-get install tftpd-hpa
sudo mkdir /home/tftp
sudo chmod 777 /home/tftp
sudo vim /etc/default/tftpd-hpa
-------- Modified as following --------------
#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -c -s /home/tftp"
----------------------------------------------
sudo /etc/init.d/tftpd-hpa start

(3) Install, configure & run NFS server
sudo apt-get install nfs-kernel-server
cd /home
sudo ln -s tftp nfs
sudo vim /etc/exports
-------- Modified as following ---------
/home/nfs *(sync,rw)
-----------------------------------------------
sudo exportfs -rv
sudo /etc/init.d/nfs-kernel-server restart

(4) Downloads S3C6410X Tool Chain 4.2.2 - EABI V0.0 - cross-4.2.2-eabi.tar
mkdir ~/Downloads

cd ~/Download
wget http://ldd6410.googlecode.com/files/cross-4.2.2-eabi.tar.bz2
tar xvjf cross-4.2.2-eabi.tar.bz2
sudo mkdir /usr/local/arm/
sudo mv 4.2.2-eabi/ /usr/local/arm/
sudo vim /etc/profile
-----------Added at the end of the file -------
PATH="$PATH:/usr/local/arm/4.2.2-eabi/usr/bin"
export PATH
-----------------------------------------------
source /etc/profile
echo $PATH
arm-linux-gcc -v

(5) Get LDD6410 kenel source codes linux-2.6.31
cd ~
svn checkout http://ldd6410.googlecode.com/svn/trunk/ ldd6410-read-only


mkdir ~/Downloads/ldd6410-skyeye-pack
cd ~/Downloads/ldd6410-skyeye-pack
wget http://ldd6410.googlecode.com/files/ldd6410-skyeye-pack.tar.gz
tar xvzf ldd6410-skyeye-pack.tar.gz

(6) Build uboot
 cd ~/ldd6410-read-only/s3c-u-boot-1.1.6/
 make smdk2410_config
 make

cp u-boot ~/Projects/skyeye_test/

(7) Build Linux kernal
cd ~/ldd6410-read-only/linux-2.6.31/
cp ~/ldd6410-read-only/patches/2410-skyeye_ldd6410-project.patch ./
patch -p0 < 2410-skyeye_ldd6410-project.patch
make smdk2410_skyeye_defconfig
make vmlinux

cp vmlinux ~/Projects/skyeye_test/

(8) Build busybox and Root File System initrd.img
cd ~/ldd6410-read-only/utils/busybox-1.15.1
make menuconfig
make
make install

mkdir initrd
dd if=/dev/zero of=initrd.img bs=1k count=4096
mke2fs -F -v initrd.img
sudo mount -o loop initrd.img initrd

cd initrd
cp -r ../_install/* .

mkdir proc lib etc dev root home var tmp
chmod 777 tmp

cd dev
sudo mknod -m 644 console c 5 1
sudo mknod -m 644 null c 1 3
sudo mknod -m 640 ram b 1 1
sudo mknod -m 644 mem c 1 1
cd ..

sudo vim etc/inittab
------ New file ----------------
::sysinit:/etc/init.d/rcS
::askfirst:-/bin/sh
::restart:/sbin/init
::ctrlaltdel:/sbin/reboot
::shutdown:/bin/umount -a -r
::shutdown:/sbin/swapoff -a
---------------------------------
sudo chmod 644 etc/inittab

cd etc
mkdir init.d
cd ..
sudo vim etc/init.d/rcS
------ New file -------------
#!/bin/sh
/bin/mount -t proc none /proc
/sbin/ifconfig lo 127.0.0.1 up
/sbin/ifconfig eth0 10.0.0.2 netmask 255.0.0.0 up
hostname skyeye
mkdir /var/tmp
mkdir /var/log
mkdir /var/run
mkdir /var/lock
/bin/ash
------------------------------
sudo chmod 755 etc/init.d/rcS

cd ..
sudo umount initrd

cp initrd.img ~/Projects/skyeye_test/

(9) Run skyeye
sudo apt-get install skyeye

cd ~/Projects/skyeye_test
cp vmlinux /home/tftp
sudo skyeye -e vmlinux -c skyeye-standalone.conf
sudo skyeye -e u-boot -c skyeye-with-uboot.conf -l 0x30000000,0xFFFFFF

tftp 0xc0000000 vmlinux
bootelf 0xc0000000

tftp 0xc0008000 zImage
bootm 0xc0008000

(X) Bug fix
#sudo apt-get install libncurses5 libncurses5-dev

#cd /usr/lib
#sudo cp libbfd-2.20.so libbfd-2.20.so.bak
#sudo mv libbfd-2.20.so libbfd-2.19.90.20090909.so
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值