MontaVista v3.1 Configuration and Compiling

原创 2007年09月14日 16:26:00
MontaVista v3.1 Configuration and Compiling


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

 (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

       Static int mambolfb_mmap(……….)
    #ifndef __arm__
        BLOCK A …
        BLOCK B …
        BLOCK C …
        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,
                                (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);
    /* Code added end */
    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
   "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.


Compiling and linking error when using NDK r10 to build cocos2d-x v3.2

用ndk r10编译cocos2dx NDK r10 has problem, refer to [this ticket](
  • shudaiu
  • shudaiu
  • 2014年08月09日 09:49
  • 1151

CDH Components (V4.5) and Talend Installation &Configuration Steps

CDH Components (V4.5) and Talend Installation &Configuration Steps Part I. Hadoop (single node mode)...

6.087 Practical Programming in C, lec1:Introduction. Writing, compiling, and debugging C programs.

前言:最近通过MIT OCW的6.087 Practial Programming in C来复习C语言,对照了下6.087的课程设置与C Programming Language的章节结构,感觉两者...
  • jubincn
  • jubincn
  • 2011年10月12日 23:08
  • 832

Compiling and running pulseaudio from git

A few budding developers have asked me recently about this and to make life easy, I decided to write...
  • dssxk
  • dssxk
  • 2011年09月09日 09:46
  • 597
您举报文章:MontaVista v3.1 Configuration and Compiling