日本黄色一级经典视频|伊人久久精品视频|亚洲黄色色周成人视频九九九|av免费网址黄色小短片|黄色Av无码亚洲成年人|亚洲1区2区3区无码|真人黄片免费观看|无码一级小说欧美日免费三级|日韩中文字幕91在线看|精品久久久无码中文字幕边打电话

當(dāng)前位置:首頁 > 單片機 > 單片機
[導(dǎo)讀]一.下載核心以及相應(yīng)補?。篖inux核心:linux-2.4.18.tar.bz2補?。簆atch-2.4.18-rmk7.gzpatch-2.4.18-rmk7-swl8.gzpatch-2.4.18-rmk7-swl8-cy2.gzpatch-2.4.18-rmk7-swl8-cy2-lc3.gz二. 解壓縮: # tar xzvf linux

一.下載核心以及相應(yīng)補?。?/p>

Linux核心:linux-2.4.18.tar.bz2

補丁:

patch-2.4.18-rmk7.gz

patch-2.4.18-rmk7-swl8.gz

patch-2.4.18-rmk7-swl8-cy2.gz

patch-2.4.18-rmk7-swl8-cy2-lc3.gz

二. 解壓縮:

# tar xzvf linux-2.4.18.tar.gz
# gunzip patch-2.4.18-rmk7.gz
# gunzip patch-2.4.18-rmk7-swl8.gz
# gunzip patch-2.4.18-rmk7-swl8-cy2.gz
# gunzip patch-2.4.18-rmk7-swl8-cy2-lc3.gz

三. 打補丁:

# cd linux-2.4.18
# patch -p1 < .. patch-2.4.18-rmk7
# patch -p1 < .. patch-2.4.18-rmk7-swl8
# patch -p1 < .. patch-2.4.18-rmk7-swl8-cy2
# patch -p1 < .. patch-2.4.18-rmk7-swl8-cy2-lc3

四. 修改相關(guān)代碼:

(1)修改主目錄的Makefile

vi linux/Makefiel

a.指定目標(biāo)平臺為ARM:


#ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
ARCH := arm



   b.指定交叉編譯器:
CROSS_COMPILE = /usr/local/arm/2.95.3/bin/arm-linux-

(我的交叉編譯工具放在/usr/local/arm文件夾下)

(2)修改arch目錄中的文件
  Linux的arch目錄存放硬件相關(guān)的內(nèi)核代碼,因此,在Linux內(nèi)核中增加對S3C2410的支持,最主要就是要修改arch目錄中的文件。

在arch/arm/Makefile文件中加入:

ifeq ($(CONFIG_ARCH_S3C2410),y)
TEXTADDR = 0xC0008000
MACHINE = s3c2410
Endif

(3) 在arch/arm/boot/Makefile文件中加入:

ifeq ($(CONFIG_ARCH_S3C2410),y)
ZTEXTADDR = 0x30008000
ZRELADDR = 0x30008000
endif

(4) 修改arch/arm/mm/mm-armv.c文件(arch/arm/mm/目錄中的文件完成與ARM相關(guān)的MMU處理):

修改:

init_maps->bufferable = 0;

為:

init_maps->bufferable = 1;

五.編譯內(nèi)核:

make menuconfig

一定要選上 :FILE_SYSTEM

CONFIG_DEVFS_FS=y

修改啟動命令行:

CONFIG_CMDLINE="root=/dev/mtdblock2 init=/linuxrc console=ttyS0,115200 devfs=mount load_ramdisk=0"

Make dep

Make zImage

運行結(jié)果:(成功)

Uncompressing Linux..................................................... done, booting the kernel.

Linux version 2.4.18-rmk7-swl8 (root@localhost.localdomain) (gcc version 2.95.3 20010315 (release)) #1 三 9月 6 15:05:59 CST 2006

CPU: SAMSUNG S3C2410(Arm920T)sid(wb) revision 0

Machine: CyberLab LN2410

On node 0 totalpages: 16384

zone(0): 16384 pages.

zone(1): 0 pages.

zone(2): 0 pages.

Kernel command line: root=/dev/mtdblock2 load_ramdisk=0 init=/linuxrc console=ttyS0 mem=64M devfs=mount

Console: colour dummy device 80x30

Calibrating delay loop... 96.05 BogoMIPS

Memory: 64MB = 64MB total

Memory: 62668KB available (1402K code, 328K data, 68K init)

Dentry-cache hash table entries: 8192 (order: 4, 65536 bytes)

Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)

Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)

Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)

Page-cache hash table entries: 16384 (order: 4, 65536 bytes)

POSIX conformance testing by UNIFIX

Linux NET4.0 for Linux 2.4

Based upon Swansea University Computer Society NET3.039

Initializing RT netlink socket

Starting kswapd

devfs: v1.10 (20020120) Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x1

JFFS version 1.0, (C) 1999, 2000 Axis Communications AB

JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.

l3 S3C2410 Adapter Initialized

ttyS00 at MEM 0xe0000000 (irq = 52) is a S3C2410

ttyS01 at MEM 0xe0004000 (irq = 55) is a S3C2410

screen_cpu:c480e000 ,screen_dma:33f01000

Console: switching to colour frame buffer device 80x30

Installed LN2410X TFT 16bpp frame buffer

by redizi, CyberLab 2003

pty: 256 Unix98 ptys configured

Loading S3C2410 Touch Screen Driver

Installing S3C2410 RTC

S3C Real Time Clock driver v1.00

block: 128 slots per queue, batch=32

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

eth0: incorrect signature 0x4000

cs89x0: no cs8900 or cs8920 detected. Be sure to disable PnP with SETUP

loop: loaded (max 8 devices)

S3C2410 UDA1341 / IIS initialized

NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung K9D1208V0M)

Creating 5 MTD partitions on "Samsung K9D1208V0M":

0x00000000-0x00030000 : "boot"

0x00030000-0x00200000 : "kernel"

0x00200000-0x02000000 : "rootfs"

0x02000000-0x03000000 : "ext-fs1"

0x03000000-0x04000000 : "ext-fs2"

usb.c: registered new driver hub

usb-ohci.c: USB OHCI at membase 0xd9000000, IRQ 26

usb.c: new USB bus registered, assigned bus number 1

hub.c: USB hub found

hub.c: 2 ports detected

mice: PS/2 mouse device common for all mice

NET4: Linux TCP/IP 1.0 for NET4.0

IP Protocols: ICMP, UDP, TCP

IP: routing cache hash table of 512 buckets, 4Kbytes

TCP: Hash tables configured (established 4096 bind 4096)

NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.

NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com

VFS: Mounted root (cramfs filesystem).

Mounted devfs on /dev

Freeing init memory: 68K

console=/dev/console

init started: BusyBox v0.60.3 (2002.05.13-08:36+0000) multi-call binary

Starting pid 16, console /dev/console: '/etc/init.d/rcS'

exec: /usr/etc/rc.local: No such file or directory

Waiting for enter to start '/bin/sh' (pid 19, terminal /dev/console)

Please press Enter to activate this console.

Starting pid 19, console /dev/console: '/bin/sh'

BusyBox v0.60.3 (2002.05.13-08:36+0000) Built-in shell (ash)

Enter 'help' for a list of built-in commands.

# ls

bin etc linuette mnt qt tmp var

dev lib linuxrc proc sbin usr

#


本站聲明: 本文章由作者或相關(guān)機構(gòu)授權(quán)發(fā)布,目的在于傳遞更多信息,并不代表本站贊同其觀點,本站亦不保證或承諾內(nèi)容真實性等。需要轉(zhuǎn)載請聯(lián)系該專欄作者,如若文章內(nèi)容侵犯您的權(quán)益,請及時聯(lián)系本站刪除( 郵箱:macysun@21ic.com )。
換一批
延伸閱讀
關(guān)閉