Chinaunix首页 | 论坛 | 博客
  • 博客访问: 712219
  • 博文数量: 60
  • 博客积分: 2849
  • 博客等级: 少校
  • 技术积分: 1011
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-10 15:38
文章分类
文章存档

2013年(4)

2012年(11)

2011年(5)

2010年(3)

2009年(9)

2008年(19)

2007年(9)

分类: LINUX

2009-05-23 16:32:58

jinix-3.0制作过程(3)

1.安装openvpn-2.0.9-install.exe,虚拟网卡改个名字‘tap2009’,给她配个ip地址:172.16.1.1/255.255.0.0,
  注意物理网卡不能有172.16.x.x网段上的任何地址,否则openvpn的虚拟网卡不能工作。
  作者mail&msn:jinglexy at yahoo.com.cn 上海莘庄 2009.04.30
  参考了‘linux家用网关.doc’文章
2.qemu命令后添加:-net nic,vlan=1 -net tap,vlan=1,ifname=tap2009
3.重编内核
  make ARCH=x86 menuconfig    添加网卡驱动:[*] Universal TUN/TAP device driver support
  make ARCH=x86 CROSS_COMPILE=i686-linux-
  编译后的内核:linux-2.6.29\arch\x86\boot\bzImage重新运行一把
  进到shell后:ifconfig eth0 172.16.1.2 netmask 255.255.0.0
  ping测试:172.16.1.1
  结果应该是很正常的
4.xynth-trunk-2009.03.05.tar.gz
  cp configs/linux.config ./.config
  make menuconfig
  改里面的交叉编译器前缀i686-linux-及Path下的'Install path'为/opt/i686/xynth
  去掉Video Drivers  --->SVGALib video output support
  去掉Video Drivers  --->SDL video output support
  修改Makefile.lib文件,在override CFLAGS最后面加上-D__KERNEL_STRICT_NAMES
  修改demo/guioo/SlideWindow.cpp文件,在最前面加上#include
  make all
  make dist
  make install
#5.编译SDL-1.2.13.tar.gz,暂时不用SDL库
#  CC=i686-linux-gcc ./configure --target=i686-linux --prefix=/opt/i686/SDL
#  make
#  make install
#6.编译esound-0.2.41.tar.bz2
7.测试xynth
  mount映像文件后,拷贝:
  mkdir ./mnt/xynth
  sudo cp /opt/i686/xynth/lib/*.so ./mnt/opt/i686/lib/       -fra
  sudo cp /opt/i686/xynth/share/   ./mnt/opt/i686/xynthshare -fra
  sudo cp /opt/i686/xynth/bin/     ./mnt/xynth/              -fra
#  sudo cp /opt/i686/SDL/bin/sdl-config ./sbin/
#  sudo cp /opt/i686/SDL/lib/libSDL-1.2.so.0      ./mnt/opt/i686/lib -fra
#  sudo cp /opt/i686/SDL/lib/libSDL-1.2.so.0.11.2 ./mnt/opt/i686/lib -fra
#  sudo cp /opt/i686/SDL/lib/libSDL.la            ./mnt/opt/i686/lib -fra
#  sudo cp /opt/i686/SDL/lib/libSDL.so            ./mnt/opt/i686/lib -fra
#  sudo cp /opt/i686/SDL/lib/libpthread-2.7.so    ./mnt/opt/i686/lib -fra
#  sudo cp /opt/i686/SDL/lib/libpthread.so        ./mnt/opt/i686/lib -fra
#  sudo cp /opt/i686/SDL/lib/libpthread.so.0      ./mnt/opt/i686/lib -fra
8.在qemu下编辑xynth文件:
  vi /opt/i686/xynthshare/xynth/configs/xynth.conf
  修改字段:driver = fbdev
            mode = 1024x768x64K
9.重编内核:
cd linux-2.6.29/
cp arch/x86/configs/i386_defconfig .config
make ARCH=x86 menuconfig
        --------------------------------------------------------------------------------------------
        ipv6                                                                                    去掉
        Netfilter                                                                               去掉
        Networking support  --->[ ]   Wireless                                                  去掉
        Kernel hacking  --->[ ] Show timing information on printks                              去掉
                            [ ] Stack utilization instrumentation                               去掉
        Security options                                                                        去掉
        Virtualization                                                                          去掉
        --------------------------------------------------------------------------------------------
        FileSystem ---> ext2                                                                    add
 Graphics support
  Support for frame buffer devices
   VGA 16-color graphics support                                           add
   Userspace VESA VGA graphics support                                     add
   VESA VGA graphics support                                               add
   nVidia Framebuffer Support                                              add
   ATI Radeon display support                                              add
  Console display driver support
   Framebuffer Console support                                             add
                                Map the console to the primary display device                   add
                                Select compiled-in fonts    及子选项   VGA 8x8 font             add
        --------------------------------------------------------------------------------------------
make ARCH=x86 CROSS_COMPILE=i686-linux-
cp   ..//linux-2.6.29/arch/i386/boot/bzImage ../ -f
10.
mknod   /dev/fb0   c   29   0
mknod   /dev/fb1   c   29   1
----------------------------------------------------------
拷贝文件的方法和前面一样:
sudo /sbin/losetup -o 32256 /dev/loop7 ./disk.img
sudo mount -o loop /dev/loop7 ./mnt
sudo umount ./mnt
sudo /sbin/losetup -d /dev/loop7
11.启动qemu批处理文件
@echo off
@set QEMU_EXEC="C:\Program Files\QemuManager\qemu\091\qemu.exe"
@set QEMU_PATH="C:\Program Files\QemuManager\qemu\091"
@set QEMU_DISK=-hda "disk.img" -hdb fat:./ -boot c
@set QEMU_PARAM=-kernel "A:\build\jinix\linux-2.6.29\arch\x86\boot\bzImage" -append "root=/dev/sda1 rw vga=791"
%QEMU_EXEC% -L %QEMU_PATH% %QEMU_DISK% -m 64 -localtime -k en-us  -kernel-kqemu %QEMU_PARAM% -net nic,vlan=1 -net tap,vlan=1,ifname=tap2009
 
阅读(1900) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~