Linux Kernel transplantation to generate uimage image file reference

Source: Internet
Author: User

1. First modify the top-level makefile as follows:

Arch? = $ (Subarch)

Cross_compile? =

Changed:

Arch? = Arm

Cross_compile? = Arm-Linux-

2. Run make s3c2410_defconfig.

3. Make uimage: it takes four minutes to compile the kernel for the first time. The following message appears at the end:


Ld arch/ARM/boot/compressed/vmlinux
Objcopy ARCH/ARM/boot/zimage
Kernel: ARCH/ARM/boot/zimage is ready
Uimage ARCH/ARM/boot/uimage
"Mkimage" command not found-u-boot images will not be built
Image ARCH/ARM/boot/uimage is ready

4. cd arch/ARM/boot/

No uimage is found under this directory, so zimage is baked under/var/lib/tftpboot.

Then run the command below u-boot to burn it into the board.

5. perform the following operations under U-boot:

Openjtag> TFTP 0x32000000 zimage
Dm9000 I/O: 0x28000300, ID: 0x90000a46
Dm9000: Running in 16 Bit mode
Mac: 08: 00: 3E: 26: 0a: 5b
TFTP from server 172.22.136.38; our IP address is 172.22.136.55
Filename 'zimage '.
Load address: 0x32000000
Loading: Checksum bad
T ####################################### ##########################
######################################## #########################
######################################## #########################
######################################## #########################
####################################
Done
Bytes transferred= 1511056 (170e90 HEX)
Openjtag> bootm 0x32000000
# Booting image at 32000000...
6. We can see from the above that there is no kernel information, so we will return to the PC to compile the kernel to check where the problem is?

See this line: "mkimage" command not found-u-boot images will not be built

The mkimage command is missing.

7. I checked some information on the Internet and found the mkimage file under the tool/of the compiled u-boot-1.1.6,

Bake it to the Cross-compiled path/work/tools/gcc-3.4.5-glibc-2.3.6/bin

8. re-enter the top layer and then compile the kernel. The following information is generated successfully:

Objcopy ARCH/ARM/boot/Image
Kernel: ARCH/ARM/boot/image is ready
As ARCH/ARM/boot/compressed/head. o
Gzip ARCH/ARM/boot/compressed/piggy.gz
As ARCH/ARM/boot/compressed/piggy. o
Cc arch/ARM/boot/compressed/Misc. o
Ld arch/ARM/boot/compressed/vmlinux
Objcopy ARCH/ARM/boot/zimage
Kernel: ARCH/ARM/boot/zimage is ready
Uimage ARCH/ARM/boot/uimage
Image name: Linux-2.6.22.6
Created: Sun Dec 6 22:33:55 2009
Image Type: ARM Linux kernel image (uncompressed)
Data size: 1511064 bytes = 1475.65 kb = 1.44 MB
Load address: 0x30008000
Entry Point: 0x30008000
Image ARCH/ARM/boot/uimage is ready

9. In ARCH/ARM/boot

This time we can see the uimage file, but it is not an executable file. Now we can change the permission.

Chmod 777
Uimage

The colors change to green ....


10. perform the following operations under U-boot:

Enter your selection: Q
Openjtag> TFTP 0x32000000 uimage
Dm9000 I/O: 0x28000300, ID: 0x90000a46
Dm9000: Running in 16 Bit mode
Mac: 08: 00: 3E: 26: 0a: 5b
TFTP from server 172.22.136.38; our IP address is 172.22.136.55
Filename 'uimage '.
Load address: 0x32000000
Loading: Checksum bad
Checksum bad
T ####################################### ##########################
######################################## #########################
######################################## #########################
######################################## #########################
####################################
Done
Bytes transferred= 1511128 (170ed8 HEX)
Openjtag> bootm 0x32000000
# Booting image at 32000000...
Image name: Linux-2.6.22.6
Created: 2009-12-06 14:33:55 UTC
Image Type: ARM Linux kernel image (uncompressed)
Data size: 1511064 bytes = 1.4 MB
Load address: 30008000
Entry Point: 30008000
Verifying checksum... OK
OK

Starting kernel...

Uncompressing Linux ...................................... ........................................ ..................... done, booting the kernel.
Linux version 2.6.22.6 (root @ huanghuang-desktop) (GCC version 3.4.5) #1 Sun Dec 6 22:33:51 CST 2009
CPU: ARM920T [41129200] Revision 0 (armv4t), Cr = c0007177
MACHINE: smdk2410
Memory Policy: ECC disabled, data cache writeback
CPU S3C2410A (ID 0x32410002)
S3C2410: Core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3c24xx clocks, (c) 2004 simtec Electronics
Clock: slow mode (1.500 MHz), fast, mpll on, upll on
Cpu0: D vivt write-back Cache
Cpu0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Cpu0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists. Total pages: 16256
Kernel command line: noinitrd root =/dev/mtdblock3 init =/linuxrc console = ttysac0
IRQ: Clearing subpending status 00000002
PID hash table entries: 256 (Order: 8, 1024 bytes)
Timer tcon = 00500000, tcnt a2c1, tcfg 00000200,00000000, USEC 20171eb8
Console: Color dummy device 80x30
Dentry cache hash table entries: 8192 (Order: 3, 32768 bytes)
Inode-Cache hash table entries: 4096 (Order: 2, 16384 bytes)
Memory: 64 MB = 64 MB total
Memory: 61696kb available (2788 K code, 313 K data, 132 k init)
Mount-Cache hash table entries: 512
CPU: Testing write buffer coherency: OK
Net: Registered protocol family 16
S3C2410 power management, (c) 2004 simtec Electronics
S3C2410: initialising Architecture
S3c24xx DMA driver, (c) 2003-simtec Electronics
DMA channel 0 at c4800000, IRQ 33
DMA Channel 1 at c4800040, IRQ 34
DMA Channel 2 at c4800080, IRQ 35
DMA Channel 3 at c48000c0, IRQ 36
Usbcore: registered new interface driver usbfs
Usbcore: registered new interface driver Hub
Usbcore: registered new device driver USB
Net: Registered protocol family 2
IP Route cache hash table entries: 1024 (Order: 0, 4096 bytes)
TCP established hash table entries: 2048 (Order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash Tables configured (established 2048 bind 2048)
TCP Reno registered
Netwinder floating point emulator v0.97 (Double Precision)
Jffs2 Version 2.2. (NAND) 2001-2006 Red Hat, Inc.
Io scheduler Noop registered
Io scheduler anticipatory registered (default)
Io scheduler deadline registered
Io scheduler CFQ registered
S3c2410-lcd s3c2410-lcd: no platform data for LCD, cannot attach
S3c2410-lcd: Probe of s3c2410-lcd failed with error-22
LP: driver loaded but no devices found
Ppdev: User-space parallel port driver
S3C2410 watchdog timer, (c) 2004 simtec Electronics
Serial: 8250/16550 driver $ revision: 1.90 $4 ports, IRQ sharing enabled
S3c2410-uart.0: s3c2410_serial0 at mmio 0x50000000 (IRQ = 70) is a S3C2410
S3c2410-uart.1: s3c2410_serial1 at mmio 0x50004000 (IRQ = 73) is a S3C2410
S3c2410-uart.2: maid at mmio 0x50008000 (IRQ = 76) is a S3C2410
Ramdisk driver initialized: 16 RAM disks of 4096 K size 1024 blocksize
Loop: module loaded
Dm9000 Ethernet driver
Uniform multi-platform E-IDE driver revision: 7.00alpha2
IDE: Assuming 50 MHz system bus speed for Pio modes; override with idebus = xx
Bast nor-Flash Driver, (c) 2004 simtec Electronics
S3c24xx NAND driver, (c) 2004 simtec Electronics
S3c2410-nand s3c2410-nand: tacls = 3, 30ns twrph0 = 7 70ns, twrph1 = 3 30ns
Nand device: Manufacturer ID: 0xec, chip ID: 0x76 (Samsung NAND 64mib, 3 V 8-bit)
Scanning Device for Bad blocks
Creating 8 MTD partitions on "NAND 64mib, 3 V 8-bit ":
0x00000000-0x00004000: "Boot agent"
0x00000000-0x00200000: "S3C2410 flash partition 1"
0x00400000-0x00800000: "S3C2410 flash partition 2"
0x00800000-0x00a00000: "S3C2410 flash partition 3"
0x00a00000-0x00e00000: "S3C2410 flash partition 4"
0x00e00000-0x01800000: "S3C2410 flash partition 5"
0x01800000-0x03000000: "S3C2410 flash partition 6"
0x0300109-0x04000000: "S3C2410 flash partition 7"
Usbmon: debugfs is not available
S3c2410-ohci s3c2410-ohci: s3c24xx OHCI
S3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
S3c2410-ohci s3c2410-ohci: IRQ 42, Io mem 0x49000000
USB usb1: configuration #1 chosen from 1 choice
Hub 1-. 0: USB hub found
Hub 1-0: 1. 0: 2 ports Detected
Mice: PS/2 mouse device common for all mice
S3c24xx RTC, (c) maid Electronics
S3c2410-i2c s3c2410-i2c: slave address 0x10
S3c2410-i2c s3c2410-i2c: Bus frequency set to 390 kHz
S3c2410-i2c s3c2410-i2c: i2c-0: s3c I2C Adapter
TCP cubic registered
Net: Registered protocol family 1
Drivers/RTC/hctosys. C: Unable to open RTC device (rtc0)
List of all partitions:
1f00 16 mtdblock0 (driver ?)
1f01 2048 mtdblock1 (driver ?)
1f02 4096 mtdblock2 (driver ?)
1f03 2048 mtdblock3 (driver ?)
1f04 4096 mtdblock4 (driver ?)
1f05 10240 mtdblock5 (driver ?)
1f06 24576 mtdblock6 (driver ?)
1f07 16384 mtdblock7 (driver ?)
No filesystem cocould Mount root, tried: ext3 ext2 cramfs msdos vfat romfs
Kernel panic-not syncing: VFS: Unable to mount root FS on unknown-block (31,3)
You can see the kernel startup information from above.

11. Kernel
Panic-not syncing: VFS: Unable to mount root FS on unknown-block (31,3)

This line of information is because we have not modified the MTD partition and added support for the yaffs file system.

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.