利用busybox, extlinux 在工控机CompactFlash(CF卡)上构建Linux系统(下)

< 工控机 (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

 

你可能感兴趣的:(利用busybox, extlinux 在工控机CompactFlash(CF卡)上构建Linux系统(下))