Transplant kernel 2.6.16 to at91rm9200 -- Linux general technology-Linux programming and kernel information. The following is a detailed description. 1. Download and install
Download the kernel for Linux2.6.16 from www.kernel.org and unzip it to/usr/src/arm/linux-2.6.16
Download the rm9200 patch from the http://maxim.org.za/AT91RM9200/2.6/, file name: 2.6.16-at91.patch.gz, copy to/usr/src/arm/linux-2.6.16, and then execute zcat 2.6.16-at91.patch.gz | patch-p1 on the command line interface
From http://www.aleph1.co.uk/cgi-bin/... fs2.tar.gz? View = tar download YAFFS2 patch yaffs2.tar.gz unzip to the file directory run sh patch-ker.sh ../linux-2.6.16 add YAFF2 to the kernel;
Download GCC compiler, file name: arm-linux-gcc-3.4.1.tar.bz2, unzip to/usr/local/arm/3.4.1
2. Modify
Open the Makefile in the root directory of the original kernel code and find the following two lines:
ARCH? = $ (SUBARCH)
CROSS_COMPILE? =
To:
ARCH? = Arm
CROSS_COMPILE? =/Usr/local/arm/3.4.1/bin/arm-linux-
3. Compile the kernel
Run the following command:
Make at91rm9200dk_defconfig
Make xconfig
Make
The above are the basic procedures for porting. The first steps are as follows:
1), change it when making xconfig
Boot_option
ZBOOT_BASE_ADDRESS 0X21000000
ZBOOT_ROM_BSS 0X21100000
Otherwise, the row cannot be moved.
Others can be compiled according to the configuration of at91rm9200dk.
2) Add a devfs file system.
Vi fs/Kconfig
Find menu "Pseudo filesystems"
Add the following statement:
Config DEVFS_FS
Bool "/dev file system support (OBSOLETE )"
Default y
Config DEVFS_MOUNT
Bool "Automatically mount at boot"
Default y
Depends on DEVFS_FS
Save and exit. After compilation and download, you can see it in filesystems under the/proc directory on the Development Board.
[Root @ AT91RM9200DK/proc] $ cat filesystems
Nodev sysfs
Nodev rootfs
Nodev bdev
Nodev proc
Nodev sockfs
Nodev pipefs
Nodev futexfs
Nodev tmpfs
Nodev inotifyfs
Nodev eventpollfs
Nodev devpts
Ext2
Cramfs
Nodev ramfs
Nodev devfs
Nodev jffs2
3), modify the separation table of NAND
In arch/mach-at91rm9200/board-dk
Change dk-nand-patition [] {
}
The following code shows the desired sharding method.
4). Modify the or sub-drive table.
In driver/mtd/maps/physmap. c
Add a sub-drive table and reference it to physmap_set_patition ().
5) Add a 9200 serial port driver
This is simpler
Modify arch/mach-at91rm9200/board-dk.c
. Nr_tty = 5,
. Tty_map = {4, 3, 2, 1, 0}
Change the two serial ports to five. The corresponding driver has detailed code under the relevant directory!
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