Run xtratum on ppc

 /*Authors:Lv Qingquan
Date:26-07-2009
*/

First the hardware is AMCC ppc440EP.my linux source is 2.6.19.2,you can get it from:ftp://ftp.denx.de/pub/linux/linux-2.6.19.2.tar.bz2
I use eldk4.0 to my cross compile tools.so download eldk first.following is how to install it.

1,#mkdir -p /mnt/cdrom
  #mount -o loop ppc-2006-01-11_amcc.iso /mnt/cdrom
  #cd /mnt/cdrom
 #./install -d <dir> [cpu_family]

the cpu family include:
#          * ppc_4xx = AMCC 4xx processors without FPU
#          * ppc_4xxFP = AMCC 4xx processors with FPU
#          * ppc_6xx = PowerPC processors based on 60x cores
#            (This includes support for MPC5xxx, 7xx, and 82xx processors).
#          * ppc_74xx = 74xx processors
#          * ppc_8xx = MPC8xx processors
#          * ppc_85xx = MPC85xx processors

the dir is your eldk directory where you want to install.
take what i do for example(i use ppc440):
# ./install -d /home/username/eldk *ppc_4xx
now you have a cross compiler in /home/username/eldk,then add the following to /etc/profile
export PATH=$PATH:/home/usename/eldk/bin:/home/username/eldk/usr/bin
make sure your pc enable tftp and nfs.make tftp's load dir is /tftpboot. add the following to /etc/exports
/home/username/eldk/ppc_4xx 192.168.1.*(rw,no_root_squash,sync)
and then restart the nfs.
Ok,the preparation is finished,so next we will introduce how tom make a xmppckernel
The procedure is:
1,unpack the linux kernel,and patch the xtatum_linux-2.6.19.2_eldk.patch to the kernel.

2,then there will a defconfig in you linux path,use it to comile .
# . /etc/profile           
#cp config-2.6.19.2-??? .config
#make menuconfig ARCH=ppc CROSS_COMPILE=ppc_4xx-
ensure this:
General setup  ---> [*] Enable XtratuM  
Processor  --->    Processor Type (44x)  --->                                    
[*] Math emulation
.
.
IBM 4xx options  ---> Machine Type (Yosemite)  --->     //type is your machine type
[*] PPC4xx DMA controller support      
Device Drivers  ---> Block devices  ---><*> Network block device support
<*> RAM disk support
(16)  Default number of RAM disks
(65536) Default RAM disk size (kbytes)
[*]   Initial RAM disk (initrd) support

File systems  ---> <*> Second extended fs support
[*]   Ext2 extended attributes
[*]     Ext2 POSIX Access Control Lists
[*]     Ext2 Security Labels
[*]   Ext2 execute in place support
Network File Systems  --->
<*> NFS file system support
[*] Provide NFSv3 client support
[*] Root file system on NFS
...
Kernel hacking  ---> [*] Kernel debugging
[*] Include BDI-2000 user context switcher (NEW)
[*] Support for early boot texts over serial port
...
# in order to use serial port we also should choose:      
Device Driver  --->    character devices  ---> [*] Virtual terminal                                                                           [*]   Support for console on virtual terminal
[*]   Support for binding and unbinding console drivers
[*] Non-standard serial port support     

3,compile it
 #make uImage ARCH=ppc CROSS_COMPILE=ppc_4xx-
then the kernel is under ./arch/ppc/boot/images.copy it to /tftpboot,now the ppcxmkernel is ok,it is uImage.
4,enter the xtratum directory.modify the Config.mk and then
 #make ARCH=ppc CROSS_COMPILE=ppc_4xx-
        #cd user_tools/examples/trivial_domain
        #make ARCH=ppc CROSS_COMPILE=ppc_4xx-
now,you have trivial.xmd.

Next is modify you filesystem.in your eldk directory,

        #cd ppc_4xx
        #cd dev
        #mknod  console  c   5    1         // mknod  need root authorization
                #mknod  ttyS0    c   4    64
             #mknod  ttyS1    c   4    65
            #mknod  ptmx     c   5    2
            #mknod  tty      c   5    0
               #mknod  tt10     c   0    0
        #cp  /dev/null   ./
        #cd ..

now,you are in the eldk/ppc_4xx
 #cp -p xtratum-ppc .   //make the xtratum in you filesystem

OK,now we have kernel and filesystem to boot them to the ppc board.
#minicom -swm
then change some config,make the loaddir: /tftpboot,and Bps/Par/Bits       : 115200 8N1
then choose    exit at the same time press the reboot key of ppc.set environment variable;
=>setenv  serverip   192.186.1.232   //your server(local) ip,you can set it as yourself.
             =>setenv  rootpath   /home/username/eldk/ppc_4xx   //your fs
            =>setenv  ipaddr     192.186.1.245
            =>setenv  gatewayip  192.186.1.1
            =>setenv  netmask    255.255.255.0
            =>setenv  hostname   lvqq               //your sys name,set it as yourself
            =>setenv  device     eth0
        =>setenv  fileaddr 400000
            =>setenv  loadaddr 40000
              =>setenv  bootfile   uImage        
                 =>setenv  bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(device):off console=ttyS0,115200        
        =>tftp
        =>bootm

now you can enter the system on ppc,if there are something wrong during boot,then ctrl+c,you can enter it.
login:root
#cd /
           #insmod xm.ko
add     XTRATUM=/PPC/xtratum-ppc-20080910-no-task_struct-lite export XTRATUM
PATH=$PATH:$XTRATUM/user_tools/xmloader export PATH  to /etc/profile
#. /etc/profile
and then load the trivial.xmd
          #cd /user_tools/examples/trivial_domain
          #loader.xm trivial.xmd
last  unload it
          #unloadr.xm -id idnumber

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值