使用自制bootloader(移植uboot的usb的dnw功能)
移植kernel3.4.2 紧能够正常启动,还没有移植驱动
静态编译busybox1.20.2制作ramdisk
通过bootloader1(16k)初始化ram并加载bootloader2(50多K)---->通过bootloader2的dnw加载 kernel和ramdisk:
const char cmd[] = "initrd=0x24000000,0xa00000 root=/dev/ram0 console=ttySAC0 init=/linuxrc";
Will go BL2
CPU: S5PV210@1000MHz(OK)
APLL = 1000MHz, HclkMsys = 200MHz, PclkMsys = 100MHz
MPLL = 669MHz, EPLL = 80MHz
HclkDsys = 167MHz, PclkDsys = 83MHz
HclkPsys = 133MHz, PclkPsys = 66MHz
SCLKA2M = 200MHz
BL2 BOOT COMPLETED
Printf enter to enter shell mode
SMDKV210 #dnw 0x20008000OTG cable Connected!
Download address 0x20008000
Now, Waiting for DNW to transmit data
Download Done!! Download Address: 0x20008000, Download Filesize:0x2b3124:size:2764k:2m
Checksum is being calculated...
Checksum O.K.
SMDKV210 #dnw 0x24000000OTG cable Connected!
Download address 0x24000000
Now, Waiting for DNW to transmit data
Download Done!! Download Address: 0x24000000, Download Filesize:0x800000:size:8192k:8m
Checksum is being calculated.........
Checksum O.K.
SMDKV210 #bootmloading linux from 0x400000 to 0x20008000...
boot linux ...
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Linux version 3.4.2 (root@lj) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #4 PREEMPT Sun Feb 24 01:52:51 CST 2013
[ 0.000000] CPU: ARMv7 Processor [412fc082] revision 2 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: SMDKV210
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] CPU S5PV210/S5PC110 (id 0x43110220)
[ 0.000000] S3C24XX Clocks, Copyright 2004 Simtec Electronics
[ 0.000000] S5PV210: PLL settings, A=1000000000, M=669000000, E=80000000 V=108000000
[ 0.000000] S5PV210: ARMCLK=1000000000, HCLKM=200000000, HCLKD=167250000
[ 0.000000] HCLKP=133800000, PCLKM=100000000, PCLKD=83625000, PCLKP=66900000
[ 0.000000] sclk_dmc: source is sclk_a2m (0), rate is 200000000
[ 0.000000] sclk_onenand: source is hclk_dsys (1), rate is 83625000
[ 0.000000] sclk_fimc: source is ext_xtal (0), rate is 24000000
[ 0.000000] sclk_fimc: source is ext_xtal (0), rate is 24000000
[ 0.000000] sclk_fimc: source is ext_xtal (0), rate is 24000000
[ 0.000000] sclk_cam0: source is ext_xtal (0), rate is 24000000
[ 0.000000] sclk_cam1: source is ext_xtal (0), rate is 24000000
[ 0.000000] sclk_fimd: source is ext_xtal (0), rate is 24000000
[ 0.000000] sclk_mfc: source is sclk_a2m (0), rate is 200000000
[ 0.000000] sclk_g2d: source is sclk_a2m (0), rate is 200000000
[ 0.000000] sclk_g3d: source is sclk_a2m (0), rate is 200000000
[ 0.000000] sclk_csis: source is ext_xtal (0), rate is 24000000
[ 0.000000] sclk_pwi: source is ext_xtal (0), rate is 24000000
[ 0.000000] sclk_pwm: source is ext_xtal (0), rate is 24000000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
[ 0.000000] Kernel command line: console=ttySAC0 root=/dev/ram initrd=0x24000000,0x00800000,ramdisk_size=4096 rw
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 512MB = 512MB total
[ 0.000000] Memory: 508520k/508520k available, 15768k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xa0800000 - 0xff000000 (1512 MB)
[ 0.000000] lowmem : 0x80000000 - 0xa0000000 ( 512 MB)
[ 0.000000] modules : 0x7f000000 - 0x80000000 ( 16 MB)
[ 0.000000] .text : 0x80008000 - 0x802740f0 (2481 kB)
[ 0.000000] .init : 0x80275000 - 0x80291000 ( 112 kB)
[ 0.000000] .data : 0x80292000 - 0x802bb100 ( 165 kB)
[ 0.000000] .bss : 0x802bb124 - 0x802eb15c ( 193 kB)
[ 0.000000] SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:208
[ 0.000000] VIC @f6000000: id 0x00041192, vendor 0x41
[ 0.000000] VIC @f6010000: id 0x00041192, vendor 0x41
[ 0.000000] VIC @f6020000: id 0x00041192, vendor 0x41
[ 0.000000] VIC @f6030000: id 0x00041192, vendor 0x41
[ 0.000000] sched_clock: 32 bits at 33MHz, resolution 29ns, wraps every 128399ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.000083] Calibrating delay loop... 997.78 BogoMIPS (lpj=2494464)
[ 0.060003] pid_max: default: 32768 minimum: 301
[ 0.060110] Mount-cache hash table entries: 512
[ 0.060530] CPU: Testing write buffer coherency: ok
[ 0.060716] Setting up static identity map for 0x201dca28 - 0x201dca80
[ 0.062246] gpiochip_add: registered GPIOs 0 to 7 on device: GPA0
[ 0.062258] gpiochip_add: registered GPIOs 9 to 12 on device: GPA1
[ 0.062268] gpiochip_add: registered GPIOs 14 to 21 on device: GPB
[ 0.062277] gpiochip_add: registered GPIOs 23 to 27 on device: GPC0
[ 0.062286] gpiochip_add: registered GPIOs 29 to 33 on device: GPC1
[ 0.062295] gpiochip_add: registered GPIOs 35 to 38 on device: GPD0
[ 0.062304] gpiochip_add: registered GPIOs 40 to 45 on device: GPD1
[ 0.062313] gpiochip_add: registered GPIOs 47 to 54 on device: GPE0
[ 0.062322] gpiochip_add: registered GPIOs 56 to 60 on device: GPE1
[ 0.062331] gpiochip_add: registered GPIOs 62 to 69 on device: GPF0
[ 0.062340] gpiochip_add: registered GPIOs 71 to 78 on device: GPF1
[ 0.062349] gpiochip_add: registered GPIOs 80 to 87 on device: GPF2
[ 0.062358] gpiochip_add: registered GPIOs 89 to 94 on device: GPF3
[ 0.062367] gpiochip_add: registered GPIOs 96 to 102 on device: GPG0
[ 0.062376] gpiochip_add: registered GPIOs 104 to 110 on device: GPG1
[ 0.062385] gpiochip_add: registered GPIOs 112 to 118 on device: GPG2
[ 0.062394] gpiochip_add: registered GPIOs 120 to 126 on device: GPG3
[ 0.062404] gpiochip_add: registered GPIOs 164 to 170 on device: GPI
[ 0.062413] gpiochip_add: registered GPIOs 172 to 179 on device: GPJ0
[ 0.062422] gpiochip_add: registered GPIOs 181 to 186 on device: GPJ1
[ 0.062431] gpiochip_add: registered GPIOs 188 to 195 on device: GPJ2
[ 0.062440] gpiochip_add: registered GPIOs 197 to 204 on device: GPJ3
[ 0.062450] gpiochip_add: registered GPIOs 206 to 210 on device: GPJ4
[ 0.062459] gpiochip_add: registered GPIOs 212 to 219 on device: MP01
[ 0.062468] gpiochip_add: registered GPIOs 221 to 224 on device: MP02
[ 0.062477] gpiochip_add: registered GPIOs 226 to 233 on device: MP03
[ 0.062486] gpiochip_add: registered GPIOs 235 to 242 on device: MP04
[ 0.062495] gpiochip_add: registered GPIOs 244 to 251 on device: MP05
[ 0.062504] gpiochip_add: registered GPIOs 128 to 135 on device: GPH0
[ 0.062513] gpiochip_add: registered GPIOs 137 to 144 on device: GPH1
[ 0.062523] gpiochip_add: registered GPIOs 146 to 153 on device: GPH2
[ 0.062531] gpiochip_add: registered GPIOs 155 to 162 on device: GPH3
[ 0.063083] S3C Power Management, Copyright 2004 Simtec Electronics
[ 0.066742] S5PV210: Initializing architecture
[ 0.072362] bio: create slab <bio-0> at 0
[ 0.073094] SCSI subsystem initialized
[ 0.073612] Switching to clocksource s5p_clocksource_timer
[ 0.083037] Trying to unpack rootfs image as initramfs...
[ 0.083227] rootfs image is not initramfs (junk in compressed archive); looks like an initrd
[ 0.112961] Freeing initrd memory: 8192K
[ 0.122879] ROMFS MTD (C) 2007 Red Hat, Inc.
[ 0.123087] io scheduler noop registered
[ 0.123096] io scheduler deadline registered
[ 0.123305] io scheduler cfq registered (default)
[ 0.123313] start plist test
[ 0.127179] end plist test
[ 0.130852] dma-pl330 dma-pl330.0: Loaded driver for PL330 DMAC-267056
[ 0.130866] dma-pl330 dma-pl330.0: DBUFF-8x4bytes Num_Chans-8 Num_Peri-32 Num_Events-32
[ 0.135200] dma-pl330 dma-pl330.1: Loaded driver for PL330 DMAC-267056
[ 0.135214] dma-pl330 dma-pl330.1: DBUFF-8x4bytes Num_Chans-8 Num_Peri-32 Num_Events-32
[ 0.195382] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 0.196359] s5pv210-uart.0: ttySAC0 at MMIO 0xe2900000 (irq = 74) is a S3C6400/10
[ 0.810230] console [ttySAC0] enabled
[ 0.813918] s5pv210-uart.1: ttySAC1 at MMIO 0xe2900400 (irq = 75) is a S3C6400/10
[ 0.821366] s5pv210-uart.2: ttySAC2 at MMIO 0xe2900800 (irq = 76) is a S3C6400/10
[ 0.828838] s5pv210-uart.3: ttySAC3 at MMIO 0xe2900c00 (irq = 77) is a S3C6400/10
[ 0.841953] brd: module loaded
[ 0.845071] loop: module loaded
[ 0.846306] mousedev: PS/2 mouse device common for all mice
[ 0.847899] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 2
[ 0.856458] RAMDISK: ext2 filesystem found at block 0
[ 0.860570] RAMDISK: Loading 8192KiB [1 disk] into ram disk... done.
[ 1.010192] EXT3-fs (ram0): using internal journal
[ 1.010259] EXT3-fs (ram0): recovery complete
[ 1.010299] EXT3-fs (ram0): mounted filesystem with ordered data mode
[ 1.010395] VFS: Mounted root (ext3 filesystem) on device 1:0.
[ 1.010619] Freeing init memory: 112K
[ 1.013687] kjournald starting. Commit interval 5 seconds
Processing /etc/profile... Done
/ # ls
bin etc linuxrc proc tmp var
dev lib lost+found sbin usr
稍后将完善驱动