利用busybox, extlinux 在工控機CompactFlash(CF卡)上構建Linux系統(下)

來源:互聯網
上載者:User

< 工控機 (AMD LX處理器平台, 非ARM) Linux kernel & Busybox 編譯選項配置 >

 

(一) 配置並編譯Busybox:

 

說明, 此次編譯的目標機不是arm板, 而是工控機(研華3355), CPU是AMD low power LX800/500 MHz and LX600/366 MHz Processor,

so~, 注意與傳統的移植arm平台的不同~


 修改Makefile,
       164行改成CROSS_COMPILE ?= 空
       189行改成ARCH ?= i386
       #如果是arm平台,CROSS_COMPILE ?= arm-linux-, ARCH ?= arm,

這裡暫用預設設定, 不修改Makefile, 執行make menuconfig,進入配置介面,

 

General Configuration---> 
 [*] Show verbose applet usage messages 
 [*] Store applet usage messages in compressed form 
 [*] Support –install [-s] to install applet links at runtime 
 [*] Enable locale support(system needs locale for this to work) 
 [*] Support for –long-options 
 [*] Use the devpts filesystem for unix98 PTYs 
 [*] Support writing pidfiles 
 [*] Runtime SUID/SGID configuration via /etc/busybox.config 
 [*]  Suppress warning message if /etc/busybox.conf is not readable 
 
Build Options---> 
 [*] Build BusyBox as a static binary(no shared libs) 
 [*] Build with Large File Support(for accessing files>2GB) 
 
Installation Options-> 
 []Don’t use /usr 
   Applets links (as soft-links) ---> 
 (./_install) BusyBox installation prefix 

 

Busybox Library Tuning ---> 
 (6)Minimum password legth 
 (2)MD5:Trade Bytes for Speed 
 [*]Fsater /proc scanning code(+100bytes) 
 [*]Command line editing 
 (1024)Maximum length of input 
 [*] vi-style line editing commands 
 (15) History size 
 [*] History saving 
 [*] Tab completion 
 [*]Fancy shell prompts 
 (4) Copy buffer size ,in kilobytes 
 [*]Use ioctl names rather than hex values in error mess
 [*]Support infiniband HW 
 
(2)、Linux Module Utilities---> 
  (/lib/modules)Default directory containing modules 
(modules.dep)Default name of modules.dep
[ ] Simplified modutils  
[*] insmod 
[*] rmmod 
[*] lsmod 
[*] modprobe 
-----options common to multiple modutils 
[ ] support version 2.2/2.4 Linux kernels 
[*]Support tainted module checking with new kernels 
[*]Support for module .aliases file 
[*] support for modules.symbols file 

 

退出make menuconfig的介面, 執行:
make
make install

產生busybox/_install檔案夾;

 

 

(二)配置並編譯Kernel:

 

  解壓核心源碼: tar xvzf linux-2.6.32.2.tar.gz
 修改Makefile: vi Makefile
在Vi中輸入/,進入搜尋,再輸入CROSS_COMPILE,找到
  export KBUILD_BUILDHOST := $(SUBARCH)
  ARCH            ?= $(SUBARCH)
  CROSS_COMPILE   ?=
 
修改為:
  export KBUILD_BUILDHOST := $(SUBARCH)
  ARCH  ?= x86
  CROSS_COMPILE ?=

如果目標機是arm平台,並且編譯器首碼是arm-linux-,則:
  export KBUILD_BUILDHOST := $(SUBARCH)
  ARCH  ?= arm
  CROSS_COMPILE ?= arm-linux-

然後執行make menuconfig
配置選項參考:
http://blog.csdn.net/hello_wyq/archive/2006/09/30/1312066.aspx
http://www.chinaunix.net/jh/4/16106.html
http://lamp.linux.gov.cn/Linux/kernel_options.html
http://blog.csdn.net/bekars/archive/2007/01/24/1492067.aspx
http://blog.chinaunix.net/u3/116495/showart_2333717.html

 

其中需要關閉的選項:

 

 

 

 


General setup

   []Initial RAM filesystem and RAM disk (initramfs/initrd) support

 

Enable the block layer

   [ ]Support for large (2TB+) block devices and files

   [ ]Block layer data integrity support

      IO Schedulers-->以下全刪

 

Power management and ACPI options

   [ ]Power Management support

   [ ]CPU idle PM support 

       CPU Frequency scaling  --->

   [ ] CPU Frequency scaling

 

Bus options

    [ ] Message Signaled Interrupts (MSI and MSI-X)

    [ ] ISA support

    [ ] MCA support

    < > PCCard (PCMCIA/CardBus) support

 

Networking support

    [ ]Amateur Radio support  --->

    < >CAN bus subsystem support  --->

    < >IrDA (infrared) subsystem support  --->

    < >Bluetooth subsystem support  --->

    [ ]  RxRPC dynamic debugging

    < >  RxRPC Kerberos security

    < >WiMAX Wireless Broadband support  --->

    < >RF switch subsystem support  --->

    < >Plan 9 Resource Sharing Support (9P2000) (Experimental)  --->

    Networking options  --->

        < > Packet socket

       < > Transformation user configuration interface

       < > PF_KEY sockets

       [ ] Security Marking

       [ ] Network packet filtering framework (Netfilter)  --->

       < > The DCCP Protocol (EXPERIMENTAL)  --->

       < > The RDS Protocol (EXPERIMENTAL)

       < > The TIPC Protocol (EXPERIMENTAL)  --->

       < > Asynchronous Transfer Mode (ATM)

       < > 802.1d Ethernet Bridging

       [ ] Distributed Switch Architecture support  --->

       < > 802.1Q VLAN Support

       < > DECnet Support

       < > ANSI/IEEE 802.2 LLC type 2 Support

       <M> The IPX protocol

       [ ]   IPX: Full internal IPX network

       < > Appletalk protocol support

       < > CCITT X.25 Packet Layer (EXPERIMENTAL)

       < > LAPB Data Link Driver (EXPERIMENTAL)

       < > Acorn Econet/AUN protocols (EXPERIMENTAL)

       < > WAN router

       < > Phonet protocols family

       < > IEEE Std 802.15.4 Low-Rate Wireless

       [ ] QoS and/or fair queueing  --->

       [ ] Data Center Bridging support

       Network testing  --->以下全刪

 

Device Drivers

       <*> Memory Technology Device (MTD) support  --->

       < > Parallel port support  --->

 

File systems//視情況刪除

 

Kernel hacking//全刪

 

Security options//全不選

 

Cryptographic API//密碼編譯演算法,視情況刪除

 

 

 

參考:友善手冊, 以及http://blog.csdn.net/cgq081616/archive/2010/03/13/5376102.aspx

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.