當前位置:編程學習大全網 - 源碼下載 - 如何配置編譯在mini2440開發板上運行的linux內核

如何配置編譯在mini2440開發板上運行的linux內核

參考:/os/html/201409/9334.html

系統ubuntu12.04(非虛擬機下)

mini2440

CPU型號: S3C2440AL-40

Nanflash型號:K9F1G08

Norflash型號:SST39VF1601

LCD: 統寶 240 x 320

$: 普通賬戶

#:root賬戶

*當shell下輸入路徑時可使用tab鍵自動補全

(壹)建立交叉編譯環境

1.將mini2440光盤中的linux文件夾拷貝到 /home/lianghuiyong 並改名為Linux_share

(其中兩個文檔為我後面添加進去的)

2.Ctrl+Alt+T打開shell

3.$ su - root (切換root權限)

4.# cd /home/lianghuiyong/Linux_share

5.解壓安裝arm-linux-gcc編輯器

# tar xvzf arm-linux-gcc-4.4.3.tar.gz –C / //註意:C後面有個空格

執行該命令,將把 arm-linux-gcc 安裝到/usr/loca/arm/4.4.3 目錄。這句來自mini2440用戶手冊,我發現其實是安裝到 /opt/FriendlyARM/toolchain/4.4.3 目錄

6.# vim /root/.bashrc

7.在最後壹行添加:export PATH=$PATH:/opt/FriendlyARM/toolschain/4.4.3/bin //opt/FriendlyARM/toolschain/4.4.3/bin 為arm-linux-gcc 環境變量

:wq保存退出。

# source ~/.bashrc

8.# sudo gedit /etc/environment

games後面添加標記部分

9.# arm-linux-gcc -v //gcc後面有空格

測試hello.c(這是在安裝了第二部分的linux示例程序才有examples/hello目錄)

# cd /opt/FriendlyARM/mini2440/examples/hello

# arm-linux-gcc -o hello hello.c

# ./hello

(二)安裝源代碼及其他工具

創建工作目錄(以下都為root環境下):

# mkdir -p /opt/FriendlyARM/mini2440

1>>解壓安裝linux內核源代碼

# cd /opt/FriendlyARM/mini2440

# tar xvzf /home/lianghuiyong/Linux_share/linux-2.6.32.2-mini2440-20100106.tar.gz

2>>解壓安裝嵌入式圖形系統qtopia源代碼

# cd /opt/FriendlyARM/mini2440

# tar xvzf /home/lianghuiyong/Linux_share/x86-qtopia.tgz

# tar xvzf /home/lianghuiyong/Linux_share/arm-qtopia.tgz

3>>解壓安裝嵌入式圖形系統 QtE-4.6.1 源代碼

# cd /opt/FriendlyARM/mini2440

# tar xvzf /home/lianghuiyong/Linux_share/arm-qte-4.6.3-20100802.tar.gz

4>>解壓安裝busybox 源代碼

# cd /opt/FriendlyARM/mini2440

# tar xvzf /home/lianghuiyong/Linux_share/busybox-1.13.3-mini2440.tgz

5>>解壓安裝 Linux 示例程序

# cd /opt/FriendlyARM/mini2440

# tar xvzf /home/lianghuiyong/Linux_share/examples-20100108.tgz

6>>解壓安裝 vboot 源代碼

# cd /opt/FriendlyARM/mini2440

# tar xvzf /home/lianghuiyong/Linux_share/vboot-src-20100106.tar.gz

7>>解壓安裝 bootloader 源代碼

# cd /opt/FriendlyARM/mini2440

# tar xvzf /home/lianghuiyong/Linux_share/bootloader.tgz

8>>解壓創建目標文件系統

# cd /opt/FriendlyARM/mini2440

#tar xvzf /home/lianghuiyong/Linux_share/rootfs_qtopia_qt4-20100816.tar.gz

9>>解壓安裝目標文件系統映象制作工具 mkyaffs2image

# cd /opt/FriendlyARM/mini2440

# tar xvzf /home/lianghuiyong/Linux_share/mkyaffs2image.tgz –C /

10>>解壓安裝LogoMaker

# cd /opt/FriendlyARM/mini2440

# tar xvzf /home/lianghuiyong/Linux_share/logomaker.tgz –C /

(三)定制linux內核及制作文件系統

config_mini2440_x35 – 適用於 Sony 3.5” LCD 的內核配置文件

config_mini2440_t35 – 適用於統寶 3.5” LCD 的內核配置文件

config_mini2440_l80 – 適用於 Sharp 8” LCD(或兼容)的內核配置文件

config_mini2440_n35 – 適用於 NEC3.5” LCD 的內核配置文件

config_mini2440_h43 – 適用於 4.3” LCD 的內核配置文件

config_mini2440_a70 – 適用於群創 7” LCD 的內核配置文件

config_mini2440_vga1024x768 – 適用於 VGA 顯示輸出(分辨率 1024x768)模塊的內核

配置文件

1.配置缺省文件config_t35 (統寶240x320)

# cd /opt/FriendlyARM/mini2440/linux-2.6.32.2

# cp config_mini2440_t35 .config

# make menuconfig

出現界面

不做更改,exit退出。這樣做是為了生成相應配置(統寶240x320)的頭文件。

2.編譯內核

在/opt/FriendlyARM/mini2440/linux-2.6.32.2 目錄下編譯內核

#make zImage

編譯結束後,會在 arch/arm/boot 目錄下生成 linux 內核映象文件:zImage(zImage 可下載到開發板測試)

3.定制linux內核(根據用戶手冊來走壹遍)

# cd /opt/FriendlyARM/mini2440/linux-2.6.32.2

# make menuconfig

出現配置選項:

3.1配置cpu

主菜單-->System --> Type S3C2400 Machines --> FriendlyARM Mini2440 development board

3.2配置lcd驅動

主菜單-->Device Drivers-->Graphics support-->Support for frame buffer devices-->Backlight-->LCD select-->3.5 inch 240x320 Toppoly LCD

3.3配置觸摸屏

主菜單-->Device Drivers-->Input device support-->Touchscreens-->Samsung s3c24410 touchscreen input driver

3.4配置usb鼠標和鍵盤

主菜單-->Device Drivers-->hid devices-->USB Human interface Device

3.5 配置優盤

主菜單-->Device Drivers-->SCSI device support--> SCSI disk

3.6配置萬能驅動USB攝像頭

主菜單-->Device Drivers-->Multimedia devices-->Video capture adapters -->V4L USB devices-->GSPCA based webcams-->ALi USB m 5602 Camera Driver

3.7 配置CMOS攝像頭驅動

主菜單-->Device Drivers-->Multimedia devices-->Video capture adapters-->OV9650 on the s3c2440 driver

3.8配置網卡驅動

主菜單-->Netwoking support-->Networking options -->選擇Unix和TCP/IP

主菜單-->Device Drivers-->Network device support-->Ethernet (10 or 100Mbit)-->

選擇 <*> Generic Media Independent Interface device support

<*> DM9000 support

3.9 配置USB無線網卡驅動

主菜單-->Netwoking support-->wireless-->IEEE 802.11

主菜單-->Device Drivers-->Netwoking device support-->wireless LAN-->Wireless LAN(IEEE 802.11)-->Ralink driver support-->

3.10 配置音頻驅動

主菜單-->Device Drivers-->Sound card supprt-->OSS Mixer API -->ALSA for Soc audio support-->SoC Audio for the samsung S3Cxxxx Chips

3.11 配置SD/MMC卡驅動

主菜單-->Device Drivers-->MMC/SD/SDIO card-->samsung S3C SD/MMC card

3.12 配置看門狗驅動支持

主菜單-->Device Drivers-->Watchdog Timer-->s3c2440 Watchdog

3.13 配置LED驅動

主菜單-->Device Drivers-->Character devices-->LED support for Mini2440

3.14 配置按鍵驅動

主菜單-->Device Drivers-->Character devices-->Buttons driver

3.15 配置PWM控制蜂鳴器驅動

主菜單-->Device Drivers-->Character devices-->buzzer driver for

3.16 配置AD轉換驅動

主菜單-->Device Drivers-->Character devices-->ADC driver for

3.17 配置串口驅動

主菜單-->Device Drivers-->Character devices-->Serial drivers-->samsung S3C2440/S3C2442

3.18 如何配置RTC實時時鐘驅動

主菜單-->Device Drivers-->Real Time Clock-->samsung S3C series SoC RTC

3.19 配置I2C-EEPROM驅動支持

主菜單-->Device Drivers-->I2C support -->I2C Hardware Bus support-->S3C2410 I2C Driver

3.20 配置yaff2s文件系統的支持

主菜單-->Device Drivers-->MTD-->NAND Device Support -->NAND FLASH Support

主菜單-->File systems-->Miscellaneous filesystems -->YAFFS2 file system support

3.21 配置EXT2/VFAT/ NFS等文件系統

主菜單-->File systems-->Network File Systems -->root file system on NFS

為了支持FAT32 文件系統.

主菜單-->File systems-->DOS/FAT/NT Filesystems -->VFAT (windows-95) fs support

關於mini2440 linux內核裁剪到此為止,退出後有壹個是否保存提示,選擇保存!

3.22 制作Linux logo

本來想使用Logomaker,結果生成的圖片都是無數據的,這可能和系統內壹些參數有關

使用命令方式制作logo:

在圖片(open_show.png)目錄下

# pngtopnm open_show.png > temp.ppm

# ppmquant 224 temp.ppm >temp2.ppm

# pnmnoraw temp2.ppm > logo.ppm

將目錄下生成的logo.ppm改成linux_logo_clut224.ppm,替代linux2.6.32.2/drivers/video/logo 目錄下的同名文件

  • 上一篇:三國誌12新增戰法效果詳解
  • 下一篇:如何高效玩轉***表達網絡分析
  • copyright 2024編程學習大全網