编译内核之前对于虚拟机的简单准备

·安装VMware-workstation-full-10.0.4-2249910.exe,因为PC机是32位系统所以不能安装VMware12(最新版)

·下载ubuntu-14.04.4-desktop-amd64.iso,并在VMware中安装

·保证虚拟机能够连接互联网

·安装vim

$sudo apt-get install vim

·如果需要使用secureCRT连接虚拟机,那么ubuntu需要安装SSH

       ·首先更新源

       $sudo apt-get update

       ·安装ssh服务

       $sudo apt-get install openssh-server

       ·检测是否已启动

       $ps–e | grep ssh

       看到有ssh字样,说明已启动,如果没有就手动启动

       $/etc/init.d/ssh start

       ·配置ssh-server,配置文件位于/etc/ssh/sshd_config,默认端口为22,(为了安全,一般自定义为其他端口)重启

       $sudo /etc/init.d/ssh restart

·可以使用secureCRT登录虚拟机

·使用FileZilla在PC和虚拟机之间传输文件

·下载arm-linux-gcc-4.4.3.tar.gz

       ·$sudo su

       ·$mkdir Work

       ·$cd Work

       ·$mkdir tools

       ·$cd /home/songs/Downloads

       ·$tar –zxvf arm-linux-gcc-4.4.3.tar.gz –C ../Work/tools/

       ·$cd /home/songs/Work/tools/

       ·$mv opt arm

       ·$cp –rv arm /usr/local/

       ·$vim /etc/profile

       ·export PATH=$PATH:/usr/local/arm/FriendlyARM/toolschain/4.4.3/bin

       ·$source /etc/profile

       ·$sudo apt-get install ia32-libs

       如果失败,根据提示,执行

       ·$sudo apt-get install lib32z1lib32ncurses5 lib32bz2-1.0

·下载linux-2.6.38.tar.bz2

       ·$cd /home/songs/Downloads

       ·$tar –xvf linux-2.6.38.tar.bz2 –C ../Work/

       ·$cd ../Work/ linux-2.6.38

       修改顶层Makefile的191和192行,以指定特定CPU体系结构和交叉编译工具。

       191ARCH?=arm

       192CROSS_COMPILE?=arm-linux-

       注意:arm和arm-linux-之后不能有空格

       ·$make s3c2410_defconfig

       ·$make menuconfig

       如果出错,执行

       ·$apt-get install ncurses-dev

       ·$make menuconfig

       出错

       ·$apt-get install lib32stdc++6

       ·$make zImage

猜你喜欢

转载自blog.csdn.net/ipuv3/article/details/75453859