上文 烧写/启动模式 提到使用 SD 卡启动。那么接下来看看怎么做。
一、首先备份
一开始购买的开发板是 Android 系统的,将拨码开关调到 SD 启动模式下。按POWER按钮,备份一份在 SecureCRT 下查看的启动信息。
U-Boot 1.3.4-dirty (May 21 2016 - 18:17:00) for x210
CPU: S5PV210@1000MHz(OK)
APLL = 1000MHz, HclkMsys = 200MHz, PclkMsys = 100MHz
MPLL = 667MHz, EPLL = 96MHz
HclkDsys = 166MHz, PclkDsys = 83MHz
HclkPsys = 133MHz, PclkPsys = 66MHz
SCLKA2M = 200MHz
Serial = CLKUART
Board: X210
DRAM: 512 MB
Flash: 8 MB
SD/MMC: 3776MB
*** Warning - using default environment
In: serial
Out: serial
Err: serial
[LEFT UP] boot mode
checking mode for fastboot ...
Hit any key to stop autoboot: 0
reading kernel.. 1073, 8192
MMC read: dev # 0, block # 1073, count 8192 ...8192 blocks read: OK
completed
reading RFS.. 9265, 6144
MMC read: dev # 0, block # 9265, count 6144 ...6144 blocks read: OK
completed
Boot with zImage
get_format
-------- 0 --------
Wrong Ramdisk Image Format
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Initializing cgroup subsys cpu
Linux version 3.0.8 (lqm@lqm) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #49 PREEMPT Tue Mar 22 19:35:49 CST 2016
CPU: ARMv7 Processor [412fc082] revision 2 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: X210
Ignoring unrecognised tag 0x41001099
Memory policy: ECC disabled, Data cache writeback
CPU S5PV210/S5PC110 (id 0x43110220)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S5PV210: PLL settings, A=1000000000, M=667000000, E=96000000 V=54000000
S5PV210: ARMCLK=1000000000, HCLKM=200000000, HCLKD=166750000
HCLKP=133400000, PCLKM=100000000, PCLKD=83375000, PCLKP=66700000
sclk_dmc: source is sclk_a2m (0), rate is 200000000
sclk_onenand: source is hclk_psys (0), rate is 66700000
uclk1: source is mout_mpll (6), rate is 66700000
uclk1: source is mout_mpll (6), rate is 66700000
uclk1: source is mout_mpll (6), rate is 66700000
uclk1: source is mout_mpll (6), rate is 66700000
sclk_mixer: source is sclk_dac (0), rate is 24000000
sclk_fimc: source is ext_xtal (0), rate is 24000000
sclk_fimc: source is ext_xtal (0), rate is 24000000
sclk_fimc: source is ext_xtal (0), rate is 24000000
sclk_cam0: source is xusbxti (1), rate is 12000000
sclk_cam1: source is ext_xtal (0), rate is 12000000
sclk_fimd: source is ext_xtal (0), rate is 24000000
sclk_mmc: source is mout_mpll (6), rate is 47642857
sclk_mmc: source is mout_epll (7), rate is 96000000
sclk_mmc: source is mout_mpll (6), rate is 47642857
sclk_mmc: source is mout_epll (7), rate is 96000000
sclk_mfc: source is sclk_a2m (0), rate is 200000000
sclk_g2d: source is sclk_a2m (0), rate is 200000000
sclk_g3d: source is sclk_a2m (0), rate is 100000000
sclk_csis: source is ext_xtal (0), rate is 24000000
sclk_spi: source is ext_xtal (0), rate is 24000000
sclk_spi: source is ext_xtal (0), rate is 24000000
sclk_pwi: source is ext_xtal (0), rate is 24000000
sclk_pwm: source is ext_xtal (0), rate is 24000000
s5p: 37748736 bytes system memory reserved for mfc at 0x3dc00000, 0-bank base(0x3dc00000)
s5p: 37748736 bytes system memory reserved for mfc at 0x4dbf5000, 1-bank base(0x4dbf5000)
s5p: 25165824 bytes system memory reserved for fimc0 at 0x4c3f5000, 1-bank base(0x4c3f5000)
s5p: 10137600 bytes system memory reserved for fimc1 at 0x4ba4a000, 1-bank base(0x4ba4a000)
s5p: 6291456 bytes system memory reserved for fimc2 at 0x4b44a000, 1-bank base(0x4b44a000)
s5p: 25165824 bytes system memory reserved for jpeg at 0x3c400000, 0-bank base(0x3c400000)
s5p: 12288000 bytes system memory reserved for fimd at 0x4a892000, 1-bank base(0x4a892000)
s5p: 1843200 bytes system memory reserved for pmem_gpu1 at 0x3c23e000, 0-bank base(0x3c23e000)
s5p: 8388608 bytes system memory reserved for g2d at 0x3ba3e000, 0-bank base(0x3ba3e000)
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 89819
Kernel command line: console=ttySAC2,115200
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 186MB 168MB 0MB = 354MB total
Memory: 350232k/511148k available, 13140k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xff000000 - 0xffe00000 ( 14 MB)
vmalloc : 0xe0800000 - 0xfd000000 ( 456 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.init : 0xc0008000 - 0xc0079000 ( 452 kB)
.text : 0xc0079000 - 0xc06cf6c0 (6490 kB)
.data : 0xc06d0000 - 0xc0719900 ( 295 kB)
.bss : 0xc0719924 - 0xc085a250 (1283 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:208
VIC @fd000000: id 0x00041192, vendor 0x41
VIC @fd010000: id 0x00041192, vendor 0x41
VIC @fd020000: id 0x00041192, vendor 0x41
VIC @fd030000: id 0x00041192, vendor 0x41
mult[140737]
max_delta_ns[2937815369]
min_delta_ns[30517]
rate[32768]
HZ[200]
Console: colour dummy device 80x30
Calibrating delay loop... 992.87 BogoMIPS (lpj=2482176)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys debug
Initializing cgroup subsys cpuacct
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
print_constraints: dummy:
NET: Registered protocol family 16
S3C Power Management, Copyright 2004 Simtec Electronics
pmstats at 00000000
pmem_start is 0x0
---pmem_start is 0x4a892000
Open OV2655 camema sensor
smdkc110_setup_clocks: sclk_mmc: source is mout_mpll, rate is 47642857
S5PV210: Initializing architecture
s3c-adc s5pv210-adc: attached adc driver
s3c24xx-pwm s3c24xx-pwm.0: tin at 66700000, tdiv at 66700000, tin=divclk, base 0
print_constraints: pd_tv_supply: 5000 mV normal
print_constraints: pd_lcd_supply: 5000 mV normal
print_constraints: pd_g3d_supply: 5000 mV normal
print_constraints: pd_mfc_supply: 5000 mV normal
print_constraints: pd_audio_supply: 5000 mV normal
print_constraints: pd_cam_supply: 5000 mV normal
bio: create slab <bio-0> at 0
print_constraints: B_PWR_5V: 5000 mV
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c.0: slave address 0x10
s3c-i2c s3c2440-i2c.0: bus frequency set to 43 KHz
s3c-i2c s3c2440-i2c.0: i2c-0: S3C I2C adapter
s3c-i2c s3c2440-i2c.1: slave address 0x10
s3c-i2c s3c2440-i2c.1: bus frequency set to 65 KHz
s3c-i2c s3c2440-i2c.1: i2c-1: S3C I2C adapter
s3c-i2c s3c2440-i2c.2: slave address 0x10
s3c-i2c s3c2440-i2c.2: bus frequency set to 65 KHz
machine_constraints_voltage: VALIVE_1.1V: failed to apply 1100000uV constraint
(NULL device *): regulator init failed
s3c-i2c s3c2440-i2c.2: i2c-2: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.24.
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource clock_source_systimer
Switched to NOHz mode on CPU #0
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 6, 327680 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
UDP hash table entries: 256 (order: 1, 12288 bytes)
UDP-Lite hash table entries: 256 (order: 1, 12288 bytes)
NET: Registered protocol family 1
PMU: registered new PMU device of type 0
input: s3c-button as /devices/virtual/input/input0
s3c button Initialized!!
Loaded driver for PL330 DMAC-0 s3c-pl330
DBUFF-64x8bytes Num_Chans-8 Num_Peri-2 Num_Events-32
Loaded driver for PL330 DMAC-1 s3c-pl330
DBUFF-8x4bytes Num_Chans-8 Num_Peri-32 Num_Events-32
Loaded driver for PL330 DMAC-2 s3c-pl330
DBUFF-8x4bytes Num_Chans-8 Num_Peri-32 Num_Events-32
ashmem: initialized
NTFS driver 2.1.30 [Flags: R/O].
ROMFS MTD (C) 2007 Red Hat, Inc.
yaffs: yaffs built Jan 18 2016 11:34:32 Installing.
msgmni has been set to 684
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
start plist test
end plist test
win->id=2, pmem_start=0x4af9a000
s3cfb s3cfb: [fb2] dma: 0x4af9a000, cpu: 0xe1000000, size: 0x004b0000
FIMD src sclk = 166750000
s3cfb s3cfb: registered successfully
Start display and show logo
s5pv210-uart.0: ttySAC0 at MMIO 0xe2900000 (irq = 16) is a S3C6400/10
s5pv210-uart.1: ttySAC1 at MMIO 0xe2900400 (irq = 20) is a S3C6400/10
s5pv210-uart.2: ttySAC2 at MMIO 0xe2900800 (irq = 24) is a S3C6400/10
console [ttySAC2] enabled
s5pv210-uart.3: ttySAC3 at MMIO 0xe2900c00 (irq = 28) is a S3C6400/10
x210 led driver
Initial GSensor Driver
input: gsensor as /devices/virtual/input/input1
gsensor's ID: 0x01
Found Gsensor hardware
i2c-core: driver [gsensor-iic] using legacy suspend method
i2c-core: driver [gsensor-iic] using legacy resume method
PA FB = 0x4AF9A000, bits per pixel = 32
screen width=1024 height=600 va=0xdaf9a000 pa=0x4af9a000
xres_virtual = 1024, yres_virtual = 1200, xoffset = 0, yoffset = 0
fb_size=4915200
Back frameBuffer[0].VAddr=db1f2000 PAddr=4b1f2000 size=2457600
brd: module loaded
loop: module loaded
S3C NAND Driver, (c) 2008 Samsung Electronics
Unknown NAND Device.
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
dm9000 Ethernet Driver, V1.31
eth0: dm9000b at e083c000,e083e004 IRQ 42 MAC: 00:09:c0:ff:ec:48 (platform data)
usbcore: registered new interface driver catc
catc: v2.8:CATC EL1210A NetMate USB Ethernet driver
usbcore: registered new interface driver kaweth
pegasus: v0.6.14 (2006/09/27), Pegasus/Pegasus II USB Ethernet driver
usbcore: registered new interface driver pegasus
rtl8150: v0.6.2 (2004/08/27):rtl8150 based usb-ethernet driver
usbcore: registered new interface driver rtl8150
usbcore: registered new interface driver asix
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver dm9601
usbcore: registered new interface driver smsc75xx
usbcore: registered new interface driver smsc95xx
usbcore: registered new interface driver net1080
usbcore: registered new interface driver cdc_subset
usbcore: registered new interface driver zaurus
cdc_ncm: 04-Aug-2011
usbcore: registered new interface driver cdc_ncm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
failed to find udc vcc source
Failed to power up USB
s5p-ehci s5p-ehci: S5P EHCI Host Controller
s5p-ehci s5p-ehci: new USB bus registered, assigned bus number 1
s5p-ehci s5p-ehci: irq 87, io mem 0xec200000
s5p-ehci s5p-ehci: USB 0.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
failed to find udc vcc source
Failed to power up USB
s5p-ohci s5p-ohci: EXYNOS OHCI Host Controller
s5p-ohci s5p-ohci: new USB bus registered, assigned bus number 2
s5p-ohci s5p-ohci: irq 87, io mem 0xec300000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
s3c-udc : S3C HS USB Device Controller Driver, (c) 2008-2009 Samsung Electronics
s3c-udc : version 15 March 2009 (DMA Mode)
android_usb gadget: Mass Storage Function, version: 2009/09/11
android_usb gadget: Number of LUNs=1
lun0: LUN: removable file: (no medium)
android_usb gadget: android_usb ready
failed to find udc vcc source
Failed to power up USB
Registered gadget driver 'android_usb'
mousedev: PS/2 mouse device common for all mice
cal_x_max=800,cal_y_max=480
samsung-ts s3c64xx-ts: driver attached, registering input device
input: s3c_ts as /devices/virtual/input/input2
==kzalloc success=
usb 1-1: new high speed USB device number 2 using s5p-ehci
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
=============gsl_load_fw end==============
[GSLX680] Enter gslX680_ts_init
input: gslX680 as /devices/platform/s3c2440-i2c.1/i2c-1/1-0040/input/input3
i2c-core: driver [gslX680] using legacy suspend method
i2c-core: driver [gslX680] using legacy resume method
==gsl_ts_init== ret=0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c64xx-rtc: rtc disabled, re-enabling
using rtc device, s3c, for alarms
s3c-rtc s3c64xx-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
lirc_dev: IR Remote Control driver registered, major 251
IR NEC protocol handler initialized
IR RC5(x) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR RC5 (streamzap) protocol handler initialized
IR LIRC bridge handler initialized
Linux video capture interface: v2.00
mfc_init: <6>S5PC110 MFC Driver, (c) 2009 Samsung Electronics
S3C JPEG Driver, (c) 2007 Samsung Electronics
JPEG driver for S5PV210
i2c i2c-1: attached s5p_ddc into i2c adapter successfully
S5PC11X HPD Driver, (c) 2010 Samsung Electronics
S5PC11X CEC Driver, (c) 2010 Samsung Electronics
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdhci s3c-sdhci.0: clock source 0: hsmmc (133400000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 2: sclk_mmc (47642857 Hz)
mmc0: no vmmc regulator found
mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA
s3c-sdhci s3c-sdhci.1: clock source 0: hsmmc (133400000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 2: sclk_mmc (96000000 Hz)
mmc1: no vmmc regulator found
mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA
s3c-sdhci s3c-sdhci.2: clock source 0: hsmmc (133400000 Hz)
s3c-sdhci s3c-sdhci.2: clock source 2: sclk_mmc (47642857 Hz)
mmc2: no vmmc regulator found
mmc2: SDHCI controller on samsung-hsmmc [s3c-sdhci.2] using ADMA
s3c-sdhci s3c-sdhci.3: clock source 0: hsmmc (133400000 Hz)
s3c-sdhci s3c-sdhci.3: clock source 2: sclk_mmc (96000000 Hz)
mmc3: no vmmc regulator found
mmc3: SDHCI controller on samsung-hsmmc [s3c-sdhci.3] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
logger: created 256K log 'log_main'
logger: created 256K log 'log_events'
logger: created 256K log 'log_radio'
logger: created 256K log 'log_system'
mmc0: new high speed MMC card at address 0001
mmcblk0: mmc0:0001 004GE0 3.68 GiB
mmcblk0boot0: mmc0:0001 004GE0 partition 1 2.00 MiB
mmcblk0boot1: mmc0:0001 004GE0 partition 2 2.00 MiB
Error: Driver 'samsung-audio' is already registered, aborting...
wm8978 probe
mmcblk0: p1 p2 p3 p4
mmcblk0boot1: unknown partition table
mmcblk0boot0: unknown partition table
mmc2: new high speed SDHC card at address 2151
mmcblk1: mmc2:2151 APPSD 7.61 GiB
mmcblk1: p1
asoc: wm8978_codec <-> samsung-i2s.0 mapping ok
asoc: wm8978_codec <-> samsung-i2s.0 mapping ok
ALSA device list:
#0: smdk
Netfilter messages via NETLINK v0.30.
NF_TPROXY: Transparent proxy support initialized, version 4.1.0
NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
lib80211: common routines for IEEE802.11 drivers
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 2
regulator_init_complete: pd_cam_supply: incomplete constraints, leaving on
regulator_init_complete: pd_mfc_supply: incomplete constraints, leaving on
regulator_init_complete: pd_tv_supply: incomplete constraints, leaving on
s3c-rtc s3c64xx-rtc: setting system clock to 2000-01-01 00:02:18 UTC (946684938)
FIMC0 registered successfully
FIMC1 registered successfully
FIMC2 registered successfully
S5PC1XX TVOUT Driver, (c) 2009 Samsung Electronics
s5p-tvout s5p-tvout: hpd status is cable removed
Warning: unable to open an initial console.
Freeing init memory: 452K
init (1): /proc/1/oom_adj is deprecated, please use /proc/1/oom_score_adj instead.
init: cannot open '/initlogo.rle'
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
EXT4-fs (mmcblk0p4): warning: checktime reached, running e2fsck is recommended
EXT4-fs (mmcblk0p4): 1 orphan inode deleted
EXT4-fs (mmcblk0p4): recovery complete
EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p3): warning: checktime reached, running e2fsck is recommended
EXT4-fs (mmcblk0p3): recovery complete
EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p1): VFS: Can't find ext4 filesystem
init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
android_usb: already disabled
adb_open
mtp_bind_config
adb_bind_config
android_work: did not send uevent (0 0 (null))
/ # PVR_K:(Warning): SysFinalise: Version string: SGX540 S5PC110 [543, drivers/gpu/pvr/s5pc110/sysconfig.c]
win->id=0, pmem_start=0x4a892000
s3cfb s3cfb: [fb0] dma: 0x4a892000, cpu: 0xe3000000, size: 0x00708000
s3cfb s3cfb: [fb1] dma: 0x47000000, cpu: 0xff800000, size: 0x004b0000
init: start ~~~~~~~~ bootanim
warning: `zygote' uses 32-bit capabilities (legacy support in use)
request_suspend_state: wakeup (3->0) at 22488732379 (2000-01-01 00:02:34.326583204 UTC)
dm9000 dm9000: eth0: link down
ADDRCONF(NETDEV_UP): eth0: link is not ready
init: start ~~~~~~~~ dhcpcd_eth0:-h android-dde77fb426e13260 eth0
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
dm9000 dm9000: eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
acc_open
acc_release
RTL871X: rtl8188eu driver version=v4.1.5_7309.20130425
RTL871X: build time: Jan 7 2014 11:30:45
usbcore: registered new interface driver rtl8188eu
init: start ~~~~~~~~ dhcpcd_eth0:-h android-dde77fb426e13260 eth0
RTL871X: +rtw_drv_halt
usbcore: deregistering interface driver rtl8188eu
RTL871X: -rtw_drv_halt
/ # ls
acct ext_sd sbin
cache init sdcard
config init.goldfish.rc sys
d init.rc system
data init.x210.rc ueventd.goldfish.rc
default.prop init.x210.usb.rc ueventd.rc
dev mnt ueventd.x210.rc
etc proc vendor
==========================================================================
U-Boot 1.3.4-dirty (May 21 2016 - 18:17:00) for x210
CPU: S5PV210@1000MHz(OK)
APLL = 1000MHz, HclkMsys = 200MHz, PclkMsys = 100MHz
MPLL = 667MHz, EPLL = 96MHz
HclkDsys = 166MHz, PclkDsys = 83MHz
HclkPsys = 133MHz, PclkPsys = 66MHz
SCLKA2M = 200MHz
Serial = CLKUART
Board: X210
DRAM: 512 MB
Flash: 8 MB
SD/MMC: 3776MB
*** Warning - using default environment
In: serial
Out: serial
Err: serial
[LEFT UP] boot mode
checking mode for fastboot ...
Hit any key to stop autoboot: 0
x210 # print
bootcmd=movi read kernel 30008000; movi read rootfs 30B00000 300000; bootm 30008000 30B00000
mtdpart=80000 400000 3000000
bootdelay=3
baudrate=115200
ethaddr=00:40:5c:26:0a:5b
ipaddr=192.168.1.88
serverip=192.168.1.102
gatewayip=192.168.0.1
netmask=255.255.0.0
Environment size: 261/16380 bytes
二、破坏iNand中的bootloader以从SD2启动
注意,如果此时将SD卡拔出,重新启动,开发板还是可以进入系统的。说明此时bootloader是从 iNand 启动的了。默认 CPU 会首先从 iNand 启动,如果 iNand 没有数据,才会从 SD2 启动。
但是你想象一下,刚买的未烧写程序的开发板。该如何烧写呢?为了演示所以我们需要先将 iNand 中的 bootloader 破坏掉。
破坏开发板 android 平台下的 bootloader,从 SD2 启动开发板
进入 android 系统控制台,执行如下指令:
busybox dd if=/dev/zero of=/dev/block/mmcblk0 bs=512 seek=1 count=1 conv=sync
为了确保执行数据有效,再执行 sync 同步一下,即可破坏掉前一个块的数据。
同理,如果是破坏开发板 linux 平台下的 bootloader,从 SD2 启动开发板
进入 linux 系统控制台,执行如下指令:
busybox dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=1 count=1 conv=sync
为了确保执行数据有效,再执行 sync 同步一下,即可破坏掉前一个块的数据。
三、分析
现在好了,开发板无法启动了... 再次上电出现错误 SD checksum Error
通过SD卡烧写,有两种方式:
第一种,在Windows下 使用 x210_Fusing_Tool.exe 烧写 uboot.bin
第二种,在Linux下 使用指令 sudo ./sd_fusing.sh /dev/sdb 烧写 uboot.bin
甭管那种把,先把 SD 格式化了再说。
四、Windows 下烧写
首先将第一种在Windows下烧写,使用工具 第一种 x210_Fusing_Tool.exe
将 SD 插入PC 格式化完后,打开 x210_Fusing_Tool.exe 软件。
确认一下 SD/MMC Drive 是不是你的SD卡可移动磁盘;Browse 选择你要烧写的 uboot.bin;点击 Add,在PATH下面会出现相应的地址,记得在其前面打对勾;点击 START 等待一会弹出如下窗口,则烧写 uboot.bin 完成。
五、Linux 下烧写
(1)首先是需要重新给 SD 分区
在Ubuntu下,插入SD卡,查看设备节点 cat /proc/partitions
使用 fdisk /dev/sdb 命令删除原来所有分区, sdb 为系统为 SD 卡分配的设备节点。
输入 d,表示删除分区,输入 w 表示保存已经修改的分区信息。至此,原/dev/sdb1 被删除。
拨掉 SD 卡,再插入 PC 机上,查询设备节点 cat /proc/partitions
注意必须拨掉后再插入,否则仍然会提示存在/dev/sdb1 节点,会造成出错。
然后使用 gparted 工具给 SD 卡预留 256M 空间,用于存放 uboot 映像。
Ubuntu上安装 gparted,使用指令 sudo apt-get install gparted 即可
使用方法:
输入 gparted /dev/sdb 进入如下界面。
点击 Partition->New
出现如下界面,在Free space preceding 处填写 256;File system 处选择 fat32;点击 Add
然后再点击对勾,即应用全部操作,然后根据提示点击,到此完成SD卡的分区。
(2)烧写 uboot
一开始如果你没有编译uboot的话,我先提供一个。
注意,这里面的 uboot.bin 有Linux和Android系统之分的。不能用Linux系统的uboot 烧写android的内核的,这一点要搞清楚的。
下载:sd_fusing.sh 脚本
然后执行 ./sd_fusing.sh /dev/sdb
到此 Linux下 烧写 uboot.bin 完成!
六、利用 fastboot 更新
将 SD 卡插入开发板,拨码开关选择 SD/MMC 启动模式,连接 USB OTG 口到 PC 机。
在 SecureCRT 连接成功。可以进入 uboot。
执行 fastboot 指令,弹出界面如下:
然后利用 fastboot 烧写,但是理想很很丰满,显示很骨感。
其中执行 fastboot指令时,出现一个问题:waiting for device
经查询是因为没有 fastboot 所需要的驱动 Android 1.0
更新驱动,驱动文件有提供的,所在位置是:
注意,最好该路径没有中文。我吃过这种亏。
但是又出现问题了,显示错误 文件的哈希值不在指定的目录文件中。
解决方法 :
1、找到WIN10的设置,点击“设置”
2、点击最后一个“更新和回复”,然后点击“恢复”
3、点击“恢复”之后,在右边点击高级启动下面的“重新启动”,此时电脑会重新启动,如果有其他重要程序在跑,请慎重
4、重启之后会出现几个选项,点击选项“疑难解答”
5、然后点击“高级”,启动设置,重启
6、这会重启之后就跳出一个列表,其中有安全模式等选项,也包括这里我们关心的“禁止强制驱动程序签名”
7、选择“禁用强制驱动程序签名”,对应哪个数字就按那个数字(按 F7),之后电脑会重新启动。
8、重启之后,驱动就可以成功安装。若有提示点击继续安装即可。
运行 CMD 进入 fastboot 文件夹下:
此时就可以利用 fastboot 完成烧写了:
其中fastboot的烧写指令分Linux系统Android系统。
技巧:将uboot、内核、文件系统与fastboot放在同一目录下可以省略它们的目录,如此还方便一点。
《1》烧录linux+QT
fastboot flash bootloader linuxQT/uboot_inand.bin 烧uboot
fastboot flash kernel linuxQT/zImage-qt 烧linuxkernel
fastboot flash system linuxQT/rootfs_qt4.ext3 烧rootfs
uboot的参数不用特意设置(因为我们刷了专为linux+QT定制的uboot,这个uboot中估计已经预制好了所有的启动参数)
《2》烧录android2.3
fastboot flash bootloader android2.3/uboot.bin 烧uboot
fastboot flash kernel android2.3/zImage 烧linuxkernel
fastboot flash system android2.3/x210.img 烧androidrom
注意:android2.3中使用了串口0,所以启动后要把串口插到串口0中,不然串口没有任何启动信息出来。android2.3中屏幕上的logo是在左上角(也是个刷机成功的标志)
《3》烧录android4.0.4
fastboot flash bootloader android4.0/uboot.bin 烧uboot
fastboot flash kernel android4.0/zImage-android 烧linuxkernel
fastboot flash system android4.0/x210.img 烧androidrom
七、启动开发板
将 OTG 线拔出,然后将拨码开关调到上面,即 SD/MCC 启动模式。
OK,启动成功!!到此烧写完成!!