• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            攀升·Uranus


            Something Different,Something New
            數據加載中……

            Linux Kernel Image: initialize

            1. 編譯kernel  
                  編譯linux時其實會又很多產物,因為android讓我接觸了linux 內核的一些資料。

            貼最后一段make的Log
            $ make ARCH=arm CROSS_COMPILE=/dev/.....
            ...   < many build steps omitted for clarity>
              LD          vmlinux                                                  Kernel proper,EFL format,最原始的kernel
              SYSMAP      System.map                                 
              OBJCOPY     arch/arm/boot/Image                     去掉 symbols, notes, and comments.
              Kernel:     arch/arm/boot/Image is ready                objcopy to generate a binary file, Image   
              AS          arch/arm/boot/compressed/head.o         ARM-specific startup code generic to ARM processors,與arm相關的一些重要的啟動時要用
              GZIP        arch/arm/boot/compressed/piggy.gz      gzip打包
              AS          arch/arm/boot/compressed/piggy.o        加載piggy.S,initializes the processor,required memory regions
              CC          arch/arm/boot/compressed/misc.o        Routines used for decompressing the kernel image 
              AS          arch/arm/boot/compressed/head-xscale.o   
              AS          arch/arm/boot/compressed/big-endian.o
              LD          arch/arm/boot/compressed/vmlinux         這容易搞亂,這個vmlinux和第一個Kernel proper是不一樣的。
              OBJCOPY     arch/arm/boot/zImage                     Final composite kernel image,loaded by bootload.
              Kernel:     arch/arm/boot/zImage is ready
            boot-strap Loader :misc.o head-xscale.o big-endian.o

            2. Initialization
                Power on-> bootloader ->head-xscale.o(boot-strap )-> head.o(vmlinux)->main.o(kernel)

            3. start_kernel();
               啟動Init()process.init初始化之前注冊的函數,最后釋放資源。內核級別啟動常報的錯就是“No init found.  Try passing init= option to kernel”
            這主要是因為通過run_init_process執行系統級別的/init時失敗,返回。如果成功,該函數不會返回。
            if (execute_command) {
            run_init_process(execute_command);
            printk(KERN_WARNING "Failed to execute %s.  Attempting "
            "defaults...\n", execute_command);
            }
            run_init_process("/sbin/init");
            run_init_process("/etc/init");
            run_init_process("/bin/init");
            run_init_process("/bin/sh");
            panic("No init found.  Try passing init= option to kernel.");

            PS:
            start_kernel(): .../init/main.c 
            Most of the Linux kernel initialization takes place in this routine
            setup_arch(&command_line):  start_kernel() function is the call to setup_arch(), .../arch/arm/kernel/setup.c

            posted on 2009-07-11 17:40 攀升 閱讀(1599) 評論(2)  編輯 收藏 引用 所屬分類: Linux

            評論

            # re: Linux Kernel Image: initialize  回復  更多評論   

            bucuo,收藏一下啦
            2009-07-11 18:40 | 99網上書城

            # re: Linux Kernel Image: initialize  回復  更多評論   

            樓上的不要起哄!
            2009-07-12 23:50 | 小米
            99久久伊人精品综合观看| 国产精品激情综合久久| 色播久久人人爽人人爽人人片AV| 很黄很污的网站久久mimi色 | 日韩欧美亚洲综合久久| 午夜天堂av天堂久久久| 91精品日韩人妻无码久久不卡 | 久久国产视频网| 久久久久18| 国产一级持黄大片99久久| 亚洲精品无码久久久影院相关影片| 91久久精品电影| 久久无码国产专区精品| 99久久精品国产高清一区二区 | 久久青青草原精品国产软件| 久久婷婷五月综合成人D啪 | 亚洲国产精品高清久久久| 国产激情久久久久影院老熟女| 久久精品aⅴ无码中文字字幕不卡| 93精91精品国产综合久久香蕉| 99久久99久久精品国产片果冻| 一本色道久久88综合日韩精品 | 无码久久精品国产亚洲Av影片| 97精品依人久久久大香线蕉97| 久久国产免费观看精品| 亚洲一级Av无码毛片久久精品| 久久久久久免费一区二区三区 | 久久久久国产一区二区三区| 2021少妇久久久久久久久久| 色狠狠久久AV五月综合| 久久精品卫校国产小美女| 三级韩国一区久久二区综合| 久久人人爽人人爽人人片AV麻豆| 久久这里只有精品久久| 97久久国产亚洲精品超碰热| 国产精品一区二区久久国产| 国内精品久久久久久久97牛牛 | 久久久WWW成人| 人人狠狠综合88综合久久| 久久夜色精品国产| 99久久国产精品免费一区二区 |