• <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久久精品免费| 日产精品久久久一区二区| 欧美精品一区二区精品久久| 久久91精品国产91久久户| 品成人欧美大片久久国产欧美...| 久久久久一级精品亚洲国产成人综合AV区 | 国内精品久久久久久99蜜桃| 国产精品99久久99久久久| 久久综合日本熟妇| 狠狠色婷婷久久一区二区三区| 久久亚洲国产成人精品无码区| 久久久国产精品亚洲一区| 久久无码一区二区三区少妇 | 香蕉99久久国产综合精品宅男自 | 最新久久免费视频| 四虎国产精品免费久久5151| 中文字幕乱码人妻无码久久| 国产ww久久久久久久久久| 精品久久无码中文字幕| 伊人久久精品无码av一区| 久久精品99无色码中文字幕| 精品久久久久久| 久久99热只有频精品8| 久久人人爽人人人人爽AV| 久久精品国产精品亚洲艾草网美妙| 精品久久久无码人妻中文字幕豆芽 | 一本大道久久东京热无码AV| 岛国搬运www久久| 久久免费高清视频| 91久久精品91久久性色| 久久精品人成免费| 久久国产精品一国产精品金尊| 久久人人添人人爽添人人片牛牛| 色99久久久久高潮综合影院| 欧美久久久久久精选9999| 久久精品国产99国产精品| 久久精品国产精品亚洲| 久久一本综合| 久久久久亚洲国产| 久久久久人妻精品一区| 精品精品国产自在久久高清|