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