用QEMU模拟运行uboot从SD卡启动Linux

平台:Qemu + vexpress-a9

u-boot:u-boot-2019.10

Linux:linux-4.14.13

之前介绍过用Qemu模拟运行uboot,然后从网络启动linux(用Qemu模拟vexpress-a9 (三)--- 实现用u-boot引导Linux内核),下面介绍用Qemu运行uboot,然后将存放在虚拟出来的SD卡里加载linux kernel、设备树,并运行。

一、编译uboot

下载最新的uboot,编译vexpress-a9:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- vexpress_ca9x4_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j8

得到编译生成的u-boot

二、编译linux内核

cross_compile=arm-linux-gnueabihf-
make CROSS_COMPILE=$cross_compile ARCH=arm vexpress_defconfig
make CROSS_COMPILE=$cross_compile ARCH=arm menuconfig
make CROSS_COMPILE=$cross_compile ARCH=arm zImage -j4
make CROSS_COMPILE=$cross_compile ARCH=arm dtbs

三、制作SD卡镜像

1、生成一个空的SD卡镜像

dd if=/dev/zero of=uboot.disk bs=1M count=1024

2、创建GPT分区,下面创建了两个分区,一个用来存放kernel和设备树,另一个存放根文件系统

sgdisk -n 0:0:+10M -c 0:kernel uboot.disk
sgdisk -n 0:0:0 -c 0:rootfs uboot.disk

查看分区:

$ sgdisk -p uboot.disk
Disk uboot.disk: 2097152 sectors, 1024.0 MiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 04963A5B-34CF-4DEE-B610-F40257C45F6D
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 2097118
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number Start (sector) End (sector) Size Code Name
   1 2048 22527 10.0 MiB 8300 kernel
   2 22528 2097118 1013.0 MiB 8300 rootfs

3、寻找一个空闲的loop设备

$ losetup -f
/dev/loop16

4、将SD卡镜像映射到loop设备上

sudo losetup /dev/loop16 uboot.disk
sudo partprobe /dev/loop16

此时会看到/dev/loop16p1和/dev/loop16p2两个节点

5、格式化

sudo mkfs.ext4 /dev/loop16p1
sudo mkfs.ext4 /dev/loop16p2

6、挂载

sudo mount -t ext4 /dev/loop16p1 p1/
sudo mount -t ext4 /dev/loop16p2 p2/

7、拷贝文件

sudo cp linux-4.14.13/arch/arm/boot/zImage p1/
sudo cp linux-4.14.13/arch/arm/boot/dts/vexpress-v2*.dtb p1/
sudo cp -raf ../rootfs/rootfs/* ./p2

8、umount

sudo umount p1 p2
sudo losetup -d /dev/loop16

四、启动uboot

uboot_image=./u-boot-2019.10/u-boot
qemu_path=/home/pengdl/work/Qemu/qemu-4.1.0/build/arm-softmmu

${qemu_path}/qemu-system-arm     -M vexpress-a9     -m 1024M     -smp 1     -nographic     -kernel ${uboot_image}     -sd ./uboot.disk

启动log

U-Boot 2019.10-g61a73d0f-dirty (Jan 13 2020 - 23:59:20 +0800)

DRAM: 1 GiB
WARNING: Caches not enabled
Flash: 128 MiB
MMC: MMC: 0
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: smc911x-0
Hit any key to stop autoboot: 0 

默认SD卡就是出于可用状态,也可以用下面的命令查看:

=> mmc dev 0
switch to partitions #0, OK
mmc0 is current device
=> mmc info
Device: MMC
Manufacturer ID: aa
OEM: 5859
Name: QEMU!
Bus Speed: 6250000
Mode: SD Legacy
Rd Block Len: 512
SD version 2.0
High Capacity: No
Capacity: 1 GiB
Bus Width: 1-bit
Erase Group Size: 512 Bytes

查看分区内容:

=> part list mmc 0
Partition Map for MMC device 0 -- Partition Type: EFI
Part Start LBA End LBA Name
        Attributes
        Type GUID
        Partition GUID
  1 0x00000800 0x000057ff "kernel"
        attrs: 0x0000000000000000
        type: 0fc63daf-8483-4772-8e79-3d69d8477de4
        guid: 0de91381-f36c-4ed7-97d9-2fd234dcef93
  2 0x00005800 0x001fffde "rootfs"
        attrs: 0x0000000000000000
        type: 0fc63daf-8483-4772-8e79-3d69d8477de4
        guid: 6b0004e2-26a1-428e-abfc-f3a648e7419e
=> ls mmc 0:1  或者 ext4ls mmc 0:1
<DIR> 1024 .
<DIR> 1024 ..
<DIR> 12288 lost+found
         7680720 zImage
           19161 vexpress-v2p-ca15_a7.dtb
           13384 vexpress-v2p-ca15-tc1.dtb
           12994 vexpress-v2p-ca5s.dtb
           14736 vexpress-v2p-ca9.dtb
=> ls mmc 0:2  或者 ext4ls mmc 0:2
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 16384 lost+found
<DIR> 4096 bin
<DIR> 4096 dev
<DIR> 4096 etc
<DIR> 4096 home
<DIR> 4096 include
<SYM> 11 init
<DIR> 4096 lib
<SYM> 11 linuxrc
<DIR> 4096 proc
<DIR> 4096 root
<DIR> 4096 sbin
<DIR> 4096 share
<DIR> 4096 sys
<DIR> 4096 tmp
<DIR> 4096 usr
<DIR> 4096 var
              26 .ash_history

五、加载kernel、设备树

=> load mmc 0:1 0x60008000 zImage  或者ext4load mmc 0:1 0x60008000 zImage
7680720 bytes read in 1034 ms (7.1 MiB/s)
=> load mmc 0:1 0x61000000 vexpress-v2p-ca9.dtb  或者 ext4load mmc 0:1 0x61000000 vexpress-v2p-ca9.dtb
14736 bytes read in 67 ms (213.9 KiB/s)

六、设置bootargs

setenv bootargs ‘root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait earlycon console=tty0 console=ttyAMA0 init=/linuxrc ignore_loglevel‘

七、引导内核

=> bootz 0x60008000 - 0x61000000

八、启动信息

=> bootz 0x60008000 - 0x61000000
Kernel image @ 0x60008000 [ 0x000000 - 0x7532d0 ]
## Flattened Device Tree blob at 61000000
   Booting using the fdt blob at 0x61000000
   Loading Device Tree to 7fe82000, end 7fe8898f ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.13+ ([email protected]) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05)) #43 SMP Mon Jan 13 00:03:12 CST 2020
[ 0.000000] CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] OF: fdt: Machine model: V2P-CA9
[ 0.000000] param_setup_earlycon enter, buf: (null)
[ 0.000000] earlycon: pl11 at MMIO 0x10009000 (options ‘115200n8‘)
[ 0.000000] bootconsole [pl11] enabled
[ 0.000000] param_setup_earlycon enter, buf: tty0
[ 0.000000] param_setup_earlycon enter, buf: ttyAMA0
[ 0.000000] debug: ignoring loglevel setting.
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] On node 0 totalpages: 262144
[ 0.000000] free_area_init_node: node 0, pgdat 80d5f300, node_mem_map bf7f9000
[ 0.000000] Normal zone: 2048 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 262144 pages, LIFO batch:31
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] random: fast init done
[ 0.000000] percpu: Embedded 16 pages/cpu @bf7ac000 s36428 r8192 d20916 u65536
[ 0.000000] pcpu-alloc: s36428 r8192 d20916 u65536 alloc=16*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260096
[ 0.000000] Kernel command line: root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait earlycon console=tty0 console=ttyAMA0 init=/linuxrc ignore_loglevel
[ 0.000000] console_setup enter, str: tty0
[ 0.000000] console_setup enter, str: ttyAMA0
[ 0.000000] log_buf_len individual max cpu contribution: 4096 bytes
[ 0.000000] log_buf_len total cpu_extra contributions: 12288 bytes
[ 0.000000] log_buf_len min size: 16384 bytes
[ 0.000000] log_buf_len: 32768 bytes
[ 0.000000] early log buf free: 14380(87%)
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 1026280K/1048576K available (6144K kernel code, 439K rwdata, 1456K rodata, 4096K init, 170K bss, 22296K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc0800000 - 0xff800000 (1008 MB)
[ 0.000000] lowmem : 0x80000000 - 0xc0000000 (1024 MB)
[ 0.000000] modules : 0x7f000000 - 0x80000000 ( 16 MB)
[ 0.000000] .text : 0x80008000 - 0x80700000 (7136 kB)
[ 0.000000] .init : 0x80900000 - 0x80d00000 (4096 kB)
[ 0.000000] .data : 0x80d00000 - 0x80d6dd48 ( 440 kB)
[ 0.000000] .bss : 0x80d74e2c - 0x80d9f634 ( 171 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] GIC CPU mask not found - kernel will fail to boot.
[ 0.000000] GIC CPU mask not found - kernel will fail to boot.
[ 0.000000] L2C: platform modifies aux control register: 0x02020000 -> 0x02420000
[ 0.000000] L2C: DT/platform modifies aux control register: 0x02020000 -> 0x02420000
[ 0.000000] L2C-310 enabling early BRESP for Cortex-A9
[ 0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[ 0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
[ 0.000000] L2C-310 cache controller enabled, 8 ways, 128 kB
[ 0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x46420001
[ 0.000000] smp_twd: clock not found -2
[ 0.000236] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.003014] clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[ 0.004034] Failed to initialize ‘/[email protected]/motherboard/[email protected],00000000/[email protected]‘: -22
[ 0.007878] Console: colour dummy device 80x30
[ 0.009804] console [tty0] enabled
[ 0.010213] Calibrating local timer... 90.50MHz.
[ 0.063660] Calibrating delay loop... 726.63 BogoMIPS (lpj=3633152)
[ 0.163367] pid_max: default: 32768 minimum: 301
[ 0.164371] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.164640] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.173301] CPU: Testing write buffer coherency: ok
[ 0.180395] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.184217] Setting up static identity map for 0x60100000 - 0x60100060
[ 0.185567] Hierarchical SRCU implementation.
[ 0.190526] smp: Bringing up secondary CPUs ...
[ 0.195085] smp: Brought up 1 node, 1 CPU
[ 0.195340] SMP: Total of 1 processors activated (726.63 BogoMIPS).
[ 0.195628] CPU: All CPU(s) started in SVC mode.
[ 0.226950] devtmpfs: initialized
[ 0.237195] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 0
[ 0.249451] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.250611] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.286424] NET: Registered protocol family 16
[ 0.289887] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.411870] cpuidle: using governor ladder
[ 0.412536] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.413148] Serial: AMBA PL011 UART driver
[ 0.417687] OF: amba_device_add() failed (-19) for /memory-[email protected]
[ 0.418518] OF: amba_device_add() failed (-19) for /memory-[email protected]
[ 0.419075] OF: amba_device_add() failed (-19) for /[email protected]
[ 0.428162] 10009000.uart: ttyAMA0 at MMIO 0x10009000 (irq = 35, base_baud = 0) is a PL011 rev1
[ 0.429393] console [ttyAMA0] enabled
[ 0.429393] console [ttyAMA0] enabled
[ 0.429830] bootconsole [pl11] disabled
[ 0.429830] bootconsole [pl11] disabled
[ 0.437874] 1000a000.uart: ttyAMA1 at MMIO 0x1000a000 (irq = 36, base_baud = 0) is a PL011 rev1
[ 0.439865] 1000b000.uart: ttyAMA2 at MMIO 0x1000b000 (irq = 37, base_baud = 0) is a PL011 rev1
[ 0.441651] 1000c000.uart: ttyAMA3 at MMIO 0x1000c000 (irq = 38, base_baud = 0) is a PL011 rev1
[ 0.443990] OF: amba_device_add() failed (-19) for /[email protected]4000000/motherboard/[email protected]7,00000000/[email protected]
[ 0.492049] SCSI subsystem initialized
[ 0.494187] libata version 3.00 loaded.
[ 0.495179] usbcore: registered new interface driver usbfs
[ 0.495583] usbcore: registered new interface driver hub
[ 0.496019] usbcore: registered new device driver usb
[ 0.500818] Advanced Linux Sound Architecture Driver Initialized.
[ 0.514158] clocksource: Switched to clocksource arm,sp804
[ 0.661421] NET: Registered protocol family 2
[ 0.665243] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.665645] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.666075] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.667823] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.668211] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.669427] NET: Registered protocol family 1
[ 0.672771] RPC: Registered named UNIX socket transport module.
[ 0.673010] RPC: Registered udp transport module.
[ 0.673167] RPC: Registered tcp transport module.
[ 0.673316] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.032936] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 5 counters available
[ 1.039079] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[ 1.056808] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 1.059624] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 1.062208] 9p: Installing v9fs 9p2000 file system support
[ 1.066233] io scheduler noop registered (default)
[ 1.066479] io scheduler mq-deadline registered
[ 1.066735] io scheduler kyber registered
[ 1.071064] clcd-pl11x 10020000.clcd: PL111 designer 41 rev2 at 0x10020000
[ 1.078507] clcd-pl11x 10020000.clcd: /[email protected]10020000 hardware, [email protected]59 display
[ 1.161773] Console: switching to colour frame buffer device 128x48
[ 1.167184] clcd-pl11x 1001f000.clcd: PL111 designer 41 rev2 at 0x1001f000
[ 1.168631] clcd-pl11x 1001f000.clcd: /[email protected]4000000/motherboard/[email protected]7,00000000/[email protected] hardware, 640x480@59 display
[ 1.477077] brd: module loaded
[ 1.495912] loop: module loaded
[ 1.500177] 40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
[ 1.501104] Intel/Sharp Extended Query Table at 0x0031
[ 1.501768] Using buffer write method
[ 1.502266] erase region 0: offset=0x0,size=0x40000,blocks=256
[ 1.504422] 40000000.flash: Found 2 x16 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
[ 1.504906] Intel/Sharp Extended Query Table at 0x0031
[ 1.505391] Using buffer write method
[ 1.505629] erase region 0: offset=0x0,size=0x40000,blocks=256
[ 1.505986] Concatenating MTD devices:
[ 1.509464] (0): "40000000.flash"
[ 1.511999] (1): "40000000.flash"
[ 1.514592] into device "40000000.flash"
[ 1.579495] libphy: Fixed MDIO Bus: probed
[ 1.654665] libphy: smsc911x-mdio: probed
[ 1.659191] smsc911x 4e000000.ethernet eth0: MAC Address: 52:54:00:12:34:56
[ 1.765966] isp1760 4f000000.usb: bus width: 32, oc: digital
[ 1.777548] isp1760 4f000000.usb: NXP ISP1760 USB Host Controller
[ 1.781625] isp1760 4f000000.usb: new USB bus registered, assigned bus number 1
[ 1.784568] isp1760 4f000000.usb: Scratch test failed.
[ 1.787257] isp1760 4f000000.usb: can‘t setup: -19
[ 1.789669] isp1760 4f000000.usb: USB bus 1 deregistered
[ 1.793814] usbcore: registered new interface driver usb-storage
[ 1.802617] rtc-pl031 10017000.rtc: rtc core: registered pl031 as rtc0
[ 1.806070] IR NEC protocol handler initialized
[ 1.808391] IR RC5(x/sz) protocol handler initialized
[ 1.810806] IR RC6 protocol handler initialized
[ 1.813412] IR JVC protocol handler initialized
[ 1.815587] IR Sony protocol handler initialized
[ 1.817861] IR SANYO protocol handler initialized
[ 1.820138] IR Sharp protocol handler initialized
[ 1.822689] IR MCE Keyboard/mouse protocol handler initialized
[ 1.824910] IR XMP protocol handler initialized
[ 1.832118] mmci-pl18x 10005000.mmci: Got CD GPIO
[ 1.834664] mmci-pl18x 10005000.mmci: Got WP GPIO
[ 1.838372] mmci-pl18x 10005000.mmci: mmc0: PL181 manf 41 rev0 at 0x10005000 irq 31,32 (pio)
[ 1.913351] input: AT Raw Set 2 keyboard as /devices/platform/[email protected]4000000/[email protected]4000000:motherboard/[email protected]4000000:motherboard:i
[email protected]7,00000000/10006000.kmi/serio0/input/input0
[ 1.928777] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.933517] usbcore: registered new interface driver usbhid
[ 1.935808] usbhid: USB HID core driver
[ 1.945013] mmc0: new SD card at address 4567
[ 1.952266] mmcblk0: mmc0:4567 QEMU! 1.00 GiB
[ 1.986464] mmcblk0: p1 p2
[ 1.992031] aaci-pl041 10004000.aaci: ARM AC‘97 Interface PL041 rev0 at 0x10004000, irq 30
[ 1.994594] aaci-pl041 10004000.aaci: FIFO 512 entries
[ 1.997482] oprofile: using arm/armv7-ca9
[ 2.000510] NET: Registered protocol family 17
[ 2.003305] 9pnet: Installing 9P2000 support
[ 2.005828] Registering SWP/SWPB emulation handler
[ 2.017119] rtc-pl031 10017000.rtc: setting system clock to 2020-01-14 15:02:26 UTC (1579014146)
[ 2.020519] ALSA device list:
[ 2.022710] #0: ARM AC‘97 Interface PL041 rev0 at 0x10004000, irq 30
[ 2.025497] Warning: unable to open an initial console.
[ 2.063902] Freeing unused kernel memory: 4096K
[ 2.500280] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/[email protected]4000000/[email protected]4000000:motherboard/[email protected]4000000:motherboard:[email protected]7,00000000/10007000.kmi/serio1/input/input2
[ 3.017505] EXT4-fs (mmcblk0p2): recovery complete
[ 3.021581] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 3.076962] Generic PHY 4e000000.ethernet-ffffffff:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=4e000000.ethernet-ffffffff:01, irq=POLL)
[ 3.083703] smsc911x 4e000000.ethernet eth0: SMSC911x/921x identified at 0xc1310000, IRQ: 28

Please press Enter to activate this console.
[[email protected] ]#[[email protected] ]# mountrootfs on / type rootfs (rw)proc on /proc type proc (rw,relatime)tmpfs on /tmp type tmpfs (rw,relatime)sysfs on /sys type sysfs (rw,relatime)tmpfs on /dev type tmpfs (rw,relatime)debugfs on /sys/kernel/debug type debugfs (rw,relatime)devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)/dev/mmcblk0p2 on /root type ext4 (rw,relatime,data=ordered)[[email protected] ]# lsbin      dev      home     init     linuxrc  root     share    tmp      vard        etc      include  lib      proc     sbin     sys      usr

完。

原文地址:https://www.cnblogs.com/pengdonglin137/p/12194548.html

时间: 2024-08-24 05:53:09

用QEMU模拟运行uboot从SD卡启动Linux的相关文章

Samsung_tiny4412(笔记)--&gt;linux 3.5,U-Boot,Busybox,SD卡启动环境搭建

/*********************************************************************************** * * Samsung_tiny4412(笔记)-->linux 3.5,U-Boot,Busybox,SD卡启动环境搭建 * * 声明: * 1. 以下所有的shell命令都是在root权限下运行的; * 2. minicom(U-Boot)指的是用minicom连接开发板作为U-Boot的终端; * 3. 文中在需要往文件中

zedboard烧写SD卡启动linux镜像

1. 先把SD卡格式化,然后把镜像文件拷贝到SD卡,下面应该是没有文件系统的 2. 插上SD卡,Zedboard设置启动模式,有5个跳线帽,配置如下,上电启动 3. 看下串口的输出 原文地址:https://www.cnblogs.com/429512065qhq/p/8782601.html

制作SD卡启动自己编译的uboot.bin

README for FriendlyARM Tiny4412 -----------------------------------------------------1. Build uboot a) 安装好toolchain (arm-linux-gcc-4.5.1-v6-vfp-20120301.tgz)并设置好 环境变量PATH,保证可以正常使用. b) 解压 uboot_tiny4412-20130729.tgz 并进入相应的目录 tar xzf uboot_tiny4412-201

6410开发板sd卡启动时烧写u-boot.bin以及u-boot-spl-16k.bin步骤

参考文档:<SMDK6410_IROM_APPLICATION NOTE_REV 1.00>(可以从这里下载到> 参考博客:Tekkaman的博文<u-boot-2010.09 for mini6410 (add MMC support)> <Tiny6410_SMDK从SD卡直接启动裸板代码> <使uboot支持S3C6410的SD启动> <S3C6410开发全纪录(一)<还原SD卡启动的真相>> sd卡启动布局方式(假定一个

[i.MX6q]i.MX6q处理器,linux操作系统平台搭建 从SD卡启动系统

转自:http://www.07net01.com/linux/2016/02/1232094.html 参照1:http://blog.csdn.net/girlkoo/article/details/44536447 参照2:http://blog.csdn.net/girlkoo/article/details/44626011 2017-02-04 22:52:54 目录: 本文的目的是,完成一个从sd卡启动的一个纯净版的linux系统移植,其实就是一个很裸的根文件系统,后期有空会试着把

不从SD卡启动树莓派2

本文你可以学到: berryboot使用,kali安装,开挂的MobaXterm,以及关于通过LABEL和UUID挂载的小技巧. 本文默认你有一定Linux基础,同时针对刚入门的水平,因为这是我的折腾记录.不懂可以留言或者email. 首先要明确的是现在暂时没有完全脱离sd卡的方法,因为Pi是默认从SD卡启动的.只是实现了将系统放在别的地方(U盘,硬盘,局域网),但是还是要有一张sd卡(可以很小,64M以内都可以)作为/boot来引导,无法完全做到从U盘启动,但是启动后可以拔掉SD卡运行. 我只

Exynos4412从SD卡启动的简单网络文件系统制作

Exynos4412从SD卡启动的简单网络文件系统制作 1. 简介 嵌入式系统能够在开发板上正常运行,需要先进行系统配置,一个完整的嵌入式系统应该包含的几个部分::uboot,kernel,rootfs,appfs.这几部分在ARM板Flash上的位置关系如下图所示: 注:图片来源于韦东山老师的<嵌入式Linux应用开发完全手册> rootfs可以不用添加到开发板,而是部署到PC机上,开发板在运行完kernel,要挂载rootfs时,可以通过NFS网络挂载到设定好的PC机上的文件系统上. 操作

嵌入式Linux裸机开发(十)——SD卡启动

嵌入式Linux裸机开发(十)--SD卡启动 存储设备分类: 磁存储设备:软盘.硬盘.光盘.CD.磁带 Flash:NandFlash.NorFlash 缺点:时序复杂,无坏块处理机制,接口不统一 NandFlash:MLC(可靠性差,容量大).SLC(可靠性高.容量小) 扩展卡式Flash:SD卡.MMC卡.MicroSD(TF卡) 内部为NnadFlash存储颗粒,外部封装了接口,接口标准统一.通用. 缺点:频繁使用导致卡槽接触不可靠 iNand.MoviNand.eSSD: 内部为Nand

解剖嵌入式设备开发时以SD卡启动时SD卡的存储结构(以三星exynos4412为例)

目前面对高性能产品的嵌入式开发中,用SD卡来代替以往的JLINK显得备受大家喜欢,而且MCU厂家也对以SD卡启动的支持度越来越大,反而对JLINK不在那么重视(不过依旧保留着).一些以开发开发板的公司在提供他们自身的bootloader(只是其中一部分是他们自身的代码而已,下面我会讲到这一点)时其原码并不对外公开,不过大家喜欢的u-boot的原码是开源的,可是像友善之臂他们的那样,还得通过他们的superboot来把u-boot二进制代码载入到LAND FLASH,EMMC等这类外部rom设备中