MontaVista v3.1 Configuration and Compiling

MontaVista v3.1 Configuration and Compiling

hansel<hansel@163.com>
2005.6.17

Assume MVL was in folder /opt/montavista/, your board is intel ixdp425.
Your cross compiler should set to $PATH first. We use xscale_be-gcc.

Add following lines to /etc/profile.

pathmunge /opt/montavista/common/eclipse
pathmunge /opt/montavista/pro/host/bin
pathmunge /opt/montavista/pro/devkit/arm/xscale_be/bin

1. Prepare your working folder
   #cd /opt
   #mkdir MVL
   #cd MVL
   #mkdir linux-2.4.20_mvl31 app target mkramdisk ramdisk

2. Copy montavista files
   #cd /opt/MVL/linux-2.4.20_mvl31
   #cp -a /opt/montavista/pro/devkit/lsp/intel-ixdp4xx-arm_xscale_be/linux-2.4.20_mvl31/ .
   #cd /opt/MVL/target
   #cp -a /opt/montavista/pro/devkit/arm/xscale_be/target .

   You can export this directory using NFS. Kernel files are 169M, target files are 921M.
3. Apply patch
(1)For frame buffer support
   #cd /opt/MVL/linux-2.4.20_mvl31
   #cp /mvl31-ixp425-fb-support.patch .
   #patch –p0 < mvl31-ixp425-fb-support.patch

(2)For socket reuse
   #cd /opt/MVL/linux-2.4.20_mvl31
   #cp /SO_REUSEPORT.patch .
   #patch –p1 < SO_REUSEPORT.patch

4. Configure Kernel
   #cd /opt/MVL/linux-2.4.20_mvl31
   #make oldconfig
   #make menuconfig

   Configuration:
 (1)Support Frame Buffer
   "Character devices"---Enable the "Virtual terminal"
   "Console drivers" --- "Frame-buffer support"--- Enable "Support for frame buffer devices"
    Enable the "Advanced low level driver options", and then enable all sub-options (i.e. Monochrome, 2, 4, 8,…bpp packed pixels) as yes instead of module.
    Enable the "Select compiled-in fonts", and then enable all font types.

    NOTE: You should also change vfb.c in SigmaDesings Driver as below. vfb.c is located in folder
mrua_EM8620L_v2_3_49_0_dcc_dev.ixdp425/MRUA_src/mambolfb.

       Static int mambolfb_mmap(……….)
    {
    #ifndef __arm__
        BLOCK A …
    #if (RMPLATFORM==RMPLATFORMID_AOE6_SH4)
        BLOCK B …
    #else
        BLOCK C …
    #endif
        BLOCK D …
    /* Code added start */
    #ifdef CONFIG_ARCH_IXP425
        /* In the IXP425 architecture, the 'videomemory' is located on PCI MEM
           and not mapped to virtual address, so treate 'videomemory'
           as physical memory. */
            if (kc_remap_page_range((struct kc_vm_area_struct *) vma,
                                vma->vm_start, videomemory,
                                vma->vm_end-vma->vm_start,
                                (struct kc_pgprot_t *) &vma->vm_page_prot))
                    return -EAGAIN;
            printk("remapped %ld bytes in userland of process %d at address "
            "0x%08lx to 0x%08lx/n",
                   vma->vm_end-vma->vm_start,current->pid,vma->vm_start, videomemory);
    #endif
    /* Code added end */
    #endif
    return 0;
    }

After the save the modified source file, the read have to compile the driver module again. Type the command “make” under the directory of which the vfb.c locates in will start the compiling for "mambolfb.o" module.
NOTE: The driver module MUST be compiled after the kernel configuration is changed.

(2)Kernel Command Line
   "General Setup"---"Default Kernel Command String" input:
                 console=ttyS1,115200 root=/dev/ram initrd=0x00800000,2000K mem=128M@0x00000000
(3)
   "File Systems"---"Network File Systems"--- Disable "Root file system on NFS"
     
5. Compile kernel
   #make dep
   #make zImage
   #make modules

   Compiled kernel is in /opt/MVL/kernel/arch/arm/boot/. Copy kernel file zImage to /tftpboot/gdzImage.
   NOTE: If Loadable Module Support is not set, disregard the make modules command and all installation directions for modules.

6. Install Modules

   #make modules_install INSTALL_MOD_PATH=<mod_install_dir>
  
   This will place the modules into <mod_install_dir>/lib/modules/x.y.z on the host, which can then be transferred to the target machine. The target directory for the modules on the MVL should be /lib/modules/x.y.z.

7. Rebuild ramdisk
   #cd /opt/MVL/mkramdisk
   #cp -a /opt/montavista/pro/devkit/arm/xscale_be/images/mkramdisk .
   #./mkramdisk -r /opt/montavista/pro/ gdramdisk
   #gzip -v9 gdramdisk

   It will create 6M ramdisk with 4.1M contents. You can use command 'mount -o loop gdramdisk /mnt' to see contents.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值