Android源码编译(二)----------->Android’s kernel for beagleboard-xm

Rowboat port enable TI device on android’s linux kernel at http://gitorious.org/rowboat

1, Build

   1: make CROSS_COMPILE=arm-eabi- distclean

   2: make CROSS_COMPILE=arm-eabi- omap3_beagle_android_defconfig

   3: make CROSS_COMPILE=arm-eabi- uImage

The generated uImage is in arch/arm/boot.

2, Modifications

2.1 arm\mach-omap2\board-omap3beagle.c

This file is major BSP for beagleboard. It defines __mach_desc_OMAP3_BEAGLE for architecture features as follows

MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
    /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
    .phys_io    = 0x48000000,
    .io_pg_offst    = ((0xfa000000) >> 18) & 0xfffc,
    .boot_params    = 0x80000100,
    .map_io     = omap3_beagle_map_io,
    .init_irq   = omap3_beagle_init_irq,
    .init_machine   = omap3_beagle_init,
    .timer      = &omap_timer,
MACHINE_END


This structure is put into .arch.info.init section referenced in link script file at arm\kernel\vmlinux.lds.S

   
 .init : {           /* Init code and data       */
        _stext = .;
        _sinittext = .;
            HEAD_TEXT
            INIT_TEXT
        _einittext = .;
        __proc_info_begin = .;
            *(.proc.info.init)
        __proc_info_end = .;
        __arch_info_begin = .;
            *(.arch.info.init)
        __arch_info_end = .;
        __tagtable_begin = .;
            *(.taglist.init)
        __tagtable_end = .;

The machine description structure is as follows:

struct machine_desc {
    /*
     * Note! The first four elements are used
     * by assembler code in head.S, head-common.S
     */
    unsigned int        nr;     /* architecture number  */
    unsigned int        phys_io;    /* start of physical io */
    unsigned int        io_pg_offst;    /* byte offset for io
                         * page tabe entry  */

    const char      *name;      /* architecture name    */
    unsigned long       boot_params;    /* tagged list      */

    unsigned int        video_start;    /* start of video RAM   */
    unsigned int        video_end;  /* end of video RAM */

    unsigned int        reserve_lp0 :1; /* never has lp0    */
    unsigned int        reserve_lp1 :1; /* never has lp1    */
    unsigned int        reserve_lp2 :1; /* never has lp2    */
    unsigned int        soft_reboot :1; /* soft reboot      */
    void            (*fixup)(struct machine_desc *,
                     struct tag *, char **,
                     struct meminfo *);
    void            (*map_io)(void);/* IO mapping function  */
    void            (*init_irq)(void);
    struct sys_timer    *timer;     /* system tick timer    */
    void            (*init_machine)(void);
};


你可能感兴趣的:(Android源码编译(二)----------->Android’s kernel for beagleboard-xm)