The entire process from Linux2.4.18 core to s3c2410

Source: Internet
Author: User
Linux 2.4.18 general technology-Linux programming and kernel information-the entire process of porting the core to s3c2410-the following is a detailed description. 1. Download the core and corresponding patches:

Linux core: linux-2.4.18.tar.bz2

Patch:

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



Ii. Decompression:

# 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



Iii. Patching:

# 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



4. Modify the relevant code:

(1) modify the Makefile of the main directory

Vi linux/Makefiel

A. Specify the target platform as 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. Specify the cross compiler:
CROSS_COMPILE =/usr/local/arm/2.95.3/bin/arm-linux-

(Put my cross-compilation tool in the/usr/local/arm folder)



(2) modify files in the arch directory
Linux's arch directory stores hardware-related kernel code. Therefore, we need to increase the support for S3C2410 in the Linux kernel, mainly to modify the files in the arch directory.

Add the following to the arch/arm/Makefile file:

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



(3) add the following to the arch/arm/boot/Makefile file:

Ifeq ($ (CONFIG_ARCH_S3C2410), y)
ZTEXTADDR = 0x30008000
ZRELADDR = 0x30008000
Endif



(4) modify the arch/arm/mm/mm-armv.c file (files in the arch/arm/mm/directory to complete ARM-related MMU processing ):

Modify:

Init_maps-> bufferable = 0;

Is:

Init_maps-> bufferable = 1;



5. Compile the kernel:

Make menuconfig

Be sure to select: FILE_SYSTEM

CONFIG_DEVFS_FS = y

Modify the startup command line:

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



Make dep

Make zImage



Running result: (successful)

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

Linux version 2.4.18-rmk7-swl8 (root@localhost.localdomain) (gcc version 2.95.3 20010315 (release) #1 Three September 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 = 64 M devfs = mount

Console: color dummy device 80x30

Calibrating delay loop... 96.05 BogoMIPS

Memory: 64 MB = 64 MB total

Memory: 62668KB available (1402 K code, 328 K data, 68 K 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 uniix

Linux NET4.0 in 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,200 0 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 color 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 4096 K 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"

0x0300109-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, 4 Kbytes

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: 68 K

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/ss'

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-+ 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

#

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.