SD机auto mount自动挂载文件系统

U-Boot 2014.07 (Feb 26 2016 - 02:22:06)


DRAM:  ECC disabled 1 GiB
MMC:   zynq_sdhci: 0
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment


In:    serial
Out:   serial
Err:   serial
Net:   zynq_gem emio is 1.
Gem.e000b000

U-BOOT for lan

@@DP83640_config.

Gem.e000b000 Waiting for PHY auto negotiation to complete.... done
zynq_gem phydev->speed is 100.
BOOTP broadcast 1
DHCP client bound to address 192.168.182.175
Hit any key to stop autoboot:  0
Device: zynq_sdhci
Manufacturer ID: 2
OEM: 544d
Name: SA04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
reading image.ub
9228324 bytes read in 798 ms (11 MiB/s)
## Loading kernel from FIT Image at 01000000 ...
   Using 'conf@1' configuration
   Trying 'kernel@1' kernel subimage
     Description:  PetaLinux Kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x010000f0
     Data Size:    9212923 Bytes = 8.8 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    crc32
     Hash value:   2e10e73d
   Verifying Hash Integrity ... crc32+ OK
## Loading fdt from FIT Image at 01000000 ...
   Using 'conf@1' configuration
   Trying 'fdt@1' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x018c95d0
     Data Size:    14102 Bytes = 13.8 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   1873a14c
   Verifying Hash Integrity ... crc32+ OK
   Booting using the fdt blob at 0x18c95d0
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 07ff9000, end 07fff715 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 3.17.0-xilinx ([email protected]) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-23) ) #12 SMP PREEMPT Fri Feb 26 02:23:14 PST 2016
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: lan
cma: Reserved 128 MiB at 38000000
Memory policy: Data cache writealloc
PERCPU: Embedded 8 pages/cpu @7779c000 s8704 r8192 d15872 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260096
Kernel command line: console=ttyPS0,115200 earlyprintk
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 895540K/1048576K available (4607K kernel code, 239K rwdata, 1584K rodata, 5912K init, 198K bss, 153036K reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
    vmalloc : 0x80800000 - 0xff000000   (2024 MB)
    lowmem  : 0x40000000 - 0x80000000   (1024 MB)
    pkmap   : 0x3fe00000 - 0x40000000   (   2 MB)
    modules : 0x3f000000 - 0x3fe00000   (  14 MB)
      .text : 0x40008000 - 0x40613f98   (6192 kB)
      .init : 0x40614000 - 0x40bda200   (5913 kB)
      .data : 0x40bdc000 - 0x40c17d20   ( 240 kB)
       .bss : 0x40c17d20 - 0x40c4958c   ( 199 kB)
Preemptible hierarchical RCU implementation.
        Dump stacks of tasks blocking RCU-preempt GP.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
L2C: platform provided aux values match the hardware, so have no effect.  Please remove them.
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76360001
slcr mapped to 80804000
zynq_clock_init: clkc starts at 80804100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 3298534883328ns
timer #0 at 80806000, irq=43
Console: colour dummy device 80x30
Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x45a688 - 0x45a6e0
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated.
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x80880000
VCCPINT: 1000 mV
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
PTP clock support registered
EDAC MC: Ver: 3.0.0
Advanced Linux Sound Architecture Driver Initialized.
Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP: reno registered
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
jffs2: version 2.2. (NAND) (SUMMARY)  c 2001-2006 Red Hat, Inc.
msgmni has been set to 2005
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-2364208
dma-pl330 f8003000.dmac:        DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
xilinx-dma 40400000.dma: include-sg value is 0x0.
xilinx-dma 40400000.dma: include-sg value is 0x0.
xilinx-dma 40400000.dma: xilinx_dma_chan_probe chan->has_sg is 0.
xilinx-dma 40400000.dma: dma_read.offset:0x808e0000, value:0x10002.
xilinx-dma 40400000.dma: dma_write.offset:0x808e0000, value:0x10006.
xilinx-dma 40400000.dma: dma_read.offset:0x808e0000, value:0x10006.
xilinx-dma 40400000.dma: dma_read.offset:0x808e0000, value:0x10002.
xilinx-dma 40400000.dma: xilinx_dma_chan_probe chan->has_sg is 0.
xilinx-dma 40400000.dma: dma_read.offset:0x808e0030, value:0x10002.
xilinx-dma 40400000.dma: dma_write.offset:0x808e0030, value:0x10006.
xilinx-dma 40400000.dma: dma_read.offset:0x808e0030, value:0x10006.
xilinx-dma 40400000.dma: dma_read.offset:0x808e0030, value:0x10002.
xilinx-dma 40400000.dma: Probing xilinx axi dma engine...Successful
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82, base_baud = 3125000) is a xuartps
console [ttyPS0] enabled
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to 8086a000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
m25p80 spi32766.0: s25fl129p1 (32768 Kbytes)
4 ofpart partitions found on MTD device spi32766.0
Creating 4 MTD partitions on "spi32766.0":
0x000000000000-0x000000500000 : "boot"
0x000000500000-0x000000520000 : "bootenv"
0x000000520000-0x000000fa0000 : "kernel"
0x000000fa0000-0x000001000000 : "spare"
libphy: Fixed MDIO Bus: probed
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2014 Intel Corporation.
libphy: XEMACPS mii bus: probed
xemacps e000b000.ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at 80870000 with timeout 10s
zynq-edac f8006000.memory-controller: ecc not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
sdhci-arasan e0100000.sdhci: No vmmc regulator found
sdhci-arasan e0100000.sdhci: No vqmmc regulator found
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
NET: Registered protocol family 17
Registering SWP/SWPB emulation handler
/opt/pkg/petalinux-v2014.4-final/components/linux-kernel/xlnx-3.17/drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
ALSA device list:
  No soundcards found.
Freeing unused kernel memory: 5912K (40614000 - 40bda000)
mmc0: new high speed SDHC card at address 1234
INIT: mmcblk0: mmc0:1234 SA04G 3.70 GiB
 mmcblk0: p1
version 2.88 booting
Creating /dev/flash/* device nodes
random: dd urandom read with 8 bits of entropy available
starting Busybox inet Daemon: inetd... done.
Starting uWeb server:
NET: Registered protocol family 10
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
 Removing any system startup links for run-postinsts ...
  /etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... udhcpc (v1.22.1) started
Sending discover...
Sending select for 192.168.182.175...
Lease of 192.168.182.175 obtained, lease time 43200
/etc/udhcpc.d/50default: Adding DNS 192.168.180.7
/etc/udhcpc.d/50default: Adding DNS 192.168.180.10
/etc/udhcpc.d/50default: Adding DNS 192.168.100.7
done.
Starting portmap daemon...
ps: configmac coming......
Config MAC address.
ifconfig eth0 hw ether 46:17:8:11:6:ca
udhcpc (v1.22.1) started
Sending discover...
xemacps e000b000.ethernet: phydev->speed is 100.
xemacps e000b000.ethernet: xu_100.
xemacps e000b000.ethernet: xuxu.rate is 0.
xemacps e000b000.ethernet: Set clk to 0 Hz
xemacps e000b000.ethernet: link up (100/FULL)
Sending discover...
Sending select for 192.168.182.208...
Lease of 192.168.182.208 obtained, lease time 43200
/etc/udhcpc.d/50default: Adding DNS 192.168.180.7
/etc/udhcpc.d/50default: Adding DNS 192.168.180.10
/etc/udhcpc.d/50default: Adding DNS 192.168.100.7
ps: autoIP......
Assign IP addresses automatically using a protocol called DHCP.
 IP addr:192.168.<1>Hello module world.
182.208
ps: install myip.ko......
myip 83c00000.axilite_ip: Device 1243 Tree Probing
myip probed at VA 0x80960000
ps: install mydma.ko......
<1>Hello module world.
mydma 83c10000.axilite_dma: Device 1243 Tree Probing
mydma probed at VA 0x80980000
ps: install xdma.ko......
<xdma> init: registered
<xdma> probe: number of devices found: 1
ps: dmamonitor start......
ps: vxi11 start......
<xdma> file: open()
mydma<00>proc_mydma_open.
<xdma> file: mmap()
ps: IEEE1588v2 ptpd has been started.
ps:  petalinux system has been started.
sd.
/etc/rc5.d/S99psinit: line 42: /bin/lxi_1588_ptpd.elf: No such file or directory
Starting tcf-agent: OK


Built with PetaLinux v2014.4 (Yocto 1.7) lan /dev/ttyPS0
lan login: root
Password:
login[960]: root login on 'ttyPS0'
root@lan:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
devtmpfs                    64         0        64   0% /dev
tmpfs                   516260        24    516236   0% /run
tmpfs                   516260        16    516244   0% /var/volatile

/dev/mmcblk0p1         3875416     73004   3802412   2% /mnt/usb



有很多人用fstab的方法,奈何我用不好使,后来petalinux-create -t apps -n autoSD --enable,

#include <stdio.h>
#include <stdlib.h>


int main()
{

system("mkdir /mnt/usb");

system("mount /dev/mmcblk0p1 /mnt/usb");

    return 0;
}




petalinux-build

petalinux-package --boot --fsbl zynq_fsbl.elf --fpga lan_top.bit --u-boot

拷到sd卡,大功告成!嗨皮!


你可能感兴趣的:(sd,u-boot,petalinux)