希望大家在此帖把在学习2410过程中关于ARM Linux的一些笔记写/贴出来,也希望有兴趣的朋友积极参与。 作为开贴,我转几篇我在chinaunix的关于2410入门的blog
http://blog.chinaunix.net/u/27204/showart_433964.html QT2410入门实践02 --- PC(宿主机)环境安装及配置
2007/10/21 =================================================================================================== Host OS install and environment build =================================================================================================== 1. Linux host OS: Ubuntu-7.10
2. On linux host, execute command after installed $sudo apt-get upgrade $sudo apt-get update
3. Install build-essential - this will install a complete devlopement environment for linux $sudo apt-get install build-essential libncurses5-dev bison flex texinfo zlib1g-dev gettext autoconf
4. Install nfs $sudo apt-get install nfs-kernel-server $edit /etc/exports, add /opt/nfs *(sync,rw) $sudo /etc/init.d/nfs-kernel-server restart
5. Install tftp 1) Install tftpd and related packages. $sudo apt-get install xinetd tftpd tftp 2) Create /etc/xinetd.d/tftp and put this entry: service tftp { protocol = udp port = 69 socket_type = dgram wait = yes user = nobody server = /usr/sbin/in.tftpd server_args = /tftpboot disable = no } 3) Make /tftpboot directory $sudo mkdir /tftpboot $sudo chmod -R 777 /tftpboot $sudo chown -R nobody /tftpboot 4) Start tftpd through xinetd $sudo /etc/init.d/xinetd start
http://blog.chinaunix.net/u/27204/showart_433982.html QT2410入门实践03 ---交叉编译工具(for ARM)及rootfs(for NFS)的制作
=================================================================================================== Building buildroot-20071126.tar.bz2 =================================================================================================== 1. Untar buildroot package $cd /opt $sudo tar -jxvf buildroot-20071126.tar.bz2 -C ./ $cd /opt/buildroot
2. Modify configure files 1)inittab $cd /opt/buildroot/target/generic/target_skeleton/etc/ //this inittab using udev $modify initab and uncomment ttyS0 as following: # Put a getty on the serial port ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100
$cd /opt/buildroot/target/generic/target_skeleton/etc/init.d $Add "/bin/sh" to rcS script at the end of file as following: ...... #add /bin/sh start echo "QT2410 shell" /bin/sh #add /bin/sh end
$cd /opt/buildroot/target/generic/target_busybox_skeleton/etc //this inittab using mdev buildin busybox $modify inittab and uncomment ttySo as following: # Put a getty on the serial port ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100
$cd /opt/buildroot/target/generic/target_busybox_skeleton/etc/init.d $Add "/bin/sh" to rcS script at the end of file as following: ...... #add /bin/sh start echo "QT2410 shell" /bin/sh #add /bin/sh end
3. Make menuconfig & make $cd /opt/buildroot $sudo make menuconfig (according to package versions as following list) binutils-2.18.tar.bz2 busybox-1.7.2.tar.bz2 cramfs-1.1.tar.gz fakeroot_1.8.2.tar.gz gcc-4.2.1.tar.bz2 genext2fs-1.4.tar.gz gmp-4.2.2.tar.bz2 jpegsrc.v6b.tar.gz libpng-1.2.16.tar.bz2 linux-2.6.23.tar.bz2 lzo_1.08.orig.tar.gz module-init-tools-3.2.2.tar.bz2 mpfr-2.3.0.patch mpfr-2.3.0.tar.bz2 mtd_20061007.orig.tar.gz ncurses-5.5.tar.gz pkg-config-0.21.tar.gz tslib-1.0.tar.bz2 uClibc-0.9.29.tar.bz2 udev-114.tar.bz2 zlib-1.2.3.tar.bz2
Note:1)MTD/JFFS2 utilities must use mtd_20061007.orig.tar.gz version
$sudo make WITHOUT_XATTR=1
4. Customizing busybox and uclibc for support NFS boot $cd /opt/buildroot $sudo make busybox-menuconfig $Busybox Settings -> General configuration --> RPC support $Busybox Settings -> Build Options -> Build BusBox as an static binary $Linux System Utilities ->mount ->Support mounting NFS file system $sudo cp project_build_arm/uclibc/busybox-1.7.2/.config package/busybox/busybox-1.6.0.config
$cd /opt/buildroot $sudo make uclibc-menuconfig $Networking support -> Remote Procedure Call (RPC) support
$cd /opt/buildroot $sudo make WITHOUT_XATTR=1
5. Make device node for console $cd /opt/buildroot/project_build_arm/uclibc/root/dev $rm console -Rf $sudo mknod -m 660 console c 5 1 # Need not make device node of null(Note!!!) # $rm null -Rf # $sudo mknod -m 660 null c 1 3
6. Modify init scipt (Note:Need not this modification if you have done step 2。1) $cd /opt/buildroot/project_build_arm/uclibc/root/etc $modify inittab and uncomment ttyS0 as following: # Put a getty on the serial port ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100
$cd buildroot/project_build_arm/uclibc/root/etc/init.d $Add "/bin/sh" to rcS script at the end of file as following: ...... #add /bin/sh start echo "QT2410 shell" /bin/sh #add /bin/sh end
7. Add cross toolchain to PATH environement(Host PC) $Modify /etc/profile to add follow content at the end of file: PATH=$PATH:/opt/buildroot/build_arm/staging_dir/usr/bin export PATH 8. Done! That's all. ARM Linux cross toolchain and rootfs is completed until now!
9。/opt/buildroot/project_build_arm/uclibc/root/ is a completed rootfs for NFS。
最后对该帖有几点建议: 1。欢迎对该贴的相关内容进行讨论 2。不赞成对该帖的好坏进行讨论,不欢迎对该帖进行评价。个人认为这样是在浪费大家的时间。
相关链接:http://blog.chinaunix.net/u/27204/showart_433964.html |