• <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 攀升 閱讀(1593) 評論(2)  編輯 收藏 引用 所屬分類: Linux

            評論

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

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

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

            樓上的不要起哄!
            2009-07-12 23:50 | 小米
            久久精品国产亚洲av日韩 | 国产亚洲精久久久久久无码77777| 国产成人久久AV免费| 久久国产视频99电影| 精品久久久久久久久免费影院| 国产成人久久精品一区二区三区| 亚洲国产另类久久久精品黑人| 久久精品国产影库免费看| 久久久久一级精品亚洲国产成人综合AV区 | 亚洲中文久久精品无码| 91精品国产综合久久久久久| 香蕉aa三级久久毛片| 国产成人久久AV免费| 欧美日韩精品久久久免费观看| 亚洲国产精品无码成人片久久| 国产成人香蕉久久久久| 久久国产欧美日韩精品| 久久久久亚洲av成人无码电影| 久久国产亚洲精品无码| 久久婷婷五月综合97色直播 | 亚洲精品乱码久久久久久久久久久久| 亚洲一区中文字幕久久| 久久精品国产半推半就| 99精品久久久久久久婷婷| 久久久久国产视频电影| 99久久国产主播综合精品| 久久婷婷五月综合97色一本一本| 久久综合亚洲色一区二区三区| 久久久99精品成人片中文字幕| 国产精品久久精品| 国产精品国色综合久久| 久久久亚洲裙底偷窥综合| 久久久精品久久久久久| 国产亚洲色婷婷久久99精品91| 久久一区二区三区免费| 办公室久久精品| 久久久久国产日韩精品网站| 国产女人aaa级久久久级| 久久精品二区| 欧美日韩精品久久免费| 亚洲精品蜜桃久久久久久|