Boot kernel using bootm in U-boot

Source: Internet
Author: User

 

U-boot uses the following labels:
Http://www.hhcn.com/cgi-bin/topic.cgi? Forum = 3 & topic = 651 & show = 0
On the keety Daxia patch generation u-boot-1.1.3 this time someone asked me u-boot kernel startup problem, remember the last U-boot Source Code mentioned in the go solution, however, U-boot has a better solution: bootm
It took a lot of time to view the posts on the Forum, and found the solution from this post:
Http://www.linuxforum.net/forum/showflat.php? Cat = & board = embedded & number = 555494 & page = 11 & view = collapsed & SB = 7 & O = 0 & fpart = now you can use bootm to boot the kernel, the possible methods are not necessarily the best, but at least they are available. The solution is as follows: 1. First, use the U-boot/tools/mkimage tool to add the file header required for the U-boot to your kernel. The procedure is as follows:
[Root @ localhost tftpboot] # mkimage-A arm-O Linux-T kernel-C none-A 0x30000-E 0x30008000-D zimage. img
Image Name:
Created: Fri Jan 12 17:14:50 2007
Image Type: ARM Linux kernel image (uncompressed)
Data size: 1262504 bytes = 1232.91 kb = 1.20 MB
Load address: 0x00030000
Entry Point: 0x30008000 the meaning of the parameter is explained here:
-A ==> set architecture to 'arch'
-O => Set Operating System to 'OS'
-T => set image type to 'type'
-C ==> set compression type 'comp'
-A ==> Set Load address to 'addr '(HEX)
-E => set entry point to 'EP' (HEX)
-N => set image name to 'name'
-D => Use Image Data from 'datafile'
-X ==> set xip (execute in place)
Note:
-A is followed by the loading address, that is, the storage address of your kernel in Flash (according to my understanding)
-E is followed by the run address. If you run the kernel in SDRAM, it is generally 0x300080002. Download the kernel
U-boot 1.1.3 (Jan 12 2007-16:16:36) U-Boot Code: 33f80000-> 33f9bac0 BSS:-> 33f9fbac
Ram Configuration:
Bank #0: 30000000 64 MB
Nor FLASH: 512 KB
Nand flash: 64 MB
In: Serial
Out: Serial
Err: Serial
Hit any key to stop autoboot: 0
Sbc2410 => TFTP 0x30008000 zimage. img
TFTP from server 192.168.1.115; our IP address is 192.168.1.128
Filename 'zimage. IMG '.
Load address: 0x30008000
Loading: ######################################## #########################
######################################## #########################
######################################## #########################
######################################## ############
Done
Bytes transferred = 1262568 (1343e8 HEX) sbc2410 => NAND erase 30000 1d0000
Nand erase: device 0 offset 196608, size 1900544... oksbc2410 => NAND write 30008000 30000 1d0000
Nand write: device 0 offset 196608, size 1900544... 1900544 bytes written: ok3. Finally, set the parameters required for Kernel startup:
Sbc2410 => setenv bootargs noinitrd root =/dev/mtdblock/3 console = ttysac0
Sbc2410 => bootcmd = NAND read 0x30008000 0x30000 0x1d0000; bootm 0x30008000
Sbc2410 => saveenv
Saving environment to Nand...
Erasing Nand... writing to Nand... done4. Reset again. The startup information is as follows:
U-boot 1.1.3 (Jan 12 2007-16:16:36) U-Boot Code: 33f80000-> 33f9bac0 BSS:-> 33f9fbac
Ram Configuration:
Bank #0: 30000000 64 MB
Nor FLASH: 512 KB
Nand flash: 64 MB
In: Serial
Out: Serial
Err: Serial
Hit any key to stop autoboot: 0 NAND read: device 0 offset 196608, size 1900544... 1900544 bytes read: OK
# Booting image at 30008000...
Image Name:
Image Type: ARM Linux kernel image (uncompressed)
Data size: 1262504 bytes = 1.2 MB
Load address: 00030000
Entry Point: 30008000
Verifying checksum... OK
Okstarting kernel... uncompressing Linux ...................................... ....................... linux version 2.6.14 (root@localhost.localdomain) (GCC version 3.4.1) #2 Fri ja7cpu: arm920tid (WB) [41129200] Revision 0 (armv4t)
MACHINE: smdk2410
Memory Policy: ECC disabled, data cache writeback
CPU S3C2410A (ID 0x32410002)
S3C2410: Core 202.800 MHz, memory 101.400 MHz, peripheral 50.700 MHz
S3C2410 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
Kernel command line: noinitrd root =/dev/mtdblock/3 console = ttysac0
IRQ: Clearing subpending status 00000002
PID hash table entries: 512 (Order: 9, 8192 bytes)
Timer tcon = 00500000, tcnt a509, tcfg 00000200,00000000, USEC 20171e4c
Console: Color dummy device 80x30
Dentry cache hash table entries: 16384 (Order: 4, 65536 bytes)
Inode-Cache hash table entries: 8192 (Order: 3, 32768 bytes)
Memory: 64 MB = 64 MB total
Memory: 62208kb available (1925 K code, 529 K data, 108 K init)
Mount-Cache hash table entries: 512
CPU: Testing write buffer coherency: OK
Softlockup Thread 0 started up.
Net: Registered protocol family 16
USB control, (c) 2006 sbc2410
S3C2410: initialising Architecture
SCSI subsystem initialized
Usbcore: registered new driver usbfs
Usbcore: registered new driver Hub
S3C2410 DMA driver, (c) 2003-2004 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
Netwinder floating point emulator v0.97 (Double Precision)
Devfs: Richard Gooch (rgooch@atnf.csiro.au)
Devfs: devfs_debug: 0x0
Devfs: boot_options: 0x1
Yaffs Jan 11 2007 23:38:14 installing.
S3c2410-lcd s3c2410-lcd: no platform data for LCD, cannot attach
S3c2410-lcd: Probe of s3c2410-lcd failed with error-22
Console: switching to color frame buffer device 80x25
Fb0: Virtual Frame Buffer Device, using 1024 K of video memory
S3c2410_serial0 at mmio 0x50000000 (IRQ = 70) is a S3C2410
S3c2410_serial1 at mmio 0x50004000 (IRQ = 73) is a S3C2410
S3c2410_serial at mmio 0x50008000 (IRQ = 76) is a S3C2410
Io scheduler Noop registered
Io scheduler anticipatory registered
Io scheduler deadline registered
Io scheduler CFQ registered
Ramdisk driver initialized: 16 RAM disks of 4096 K size 1024 blocksize
Usbcore: registered new driver UB
Cirrus Logic cs8900a driver for Linux (modified for smdk2410)
Eth0: cs8900a rev E at 0xe0000300 IRQ = 53, no EEPROM, ADDR: 08: 0: 3E: 26: 0a: 5b
S3c24xx NAND driver, (c) 2004 simtec Electronics
S3c2410-nand: mapped registers at c4980000
S3c2410-nand: Timing: tacls 10ns, twrph0 30ns, twrph1 10ns
Nand device: Manufacturer ID: 0xec, chip ID: 0x76 (Samsung NAND 64mib, 3 V 8-bi) scanning device for Bad blocks
Bad eraseblock 1884 at 0x01d70000
Creating 4 MTD partitions on "NAND 64mib, 3 V 8-bit ":
0x00000000-0x00020000: "Vivi"
0x00020000-0x00030000: "Param"
0x00030000-0x00200000: "kernel"
0x00200000-0x04000000: "root"
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
Hub 1-. 0: USB hub found
Hub 1-0: 1. 0: 2 ports Detected
Initializing USB Mass Storage driver...
Usbcore: registered new driver USB-storage
USB Mass Storage support registered.
Mice: PS/2 mouse device common for all mice
TS: Compaq touchscreen protocol output
S3C2410 touchscreen successfully loaded
Uda1341 audio driver initialized
Net: Registered protocol family 2
IP Route cache hash table entries: 1024 (Order: 0, 4096 bytes)
TCP established hash table entries: 4096 (Order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (Order: 2, 16384 bytes)
TCP: Hash Tables configured (established 4096 bind 4096)
TCP Reno registered
TCP Bic registered
Net4: Unix domain sockets 1.0/SMP for Linux net4.0.
Net: Registered protocol family 1
................................ As you can see, the kernel has been running, and we are done!

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.