In order to facilitate building the file system, we will need to setup TFTP server. There are two options: one if to setup TFTP in a linux server. The other is to use TFTP32 on windows (http://tftpd32.jounin.net/) . The detail process will be setup a samba service on the building linux PC, and share the file directory to the windows through the samba. Then use TFTP32 to provide the file directory to let pcDuino3 to boot.
In this post, we choose the second approach. As the windows PC we have is win8, 64 bit, we are going to use TFTP64.
Insert the SD card that has the uboot, kernel and root file system into the build linux PC.
#vim /media/5BC6-6413/uEnv.txt
autoload=no fdt_high=ffffffff serverip=192.168.1.100 console=ttyS0,115200 init=/init bootargs=console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait boot_tftp=dhcp; tftp 0x46000000 arch/arm/boot/uImage; tftp 0x49000000 arch/arm/b oot/dts/sun7i-a20-pcduino3.dtb; bootm 0x46000000 - 0x49000000 uenvcmd=run boot_tftp
Note: the serverip is the IP address of the Windows PC. Insert the SD card with the modifed uEnv.txt back to pcDuino3, and reboot, we can find that the kernel is booting from the remote TFTP server:
U-Boot SPL 2014.04-10685-g4af825f (Jun 22 2014 - 21:16:54) Board: Linksprite_pcDuino3 DRAM: 1024 MiB CPU: 960000000Hz, AXI/AHB/APB: 3/2/2 spl: not an uImage at 1600 U-Boot 2014.04-10685-g4af825f (Jun 22 2014 - 21:16:54) Allwinner Technology CPU: Allwinner A20 (SUN7I) Board: Linksprite_pcDuino3 I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: dwmac.1c50000 Hit any key to stop autoboot: 0 reading uEnv.txt 322 bytes read in 16 ms (19.5 KiB/s) Loaded environment from uEnv.txt Running uenvcmd ... Speed: 100, full duplex BOOTP broadcast 1 DHCP client bound to address 192.168.1.119 Speed: 100, full duplex Using dwmac.1c50000 device TFTP from server 192.168.1.100; our IP address is 192.168.1.119 Filename 'arch/arm/boot/uImage'. Load address: 0x46000000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################# 466.8 KiB/s done Bytes transferred = 8350864 (7f6c90 hex) Speed: 100, full duplex Using dwmac.1c50000 device TFTP from server 192.168.1.100; our IP address is 192.168.1.119 Filename 'arch/arm/boot/dts/sun7i-a20-pcduino3.dtb'. Load address: 0x49000000 Loading: ## 152.3 KiB/s done Bytes transferred = 20919 (51b7 hex) ## Booting kernel from Legacy Image at 46000000 ... Image Name: Linux-3.15.0-rc6-01550-g119918d- Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 8350800 Bytes = 8 MiB Load Address: 40008000 Entry Point: 40008000 Verifying Checksum ... OK ## Flattened Device Tree blob at 49000000 Booting using the fdt blob at 0x49000000 Loading Kernel Image ... OK Using Device Tree in place at 49000000, end 490081b6 Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 3.15.0-rc6-01550-g119918d-dirty (pillar@server) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #19 SMP Tue Jun 24 20:18:09 CST 2014 [ 0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine model: LinkSprite pcDuino V3 [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] PERCPU: Embedded 7 pages/cpu @eefd5000 s6592 r8192 d13888 u32768 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260624 [ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait [ 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: 1027336K/1048576K available (4690K kernel code, 193K rwdata, 2116K rodata, 4810K init, 242K bss, 21240K reserved, 270336K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) [ 0.000000] vmalloc : 0xf0000000 - 0xff000000 ( 240 MB) [ 0.000000] lowmem : 0xc0000000 - 0xef800000 ( 760 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc06adddc (6808 kB) [ 0.000000] .init : 0xc06ae000 - 0xc0b609c0 (4811 kB) [ 0.000000] .data : 0xc0b62000 - 0xc0b926a0 ( 194 kB) [ 0.000000] .bss : 0xc0b926a8 - 0xc0bcf0b0 ( 243 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] Hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2 [ 0.000000] NR_IRQS:16 nr_irqs:16 16 [ 0.000000] Architected cp15 timer(s) running at 24.00MHz (virt). [ 0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 2863311519744ns [ 0.000015] Switching to timer-based delay loop [ 0.000284] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns [ 0.000406] sched_clock: 32 bits at 160MHz, resolution 6ns, wraps every 26843545593ns [ 0.000551] Console: colour dummy device 80x30 [ 0.000578] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.000592] pid_max: default: 32768 minimum: 301 [ 0.000698] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000708] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.001233] CPU: Testing write buffer coherency: ok [ 0.001486] /cpus/cpu@0 missing clock-frequency property [ 0.001505] /cpus/cpu@1 missing clock-frequency property [ 0.001516] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.001544] Setting up static identity map for 0x404755e0 - 0x40475638 [ 0.002440] CPU1: failed to boot: -38 [ 0.002473] Brought up 1 CPUs [ 0.002481] SMP: Total of 1 processors activated. [ 0.002487] CPU: All CPU(s) started in SVC mode. [ 0.002958] devtmpfs: initialized [ 0.006543] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 4 [ 0.006745] pinctrl core: initialized pinctrl subsystem [ 0.006935] regulator-dummy: no parameters [ 0.011206] NET: Registered protocol family 16 [ 0.011472] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.020121] reg-fixed-voltage ahci-5v.3: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/ahci_pwr_pin@0, deferring probe [ 0.020148] platform ahci-5v.3: Driver reg-fixed-voltage requests probe deferral [ 0.020172] reg-fixed-voltage usb1-vbus.4: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb1_vbus_pin@0, deferring probe [ 0.020185] platform usb1-vbus.4: Driver reg-fixed-voltage requests probe deferral [ 0.020203] reg-fixed-voltage usb2-vbus.5: could not find pctldev for node /soc@01c00000/pinctrl@01c20800/usb2_vbus_pin@0, deferring probe [ 0.020215] platform usb2-vbus.5: Driver reg-fixed-voltage requests probe deferral [ 0.020537] pps_core: LinuxPPS API ver. 1 registered [ 0.020545] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.020568] PTP clock support registered [ 0.021246] Switched to clocksource arch_sys_counter [ 0.021501] FS-Cache: Loaded [ 0.021698] CacheFiles: Loaded [ 0.028109] NET: Registered protocol family 2 [ 0.028530] TCP established hash table entries: 8192 (order: 3, 32768 bytes) [ 0.028609] TCP bind hash table entries: 8192 (order: 4, 65536 bytes) [ 0.028728] TCP: Hash tables configured (established 8192 bind 8192) [ 0.028805] TCP: reno registered [ 0.028821] UDP hash table entries: 512 (order: 2, 16384 bytes) [ 0.028875] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) [ 0.029076] NET: Registered protocol family 1 [ 0.029477] RPC: Registered named UNIX socket transport module. [ 0.029489] RPC: Registered udp transport module. [ 0.029495] RPC: Registered tcp transport module. [ 0.029501] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.315117] futex hash table entries: 512 (order: 3, 32768 bytes) [ 0.315188] Initialise system trusted keyring [ 0.315677] bounce pool size: 64 pages [ 0.325588] FS-Cache: Netfs 'nfs' registered for caching [ 0.326294] NFS: Registering the id_resolver key type [ 0.326364] Key type id_resolver registered [ 0.326371] Key type id_legacy registered [ 0.326387] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 0.326394] Installing knfsd (copyright (C) 1996 okir@monad.swb.de). [ 0.327113] FS-Cache: Netfs 'cifs' registered for caching [ 0.327496] Key type cifs.spnego registered [ 0.327529] Key type cifs.idmap registered [ 0.327689] ntfs: driver 2.1.30 [Flags: R/W]. [ 0.328498] FS-Cache: Netfs 'ceph' registered for caching [ 0.328526] ceph: loaded (mds proto 32) [ 0.329406] Key type asymmetric registered [ 0.329419] Asymmetric key parser 'x509' registered [ 0.329675] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251) [ 0.329687] io scheduler noop registered [ 0.329694] io scheduler deadline registered [ 0.329722] io scheduler cfq registered (default) [ 0.331880] sun7i-a20-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver [ 0.372005] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled [ 0.374412] console [ttyS0] disabled [ 0.394595] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A [ 1.007458] console [ttyS0] enabled [ 1.032872] dw-apb-uart 1c29800.serial: Couldn't set LCR to 0 [ 1.039619] dw-apb-uart 1c29800.serial: Couldn't set LCR to 0 [ 1.045397] 1c29800.serial: ttyS1 at MMIO 0x1c29800 (irq = 51, base_baud = 1500000) is a U6_16550A [ 1.076151] dw-apb-uart 1c29c00.serial: Couldn't set LCR to 0 [ 1.082895] dw-apb-uart 1c29c00.serial: Couldn't set LCR to 0 [ 1.088668] 1c29c00.serial: ttyS2 at MMIO 0x1c29c00 (irq = 52, base_baud = 1500000) is a U6_16550A [ 1.099245] stmmaceth 1c50000.ethernet: no regulator found [ 1.104812] stmmaceth 1c50000.ethernet: no reset control found [ 1.110640] Ring mode enabled [ 1.113704] No HW DMA feature register supported [ 1.118227] Normal descriptors [ 1.121555] TX Checksum insertion supported [ 1.129562] libphy: stmmac: probed [ 1.133010] eth0: PHY ID 02430c54 at 1 IRQ 0 (stmmac-0:01) active [ 1.139448] mousedev: PS/2 mouse device common for all mice [ 1.145296] i2c /dev entries driver [ 1.150610] sunxi-wdt 1c20c90.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0) [ 1.159756] TCP: cubic registered [ 1.163115] NET: Registered protocol family 17 [ 1.167692] NET: Registered protocol family 33 [ 1.172157] Key type rxrpc registered [ 1.175815] Key type rxrpc_s registered [ 1.181533] sctp: Hash tables configured (established 65536 bind 65536) [ 1.188504] Key type dns_resolver registered [ 1.192799] Key type ceph registered [ 1.196708] libceph: loaded (mon/osd proto 15/24) [ 1.201501] Registering SWP/SWPB emulation handler [ 1.206664] Loading compiled-in X.509 certificates [ 1.218824] Loaded X.509 cert 'Magrathea: Glacier signing key: cc6b77f1515c32d2b4b1365136c9f000545ef48d' [ 1.228311] kAFS: Red Hat AFS client v0.1 registering. [ 1.233518] FS-Cache: Netfs 'afs' registered for caching [ 1.239800] ahci-5v: 5000 mV [ 1.243062] usb1-vbus: 5000 mV [ 1.246424] usb2-vbus: 5000 mV [ 1.249865] Warning: unable to open an initial console. [ 1.260020] Freeing unused kernel memory: 4808K (c06ae000 - c0b60000) (none) login: root login[83]: root login on 'ttyS0' # ls / a.out hello.c proc tmp bin init root update blink_led.sh lib sbin usr dev linuxrc sun7i_rootfs.cpio etc mnt sys #
Leave a Reply
You must be logged in to post a comment.