Combined with the online and the book's explanation, recorded the Linux kernel and YAFFS2 file system transplant process and the question, in order to inquire later!
Partly transferred from: http://blog.sina.com.cn/s/blog_9d7f02120101gvnk.html
One, kernel porting
Modifying the crystal oscillator
arch/arm/mach-s3c2440/mach-smdk2440.c
static void __init smdk2440_map_io (void)
{
s3c24xx_init_io (Smdk2440_iodesc, Array_size (SMDK2440_IODESC));
s3c24xx_init_clocks (12000000 );
S3c24xx_init_uarts (Smdk2440_uartcfgs, Array_size (SMDK2440_UARTCFGS));
}
3. Modify the MTD partition:
Modify File/arch/arm/plat-s3c24xx/common-smdk.c
static struct Mtd_partition smdk_default_nand_part[] = {
[0] = {
. Name = "Kernel",
. Offset = 0,
. Size = sz_2m,
},
[1] = {
. Name = "JFFS2",
. offset = Mtdpart_ofs_append,
. Size = sz_8m,
},
[2] = {
. Name = "YAFFS2",
. offset = Mtdpart_ofs_append,
. Size = Mtdpart_siz_full,
}
};
(Note: This step is to modify the MTD partition, the changes are different from the book and the original text, mainly due to the late use of the YAFFS2 file system)
Then modify S3c2410_platform_nand_smdk_nand_info Smdk_nand_info = {
...
. Tacls = 0,
. Twrph0 = 30,
. twrph1=0,
(Note: This step is not described in the book, unknown and specific purposes, guessing the timing of the NAND flash operation)
4, to the kernel to hit YAFFS2 patch
CD YAFFS2
./patch-ker.sh c/linux-2.6.22.6
6. Kernel configuration:
Enter the kernel directory,
(cp/arch/arm/configs/s3c2410_defconfig. config This step is not necessary if the next step can be performed)
Make S3c2410_defconfig (note here is different from the book, mainly does not exist Smdk2410_defconfig)
Make Menuconfig
(The specific configuration is not clear use, so can be configured on the reference book)
7, making uimage
make uimage
8. Burn Write uimage
jz2440 comes with
This article is from the "Essays in the Literary Sword Minor" blog, please make sure to keep this source http://wenjianboy.blog.51cto.com/7389753/1622682
About the porting of Linux kernel and file systems in jz2440