An error occurred while porting the uclinux2.6 kernel to B0! Help!

Source: Internet
Author: User
An error occurred while porting the uclinux2.6 kernel to B0! Help! -- Linux general technology-Linux programming and kernel information. The following is a detailed description. I use the kernel 2.6.14 and u-boot for loading. I will list the problems and my understanding during the porting of the uclinux2.6 kernel to b0x. During the porting process, I used a simple driver. After necessary modifications, the kernel is compiled and run properly, the following content appears:

Tarting kernel...
Linux version 2.6.14-hsc0 (root @ billcsong) (gcc version 2.95.3 20010315 (release) (ColdFire patches-20010318 from http://fiddes.net/coldfire/) (uClinux XIP and shared lib patches from http://www.snapgear.com /)) # 4tue Mar 27 10:48:52 CST 2007
CPU: [44b07700]
Machine: jx44b0x Development Board
Memory management: Non-Paged (unused/noMMU)
Built 1 zonelists
Kernel command line:
PID hash table entries: 64 (order: 6, 1024 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 8 MB = 8 MB total
Memory: 6676KB available (1212 K code, 117 K data, 72 K init)

Then the program stops here and there is no output. I can see that the output pasted by most netizens can at least be output to the warning that the root file system cannot be mounted, as shown in the following code:
......
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 8 MB = 8 MB total
Memory: 6512KB available (1386 K code, 125 K data, 52 K init)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Checking if image is initramfs... it isn' t (ungzip failed); looks like an initrd
NET: Registered protocol family 16
Init_module
Samsung 0.1 Rtl8019as driver version)
Init
Eth0: 12: 34: 56: 78: 90: AB
Get_stats
RAMDISK driver initialized: 16 RAM disks of 2048 K size 1024 blocksize
......

There are two reasons for this:
1. I used a simple serial port driver, and started the kernel init process and started to execute/bin/sh exactly where my program was stopped. At this time, I started to need the tty device driver for output, so my program stops. But I also thought that when the system could not find the tty device driver, the system would continue to restart rather than stop at that place. So I thought of the following reason.
2. The program has not run to the init process and run/bin/sh, because the root file system has not been successfully mounted and the init process and/bin/sh are not executed at all. If so, it means that I have not mastered how to mount the root file system. The method used to mount the root file system is as follows:
(1) Support for ram disk and intrd is set in Kernel configuration.
(2) Compile the generated romfs. the img image file uses mkimage-A arm-O linux-T ramdisk-C none-a 0x0c300000-d romfs. img romfs. the umg command is used to create a ramdisk image in u-boot format and burn it at 1c0000 in flash.
(3) Specify the bootargs environment variable as root =/dev/ram initrd = 0x0c300000 rw console = ttySAC0, 115200 mem = 8 M
(4) use bootm 40000 1c0000 to load the kernel and root file system.
Please advise me if there is a problem with this practice. What is the problem?
We hope you can give us some advice on the above two questions.

In addition, I want to transplant the tty device driver, but I cannot find the appropriate driver, and I am not able to write the driver myself. So if any friend has uart. h and serial_jx44b0.c, can you tell me and give me a (guodarui@163.com), very grateful!
Related Article

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.