Linux Startup information comments (user_mode)

Source: Internet
Author: User

UClinux is started in two phases:

Part 1 bootloader startup phase

Part 2 Linux kernel initialization and startup

Section 1: start_kernel

Section 2: Start In user_mode and end in start_kernel

Section 3: After loading the Linux kernel, transfer it to the cpu_idle Process

S3C2410 startup information comment

Linux net4.0 in Linux 2.4
Based upon Swansea University Computer Society net3.039

Net3.039, TCP/IP protocol stack of the University of Wales and the University of swangxi.

This information appears during Linux Startup.
Initializing RT netlink socket
BlueZ Core ver 2.4 Copyright (C) 2000,2001 Qualcomm Inc
Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
CPU clock = 202.800000 Mhz, HCLK = 101.400000 Mhz, PCLK = 50.700000 Mhz

Socket initialization, socket_init (), Netlink a router Management Protocol (linux-2.4.22/NET/CORE/rtnetlink. C, routing netlink socket interface: Protocol Independent part. RT indicates the route. This output is a debugging output when create generates the socket Socket socket of rtnetlink .)

This information appears during Linux Startup.


Initializing S3C2410 buffer pool for DMA workaround

Initialize memory pool


Starting kswapd

Start the kswapd switch daemon and kpiod the process I/O operation routine.

Kswapd can be used with kpiod. A process sometimes has nothing to do. When it runs, it does not need to put all its code and data in the memory. This means that we can switch the content not used by the running program to the swap partition to better utilize the memory. Kswapd wakes up and checks the memory every one second. If you want to read data from the hard disk or the memory space is insufficient, kpiod will be called to perform the Import/remove operation. Kswapd is responsible for checking and kpiod is responsible for moving.

Devfs: v1.10 (20020120) Richard Gooch (rgooch@atnf.csiro.au)
Devfs: boot_options: 0x1

The output information of the devfs module. Devfs, version 1.12c


Samsung S3C2410X (I2C) Algorithm Module version 2.6.1 (20010830)
Iic_s3c2410_init: Samsung S3C2410X IIC adapter module version 2.6.1 (20010830)
I2c-dev.o: Registered 'samsung S3C2410X IIC adapter 'as minor 0
S3c2410_init: initialized IIC On S3C2410X, 386 kHz clock
Iic_s3c2410_init: initialized IIC-bus at 0xf4000000.

I2C



TTS/% D0 at I/O 0x50000000 (IRQ = 52) is a S3C2410
TTS/% D1 at I/O 0x50004000 (IRQ = 55) is a S3C2410
TTS/% D2 at I/O 0x50008000 (IRQ = 58) is a S3C2410

Console: switching to color frame buffer device 80x60
Installed S3C2410 Frame Buffer

Framebuffer


Pty: 256 unix98 ptys configured

The output information of the Pty module, which is related to console operations. Unix98 ptys will be used through the devpts file system. (pseudo-TTYs (TELNET etc) device is the abbreviation of pseudo TTYs device.
  • ① Tty (/dev/tty) is an old abbreviation of teletype. It provides device drivers for different consoles for user input. The name is derived from a terminal actually connected to a UNIX system called teletype. In Linux, these files provide support for virtual consoles and can be accessed by pressing the <Alt-F1> to <alt-F6> key. These virtual consoles provide independent local login conversations at the same time
  • ② TTYs (/dev/TTYs) is a serial interface of a computer terminal. /Dev/ttys0 corresponds to COM1 under the MS-DOS.

Use the make Dev script makedev to create a Pty file. In this way, the system kernel supports the unix98 Pty style. The/dev/Pty device will be used for telnet login. Pty is a pseudo-terminal device. It must be used for remote login and other terminals, but is not required for applications on real terminals, such as telnet or xterm. Linux 2.2 and later added the unix98-style Pty device, which uses a new file system (devpts for the Pseudo Terminal File System) and a cloned device cloning device to implement its functions.

linux-2.4.22/drivers/char/Pty.c
, Indevfs_mk_dir (NULL, "pts", NULL);
The above information is output.

The s3c44b0-kbd initialized.
The s3c2410-ts initialized.
The s3c2410-adc initialized.
S3C2410 real time clock driver v0.1

S3C2410 keyboard, AD converter, real-time clock Initialization


Block: 128 slots per queue, batch = 32
Uniform multi-platform E-IDE driver revision: 6.31
IDE: Assuming 50 MHz system bus speed for Pio modes; override with idebus = xxne. C: v1.10 9/23/94 Donald Becker (becker@scyld.com)
Last modified Nov 1, 2000 by Paul gortmaker


IDE block Device Driver



Eth0: ne2000 found at 0xd1000200, using IRQ 2.
PPP Generic Driver version 2.4.1

NIC driver with the base address:

0xd1000200, interrupt No.: 2



SCSI subsystem driver revision: 1.00
Request_module [scsi_hostadapter]: Root FS not mounted

USB device information, which is processed as SCSI.



Uda1341 audio driver initialized

Sound Card drive



Nand device: manufacture ID: 0xec, chip ID: 0x76 (Samsung k9d1208v0m)
Find a MTD partition from bonfs-> nandflash0 (bon4)
Creating 1 MTD partitions on "Samsung k9d1208v0m ":
0x00430000-0x03f30000: "nandflash0 (bon4 )"

Devfs_mk_dir (bon): using old entry in Dir: c03650a0 ""
Bon0: 00000000-00020000 (00020000) 00000000
Bon1: 00020000-00030000 (00010000) 00000000
Bon2: 00030000-00130000 (00100000) 00000000
Bon3: 00130000-00430000 (00300000) 00000000
Bon4: 00430000-03f30000 (03b00000) 00000001
Bon5: 03f30000-03ffc000 (000cc000) 00000000


Nand Device

Flash provides buffer writing commands to speed up block operations on flash. It is slow to erase and write data in flash. If you use the buffer write command, it will be faster. According to the manual, it will be 20 times faster. Buffer size: the buffer of 5 bytes does not exist in every block. It means that the entire flash has only one buffer of 5 bytes. Use the write buffer command to write all the blocks, the same buffer is used. Writing a buffer is mainly used to check whether the buffer is available. In fact, the buffer acts as a buffer to improve work efficiency.

For example, a flash has 128 kb. Users are allowed to perform byte programming and write buffer byte programming for any block. The programming time per byte is 210 μs. If the write buffer byte programming method is adopted, the 32-byte programming requires a total of 218 μs, the programming time per byte is only 6.8 μs. The block erasure time of the chip is 1 s, which allows reading by suspension interruption while programming or block erasure. After the read operation is complete, write the suspension restoration command, continue programming or block erasure.

This is an important part of the information and requires special attention. For the flash mapped in the memory, create three MTD partitions: the content on the flash will be mapped to the corresponding address in the memory.
The first 128k is bootloader ---> 0x00000000-0x00020000
The next 128k is the location where the system configuration information config is stored ---> 0x00020000-0x00040000
The following 16 m-2x128 K is the storage space of romfs. ---> 0x00040000-0x0000000
The above content can be obtained based on the previous conversion formula.
A> the size of the compiled bootloader is about 50 kb. B> here, we know that the configuration information config is in the 2nd partition;

C> the size of romfs, usually about 8 m or 10 m, so it can be put down;

UClinux kernel block Device Driver
For linux root file systems, there are currently three types of drivers available:

A) blkmem driver
B) MTD driver
C) RAM disk driver

The blkmem driver is a block Device Driver specially developed for uClinux. It is the oldest and most common block Device Driver in uClinux. The principle is relatively simple but the configuration is complicated. You need to modify the code based on the usage of the flash partition. Of course, the modification result is that it can perform read and write operations on some nor Flash files. However, there are not many supported flash types. It takes a lot of work to support a new type of flash.

The MTD driver of Linux is the Flash Driver of standard Linux. It supports a large number of devices and has enough functions to define flash partitions and perform address ing. With MTD, you can use different types of flash in a system. It can combine different Flash files into a linear address for you to use. In the standard Linux 2.4 kernel, MTD has a series of options that you can choose and customize based on your system needs.

Another option is the RAM disk driver. On a PC, it is often used to start a Linux system without a hard disk. It has no direct relationship with flash. However, when flash starts a compressed kernel. RAM disk can be used as the root file system. The MTD Driver provides powerful support for flash, through which you can even run a real file system that can read and write on flash, such as jffs2. While the blkmem driver is far behind


USB. C: registered new driver usbdevfs
USB. C: registered new driver Hub
Usb-ohci.c: usb ohci at membase 0xe9000000, IRQ 26
USB. C: new USB bus registered, assigned bus number 1
Hub. C: USB hub found

Port #1 suspened!
Port #0 alived!
Hub. C: 1 port Detected
Initializing USB Mass Storage driver...
USB. C: registered new driver USB-storage
USB Mass Storage support registered.


USB Information


Net4: Linux TCP/IP 1.0 for net4.0

The output information when inet_init [linux-2.4.22/NET/IPv4/af_inet.c] is called by socket. C during startup.


IP protocols: ICMP, UDP, TCP, IGMP

List the supported IP protocols. Here, the output of the kernel source code inet_add_protocol (p. The output of this sentence is displayed during Linux Startup.



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

The output information of the IP routing code.

ip_rt_init [ linux-2.4.22/net/ipv4\Route.c ]
, Set the IP module and route buffer hash table

TCP: Hash Tables configured (established 4096 bind 4096)

TCP initialization output information.
tcp_init [ linux-2.4.22/net/ipv4/Tcp.c ]



Net4: Unix domain sockets 1.0/SMP for Linux net4.0.

UNIX network protocol information.

af_unix_init[ linux-2.4.22/net/unix/Af_unix.c ]
One of multiple connections (IPv4, Unix domain sockets, IPv6, and IrDA). SMP symmetric multi-processor-wide rical multi processing, which mainly refers to some UNIX network protocols.

The above network output information appears in the Linux Startup information.


Netwinder floating point emulator v0.95 (c) 1998-1999 rebel.com


VFS: mounted root (cramfs filesystem ).

The output information of the Virtual File System VFS (Virtual filesystem switch.

Emphasize the next concept again. VFS is a software mechanism. It can also be called a Linux File System Administrator. It is used to manage mount points of the actual file system to support multiple file systems. Kernel first creates a VFS directory tree in the memory, which is a data object in the memory, then mounts the rootfs File System under it, and can mount other types of file systems to a subdirectory.


Mounted devfs on/dev

Load the devfs device management File System to the dev Installation Point. /dev
Is a directory that we often use. It is used only in the 2.4 kernel. At each startup, the kernel will automatically mount devfs.

Devfs provides a namespace for accessing the kernel device. It does not create or change device nodes. devfs only maintains your special file system. Generally, we can manually create a device node for mknod. The/dev directory is initially empty. The specific files in the directory are created when the system is started or when the driver is loaded after the module is loaded. When the module and driver are uninstalled, the file disappears.


Freeing init memory: 68 K

Releases the memory occupied by user process init on the first day.


Yaffs: Dev is 7937 name is "1f: 01"
Mount: mounting ramfs on/root failed: no such file or directory

VFS




Cramfs is a small file system developed by Linus Torvalds for embedded systems. Because it is read-only, although it adopts zlib for compression, it can still achieve efficient random reading. Cramfs does not affect the speed at which the system reads files. It is also a highly compressed file system.

After creating an image file, we also need to consider how to mount the image file to become an available file system when the system is running. Because the image file is not a block device in the general sense, we must use the loopback device to complete this task, for example:
mount -o loop -t cramfs /usr.img /usr

In this way, you can mount the cramfs image file USR. IMG to the/usr directory through the loopback device. The loopback device must be supported in the kernel. The compression efficiency of cramfs is generally nearly 50%. Cramfs saves space by optimizing the size of the index node table and eliminating the space waste between files in traditional file systems. It also uses zlib compression to achieve a compression ratio better than 2 to 1. The system overhead of the decompression process is not very high, because cramfs supports the extraction of a single block without the need to decompress the entire file. Cramfs not only saves space, but also avoids the trouble of waiting for fsck or manual fsck caused by abnormal shutdown. It achieves this goal in read-only mode.





Busybox v1.00 (2005.01.20-+ 0000) built-in Shell (Ash)


Busybox



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


Help



Runing/etc/profile OK
[/Mnt/yaffs]

OK

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.