FC2カウンター FPGAの部屋 2019年04月
fc2ブログ

FPGAやCPLDの話題やFPGA用のツールの話題などです。 マニアックです。 日記も書きます。

FPGAの部屋

FPGAの部屋の有用と思われるコンテンツのまとめサイトを作りました。Xilinx ISEの初心者の方には、FPGAリテラシーおよびチュートリアルのページをお勧めいたします。

”Docker 上のUbuntu 16.04 のPetaLinux 2018.2でuioとudmabufの動作をテストする(DMA_pow2_testを使用)”のRootFSをUbuntu 18.04に変更した2

”Docker 上のUbuntu 16.04 のPetaLinux 2018.2でuioとudmabufの動作をテストする(DMA_pow2_testを使用)”のRootFSをUbuntu 18.04に変更した”の続き。

前回は、PetaLinux 2018.2 のプロジェクトを作成して、ビルドを行い、BOOT.BIN の作成したものに、PL のIP(DMA_pow2)のUIO を追加し、さらに udmabuf.ko をビルドした。そして、DMApow2Test2.c を作成し、ビルドして、Ultra96 のPetaLinux 上でテストしたところ成功した。そしてそのPetaLinux のRootFS をUbuntu 18.04.2 に変更したところうまく起動した。今回は、Ubuntu 18.04.2 のUIOの状況を見ていこう。

/sys/class を見ると uio ディレクトリがある。
しかし、uio ディレクトリの下には、uio0 のみだった。 uio1 がない。
PetaLinux_198_190430.png

/sys/devices/platform/amba_pl@0/80000000.DMA_pow2 はあったので、デバイスツリーは認識されているが、UIO には入っていないようだ。
PetaLinux_199_190430.png

aster_ism さんのように devmem2 やスーパーバイザのコードでやる方法もあるが、できればUIO でやりたい。

デバイスツリーを使わずにUIOを使用する方法もあるようだが、PetaLinux から外れてきてしまっているので、もし使うならば ikwzm さんの実装のほうが良さそうだ。
  1. 2019年04月30日 16:48 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

洗濯干場のすのこ作成と床の間段差解消用の台

昨日から、お袋が干している洗濯干場が草が生えてきて、濡れるということで、防腐剤入り2x4 材ですのこを作りました。
2x4 6フィート(1820mm)を5本横に並べて、縦に 65mm のコーススレッドで止めました。板の隙間が開くと光が入って草が生えちゃうので、クランプで締め上げて、隙間なしに作りました。裏からコーススレッドで止めたのですが、直接コーススレッドが土につかないように、ざぐりを入れるドリルビットを使って下穴を開けています。
昨日、2つ、今日は1つ作って並べました。
nikki_6_190429.jpg

nikki_7_190429.jpg

今日はもう1つ作りました。これは、床の間の段差解消用の台です。この台は、床の間の段差を解消して、床の間に自転車を飾っておくために使います。
nikki_8_190429.jpg

こっちのほうが難しかったです。幅は 310mm だったので、1x4 3 フィートの板を4つ並べて仮止めしてから、両側を 20 mm ずつカットしました。また、高さは 105 mm なので、 2x4 材を縦にして 1x4 3 フィートの板に付けたのですが、そのままだと高すぎるので、手押しカンナ盤を使って、 0.5 mm 単位でその高さになるように削っていきました。
足を付ける時に位置を間違ってしまったので、もう1つ足を付けてしまいました。失敗。。。
  1. 2019年04月29日 20:02 |
  2. 木工
  3. | トラックバック:0
  4. | コメント:0

昨日、朝日トンネル前までサイクリングに行ってきました

昨日、朝日トンネルまでこの前買ったロードレーサー(Cannondale CAAD12 105)に乗ってサイクリングに行ってきました。本当は朝日トンネルを通って、朝日里山学校に行こうと思っていました。朝日里山学校では、奥さんのトレラン大会のゴールなので、応援に行こうと思ったのでした。
ですが、初めての一般道で転倒しかけてビビっていたのでトンネルが見えるところまで行ったのですが、、とてもトンネル通る気にならずに、引き返しました。
nikki_1_190429.jpg

nikki_2_190429.jpg

家まで帰ってきたのですが、40km くらいロードレーサーに乗ってみようと思って、小貝川河川敷を南に行きました。いや〜。菜の花が花盛りでしたね。とても良かったです。
nikki_3_190429.jpg

nikki_5_190429.jpg

総走行距離は 42.74 km, 2:23:38、平均速度 17.9 kph, 平均移動速度 21.4 kph でした。風が強かったけど、楽しかったです。
  1. 2019年04月29日 19:45 |
  2. 日記
  3. | トラックバック:0
  4. | コメント:0

”Docker 上のUbuntu 16.04 のPetaLinux 2018.2でuioとudmabufの動作をテストする(DMA_pow2_testを使用)”のRootFSをUbuntu 18.04に変更した

”Docker 上のUbuntu 16.04 のPetaLinux 2018.2でuioとudmabufの動作をテストする(DMA_pow2_testを使用)”で2乗IPを動作させることができた”の続き。

前回は、PetaLinux 2018.2 のプロジェクトを作成して、ビルドを行い、BOOT.BIN の作成したものに、PL のIP(DMA_pow2)のUIO を追加し、さらに udmabuf.ko をビルドした。そして、DMApow2Test2.c を作成し、ビルドして、Ultra96 のPetaLinux 上でテストしたところ成功した。今回は、そのPetaLinux のRootFS をUbuntu 18.04.2 に変更する。

aster_ismの工作室の”ZYBO-Z7を用いたLチカ(Ubuntu16.04編)”を参考にさせていただいた。

Ubuntu 18.04 をダウンロードする。
https://rcn-ee.com/rootfs/eewiki/minfs/ をWeb ブラウザで表示させると、Debian やUbuntu のRootFS がたくさんあった。そのうちの ubuntu-18.04.2-minimal-armhf-2019-04-27.tar.xz をダウンロードした。
PetaLinux_194_190429.png

ubuntu-18.04.2-minimal-armhf-2019-04-27.tar.xz を解凍したところ、ubuntu-18.04.2-minimal-armhf-2019-04-27 ディレクトリの下に armhf-rootfs-ubuntu-bionic.tar が入っていた。
PetaLinux_195_190429.png

MicroSD カードの rootfs ディレクトリの下をすべて削除して、 armhf-rootfs-ubuntu-bionic.tar 内のディレクトリやファイルを書き込む。
cd /media/masaaki/rootfs/
sudo rm -rf *
sync
cd ~/Docker/vivado182ub16/masaaki/PetaLProj/ubuntu-18.04.2-minimal-armhf-2019-04-27
sudo tar xvfp armhf-rootfs-ubuntu-bionic.tar -C /media/masaaki/rootfs/
sync

PetaLinux_196_190429.png

MicroSD カードをUltra96 に入れて電源ON。
Ubuntu 18.04 が立ち上がった。なおこのログイン画面は reboot した後の画面である。
PetaLinux_197_190429.png

ID: ubuntu, パスワード: temppwd でログインできた。

起動ログを示す。

Xilinx Zynq MP First Stage Boot Loader 
Release 2018.2   Apr 25 2019  -  20:02:24
PMUFW: v1.0


U-Boot 2018.01 (Apr 25 2019 - 20:01:03 +0000) Xilinx ZynqMP ZCU100 RevC

I2C:   ready
DRAM:  2 GiB
EL Level: EL2
Chip ID: zu3eg
MMC:   sdhci@ff160000: 0 (SD), sdhci@ff170000: 1
*** Warning - bad CRC, using default environment

In:    serial@ff010000
Out:   serial@ff010000
Err:   serial@ff010000
Model: ZynqMP ZCU100 RevC
Board: Xilinx ZynqMP
Bootmode: SD_MODE
Net:   Net Initialization Skipped
No ethernet found.
U-BOOT for xilinx-ultra96-reva-2018_2

Hit any key to stop autoboot:  0 
Device: sdhci@ff160000
Manufacturer ID: 3
OEM: 5344
Name: SL08G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
6999032 bytes read in 509 ms (13.1 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x10000108
     Data Size:    6960378 Bytes = 6.6 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
     Hash algo:    sha1
     Hash value:   bf72d1cfee04a80e2a5b2d9d17b6d9fefd92391e
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x106a3708
     Data Size:    36729 Bytes = 35.9 KiB
     Architecture: AArch64
     Hash algo:    sha1
     Hash value:   d2d33c2d7fe1be4facc9e56557a056ca154cd89c
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x106a3708
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 0000000007ff4000, end 0000000007ffff78 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-xilinx-v2018.2 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #3 SMP Thu Apr 25 20:00:38 UTC 2019
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc07fe70000 s46488 r8192 d31336 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 512771
[    0.000000] Kernel command line: console=ttyPS0,115200 earlyprintk earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait uio_pdrv_genirq.of_id=generic-uio cpuidle.off=1
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1768684K/2079744K available (9980K kernel code, 644K rwdata, 3128K rodata, 512K init, 2168K bss, 48916K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a40000   (  9984 KB)
[    0.000000]     .rodata : 0xffffff8008a40000 - 0xffffff8008d60000   (  3200 KB)
[    0.000000]       .init : 0xffffff8008d60000 - 0xffffff8008de0000   (   512 KB)
[    0.000000]       .data : 0xffffff8008de0000 - 0xffffff8008e81200   (   645 KB)
[    0.000000]        .bss : 0xffffff8008e81200 - 0xffffff800909f2b0   (  2169 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01bfc800   (    27 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc07ff00000   (  2047 MB)
[    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: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 99.99MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024e3b8, max_idle_ns: 440795206484 ns
[    0.000004] sched_clock: 56 bits at 99MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008319] Console: colour dummy device 80x25
[    0.012594] Calibrating delay loop (skipped), value calculated using timer frequency.. 199.99 BogoMIPS (lpj=399999)
[    0.022953] pid_max: default: 32768 minimum: 301
[    0.027649] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.034207] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.042027] ASID allocator initialised with 65536 entries
[    0.047285] Hierarchical SRCU implementation.
[    0.051884] EFI services will not be available.
[    0.056243] zynqmp_plat_init Platform Management API v1.0
[    0.061585] zynqmp_plat_init Trustzone version v1.0
[    0.066533] smp: Bringing up secondary CPUs ...
[    0.071208] Detected VIPT I-cache on CPU1
[    0.071249] CPU1: Booted secondary processor [410fd034]
[    0.071559] Detected VIPT I-cache on CPU2
[    0.071578] CPU2: Booted secondary processor [410fd034]
[    0.071868] Detected VIPT I-cache on CPU3
[    0.071886] CPU3: Booted secondary processor [410fd034]
[    0.071928] smp: Brought up 1 node, 4 CPUs
[    0.103345] SMP: Total of 4 processors activated.
[    0.108018] CPU features: detected feature: 32-bit EL0 Support
[    0.113816] CPU: All CPU(s) started at EL2
[    0.117890] alternatives: patching kernel code
[    0.123020] devtmpfs: initialized
[    0.130364] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.139906] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.152307] xor: measuring software checksum speed
[    0.196987]    8regs     :  2303.000 MB/sec
[    0.237016]    8regs_prefetch:  2053.000 MB/sec
[    0.281386]    32regs    :  2830.000 MB/sec
[    0.321416]    32regs_prefetch:  2381.000 MB/sec
[    0.325840] xor: using function: 32regs (2830.000 MB/sec)
[    0.331290] pinctrl core: initialized pinctrl subsystem
[    0.337047] NET: Registered protocol family 16
[    0.342651] vdso: 2 pages (1 code @ ffffff8008a46000, 1 data @ ffffff8008de4000)
[    0.349859] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.357237] DMA: preallocated 256 KiB pool for atomic allocations
[    0.393716] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
[    0.401078] ARM CCI_400_r1 PMU driver probed
[    0.405603] zynqmp-pinctrl ff180000.pinctrl: zynqmp pinctrl initialized
[    0.425598] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.496596] raid6: int64x1  gen()   401 MB/s
[    0.568648] raid6: int64x1  xor()   445 MB/s
[    0.640725] raid6: int64x2  gen()   688 MB/s
[    0.712774] raid6: int64x2  xor()   603 MB/s
[    0.784861] raid6: int64x4  gen()  1043 MB/s
[    0.856879] raid6: int64x4  xor()   742 MB/s
[    0.928960] raid6: int64x8  gen()   980 MB/s
[    1.000987] raid6: int64x8  xor()   745 MB/s
[    1.073092] raid6: neonx1   gen()   726 MB/s
[    1.145101] raid6: neonx1   xor()   852 MB/s
[    1.217192] raid6: neonx2   gen()  1169 MB/s
[    1.289213] raid6: neonx2   xor()  1207 MB/s
[    1.361292] raid6: neonx4   gen()  1506 MB/s
[    1.433340] raid6: neonx4   xor()  1442 MB/s
[    1.505385] raid6: neonx8   gen()  1652 MB/s
[    1.577454] raid6: neonx8   xor()  1534 MB/s
[    1.581534] raid6: using algorithm neonx8 gen() 1652 MB/s
[    1.586896] raid6: .... xor() 1534 MB/s, rmw enabled
[    1.591828] raid6: using neon recovery algorithm
[    1.597718] SCSI subsystem initialized
[    1.601497] usbcore: registered new interface driver usbfs
[    1.606824] usbcore: registered new interface driver hub
[    1.612113] usbcore: registered new device driver usb
[    1.617155] media: Linux media interface: v0.10
[    1.621605] Linux video capture interface: v2.00
[    1.626210] pps_core: LinuxPPS API ver. 1 registered
[    1.631099] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.640193] PTP clock support registered
[    1.644092] EDAC MC: Ver: 3.0.0
[    1.647554] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[    1.654564] FPGA manager framework
[    1.657905] fpga-region fpga-full: FPGA Region probed
[    1.662915] Advanced Linux Sound Architecture Driver Initialized.
[    1.669155] Bluetooth: Core ver 2.22
[    1.672558] NET: Registered protocol family 31
[    1.676954] Bluetooth: HCI device and connection manager initialized
[    1.683272] Bluetooth: HCI socket layer initialized
[    1.688113] Bluetooth: L2CAP socket layer initialized
[    1.693148] Bluetooth: SCO socket layer initialized
[    1.698651] clocksource: Switched to clocksource arch_sys_counter
[    1.704639] VFS: Disk quotas dquot_6.6.0
[    1.708486] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.719525] NET: Registered protocol family 2
[    1.724057] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.731185] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.737977] TCP: Hash tables configured (established 16384 bind 16384)
[    1.744402] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.750307] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.756805] NET: Registered protocol family 1
[    1.761221] RPC: Registered named UNIX socket transport module.
[    1.766955] RPC: Registered udp transport module.
[    1.771619] RPC: Registered tcp transport module.
[    1.776289] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.783292] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.790389] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.798761] audit: initializing netlink subsys (disabled)
[    1.804043] audit: type=2000 audit(1.744:1): state=initialized audit_enabled=0 res=1
[    1.804403] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    1.818783] NFS: Registering the id_resolver key type
[    1.823662] Key type id_resolver registered
[    1.827794] Key type id_legacy registered
[    1.831778] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.838447] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    1.869095] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    1.876313] io scheduler noop registered
[    1.880189] io scheduler deadline registered
[    1.884438] io scheduler cfq registered (default)
[    1.889096] io scheduler mq-deadline registered
[    1.893593] io scheduler kyber registered
[    1.899033] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    1.905657] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[    1.912572] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[    1.919487] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[    1.926404] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[    1.933322] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[    1.940241] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[    1.947168] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[    1.954093] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[    1.961074] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[    1.967983] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[    1.974904] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[    1.981820] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[    1.988742] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[    1.995664] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[    2.002582] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[    2.009508] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[    2.043552] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    2.053642] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    2.064187] brd: module loaded
[    2.071280] loop: module loaded
[    2.075203] mtdoops: mtd device (mtddev=name/number) must be supplied
[    2.083855] libphy: Fixed MDIO Bus: probed
[    2.088870] tun: Universal TUN/TAP device driver, 1.6
[    2.093911] CAN device driver interface
[    2.098543] usbcore: registered new interface driver asix
[    2.103813] usbcore: registered new interface driver ax88179_178a
[    2.109825] usbcore: registered new interface driver cdc_ether
[    2.115618] usbcore: registered new interface driver net1080
[    2.121240] usbcore: registered new interface driver cdc_subset
[    2.127122] usbcore: registered new interface driver zaurus
[    2.132670] usbcore: registered new interface driver cdc_ncm
[    2.138633] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    2.145216] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.151562] ehci-pci: EHCI PCI platform driver
[    2.156253] usbcore: registered new interface driver uas
[    2.161403] usbcore: registered new interface driver usb-storage
[    2.167952] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0
[    2.175037] i2c /dev entries driver
[    2.179248] IR NEC protocol handler initialized
[    2.183598] IR RC5(x/sz) protocol handler initialized
[    2.188610] IR RC6 protocol handler initialized
[    2.193107] IR JVC protocol handler initialized
[    2.197607] IR Sony protocol handler initialized
[    2.202189] IR SANYO protocol handler initialized
[    2.206860] IR Sharp protocol handler initialized
[    2.211531] IR MCE Keyboard/mouse protocol handler initialized
[    2.217327] IR XMP protocol handler initialized
[    2.222950] usbcore: registered new interface driver uvcvideo
[    2.228503] USB Video Class driver (1.1.1)
[    2.232640] ltc2952-poweroff ltc2954: pm_power_off already registered
[    2.238977] ltc2952-poweroff: probe of ltc2954 failed with error -16
[    2.246159] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer at ffffff800912d000 with timeout 10s
[    2.255111] Bluetooth: HCI UART driver ver 2.3
[    2.259372] Bluetooth: HCI UART protocol H4 registered
[    2.264470] Bluetooth: HCI UART protocol BCSP registered
[    2.269770] Bluetooth: HCI UART protocol LL registered
[    2.274850] Bluetooth: HCI UART protocol ATH3K registered
[    2.280212] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    2.286477] Bluetooth: HCI UART protocol Intel registered
[    2.291804] Bluetooth: HCI UART protocol QCA registered
[    2.297029] usbcore: registered new interface driver bcm203x
[    2.302649] usbcore: registered new interface driver bpa10x
[    2.308179] usbcore: registered new interface driver bfusb
[    2.313632] usbcore: registered new interface driver btusb
[    2.319052] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[    2.324721] usbcore: registered new interface driver ath3k
[    2.330254] EDAC MC: ECC not enabled
[    2.333922] EDAC DEVICE0: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    2.346532] CPUidle arm: Failed to register cpuidle driver
[    2.352025] sdhci: Secure Digital Host Controller Interface driver
[    2.358011] sdhci: Copyright(c) Pierre Ossman
[    2.362335] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.410663] mmc0: SDHCI controller on ff160000.sdhci [ff160000.sdhci] using ADMA 64-bit
[    2.424408] sdhci-arasan ff170000.sdhci: parsing dt failed (-517)
[    2.430701] ledtrig-cpu: registered to indicate activity on CPUs
[    2.436696] usbcore: registered new interface driver usbhid
[    2.442073] usbhid: USB HID core driver
[    2.447790] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    2.455910] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    2.465513] Netfilter messages via NETLINK v0.30.
[    2.470167] ip_tables: (C) 2000-2006 Netfilter Core Team
[    2.475454] Initializing XFRM netlink socket
[    2.479627] NET: Registered protocol family 10
[    2.484392] Segment Routing with IPv6
[    2.487915] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    2.493361] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.499481] NET: Registered protocol family 17
[    2.503751] NET: Registered protocol family 15
[    2.508169] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.521040] Ebtables v2.0 registered
[    2.524689] can: controller area network core (rev 20170425 abi 9)
[    2.530813] NET: Registered protocol family 29
[    2.535145] can: raw protocol (rev 20170425)
[    2.539381] can: broadcast manager protocol (rev 20170425 t)
[    2.545006] can: netlink gateway (rev 20170425) max_hops=1
[    2.550728] Bluetooth: RFCOMM TTY layer initialized
[    2.555424] Bluetooth: RFCOMM socket layer initialized
[    2.560531] Bluetooth: RFCOMM ver 1.11
[    2.564240] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.569514] Bluetooth: BNEP filters: protocol multicast
[    2.574706] Bluetooth: BNEP socket layer initialized
[    2.579640] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.585517] Bluetooth: HIDP socket layer initialized
[    2.590591] 9pnet: Installing 9P2000 support
[    2.594701] Key type dns_resolver registered
[    2.599445] registered taskstats version 1
[    2.603735] Btrfs loaded, crc32c=crc32c-generic
[    2.614911] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 40, base_baud = 6249999) is a xuartps
[    2.623958] serial serial0: tty port ttyPS1 registered
��r��‚�����ͽ�������AM���*������5R��r��‚�����ͽ�������AM���*������5R��r����ʒ���э��ͽ���ڍ������"�ͅ����5R��r����ʒ���э��ͽ���ڍ������"�ͅ����5R�[    2.654525] xilinx-psgtr fd400000.zynqmp_phy: Lane:1 type:8 protocol:4 pll_locked:yes
[    2.662850] PLL: shutdown
[    2.665603] PLL: shutdown
[    2.665675] mmc0: new high speed SDHC card at address aaaa
[    2.665882] mmcblk0: mmc0:aaaa SL08G 7.40 GiB 
[    2.678518] PLL: enable
[    2.681007] PLL: shutdown
[    2.684449] PLL: enable
[    2.686924] xilinx-dp-snd-codec fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
[    2.697547] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
[    2.705510] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
[    2.713776]  mmcblk0: p1 p2
[    2.713867] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.728982] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.741583] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
[    2.751702] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
[    2.758637] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.765168] [drm] No driver support for vblank timestamp query.
[    2.771144] xlnx-drm xlnx-drm.0: bound fd4a0000.zynqmp-display (ops 0xffffff8008af7228)
[    3.858660] [drm] Cannot find any crtc or sizes
[    3.863303] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.zynqmp-display on minor 0
[    3.871325] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsystem driver probed
[    3.880995] xilinx-psgtr fd400000.zynqmp_phy: Lane:2 type:0 protocol:3 pll_locked:yes
[    3.890446] xilinx-psgtr fd400000.zynqmp_phy: Lane:3 type:1 protocol:3 pll_locked:yes
[    3.898462] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.903877] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    3.911734] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x22010010
[    3.920387] xhci-hcd xhci-hcd.0.auto: irq 50, io mem 0xfe300000
[    3.926387] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.933093] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.940293] usb usb1: Product: xHCI Host Controller
[    3.945153] usb usb1: Manufacturer: Linux 4.14.0-xilinx-v2018.2 xhci-hcd
[    3.951837] usb usb1: SerialNumber: xhci-hcd.0.auto
[    3.957021] hub 1-0:1.0: USB hub found
[    3.960714] hub 1-0:1.0: 1 port detected
[    3.964781] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.970187] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    3.977887] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.985972] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    3.992679] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.999881] usb usb2: Product: xHCI Host Controller
[    4.004741] usb usb2: Manufacturer: Linux 4.14.0-xilinx-v2018.2 xhci-hcd
[    4.011425] usb usb2: SerialNumber: xhci-hcd.0.auto
[    4.016525] hub 2-0:1.0: USB hub found
[    4.020218] hub 2-0:1.0: 1 port detected
[    4.025672] i2c i2c-0: Added multiplexed i2c bus 2
[    4.030509] i2c i2c-0: Added multiplexed i2c bus 3
[    4.035345] i2c i2c-0: Added multiplexed i2c bus 4
[    4.040184] i2c i2c-0: Added multiplexed i2c bus 5
[    4.045424] tps65086 6-005e: Device: TPS650864, OTP: C, Rev: 0
[    4.054190] i2c i2c-0: Added multiplexed i2c bus 6
[    4.059508] ina2xx 7-0040: power monitor ina226 (Rshunt = 10000 uOhm)
[    4.065900] i2c i2c-0: Added multiplexed i2c bus 7
[    4.070785] i2c i2c-0: Added multiplexed i2c bus 8
[    4.075659] i2c i2c-0: Added multiplexed i2c bus 9
[    4.080365] pca954x 0-0075: registered 8 multiplexed busses for I2C switch pca9548
[    4.087955] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 31
[    4.095459] sdhci-arasan ff170000.sdhci: allocated mmc-pwrseq
[    4.146662] mmc1: SDHCI controller on ff170000.sdhci [ff170000.sdhci] using ADMA 64-bit
[    4.162015] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    4.168911] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01 00:15:07 UTC (907)
[    4.172972] sdhci-arasan ff170000.sdhci: card claims to support voltages below defined range
[    4.185625] clk: Not disabling unused clocks
[    4.189864] ALSA device list:
[    4.192758]   #0: DisplayPort monitor
[    4.197460] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    4.203206] mmc1: new high speed SDIO card at address 0001
[    4.203901] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
[    4.203929] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
[    4.203932] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
[    4.203934] wlcore: WARNING falling back to default config
[    4.262902] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    4.270927] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    4.284070] devtmpfs: mounted
[    4.287164] Freeing unused kernel memory: 512K
[    4.306670] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    4.459191] usb 1-1: New USB device found, idVendor=0424, idProduct=2744
[    4.465830] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.472931] usb 1-1: Product: USB2744
[    4.476575] usb 1-1: Manufacturer: Microchip Tech
[    4.490000] hub 1-1:1.0: USB hub found
[    4.493730] hub 1-1:1.0: 4 ports detected
[    4.499093] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    4.508368] wlcore: loaded
[    4.586714] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    4.611053] usb 2-1: New USB device found, idVendor=0424, idProduct=5744
[    4.617681] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[    4.624796] usb 2-1: Product: USB5744
[    4.628436] usb 2-1: Manufacturer: Microchip Tech
[    4.633982] hub 2-1:1.0: USB hub found
[    4.637688] hub 2-1:1.0: 3 ports detected
[    4.698473] systemd[1]: System time before build time, advancing clock.
[    4.717217] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[    4.727146] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[    4.736336] Bluetooth: hci0: download firmware failed, retrying...
[    4.752352] systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[    4.773872] systemd[1]: Detected architecture arm64.

Welcome to Ubuntu 18.04.2 LTS!

[    4.791448] systemd[1]: Set hostname to <arm>.
[    4.822767] usb 1-1.4: new high-speed USB device number 3 using xhci-hcd
[    4.931439] usb 1-1.4: New USB device found, idVendor=0424, idProduct=2740
[    4.938257] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.945542] usb 1-1.4: Product: Hub Controller
[    4.949958] usb 1-1.4: Manufacturer: Microchip Tech
[    4.966674] [drm] Cannot find any crtc or sizes
[    5.122341] systemd[1]: File /lib/systemd/system/systemd-udevd.service:34 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[    5.139061] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[    5.241113] systemd[1]: Reached target Swap.
[  OK  ] Reached target Swap.
[    5.254764] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[    5.271059] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[    5.286885] systemd[1]: Created slice System Slice.
[  OK  ] Created slice System Slice.
[    5.302965] systemd[1]: Listening on Syslog Socket.
[    5.307802] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[    5.317747] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[    5.326940] Bluetooth: hci0: download firmware failed, retrying...
[  OK  ] Listening on Syslog Socket.
[  OK  ] Reached target Slices.
[  OK  ] Listening on Journal Audit Socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Listening on Journal Socket.
         Starting Remount Root and Kernel File Systems...
         Mounting Kernel Debug File System...
         Starting udev Coldplug all Devices...
         Starting Set the console keyboard layout...
         Mounting POSIX Message Queue File System...
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Local Encrypted Volumes.
         Starting Load Kernel Modules...
         Mounting Huge Pages File System...
[  OK  ] Listening on Journal Socket (/dev/log).
         Starting Journal Service...
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Journal Service.
[  OK  ] Mounted Huge Pages File System.
         Starting Apply Kernel Variables...
         Mounting Kernel Configuration File System...
         Starting Load/Save Random Seed...
         Starting Flush Journal to Persistent Storage...
         Starting udev Kernel Device Manager...
[  OK  ] Started Set the console keyboard layout.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Set console font and keymap...
[    5.881706] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[    5.890922] Bluetooth: hci0: download firmware failed, retrying...
         Starting Raise network interfaces...
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Set console font and keymap.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Reached target Sound Card.
         Starting Create Volatile Files and Directories...
[  OK  ] Found device /dev/ttyPS0.
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Listening on Load/Save RF Kill Switch Status [    6.425684] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
/dev/rfkill Watch.
[    6.439696] Bluetooth: hci0: download firmware failed, retrying...
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Raise network interfaces.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Started Discard unused blocks once a week.
[  OK  ] Started Message of the Day.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting Avahi mDNS/DNS-SD Stack...
[  OK  ] Started Set the CPU Frequency Scaling governor.
[  OK  ] Started Regular background program processing daemon.
[  OK  ] Started D-Bus System Message Bus.
         Starting oFono Mobile telephony stack...
         Starting Connection service...
         Starting Login Service...
         Starting LSB: Load kernel modules needed to enable cpufreq scaling...
         Starting Generic Board Startup...
         Starting Bluetooth service...
         Starting LSB: Start busybox udhcpd at boot time...
         Starting WPA supplicant...
         Starting System Logging Service...
         Starting Dispatcher daemon for systemd-networkd...
         Starting Load/Save RF Kill Switch Status...
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started oFono Mobile telephony stack.
[  OK  ] Started Load/Save RF Kill Switch Status.
[  OK  ] Started Login Service.
[  OK  ] Started Bluetooth service.
[  OK  ] Started System Logging Service.
[  OK  ] Started LSB: Start busybox udhcpd at boot time.
[  OK  ] Started Connection service.
[  OK  ] Started Generic Board Startup.
[  OK  ] Started WPA supplicant.
[  OK  ] Reached target Network.
         Starting Permit User Sessions...
         Starting OpenBSD Secure Shell server...
         Starting A high performance web server and a reverse proxy server...
         Starting Hostname Service...
[  OK  ] Reached target Bluetooth.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started LSB: Load kernel modules needed to enable cpufreq scaling.
         Starting LSB: set CPUFreq kernel parameters...
         Starting Set console scheme...
[  OK  ] Started Serial Getty on ttyPS0.
[  OK  ] Started LSB: set CPUFreq kernel parameters.
[  OK  ] Started Hostname Service.
[  OK  ] Started Set console scheme.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Started A high performance web server and a reverse proxy server.
[  OK  ] Started Dispatcher daemon for systemd-networkd.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Ubuntu 18.04.2 LTS arm ttyPS0

default username:password is [ubuntu:temppwd]

arm login: ubuntu
Password: 
Last login: Sun Jan 28 15:59:20 UTC 2018 on ttyPS0
ubuntu@arm:~$ 

  1. 2019年04月29日 05:17 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

”Docker 上のUbuntu 16.04 のPetaLinux 2018.2でuioとudmabufの動作をテストする(DMA_pow2_testを使用)”で2乗IPを動作させることができた

”Docker 上のUbuntu 16.04 のPetaLinux 2018.2でuioとudmabufの動作をテストする(DMA_pow2_testを使用)”にudmabufを追加する”の続き。

PetaLinux 2018.2 のプロジェクトを作成して、ビルドを行い、BOOT.BIN の作成したものに、PL のIP(DMA_pow2)のUIO を追加し、さらに udmabuf.ko をビルドした。今回は、DMApow2Test2.c を作成し、ビルドして、Ultra96 のPetaLinux 上でテストする。

DMA_pow2_test2.c は”Ultra96 ボードでデバイスツリー・オーバーレイをテストする5”に記述されている。それをほとんどまるごと使用するのだが、PetaLinux のアプリケーションでは、アンダーバーを使用することができないためDMApow2Test2.c とした。それに、udmabuf4 を udmabuf0 に変更した。別に udmabuf4 でも問題ないが、前のブログ記事で udmabuf0 を使用したので、変更を行った。

Ultra96 のPetaLinux2018.2 でhelloworld アプリケーションを作る(ただし、rootfs を使用)”を参考にした。

DMApow2Test2 カスタム・アプリケーションを追加する。
petalinux-create -t apps --template c --name DMApow2Test2 --enable
PetaLinux_181_190428.png

DMA_pow2_test/project-spec/meta-user/recipes-apps/DMApow2Test2 ディレクトリが作成されて、その下の files ディレクトリの下に DMApow2Test2.c ができた。
PetaLinux_182_190428.png

DMApow2Test2.c をダブルクリックして起動し、”Ultra96 ボードでデバイスツリー・オーバーレイをテストする5”に記述されているDMA_pow2_test2.c を DMApow2Test2.c に変更して、記述をコピー・アンド・ペーストした。
PetaLinux_183_190428.png

DMApow2Test2.c を示す。

// DMApow2Test2.c
// 2019/04/28 by marsee
//

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>

int main(){
    volatile unsigned int *udmabuf0_buf;
    int udmabuf0_fd, fd_phys_addr;
    char  attr[1024];
    unsigned long  phys_addr;
    int fd1;
    volatile unsigned int *dma_pow2;
    int i;
    
    // udmabuf0
    udmabuf0_fd = open("/dev/udmabuf0", O_RDWR); // frame_buffer, The chache is enabled. 
    if (udmabuf0_fd == -1){
        fprintf(stderr, "/dev/udmabuf0 open error\n");
        exit(-1);
    }
    udmabuf0_buf = (volatile unsigned int *)mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, udmabuf0_fd, 0);
    if (!udmabuf0_buf){
        fprintf(stderr, "udmabuf0_buf mmap error\n");
        exit(-1);
    }

    // phys_addr of udmabuf0
    fd_phys_addr = open("/sys/class/udmabuf/udmabuf0/phys_addr", O_RDONLY);
    if (fd_phys_addr == -1){
        fprintf(stderr, "/sys/class/udmabuf/udmabuf0/phys_addr open error\n");
        exit(-1);
    }
    read(fd_phys_addr, attr, 1024);
    sscanf(attr, "%lx", &phys_addr);  
    close(fd_phys_addr);
    printf("phys_addr = %x\n", (int)phys_addr);

    // data set
    for(i=0; i<20; i++){
        udmabuf0_buf[i] = i;
    }

    // uio initialize (uio1)
    fd1 = open("/dev/uio1", O_RDWR|O_SYNC); // dma_pow2 IP
    if (fd1 < 1){
        fprintf(stderr, "/dev/uio1 (dma_pow2) open error\n");
        exit(1);
    }
    dma_pow2 = (volatile unsigned *)mmap(NULL, 0x10000, PROT_READ|PROT_WRITE, MAP_SHARED, fd1, 0);
    if (!dma_pow2){
        fprintf(stderr, "dma_pow2 mmap error\n");
        exit(1);
    }
    printf("Address of int size is %d\n", sizeof(int *));
    
    dma_pow2[6] = phys_addr; // Data signal of in_r
    dma_pow2[8] = phys_addr+10*sizeof(int); // Data signal of out_r
    
    dma_pow2[0] = 1; // ap_start
    
    while (!(dma_pow2[0] & 0x2)) ; // ap_done ?
    
    for(i=0; i<10; i++){
        printf("data[%d] = %d, result[%d] = %d\n", i, udmabuf0_buf[i], i, udmabuf0_buf[10+i]);
    }
    
    munmap((void *)dma_pow2, 0x10000);
    close(fd1);
    munmap((void *)udmabuf0_buf, 0x1000);
    close(udmabuf0_fd);
    
    return(0);
}


rootfs をビルドする。
LANG=en_US.UTF-8 petalinux-build -c rootfs
PetaLinux_184_190428.png

ビルドが成功した。
rootfs.tar.gz が更新されている。
PetaLinux_185_190428.png

rootfs.tar.gz を表すると、/usr/bin/ ディレクトリの下に DMApow2Test2 が生成されていた。
PetaLinux_186_190428.png

DMApow2Test2 をホストパソコンのホーム上にコピーした。
PetaLinux_187_190428.png

MicroSD カードをホストパソコンにマウントして、rootfs の /home/root/ ディレクトリにDMApow2Test2 を書き込む。
sudo mv DMApow2Test2 /media/masaaki/rootfs/home/root/
sudo ls /media/masaaki/rootfs/home/root/

PetaLinux_188_190428.png

MicroSD カードをUltra96 に入れて電源ON。
ログインしてから、まずは udmabuf をロードしてから、DMApow2Test2 を起動した。
PetaLinux_189_190428.png

入力値が 2 乗倍されて出力されていたので正しい。成功だ。

次に、rootfs を構築するに時間がかかるため、それをしなくてもビルドできるように探ってみよう。
LANG=en_US.UTF-8 petalinux-build
したがエラーになってしまった。
PetaLinux_190_190428.png

ERROR: DMApow2Test2-1.0-r0 do_package_qa: QA Issue: /usr/bin/DMApow2Test2 contained in package DMApow2Test2 requires libc.so.6()(64bit), but no providers found in RDEPENDS_DMApow2Test2? [file-rdeps]
ERROR: DMApow2Test2-1.0-r0 do_package_qa: QA Issue: /usr/bin/DMApow2Test2 contained in package DMApow2Test2 requires libc.so.6(GLIBC_2.17)(64bit), but no providers found in RDEPENDS_DMApow2Test2? [file-rdeps]
ERROR: DMApow2Test2-1.0-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: DMApow2Test2-1.0-r0 do_package_qa: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/masaaki/PetaLProj/DMA_pow2_test/build/tmp/work/aarch64-xilinx-linux/DMApow2Test2/1.0-r0/temp/log.do_package_qa.31858
ERROR: Task (/home/masaaki/PetaLProj/DMA_pow2_test/project-spec/meta-user/recipes-apps/DMApow2Test2/DMApow2Test2.bb:do_package_qa) failed with exit code '1'


ZYBO (Zynq) 初心者ガイド (11) LinuxユーザアプリケーションでLチカ”によると2回めにビルドするとエラーが発生するとあるが、私のところでも同様にエラーになった。

ZYBO (Zynq) 初心者ガイド (11) LinuxユーザアプリケーションでLチカ”に従って、
LANG=en_US.UTF-8 petalinux-build -c DMApow2Test2 -x do_clean
PetaLinux_191_190428.png

してから
LANG=en_US.UTF-8 petalinux-build -c DMApow2Test2 -x do_install
PetaLinux_192_190428.png

するとビルドに成功した。
DMA_pow2_test/build/tmp/work/aarch64-xilinx-linux/ ディレクトリに DMApow2Test2 が生成されていた。
PetaLinux_193_190428.png
  1. 2019年04月28日 07:33 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

”Docker 上のUbuntu 16.04 のPetaLinux 2018.2でuioとudmabufの動作をテストする(DMA_pow2_testを使用)”にudmabufを追加する

”Docker 上のUbuntu 16.04 のPetaLinux 2018.2でuioとudmabufの動作をテストする(DMA_pow2_testを使用)”にPLのIPのUIOを追加する”の続き。

PetaLinux 2018.2 のプロジェクトを作成して、ビルドを行い、BOOT.BIN の作成したものに、PL のIP(DMA_pow2)のUIO を追加した。今回は、それに udmabuf を追加する。

udmabufをPetaLinux 2018.2でビルドする”を参考にする。

PetaLinux のプロジェクトのディレクトリで、udmabuf をカーネルモジュールとして作成しよう。
petalinux-create -t modules --name udmabuf --enable
PetaLinux_174_190427.png

DMA_pow2_test/project-spec/meta-user/recipes-modules ディレクトリの下に udmabuf ディレクトリが作成され、その下の files ディレクトリの下に udmabuf.c が生成された。
PetaLinux_175_190427.png

自動生成された DMA_pow2_test/project-spec/meta-user/recipes-module/udmabuf/files/udmabuf.c を開いて、ikwzm さんの udmabuf.c の内容をコピペして入れ替えた。
PetaLinux_176_190427.png

LANG=en_US.UTF-8 petalinux-build -c udmabuf
で udmabuf をビルドしたところ成功した。
PetaLinux_177_190427.png

~/Docker/vivado182ub16/masaaki/PetaLProj/DMA_pow2_test/build/tmp/sysroots-components/ultra96_zynqmp/udmabuf/lib/modules/4.14.0-xilinx-v2018.2/extra/ ディレクトリの下に udmabuf.ko が生成されていた。
PetaLinux_178_190427.png

ホストパソコンのターミナルで udmabuf.ko の生成されているディレクトリに行って、udmabuf.ko をUltra96 のMicroSD カードの /home/root の下にコピペする。
cd ~/Docker/vivado182ub16/masaaki/PetaLProj/DMA_pow2_test/build/tmp/sysroots-components/ultra96_zynqmp/udmabuf/lib/modules/4.14.0-xilinx-v2018.2/extra/
sudo cp udmabuf.ko /media/masaaki/rootfs/home/root/

PetaLinux_179_190427.png

Ultra96 ボードの電源をON して、Ultra96 のPetaLinux 上で udmabuf.ko をinsmod したところ成功した。
/dev/udmabuf0/ が生成されている。
insmod udmabuf.ko udmabuf0=0x1000
ls -l /dev/udmabuf0

PetaLinux_180_190427.png

root@xilinx-ultra96-reva-2018_2:~# ls
udmabuf.ko
root@xilinx-ultra96-reva-2018_2:~# insmod udmabuf.ko udmabuf0=0x1000
[   57.543694] udmabuf udmabuf0: driver version = 1.4.0
[   57.548596] udmabuf udmabuf0: major number   = 243
[   57.553366] udmabuf udmabuf0: minor number   = 0
[   57.557962] udmabuf udmabuf0: phys address   = 0x000000006fc8e000
[   57.564038] udmabuf udmabuf0: buffer size    = 4096
[   57.568895] udmabuf udmabuf0: dma coherent   = 0
[   57.573499] udmabuf udmabuf.0: driver installed.
root@xilinx-ultra96-reva-2018_2:~# ls -l /dev/udmabuf0
crw------- 1 root root 243, 0 Apr 25 20:22 /dev/udmabuf0

  1. 2019年04月27日 04:08 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

”Docker 上のUbuntu 16.04 のPetaLinux 2018.2でuioとudmabufの動作をテストする(DMA_pow2_testを使用)”にPLのIPのUIOを追加する

Docker 上のUbuntu 16.04 のPetaLinux 2018.2でuioとudmabufの動作をテストする(DMA_pow2_testを使用)”の続き。

前回は、DMA_pow2_test のVivado 2018.2 プロジェクトを使用して uio と udmabuf のテストをすることにした。ということで、PetaLinux 2018.2 のプロジェクトを作成して、ビルドを行い、BOOT.BIN の作成まで行った。今回は、それにPL のIP のUIO を追加しよう。

今回は、
Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)にUIOを追加した”と
Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)にPLのUIOを追加した”を参考にする。

petalinux-config --get-hw-description=DMA_pow2_test.sdk
を実行して、設定画面の DTG Settings > Kernel Bootargs を

earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait uio_pdrv_genirq.of_id=generic-uio cpuidle.off=1

に変更した。
PetaLinux_168_190426.png

PetaLinux_169_190426.png

PL のDTS を見てみよう。PetaLProj/DMA_pow2_test/componets/plnx_workspace/device-tree/device-tree/pl.dtsi がそれだ。
PetaLinux_170_190426.png

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version:  
 * Today is: Wed Apr 24 20:08:16 2019
 */


/ {
    amba_pl: amba_pl@0 {
        #address-cells = <2>;
        #size-cells = <2>;
        compatible = "simple-bus";
        ranges ;
        DMA_pow2_0: DMA_pow2@80000000 {
            compatible = "xlnx,DMA-pow2-1.0";
            reg = <0x0 0x80000000 0x0 0x10000>;
            xlnx,s-axi-axilites-addr-width = <0x6>;
            xlnx,s-axi-axilites-data-width = <0x20>;
        };
        psu_ctrl_ipi: PERIPHERAL@ff380000 {
            compatible = "xlnx,PERIPHERAL-1.0";
            reg = <0x0 0xff380000 0x0 0x80000>;
        };
        psu_message_buffers: PERIPHERAL@ff990000 {
            compatible = "xlnx,PERIPHERAL-1.0";
            reg = <0x0 0xff990000 0x0 0x10000>;
        };
    };
};


DMA_pow2_0 だけがPL のIP としてエントリされている。

ZYBO (Zynq) 初心者ガイド (16) Linuxから自作IPをUIOで制御する”によると、(多少、PetaLinux のバージョン違いによりディレクトリ名が違っているところはあるのだが) PetaLProj/DMA_pow2_test/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi が編集可能なDTS のファイルとのことだ。
system-user.dtsi を以下のように書き換えて DMA_pow2_0 IP がUIO に追加されるようにした。
PetaLinux_171_190426.png

/include/ "system-conf.dtsi"
/include/ "openamp-overlay.dtsi"
/{
    chosen {
        bootargs = "console=ttyPS0,115200 earlyprintk earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait uio_pdrv_genirq.of_id=generic-uio cpuidle.off=1";
    };
};

&DMA_pow2_0 {
    compatible = "generic-uio";
};


ビルドを行った。
LANG=en_US.UTF-8 petalinux-build
LANG=en_US.UTF-8 petalinux-package --image -c kernel --format uImage
LANG=en_US.UTF-8 petalinux-package --boot --fsbl components/plnx_workspace/fsbl/fsbl/Release/fsbl.elf --fpga components/plnx_workspace/fsbl/fsbl_hwproj/DMA_pow2_test_wrapper.bit --pmufw images/linux/pmufw.elf --u-boot

各ファイルが生成された。
PetaLinux_172_190426.png

MicroSD カードの第1パーティションに、BOOT.BIN と image.ub を書いて、第2パーティションに rootfs.tar.gz を展開した。
第2パーティションに rootfs.tar.gz を展開する様子を示す。
cd /media/masaaki/rootfs/
sudo rm -rf *
sync
cd ~/Docker/vivado182ub16/masaaki/PetaLProj/DMA_pow2_test/images/linux/
sudo tar fxz rootfs.tar.gz -C /media/masaaki/rootfs/
sync


書いたMicroSD カードをUltra96 に入れて電源ON。
PetaLinux がブートした。
/sys/class/uio を見ると、 uio0 と uio1 があった。
uio1 に入って name を見ると、DMA_pow2 だった。
その下の maps/map0 に入って、各種パラーメタを見た。
PetaLinux_173_190427.png

root@xilinx-ultra96-reva-2018_2:/sys/class/uio# ls
uio0 uio1
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# cd uio1
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1# ls
dev device event maps name power subsystem uevent version
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1# more name
DMA_pow2
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1# cd maps
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps# ls
map0
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps# cd map0
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps/map0# ls
addr name offset size
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps/map0# more addr
0x0000000080000000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps/map0# more name
/amba_pl@0/DMA_pow2@80000000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps/map0# more offset
0x0
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps/map0# more size
0x0000000000010000

  1. 2019年04月26日 05:24 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

Docker 上のUbuntu 16.04 のPetaLinux 2018.2でuioとudmabufの動作をテストする(DMA_pow2_testを使用)

今まで、cam_dp_183 のVivado 2018.3 プロジェクトを使用して、PetaLinux をいろいろと試してみたが、uio と udmabuf の動作テストをする場合に、カメラをDisplayPort に表示して、BMP ファイルの落とすソフトウェアはOpenCV の関数を使用していてハードルが高い。そこで、DMA_pow2_test のVivado 2018.2 プロジェクトを使用して uio と udmabuf のテストをすることにした。

DMA_pow2_test のVivado HLS でのIP 作成と、Vivado 2018.2 のプロジェクトの記事、そして、アプリケーションのDMA_pow2_test2.c の書いてある記事を示す。
Vivado HLS でDMA Readしたデータを2乗し、DMA WriteするUltra96ボード用 IP を作成
デバイスツリー・オーバーレイをテストするためのVivado 2018.2 のプロジェクトを作成する
Ultra96 ボードでデバイスツリー・オーバーレイをテストする5

Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)”を参考にして、PetaLinux 2018.2 で xilinx-ultra96-reva-v2018.2-final.bsp を使用したPetaLinux のプロジェクトを作成する。
petalinux-create -t project -s xilinx-ultra96-reva-v2018.2-final.bsp --name DMA_pow2_test
PetaLinux_156_190425.png

PetaLProj ディレクトリ下に DMA_pow2_test ディレクトリが作成された。
PetaLinux_157_190425.png

DMA_pow2_test ディレクトリ下に DMA_pow2_test.sdk ディレクトリをコピーした。
PetaLinux_158_190425.png

cd DMA_pow2_test
petalinux-config --get-hw-description=DMA_pow2_test.sdk

設定を行うが、設定はすでにされているということが、分かっているので、特にこちらからの設定なしで EXIT した。
PetaLinux_159_190425.png

PetaLinux_160_190425.png

PetaLinux_161_190425.png

LANG=en_US.UTF-8 petalinux-build
PetaLinux_162_190425.png

image/linux ディレクトリの様子を示す。続々とファイルができていた。
PetaLinux_163_190425.png

uImage を作成する。
LANG=en_US.UTF-8 petalinux-package --image -c kernel --format uImage
PetaLinux_164_190425.png

uImage が生成された。
PetaLinux_165_190425.png

最後にBOOT.BIN を作成する。
LANG=en_US.UTF-8 petalinux-package --boot --fsbl components/plnx_workspace/fsbl/fsbl/Release/fsbl.elf --fpga components/plnx_workspace/fsbl/fsbl_hwproj/DMA_pow2_test_wrapper.bit --pmufw images/linux/pmufw.elf --u-boot
PetaLinux_166_190425.png

BOOT.BIN が作成された。
PetaLinux_167_190425.png
  1. 2019年04月25日 05:32 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

Ultra96 で動作するPetaLinux 2018.2 へSDKリモートデバックを行ったが失敗した2(成功するそうです)

Ultra96 で動作するPetaLinux 2018.2 へSDKリモートデバックを行ったが失敗した”の続き。

前回は、”TCF agent を使ってLinaro Ubuntu14.04LTSが動作してるZYBO へパソコンのSDK からリモートデバッグする2”の手順でSDK リモートデバック(つまりホストパソコンからSDK を使用してUltra96 のPetaLinux へリモートデバックする)してみたが失敗した。今回は、PetaLinux のリファレンス・ガイド(UG1144)の手順でやってみたが同様に失敗した。

最初に、Docker コンテナの ~/PetaLProj/cam_dp_183 ディレクトリで、
petalinux-config -c rootfs
を実行した。
設定画面が開いた。Filesystem Packages に入って、misc に入る。
PetaLinux_130_190423.png

tcf-agent に入る。
PetaLinux_131_190423.png

tcf-agent にチェックが入っていたので、そのままにした。
PetaLinux_132_190423.png

次に、Filesystem Packages に入って、console に入る。
PetaLinux_133_190423.png

network に入る。
PetaLinux_134_190423.png

dropbear に入る。
PetaLinux_135_190423.png

dropbear にチェックを入れた。
PetaLinux_136_190423.png

これで設定が終了したので、セーブして exit した。
PetaLinux_137_190423.png

petalinux-config -c rootfs が終了した。
PetaLinux_138_190423.png

これで設定が終了したので、BOOT.BIN の生成まで行う。
LANG=en_US.UTF-8 petalinux-build
PetaLinux_139_190423.png

LANG=en_US.UTF-8 petalinux-package --image -c kernel --format uImage
PetaLinux_140_190423.png

LANG=en_US.UTF-8 petalinux-package --boot --fsbl components/plnx_workspace/fsbl/fsbl/Release/fsbl.elf --fpga components/plnx_workspace/fsbl/fsbl_hwproj/cam_dp_wrapper.bit --pmufw images/linux/pmufw.elf --u-boot
PetaLinux_141_190423.png

BOOT.BIN, image.ub, rootfs.tar.gz が更新された。
PetaLinux_142_190423.png

MicroSD カードのすべてのファイルを入れ替えた。
cd /media/masaaki/ROOT_FS/
sudo rm -rf *
sync
cd ~/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/images/linux/
sudo tar fxz rootfs.tar.gz -C /media/masaaki/ROOT_FS/
sync

PetaLinux_143_190423.png

MicroSD カードをUltra96 に戻して、Ultra96 をブートした。無線LANの設定も無くなってしまったので、もう一度、”Ultra96 のPetaLinux2018.2 で無線LANを設定する”の設定を行って、無線LANが復活した。
PetaLinux の起動画面で

Starting tcf-agent: OK

のメッセージが出た。

ホストパソコンのUbuntu 18.04 で xsdk を起動した。
xsdk &
PetaLinux_144_190423.png

SDK が立ち上がった。ワークスペースのディレクトリを指定した。
PetaLinux_145_190423.png

SDK が立ち上がった。
PetaLinux_146_190423.png

最初にハードウェア・プラットフォーム仕様を追加する。
File メニュー -> New -> Project.. を指定する。
New Project ウインドウで、Xilinx -> Hardware Platform Specification を選択し、Next ボタンをクリックする。
PetaLinux_147_190423.png

New Hardware Project ダイアログで、Project Name を helloworld2 に指定した。
Target Hardware Specification に cam_dp_183/project-spec/hw-description/system.hdf を指定した。
PetaLinux_148_190423.png

次にアプリケーションを作成する。
File メニュー -> New -> Application Project を選択する。
New Project ダイアログが開く。
Project Name に helloworld と入力し、OS Platform を linux に設定し、Finish ボタンをクリックした。
(2020/06/02:追記) Processor Type が Cortex-A9 になっていた。UltraScale+ MPSoC なのになんで?これを a53 にするとうまくいったそうだ。kotaro さん、ありがとうございました。
PetaLinux_149_190423.png

helloworld プロジェクトが生成された。
helloworld.c を開いた。コードが入っているので、これでOK。
PetaLinux_150_190423.png

左側の Project Explorer のペインで、helloword プロジェクトで右クリックし、右クリックメニューからDebug As -> Debug Configurations... を選択した。
Debug Configurations ダイアログが開く。
左側のペインで Xilinx C/C++ application (System Debugger) を右クリックし、右クリックメニューから New を選択した。
すると、System Debugger using Debug_helloworld.elf on Linux Agent が生成された。
Connection: の New ボタンをクリックした。
PetaLinux_151_190423.png

Taget Name に Ultra96 、Host にUltra96 のPetaLinux のIP アドレスを入れて OK ボタンをクリックした。
なお、Test Connection ボタンを押したときの接続に問題は無かった。
PetaLinux_152_190423.png

Debug Configurations ダイアログで、Application タブをクリックした。
Remote File Path: に /home/root/helloworld.elf を書いた。
Apply ボタンをクリックしてから、Debug ボタンをクリックした。
PetaLinux_153_190423.png

やはり、同様にエラーだった。
PetaLinux_154_190424.png

Ultra96 の /home/root に helloworld.elf はあるので、SFTP でのアップロードは問題ないようだ。
PetaLinux_155_190424.png

どうもうまく行かないので、他の方法でやってみることにする。
  1. 2019年04月24日 05:07 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:2

Ultra96 で動作するPetaLinux 2018.2 へSDKリモートデバックを行ったが失敗した

Ultra96 で動作するPetaLinux 2018.2 へSDKリモートデバックを行ったが失敗した。
使用するのは、”Ultra96 のPetaLinux2018.2 でhelloworld アプリケーションを作る(ただし、rootfs を使用)”のシステムだ。

SDKリモートデバックは tcf agent が起動しているXilinx FPGA 上で動作してるLinux システムに、 elf 実行ファイルをホストパソコンから送り込んでリモートデバックを行う。

cam_dp_183 のVivado プロジェクトを示す。
PetaLinux_113_190422.png

ハードウェアをビットストリーム付きでエクスポートして、SDK を起動した。
PetaLinux_114_190422.png

File メニューからNew -> Application project を選択した。

New Project ダイアログが表示された。Project name に helloworld2 と入力した。Next > ボタンをクリックする。
PetaLinux_115_190422.png

New Project ダイアログの Templates で、Linux Hello World を選択されているのを確認して、Finish ボタンをクリックする。
PetaLinux_116_190422.png

helloworld2 プロジェクトが作成され、C ファイルも生成され、自動的にビルドされ elf ファイルもできた。
PetaLinux_117_190422.png

Ultra96 を起動して、 ifconfig を行った。 192.168.3.28 のIP が振られている。
PetaLinux_118_190422.png

helloworld2 ディレクトリを右クリックし、右クリックメニューから Debug As -> Debug Configuration... を選択した。

Debug Configurations ダイアログが表示された。
PetaLinux_119_190422.png

Xilinx C/C++ application (System Debugger) を右クリックし、右クリックメニューから New を選択した。

Xilinx C/C++ application (System Debugger) の下に、System Debugger using Debug_helloworld2.elf on Linux Agent ができた。
Connection の New ボタンをクリックする。
PetaLinux_120_190422.png

Target Connection Details の New Target Connection ダイアログが表示された。
Target Name を Ultra96 に、Set as default target にチェックを入れて、Host に現在のUltra96 上のLinux の IP アドレスを入力した。
PetaLinux_121_190422.png

Test Connection ボタンをクリックすると、Connection successful! が表示されて、成功した。
PetaLinux_122_190422.png

Target Connection Details の New Target Connection ダイアログで、OK ボタンをクリックし、終了した。
PetaLinux_123_190422.png

Debug Configurations ダイアログに戻った。
PetaLinux_124_190422.png

Application タブをクリックした。Romote File Path: を /home/root/helloworld2.elf に変更して、Apply ボタンをクリックした。
PetaLinux_125_190422.png

次にDebug ボタンをクリックした。
PetaLinux_126_190422.png

Debug パースペクティブに変更するというダイアルが出るので、OK ボタンクリックした。
PetaLinux_127_190422.png

SDK がDebug パースペクティブになるが、Disconnedted されてしまう。
PetaLinux_128_190422.png

おかしい?
Ultra96 で見てみると、helloworld2.elf がアップロードされていたのだが。。。
PetaLinux_129_190422.png

ちなみに、
TCF agent を使ってLinaro Ubuntu14.04LTSが動作してるZYBO へパソコンのSDK からリモートデバッグする1
TCF agent を使ってLinaro Ubuntu14.04LTSが動作してるZYBO へパソコンのSDK からリモートデバッグする2
ではうまく行っていたのだが、TCF Agent とSDK のバージョンが合わないのか?
PetaLinux は 2018.2 でVivado のSDK は 2018.3 が影響しているのか?
  1. 2019年04月22日 05:45 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

ROS Japan UG #29 ROS2講習会に行ってきました

昨日は、ROS Japan UG #29 ROS2講習会に行ってきて、1日しっかりROS2 を勉強してきました。

ROS2 はRobot のOperation System の第 2 バージョンという意味です。ROS2 の説明については講師の Geoffrey BIGGS さんの資料があります。”次世代ロボット フレームワーク ROS2の紹介”です。この資料を使って説明していただきました。

ROS1 とROS2 の大きな違いはROS2 ではMaster が無くなって、各ノードがDDS というプロトコルで通信しあうことだそうです。

ROS2 講習会では、初めに”次世代ロボット フレームワーク ROS2の紹介”を使ってROS2 の説明をしてから実習に入りました。
実習のテキストは、”ROS Japan ユーザグループ 講習会 ~ ROS 2 の紹介 ~”でした。これに従って実習を行いました。

実習では、あらかじめROS2 をインストールしてくるように指示がありました。私はノートパソコンのWindows10 上にVirtualBox をインストールして、その上にUbuntu 18.04 をインストールし、ROS2 をインストールしました。

最初に、”ROS 2のワークスペース:colconとパッケージ”の章の実習をしました。ここでは、colcon という”複数の依存関係があるパッケージを正しい順番でビルドするためのツール”を使用して、パッケージをビルドしました。勉強会にやり方としては、講師の方が説明してから、テキストに従って自分でコマンドを実行する形式です。次の章とかは特にやることが多いので、実習の時間が少ないという印象でした。

次に、”OS 2のAPIの使い方”を実習しました。
ROS2 の通信方法は3 つあるそうです。送りっぱなしのメッセージ、クライアントが送ってサーバーが返答を返すサービス、通信の途中でキャンセルやアボートできるアクションです。それらの通信方法の実装方法を勉強しました。

ROS 2のツールの使い方”と”ROS 1とROS 2のつながり(ros1_bridge)”は説明だけでした。

最後に、”これからのROS 2”のプレゼントを聞いて終了となりました。

本当に、講師の方と実習サポートの方、アナログ・デバイセズ株式会社の方ありがとうございました。

ROS2 勉強会に参加して、ROS2 ってノード間の通信方法だけを規定しているので、モーター制御などのアプリケーションは自分で作るか、ネットに落ちているのを拾ってくるしかないんだな?ということが分かりました。OS (ミドルウェアだそうです)なので、基本的な基盤を作れれば、その上にどうにでもアプリケーションを構築できるんだということが分かってよかったです。
  1. 2019年04月21日 05:12 |
  2. ROS
  3. | トラックバック:0
  4. | コメント:0

Ultra96 のPetaLinux2018.2 でhelloworld アプリケーションを作る(ただし、rootfs を使用)

Ultra96 のPetaLinux2018.2 で無線LANを設定する”の続き。

前回は、無線LANを設定してネットワークを使用できるように設定を行った。今回は、PetaLinux の手順でhelloworld アプリケーションを作成してみよう。
今回、参考にさせていただくのは”ZYBO (Zynq) 初心者ガイド (11) LinuxユーザアプリケーションでLチカ”だ。だが、この記事はRAMDISK だが私のはRoot File system を使用しているので、結果が多少違うようだ?

まずは、helloworld のユーザーアプリケーションを作成しよう。
petalinux-create -t apps --template c --name helloworld --enable
PetaLinux_104_190420.png

すると、cam_dp_183/project-spec/meta-user/recipes-apps/helloworld ディレクトリが作成されて、その下の files ディレクトリの下に、helloworld.c ができた。
PetaLinux_105_190420.png

helloworld.c を示す。すでに、printf でHello World を表示するコードが書いてあるので、このまま使用することにする。
PetaLinux_106_190420.png

ZYBO (Zynq) 初心者ガイド (11) LinuxユーザアプリケーションでLチカ”によると、
LANG=en_US.UTF-8 petalinux-build -x package
を行うと、image.ubが再生成されるということだが、image.ub のファイルの日付を見ても更新されていなかった。
PetaLinux_107_190420.png

PetaLinux_108_190420.png

ZYBO (Zynq) 初心者ガイド (11) LinuxユーザアプリケーションでLチカ”はRAMDISK を使用しているけど、今回はRoot File System を使用しているからじゃないか?ということで、
LANG=en_US.UTF-8 petalinux-build -c rootfs
を実行したが、長く掛かりそうなので、途中でアポートした。
すると、helloworld アプリケーションが cam_dp_183/build/tmp/work/ultra96_zynqmp-xilinx-linux/petalinux-user-image/1.0-r0/rootfs/usr/bin ディレクトリの下にできていた。
この helloworld アプリケーションを MicroSD カードの /home/root/ ディレクトリの下に書いて、Ultra96 でブートして、実行したところ問題なく実行することができた。
PetaLinux_112_190420.png

これは、ということで、もう一度、
LANG=en_US.UTF-8 petalinux-build -c rootfs
を最後まで実行したところ、Root File Sytem のファイルが更新されている。
rootfs.tar.gz をホストコンピュータの適当なところに解凍して、まずは、udmabuf.ko を検索した。
udmabuf.ko は /lib/modules/4.14.0-xilinx-v2018.2/extra ディレクトリにあった。
PetaLinux_110_190420.png

肝心の helloworld アプリケーションは、/usr/bin ディレクトリに入っていた。
PetaLinux_111_190420.png
  1. 2019年04月20日 21:28 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

Ultra96 のPetaLinux2018.2 で無線LANを設定する

udmabufをPetaLinux 2018.2でビルドする”の続き。

前回は、udmabuf をPetaLinux 2018.2 上でビルドしてみたところ、Ultra96 のPetaLinux で insmod することができた。今回は、無線LANを設定してネットワークを使用できるようにしてみよう。

まずは Ultra96 上のPetaLinux で ifconfig コマンドでネットワークの設定を確認した。
PetaLinux_98_190418.png

wlan0 があるので大丈夫そうだ。これを家の無線LANルーター(Buffalo-G-F220)に接続する。
wpa_passphrase Buffalo-G-F220 パスフレーズ
を実行した。すると、psk に暗号化されたパスフレーズが出力された。暗号化されたパスフレーズは隠してあります。
PetaLinux_99_190418.png

/etc/network/ ディレクトリに行って、interfaces ファイルを確認した。
cd /etc/network/
more interfaces

PetaLinux_100_190418.png

どうやら、/etc/wpa_supplicant.conf に設定を記述すれば良さそうだ。

/etc ディレクトリに行って、wpa_supplicant.conf を編集し、network の中に ssid と psk を記述した。
cd ..
vi wpa_supplicant.conf
more wpa_supplicant.conf

PetaLinux_101_190418.png

reboot をしてから、 ifconfig すると wlan0 にIP アドレス 192.168.3.28 が割り当てられているのが分かる。成功だ。
PetaLinux_102_190418.png

ホストパソコンでUltra96 のPetaLinux にリモートログインしてみよう。
ssh 192.168.3.28 -X -l root
したところ、ホストキーの関係でログインできなかった。そこで指示されたとおりにキーをアップデートするコマンドを起動した。
ssh-keygen -f "/home/masaaki/.ssh/known_hosts" -R "192.168.3.28"
もう一度リモートログインすると、ログインすることができた。
ssh 192.168.3.28 -X -l root
PetaLinux_103_190418.png

よし。。。これで成功だ。Ultra96 のPetaLinux が無線LANに接続できた。
  1. 2019年04月19日 04:19 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

udmabufをPetaLinux 2018.2でビルドする

udmabufをPetaLinuxで使用する(ホストパソコンでudmabufをmake したが致命的エラー)”の続き。

前回は、arm64 用にホストパソコン上で make でudmabuf をビルドしようとしたが、致命的エラーになってビルドできなかった。今回は、素直にPetaLinux 2018.2 を使用して、PetaLinux 上でビルドしてみよう。

今回の環境は”Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)にPLのUIOを追加した”の続きとなって、環境は全て引き継いでいる。

なお、”ZYBO (Zynq) 初心者ガイド (17) Linuxで自作IPのデバイスドライバを作る”を参考にさせていただいた。これはとても参考になったというか、真似させていただいた。感謝。

さて、”ZYBO (Zynq) 初心者ガイド (17) Linuxで自作IPのデバイスドライバを作る”のやり方に従ってやっていこう。ただし、今回ビルドするのは、PL のIP のドライバでなく、Linux 上のCMA 領域を使用するためのドライバのudmabuf をビルドするので、”components/plnx_workspace/device-tree/device-tree-generation/pl.dtsi”ファイルにデバイスツリーの記述が無いことに注意しよう。

udmabuf をカーネルモジュールとして作成しよう。
petalinux-create -t modules --name udmabuf --enable
PetaLinux_87_190417.png

すると、cam_dp_183/project-spec/meta-user/recipes-modules ディレクトリの下に udmabuf ディレクトリが作成され、その下の files ディレクトリの下に udmabuf.c が生成された。
PetaLinux_88_190417.png

LANG=en_US.UTF-8 petalinux-build -c rootfs
PetaLinux_89_190417.png

自動生成された cam_dp_183/project-spec/meta-user/recipes-module/udmabuf/files/udmabuf.c を見てみよう。
PetaLinux_90_190417.png

これに、ikwzm さんの udmabuf.c の内容をコピペして入れ替える。
PetaLinux_91_190417.png

LANG=en_US.UTF-8 petalinux-build -c udmabuf
で udmabuf をビルドしたところ成功した。
PetaLinux_92_190417.png

~/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/build/tmp/sysroots-components/ultra96_zynqmp/udmabuf/lib/modules/4.14.0-xilinx-v2018.2/extra/ ディレクトリの下に udmabuf.ko が生成されていた。
PetaLinux_93_190417.png

そのディレクトリに行って、udmabuf.ko をUltra96 のMicroSD カードの /home/root の下にコピペする。
cd ~/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/build/tmp/sysroots-components/ultra96_zynqmp/udmabuf/lib/modules/4.14.0-xilinx-v2018.2/extra/
sudo cp udmabuf.ko /media/masaaki/ROOT_FS/home/root/

PetaLinux_94_190417.png

Ultra96 ボードの電源をON して、Ultra96 のPetaLinux 上で udmabuf.ko をinsmod したところ成功した。
/dev/udmabuf0/ が生成されている。
insmod udmabuf.ko udmabuf0=0x1000
ls -l /dev/udmabuf0

PetaLinux_95_190417.png

petalinux-build -x package したが cam_dp_183/image/linux/ ディレクトリのファイルに変化はなかった。これは、PL のIP としてのドライバではないからだと思う。
LANG=en_US.UTF-8 petalinux-build -x package
PetaLinux_96_190417.png

PetaLinux のリファレンスマニュアルで、”選択したユーザー モジ ュールをインストールする方法”を試してみよう。”このコマンドを実行すると 、 モジュールがターゲットの rootfs ホストコ ピーにインストールされます。”とのことだ。
LANG=en_US.UTF-8 petalinux-build -c udmabuf -x do_install
PetaLinux_97_190418.png

これも、petalinux-build -x package したが cam_dp_183/image/linux/ ディレクトリのファイルに変化はなかった。

最後に、PetaLinux のリファレンスマニュアルによると、モジュールをクリーンアップする方法は以下のコマンドを使用するようだ。
petalinux-build -c udmabuf -x do_cleansstate

私の環境では、
LANG=en_US.UTF-8 petalinux-build -c udmabuf -x do_cleansstate
  1. 2019年04月18日 04:47 |
  2. Docker
  3. | トラックバック:0
  4. | コメント:0

udmabufをPetaLinuxで使用する(ホストパソコンでudmabufをmake したが致命的エラー)

udmabufをPetaLinuxで使用する(ホストパソコンでudmabufをmakeして、udmabuf.koをPetaLinuxにコピーしたが失敗)”の続き。

前回の make は X86 用のカーネルモジュールを生成してしまい、Ultra96 のPetaLinux に持っていったがinsmod でエラーになった。今回は、arm64 用に make を行ってみよう。なお、arm64 用のコンパイル環境は、source /tools/Xilinx/Vivado/2018.3/settings64.sh を起動することにより確保している。

arm64 用に make をするためには、
ARCH=arm64 make
とすれば良いようだ。
また、libelf-dev モジュールが必要のようなので、これをインストールする。
sudo apt install -y libelf-dev
ARCH=arm64 make

致命的エラーになってしまった。
PetaLinux_84_190416.png

エラー内容を示す。

masaaki@masaaki-H110M4-M01:~/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf$ ARCH=arm64 make
make -C /lib/modules/4.15.0-47-generic/build ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- M=/home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf modules
make[1]: ディレクトリ '/usr/src/linux-headers-4.15.0-47-generic' に入ります
  CC [M]  /home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf/udmabuf.o
In file included from ./include/linux/types.h:6:0,
                 from ./include/linux/kobject.h:19,
                 from ./include/linux/cdev.h:5,
                 from /home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf/udmabuf.c:31:
./include/uapi/linux/types.h:5:10: 致命的エラー: asm/types.h: そのようなファイルやディレクトリはありません
 #include <asm/types.h>
          ^~~~~~~~~~~~~
コンパイルを停止しました。
scripts/Makefile.build:339: recipe for target '/home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf/udmabuf.o' failed
make[2]: *** [/home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf/udmabuf.o] Error 1
Makefile:1552: recipe for target '_module_/home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf' failed
make[1]: *** [_module_/home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf] Error 2
make[1]: ディレクトリ '/usr/src/linux-headers-4.15.0-47-generic' から出ます
Makefile:19: recipe for target 'all' failed
make: *** [all] Error 2


次に、念の為、ARCH=arm でもやってみよう。
make clean
ARCH=arm make

やはり致命的エラーだった。
PetaLinux_85_190416.png

ログを示す。

masaaki@masaaki-H110M4-M01:~/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf$ ARCH=arm make
make -C /lib/modules/4.15.0-47-generic/build ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- M=/home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf modules
make[1]: ディレクトリ '/usr/src/linux-headers-4.15.0-47-generic' に入ります
  CC [M]  /home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf/udmabuf.o
In file included from ./include/asm-generic/int-ll64.h:11:0,
                 from ./arch/arm/include/uapi/asm/types.h:5,
                 from ./include/uapi/linux/types.h:5,
                 from ./include/linux/types.h:6,
                 from ./include/linux/kobject.h:19,
                 from ./include/linux/cdev.h:5,
                 from /home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf/udmabuf.c:31:
./include/uapi/asm-generic/int-ll64.h:12:10: 致命的エラー: asm/bitsperlong.h: そのようなファイルやディレクトリはありません
 #include <asm/bitsperlong.h>
          ^~~~~~~~~~~~~~~~~~~
コンパイルを停止しました。
scripts/Makefile.build:339: recipe for target '/home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf/udmabuf.o' failed
make[2]: *** [/home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf/udmabuf.o] Error 1
Makefile:1552: recipe for target '_module_/home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf' failed
make[1]: *** [_module_/home/masaaki/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/udmabuf] Error 2
make[1]: ディレクトリ '/usr/src/linux-headers-4.15.0-47-generic' から出ます
Makefile:19: recipe for target 'all' failed
make: *** [all] Error 2


試しに、udmabuf ディレクトリをMicroSD カードの第2パーティションの rootfs の /home/root/ ディレクトリにコピーして、Ultra96 のPetaLinux 上で make してみたがエラーだった。
PetaLinux_86_190416.png

エラー内容を示す。

root@xilinx-ultra96-reva-2018_2:~/udmabuf# make
make -C /lib/modules/4.14.0-xilinx-v2018.2/build ARCH=arm64 CROSS_COMPILE= M=/home/root/udmabuf modules
make[1]: *** /lib/modules/4.14.0-xilinx-v2018.2/build: No such file or directory. Stop.
make: *** [Makefile:19: all] Error 2

  1. 2019年04月16日 05:03 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:2

udmabufをPetaLinuxで使用する(ホストパソコンでudmabufをmakeして、udmabuf.koをPetaLinuxにコピーしたが失敗)

Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)にPLのUIOを追加した”でPetaLinux にPL のIP のUIO を追加することができた。cam_dp_183 プロジェクトで作成したビットストリームを動作させるには、どうしても udmabuf が必要なので、udmabuf をインストールしよう。

今回は、udmabuf を git からクローンして、まずは、Docker コンテナ上でmake してみたが、エラーになった。次に、ホストパソコンでVivado を使用できるようにした状態で、make するとビルドできて、udmabuf.ko が生成された。この udmabuf.ko をUltra96 のMicroSD カードのRoot File System に書いて、Ultra96 のPetaLinux 上で insmod したところ失敗した。

2019/04/16:追記 今回の make は X86 用のカーネルモジュールを生成してしまったようです。 ikwzm さんから指摘を受けました。失礼しました)

まずは、udmabuf を git からクローンする。Docker コンテナ上でやってみよう。
git clone https://github.com/ikwzm/udmabuf.git
PetaLinux_79_190415.png

Docke コンテナ上で make を行って、失敗した。
PetaLinux_80_190415.png

次に、source /tools/Xilinx/Vivado/2018.3/settings64.sh を実行したホストパソコン上で make を行ったところ成功した。
PetaLinux_81_190415.png

Ultra96 のMicroSD カードをホストパソコンにマウントして、udmabuf.ko をコピーした。
sudo cp udmabuf.ko /media/masaaki/ROOT_FS/home/root/
PetaLinux_82_190415.png

MicroSD カードをUltra96 に挿入して電源ON。
insmod udmabuf.ko udmabuf0=0x1000
を実行したところ、”insmod: ERROR: could not insert module udmabuf.ko: Invalid module format”になった。
PetaLinux_83_190415.png

やはり、PetaLinux 上でビルドする必要がありそうだ。
  1. 2019年04月15日 05:07 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)にPLのUIOを追加した

Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)にUIOを追加した””の続き。

前回は、Linux のブートオプションに uio_pdrv_genirq.of_id=generic-uio cpuidle.off=1 を追加して、UIOを活かした。今回は、PL のIP をUIO として設定してみよう。

参考にさせて頂くのは、”ZYBO (Zynq) 初心者ガイド (16) Linuxから自作IPをUIOで制御する”だ。とっても助かったというか、真似させていただいた。

Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)にUIOを追加した”のPetaLinux 2018.2 のプロジェクトを使用して、PL のIP のUIO を作成する。

最初にPL のDTS を見てみよう。PetaLProj/cam_dp_183/componets/plnx_workspace/device-tree/device-tree/pl.dtsi がそれだ。
PetaLinux_72_190413.png

PetaLinux_73_190413.png

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version:  
 * Today is: Fri Apr 12 20:17:06 2019
 */


/ {
    amba_pl: amba_pl@0 {
        #address-cells = <2>;
        #size-cells = <2>;
        compatible = "simple-bus";
        ranges ;
        axi_gpio_1: gpio@a0013000 {
            #gpio-cells = <3>;
            clock-names = "s_axi_aclk";
            clocks = <&clk 71>;
            compatible = "xlnx,xps-gpio-1.00.a";
            gpio-controller ;
            reg = <0x0 0xa0013000 0x0 0x1000>;
            xlnx,all-inputs = <0x1>;
            xlnx,all-inputs-2 = <0x0>;
            xlnx,all-outputs = <0x0>;
            xlnx,all-outputs-2 = <0x0>;
            xlnx,dout-default = <0x00000000>;
            xlnx,dout-default-2 = <0x00000000>;
            xlnx,gpio-width = <0x2>;
            xlnx,gpio2-width = <0x20>;
            xlnx,interrupt-present = <0x0>;
            xlnx,is-dual = <0x0>;
            xlnx,tri-default = <0xFFFFFFFF>;
            xlnx,tri-default-2 = <0xFFFFFFFF>;
        };
        camera_axi_iic_0: i2c@a0011000 {
            #address-cells = <1>;
            #size-cells = <0>;
            clock-names = "s_axi_aclk";
            clocks = <&clk 71>;
            compatible = "xlnx,xps-iic-2.00.a";
            reg = <0x0 0xa0011000 0x0 0x1000>;
        };
        camera_mt9d111_inf_axis_0: mt9d111_inf_axis@a0010000 {
            compatible = "xlnx,mt9d111-inf-axis-1.0";
            reg = <0x0 0xa0010000 0x0 0x1000>;
        };
        camera_vflip_dma_write2_0: vflip_dma_write2@a0020000 {
            compatible = "xlnx,vflip-dma-write2-1.0";
            reg = <0x0 0xa0020000 0x0 0x10000>;
            xlnx,s-axi-axilites-addr-width = <0x6>;
            xlnx,s-axi-axilites-data-width = <0x20>;
        };
        display_axi_gpio_0: gpio@a0012000 {
            #gpio-cells = <3>;
            clock-names = "s_axi_aclk";
            clocks = <&clk 71>;
            compatible = "xlnx,xps-gpio-1.00.a";
            gpio-controller ;
            reg = <0x0 0xa0012000 0x0 0x1000>;
            xlnx,all-inputs = <0x0>;
            xlnx,all-inputs-2 = <0x0>;
            xlnx,all-outputs = <0x1>;
            xlnx,all-outputs-2 = <0x0>;
            xlnx,dout-default = <0x00000000>;
            xlnx,dout-default-2 = <0x00000000>;
            xlnx,gpio-width = <0x1>;
            xlnx,gpio2-width = <0x20>;
            xlnx,interrupt-present = <0x0>;
            xlnx,is-dual = <0x0>;
            xlnx,tri-default = <0xFFFFFFFF>;
            xlnx,tri-default-2 = <0xFFFFFFFF>;
        };
        display_disp_dmar_axis_0: disp_dmar_axis@a0000000 {
            compatible = "xlnx,disp-dmar-axis-1.0";
            reg = <0x0 0xa0000000 0x0 0x10000>;
            xlnx,s-axi-axilites-addr-width = <0x6>;
            xlnx,s-axi-axilites-data-width = <0x20>;
        };
        psu_ctrl_ipi: PERIPHERAL@ff380000 {
            compatible = "xlnx,PERIPHERAL-1.0";
            reg = <0x0 0xff380000 0x0 0x80000>;
        };
        psu_message_buffers: PERIPHERAL@ff990000 {
            compatible = "xlnx,PERIPHERAL-1.0";
            reg = <0x0 0xff990000 0x0 0x10000>;
        };
    };
};


Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)にUIOを追加した”で作成したMicroSD カードを起動すると、 /proc/device-tree/amba_pl@0/ に pl.dtsi のデバイスが表示されるのが見える。

、”ZYBO (Zynq) 初心者ガイド (16) Linuxから自作IPをUIOで制御する”によると、(多少、PetaLinux のバージョン違いによりディレクトリ名が違っているところはあるのだが) PetaLProj/cam_dp_183/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi が編集可能なDTS のファイルとのことだ。
cam_dp_183 のDevice-Tree の設定は、”カメラ画像をDisplayPortに出力する8(Ultra96 での準備)”に書いてあるので、それを参照しながら system-user.dtsi を書き換えた。
PetaLinux_72_190413.png

system-user.dtsi を示す。
PetaLinux_73_190413.png

/include/ "system-conf.dtsi"
/include/ "openamp-overlay.dtsi"
/ {
    chosen {
        bootargs = "console=ttyPS0,115200 earlyprintk earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait uio_pdrv_genirq.of_id=generic-uio cpuidle.off=1";
    };
};

&camera_mt9d111_inf_axis_0 {
    compatible = "generic-uio";
};

&camera_axi_iic_0 {
    compatible = "generic-uio";
};

&display_disp_dmar_axis_0 {
    compatible = "generic-uio";
};

&camera_vflip_dma_write2_0 {
    compatible = "generic-uio";
};

&display_axi_gpio_0 {
    compatible = "generic-uio";
};

&axi_gpio_1 {
    compatible = "generic-uio";
};


これで、petalinux-build を行った。
LANG=en_US.UTF-8 petalinux-build
PetaLinux_75_190413.png

petalinux-build で書き換えられた image.ub を MicroSD カードのそれと入れ替えた。
そしてUltra96 でブートした。

/sys/class/uio を見ると、今度は、uio0 だけでなく、uio6 までの uio があった。
uio0 は前と変わらずに axi-pmon で、 uio1 はgpio, uio2 は i2c, uio3 は mt9d111_inf_axis, uio4 は vflip_dma_write2, uio5 は gpio, uio6 は disp_dmar_axis だった。これは、pl.dtsi の順番で間違いないようだ。
PetaLinux_76_190413.png
PetaLinux_77_190413.png
PetaLinux_78_190413.png

ログを示す。

root@xilinx-ultra96-reva-2018_2:~# cd /sys/class
root@xilinx-ultra96-reva-2018_2:/sys/class# ls
ata_device  bsg       fpga_region  input     mtd           rc       scsi_host   video4linux
ata_link    devcoredump   gpio         iommu     net           regulator    sound   vtconsole
ata_port    dma       graphics     leds  pci_bus       remoteproc   spi_master  watchdog
backlight   drm       hwmon        mdio_bus  phy           rfkill       tty     xilinx_sdfec
bdi     extcon    i2c-adapter  mem   power_supply  rtc      udc     zynqmp_ipi_mbox
block       fpga_bridge   i2c-dev      misc  pps           scsi_device  uio
bluetooth   fpga_manager  ieee80211    mmc_host  ptp           scsi_disk    vc
root@xilinx-ultra96-reva-2018_2:/sys/class# cd uio
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# ls
uio0  uio1  uio2  uio3  uio4  uio5  uio6
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# cd uio1
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1# ls
dev  device  event  maps  name  power  subsystem  uevent  version
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1# less name
gpio
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1# cd ..
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio0/name
axi-pmon
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio1/name
gpio
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio2/name
i2c
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio3/name
mt9d111_inf_axis
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio4/name
vflip_dma_write2
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio5/name
gpio
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio6/name
disp_dmar_axis
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# [  616.576476] PLL: shutdown
ls
uio0  uio1  uio2  uio3  uio4  uio5  uio6
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# cd uio1
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1# ls
dev  device  event  maps  name  power  subsystem  uevent  version
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1# cd maps
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps# ls
map0
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps# cd map0
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps/map0# ls
addr  name  offset  size
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps/map0# more addr 
0x00000000a0013000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps/map0# more name 
/amba_pl@0/gpio@a0013000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps/map0# more offset 
0x0
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps/map0# more size 
0x0000000000001000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1/maps/map0# cd ../..
root@xilinx-ultra96-reva-2018_2:/sys/class/uio/uio1# cd .. 
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio2/maps/map0/addr 
0x00000000a0011000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio2/maps/map0/name 
/amba_pl@0/i2c@a0011000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio2/maps/map0/offset 
0x0
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio2/maps/map0/size   
0x0000000000001000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio3/maps/map0/addr 
0x00000000a0010000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio3/maps/map0/name 
/amba_pl@0/mt9d111_inf_axis@a0010000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio3/maps/map0/offset 
0x0
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio3/maps/map0/size   
0x0000000000001000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio4/maps/map0/addr 
0x00000000a0020000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio4/maps/map0/name 
/amba_pl@0/vflip_dma_write2@a0020000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio4/maps/map0/offset 
0x0
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio4/maps/map0/size   
0x0000000000010000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio5/maps/map0/addr 
0x00000000a0012000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio5/maps/map0/name 
/amba_pl@0/gpio@a0012000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio5/maps/map0/offset 
0x0
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio5/maps/map0/size   
0x0000000000001000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio6/maps/map0/addr 
0x00000000a0000000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio6/maps/map0/name 
/amba_pl@0/disp_dmar_axis@a0000000
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio6/maps/map0/offset 
0x0
root@xilinx-ultra96-reva-2018_2:/sys/class/uio# more uio6/maps/map0/size   
0x0000000000010000

  1. 2019年04月13日 13:53 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)にUIOを追加した

Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)”の続き。

前回、Linux 起動時に ls /sys/class してみたところ uio が入っていなかったと思うので、今回は、”Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)”にUIO を追加する。ついでに、”Ultra96 のuEnv.txt のbootargs に cpuidle.off=1を追加した”に書いたようにLinux 起動時にハングアップしないように、Linux のブートオプションに cpuidle.off=1 も追加する。

petalinux-config --get-hw-description=cam_dp_183.sdk
を実行して、設定画面の DTG Settings > Kernel Bootargs を

earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait uio_pdrv_genirq.of_id=generic-uio cpuidle.off=1

に変更した。
PetaLinux_63_190411.png

PetaLinux_64_190411.png

petalinux-build を行った。
LANG=en_US.UTF-8 petalinux-build
PetaLinux_65_190411.png

成功した。

必要なファイルを生成した。
LANG=en_US.UTF-8 petalinux-package --image -c kernel --format uImage
LANG=en_US.UTF-8 petalinux-package --boot --fsbl components/plnx_workspace/fsbl/fsbl/Release/fsbl.elf --fpga components/plnx_workspace/fsbl/fsbl_hwproj/cam_dp_wrapper.bit --pmufw images/linux/pmufw.elf --u-boot

PetaLinux_66_190412.png

これで、必要なファイルが生成されたので、MicroSD カードの第1パーティションに、BOOT.BIN と image.ub を書き込み、第2パーティションには、rootfs.tar.gz を展開しながら書き込んだ。
cd /media/masaaki/ROOT_FS/
sudo rm -rf *
sync
cd ~/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/images/linux/
sudo tar fxz rootfs.tar.gz -C /media/masaaki/ROOT_FS/
sync


MicroSD カードをUltra96 に挿入してブートした。
cd /sys/class して ls すると、uio が見えた。
cd uio すると uio0 があるのがわかった。
PetaLinux_67_190412.png

uio0 の下の name を見ると axi-pmon ということが分かった。
PetaLinux_68_190412.png

その下の map0 と map1 をみた。
map0、map1 の下には、addr, name, offset, size の各ファイルがあった。その内容を示す。
PetaLinux_69_190412.png
  1. 2019年04月12日 05:24 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)

毎回タイトルが長いのだが、うまいタイトルの付け方が分からない?

今回は、”Docker 上のUbuntu 16.04 のPetaLinux 2018.3でRootFSを使用するUltra96のPetaLinuxをビルドしたが失敗した”で使用したVivado 2018.3 の cam_dp_183 プロジェクトの SDK ディレクトリを使用して、Ultra96 のPetaLinux 2018.2 のBSP を使用してPetaLinux 2018.2 でビルドするとどうなるか?を確かめてみよう。

まず、Ultra96 のPetaLinux 2018.2 のBSP のダウンロードだが、”PetaLinux 2018.2 BSP”に書いてあったリンクからダウンロードした。(xilinx-ultra96-reva-v2018.2-final.bsp)

PetaLinux を使用して、BSP を使用したプロジェクトを作成するには、-s オプションを付ければ良さそうだ。
早速、PetaLinux 2018.2 の cam_dp_183 プロジェクトを作成する。
petalinux-create -t project -s xilinx-ultra96-reva-v2018.2-final.bsp --name cam_dp_183
PetaLinux_30_190409.png

cam_dp_183 ディレクトリに cam_dp_183.sdk をコピーした。
PetaLinux_31_190409.png

cam_dp_183 ディレクトリに入って、petalinux-config を行った。
cd cam_dp_183/
petalinux-config --get-hw-description=cam_dp_183.sdk


必要だった設定もすでに設定されている。
Ultra96 cannot boot Petalinux Custom rootfs and kernel from SD Card”の petalinux-build での 3 つの設定を示す。

1. petalinux-config ---> DTG Settings ---> (zcu100-revc) MACHINE_NAME
2. petalinux-config ---> u-boot Configuration ---> (xilinx_zynqmp_zcu100_revC_defconfig) u-boot config target
3. petalinux-config ---> Yocto Settings ---> (ultra96-zynqmp) YOCTO_MACHINE_NAME


PetaLinux_32_190409.png

PetaLinux_33_190409.png

PetaLinux_34_190409.png

更に、Root filesystem type も SD card になっていた。
PetaLinux_35_190409.png

Subsystem AUTO Hardware Settings -> Serial Settings も Primary stdin/stdout を psu_uart_1 になっていた。

これで、 petalinux-config が終了した。
PetaLinux_36_190409.png

次は、petalinux-build を行う。
LANG=en_US.UTF-8 petalinux-build
PetaLinux_37_190409.png

成功した。
Ultra96 BSP を使用したため rootfs.tar.gz が 406.4 MB になっている。
PetaLinux_38_190409.png

Docker 上のUbuntu 16.04 のPetaLinux 2018.3でRootFSを使用するUltra96のPetaLinuxをビルドしたが失敗した”の rootfs.tar.gz は、11.8 MB だった。
PetaLinux_39_190409.png

uImage の作成をする。
LANG=en_US.UTF-8 petalinux-package --image -c kernel --format uImage
PetaLinux_40_190409.png

BOOT.BIN を作成した。
LANG=en_US.UTF-8 petalinux-package --boot --fsbl components/plnx_workspace/fsbl/fsbl/Release/fsbl.elf --fpga components/plnx_workspace/fsbl/fsbl_hwproj/cam_dp_wrapper.bit --pmufw images/linux/pmufw.elf --u-boot
PetaLinux_41_190409.png

MicroSD カードの第1パーティションに、BOOT.BIN と image.ub を書き込み、第2パーティションには、rootfs.tar.gz を展開しながら書き込む。
cd /media/masaaki/rootfs/
sudo rm -rf *
sync
cd ~/Docker/vivado182ub16/masaaki/PetaLProj/cam_dp_183/images/linux/

PetaLinux_42_190409.png

sudo tar fxz rootfs.tar.gz -C /media/masaaki/rootfs/
sync

PetaLinux_43_190409.png

これで、MircoSD カードが作成できたので、Ultra96 に挿入してブートしたところ、Linux が起動した。しかし、ログイン・プロンプトが出てこない。
PetaLinux_60_190411.png

リターンキーを押したらログイン・プロンプトが出てきた。
PetaLinux_61_190411.png

ID が root ,パスワードも root でログインできた。
さらに ifconfig してみたところ、wlan0, wlan1 が設定されていた。
wlan1 はサーバー になっているのではないだろうか?
PetaLinux_62_190411.png

もしかして、今回動作したということは、前回の”Docker 上のUbuntu 16.04 のPetaLinux 2018.3でRootFSを使用するUltra96のPetaLinuxをビルドしたが失敗した”でもしつこく gtkterm を再起動すれば動作していたのかもしれない?

最後に、PetaLinux の起動ログを示す。

Xilinx Zynq MP First Stage Boot Loader 
Release 2018.2   Apr 10 2019  -  19:14:20
PMUFW: v1.0


U-Boot 2018.01 (Apr 10 2019 - 19:13:27 +0000) Xilinx ZynqMP ZCU100 RevC

I2C:   ready
DRAM:  2 GiB
EL Level: EL2
Chip ID: zu3eg
MMC:   sdhci@ff160000: 0 (SD), sdhci@ff170000: 1
*** Warning - bad CRC, using default environment

In:    serial@ff010000
Out:   serial@ff010000
Err:   serial@ff010000
Model: ZynqMP ZCU100 RevC
Board: Xilinx ZynqMP
Bootmode: SD_MODE
Net:   Net Initialization Skipped
No ethernet found.
U-BOOT for xilinx-ultra96-reva-2018_2

Hit any key to stop autoboot:  0 
Device: sdhci@ff160000
Manufacturer ID: 74
OEM: 4a45
Name: USD   
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
7000320 bytes read in 517 ms (12.9 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x10000108
     Data Size:    6960377 Bytes = 6.6 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
     Hash algo:    sha1
     Hash value:   386df829eeb20d1d4d16c6ef732e67868faa91f5
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x106a3708
     Data Size:    38019 Bytes = 37.1 KiB
     Architecture: AArch64
     Hash algo:    sha1
     Hash value:   c9e2d94cabe6d2ebfa24487f09a0647e63f34cf0
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x106a3708
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 0000000007ff3000, end 0000000007fff482 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-xilinx-v2018.2 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #3 SMP Wed Apr 10 19:13:08 UTC 2019
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc07fe6e000 s46488 r8192 d31336 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 512771
[    0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1768676K/2079744K available (9980K kernel code, 644K rwdata, 3128K rodata, 512K init, 2168K bss, 48924K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a40000   (  9984 KB)
[    0.000000]     .rodata : 0xffffff8008a40000 - 0xffffff8008d60000   (  3200 KB)
[    0.000000]       .init : 0xffffff8008d60000 - 0xffffff8008de0000   (   512 KB)
[    0.000000]       .data : 0xffffff8008de0000 - 0xffffff8008e81200   (   645 KB)
[    0.000000]        .bss : 0xffffff8008e81200 - 0xffffff800909f2b0   (  2169 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01bfc800   (    27 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc07ff00000   (  2047 MB)
[    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: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024e7e0, max_idle_ns: 440795205315 ns
[    0.000004] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008407] Console: colour dummy device 80x25
[    0.012663] console [tty0] enabled
[    0.016028] bootconsole [cdns0] disabled
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-xilinx-v2018.2 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #3 SMP Wed Apr 10 19:13:08 UTC 2019
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc07fe6e000 s46488 r8192 d31336 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 512771
[    0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1768676K/2079744K available (9980K kernel code, 644K rwdata, 3128K rodata, 512K init, 2168K bss, 48924K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a40000   (  9984 KB)
[    0.000000]     .rodata : 0xffffff8008a40000 - 0xffffff8008d60000   (  3200 KB)
[    0.000000]       .init : 0xffffff8008d60000 - 0xffffff8008de0000   (   512 KB)
[    0.000000]       .data : 0xffffff8008de0000 - 0xffffff8008e81200   (   645 KB)
[    0.000000]        .bss : 0xffffff8008e81200 - 0xffffff800909f2b0   (  2169 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01bfc800   (    27 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc07ff00000   (  2047 MB)
[    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: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024e7e0, max_idle_ns: 440795205315 ns
[    0.000004] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008407] Console: colour dummy device 80x25
[    0.012663] console [tty0] enabled
[    0.016028] bootconsole [cdns0] disabled
[    0.019941] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
[    0.019955] pid_max: default: 32768 minimum: 301
[    0.020075] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020093] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020831] ASID allocator initialised with 65536 entries
[    0.020886] Hierarchical SRCU implementation.
[    0.021219] EFI services will not be available.
[    0.021248] zynqmp_plat_init Platform Management API v1.0
[    0.021256] zynqmp_plat_init Trustzone version v1.0
[    0.021371] smp: Bringing up secondary CPUs ...
[    0.021660] Detected VIPT I-cache on CPU1
[    0.021699] CPU1: Booted secondary processor [410fd034]
[    0.022008] Detected VIPT I-cache on CPU2
[    0.022027] CPU2: Booted secondary processor [410fd034]
[    0.022318] Detected VIPT I-cache on CPU3
[    0.022336] CPU3: Booted secondary processor [410fd034]
[    0.022378] smp: Brought up 1 node, 4 CPUs
[    0.022411] SMP: Total of 4 processors activated.
[    0.022420] CPU features: detected feature: 32-bit EL0 Support
[    0.022432] CPU: All CPU(s) started at EL2
[    0.022450] alternatives: patching kernel code
[    0.023171] devtmpfs: initialized
[    0.027217] random: get_random_u32 called from bucket_table_alloc+0x108/0x260 with crng_init=0
[    0.027454] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.027481] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.027685] random: fast init done
[    0.033591] xor: measuring software checksum speed
[    0.072038]    8regs     :  2303.000 MB/sec
[    0.112067]    8regs_prefetch:  2053.000 MB/sec
[    0.152097]    32regs    :  2830.000 MB/sec
[    0.192127]    32regs_prefetch:  2379.000 MB/sec
[    0.192135] xor: using function: 32regs (2830.000 MB/sec)
[    0.192232] pinctrl core: initialized pinctrl subsystem
[    0.192953] NET: Registered protocol family 16
[    0.193936] cpuidle: using governor menu
[    0.194468] vdso: 2 pages (1 code @ ffffff8008a46000, 1 data @ ffffff8008de4000)
[    0.194488] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.195130] DMA: preallocated 256 KiB pool for atomic allocations
[    0.225576] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
[    0.226096] ARM CCI_400_r1 PMU driver probed
[    0.230594] zynqmp-pinctrl ff180000.pinctrl: zynqmp pinctrl initialized
[    0.240404] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.308372] raid6: int64x1  gen()   402 MB/s
[    0.376347] raid6: int64x1  xor()   446 MB/s
[    0.444422] raid6: int64x2  gen()   688 MB/s
[    0.512426] raid6: int64x2  xor()   602 MB/s
[    0.580475] raid6: int64x4  gen()  1042 MB/s
[    0.648528] raid6: int64x4  xor()   742 MB/s
[    0.716616] raid6: int64x8  gen()   980 MB/s
[    0.784634] raid6: int64x8  xor()   745 MB/s
[    0.852669] raid6: neonx1   gen()   726 MB/s
[    0.920726] raid6: neonx1   xor()   853 MB/s
[    0.988799] raid6: neonx2   gen()  1169 MB/s
[    1.056821] raid6: neonx2   xor()  1207 MB/s
[    1.124884] raid6: neonx4   gen()  1506 MB/s
[    1.192910] raid6: neonx4   xor()  1442 MB/s
[    1.260970] raid6: neonx8   gen()  1651 MB/s
[    1.329015] raid6: neonx8   xor()  1533 MB/s
[    1.329024] raid6: using algorithm neonx8 gen() 1651 MB/s
[    1.329031] raid6: .... xor() 1533 MB/s, rmw enabled
[    1.329040] raid6: using neon recovery algorithm
[    1.329760] XGpio: /amba_pl@0/gpio@a0013000: registered, base is 510
[    1.330013] XGpio: /amba_pl@0/gpio@a0012000: registered, base is 509
[    1.331127] SCSI subsystem initialized
[    1.331352] usbcore: registered new interface driver usbfs
[    1.331395] usbcore: registered new interface driver hub
[    1.331439] usbcore: registered new device driver usb
[    1.331513] media: Linux media interface: v0.10
[    1.331545] Linux video capture interface: v2.00
[    1.331590] pps_core: LinuxPPS API ver. 1 registered
[    1.331599] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.331623] PTP clock support registered
[    1.331654] EDAC MC: Ver: 3.0.0
[    1.332037] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[    1.332224] FPGA manager framework
[    1.332341] fpga-region fpga-full: FPGA Region probed
[    1.332459] Advanced Linux Sound Architecture Driver Initialized.
[    1.332771] Bluetooth: Core ver 2.22
[    1.332803] NET: Registered protocol family 31
[    1.332810] Bluetooth: HCI device and connection manager initialized
[    1.332824] Bluetooth: HCI socket layer initialized
[    1.332834] Bluetooth: L2CAP socket layer initialized
[    1.332863] Bluetooth: SCO socket layer initialized
[    1.333488] clocksource: Switched to clocksource arch_sys_counter
[    1.333580] VFS: Disk quotas dquot_6.6.0
[    1.333636] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.338018] NET: Registered protocol family 2
[    1.338376] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.338490] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.338822] TCP: Hash tables configured (established 16384 bind 16384)
[    1.338928] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.338973] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.339122] NET: Registered protocol family 1
[    1.339357] RPC: Registered named UNIX socket transport module.
[    1.339367] RPC: Registered udp transport module.
[    1.339374] RPC: Registered tcp transport module.
[    1.339382] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.339916] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.340086] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.340954] audit: initializing netlink subsys (disabled)
[    1.341337] audit: type=2000 audit(1.328:1): state=initialized audit_enabled=0 res=1
[    1.341388] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    1.342198] NFS: Registering the id_resolver key type
[    1.342224] Key type id_resolver registered
[    1.342232] Key type id_legacy registered
[    1.342246] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.342269] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    1.366269] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    1.366298] io scheduler noop registered
[    1.366306] io scheduler deadline registered
[    1.366327] io scheduler cfq registered (default)
[    1.366335] io scheduler mq-deadline registered
[    1.366343] io scheduler kyber registered
[    1.367908] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    1.368360] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[    1.368519] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[    1.368679] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[    1.368840] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[    1.368998] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[    1.369158] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[    1.369317] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[    1.369471] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[    1.369732] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[    1.369900] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[    1.370061] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[    1.370214] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[    1.370374] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[    1.370531] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[    1.370687] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[    1.370842] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[    1.398204] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.402240] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.407127] brd: module loaded
[    1.411327] loop: module loaded
[    1.412303] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.414517] libphy: Fixed MDIO Bus: probed
[    1.415617] tun: Universal TUN/TAP device driver, 1.6
[    1.415824] CAN device driver interface
[    1.416883] usbcore: registered new interface driver asix
[    1.416957] usbcore: registered new interface driver ax88179_178a
[    1.416989] usbcore: registered new interface driver cdc_ether
[    1.417023] usbcore: registered new interface driver net1080
[    1.417055] usbcore: registered new interface driver cdc_subset
[    1.417085] usbcore: registered new interface driver zaurus
[    1.417131] usbcore: registered new interface driver cdc_ncm
[    1.417586] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    1.418249] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.418260] ehci-pci: EHCI PCI platform driver
[    1.418586] usbcore: registered new interface driver uas
[    1.418632] usbcore: registered new interface driver usb-storage
[    1.419241] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0
[    1.419314] i2c /dev entries driver
[    1.420173] IR NEC protocol handler initialized
[    1.420182] IR RC5(x/sz) protocol handler initialized
[    1.420190] IR RC6 protocol handler initialized
[    1.420198] IR JVC protocol handler initialized
[    1.420206] IR Sony protocol handler initialized
[    1.420213] IR SANYO protocol handler initialized
[    1.420220] IR Sharp protocol handler initialized
[    1.420228] IR MCE Keyboard/mouse protocol handler initialized
[    1.420236] IR XMP protocol handler initialized
[    1.421422] usbcore: registered new interface driver uvcvideo
[    1.421431] USB Video Class driver (1.1.1)
[    1.421532] ltc2952-poweroff ltc2954: pm_power_off already registered
[    1.421547] ltc2952-poweroff: probe of ltc2954 failed with error -16
[    1.422410] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer at ffffff8009145000 with timeout 10s
[    1.422618] Bluetooth: HCI UART driver ver 2.3
[    1.422629] Bluetooth: HCI UART protocol H4 registered
[    1.422638] Bluetooth: HCI UART protocol BCSP registered
[    1.422668] Bluetooth: HCI UART protocol LL registered
[    1.422677] Bluetooth: HCI UART protocol ATH3K registered
[    1.422686] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    1.422731] Bluetooth: HCI UART protocol Intel registered
[    1.422740] Bluetooth: HCI UART protocol QCA registered
[    1.422780] usbcore: registered new interface driver bcm203x
[    1.422819] usbcore: registered new interface driver bpa10x
[    1.422855] usbcore: registered new interface driver bfusb
[    1.422890] usbcore: registered new interface driver btusb
[    1.422899] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[    1.422955] usbcore: registered new interface driver ath3k
[    1.423129] EDAC MC: ECC not enabled
[    1.423342] EDAC DEVICE0: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    1.424402] sdhci: Secure Digital Host Controller Interface driver
[    1.424411] sdhci: Copyright(c) Pierre Ossman
[    1.424419] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.469498] mmc0: SDHCI controller on ff160000.sdhci [ff160000.sdhci] using ADMA 64-bit
[    1.475612] sdhci-arasan ff170000.sdhci: parsing dt failed (-517)
[    1.476167] ledtrig-cpu: registered to indicate activity on CPUs
[    1.476360] usbcore: registered new interface driver usbhid
[    1.476368] usbhid: USB HID core driver
[    1.478370] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    1.480301] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    1.482518] Netfilter messages via NETLINK v0.30.
[    1.482668] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.482824] Initializing XFRM netlink socket
[    1.482901] NET: Registered protocol family 10
[    1.483346] Segment Routing with IPv6
[    1.483394] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    1.483546] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.483916] NET: Registered protocol family 17
[    1.483934] NET: Registered protocol family 15
[    1.483958] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.483973] Ebtables v2.0 registered
[    1.484073] can: controller area network core (rev 20170425 abi 9)
[    1.484115] NET: Registered protocol family 29
[    1.484125] can: raw protocol (rev 20170425)
[    1.484133] can: broadcast manager protocol (rev 20170425 t)
[    1.484145] can: netlink gateway (rev 20170425) max_hops=1
[    1.484220] Bluetooth: RFCOMM TTY layer initialized
[    1.484233] Bluetooth: RFCOMM socket layer initialized
[    1.484252] Bluetooth: RFCOMM ver 1.11
[    1.484263] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    1.484271] Bluetooth: BNEP filters: protocol multicast
[    1.484282] Bluetooth: BNEP socket layer initialized
[    1.484291] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    1.484301] Bluetooth: HIDP socket layer initialized
[    1.484429] 9pnet: Installing 9P2000 support
[    1.484455] Key type dns_resolver registered
[    1.484904] registered taskstats version 1
[    1.485255] Btrfs loaded, crc32c=crc32c-generic
[    1.492001] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 40, base_baud = 6249999) is a xuartps
[    1.492204] serial serial0: tty port ttyPS1 registered
[    1.492503] ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 41, base_baud = 6249999) is a xuartps
[    1.515536] mmc0: new high speed SDHC card at address b368
[    1.515762] mmcblk0: mmc0:b368 USD   7.46 GiB 
[    1.518430]  mmcblk0: p1 p2
[    3.024143] console [ttyPS0] enabled
[    3.029166] xilinx-psgtr fd400000.zynqmp_phy: Lane:1 type:8 protocol:4 pll_locked:yes
[    3.037321] PLL: shutdown
[    3.040003] PLL: shutdown
[    3.042999] PLL: enable
[    3.045488] PLL: shutdown
[    3.049104] PLL: enable
[    3.051578] xilinx-dp-snd-codec fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
[    3.062197] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
[    3.070169] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
[    3.078550] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    3.090941] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    3.103625] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
[    3.113742] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
[    3.120710] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    3.127247] [drm] No driver support for vblank timestamp query.
[    3.133223] xlnx-drm xlnx-drm.0: bound fd4a0000.zynqmp-display (ops 0xffffff8008af7228)
[    3.162458] PLL: enable
[    3.279975] Console: switching to colour frame buffer device 128x48
[    3.305295] zynqmp-display fd4a0000.zynqmp-display: fb0:  frame buffer device
[    3.312636] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.zynqmp-display on minor 0
[    3.320740] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsystem driver probed
[    3.330521] xilinx-psgtr fd400000.zynqmp_phy: Lane:2 type:0 protocol:3 pll_locked:yes
[    3.342113] xilinx-psgtr fd400000.zynqmp_phy: Lane:3 type:1 protocol:3 pll_locked:yes
[    3.352167] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.357636] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    3.365549] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x22010010
[    3.374284] xhci-hcd xhci-hcd.0.auto: irq 52, io mem 0xfe300000
[    3.380308] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.387082] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.394295] usb usb1: Product: xHCI Host Controller
[    3.399139] usb usb1: Manufacturer: Linux 4.14.0-xilinx-v2018.2 xhci-hcd
[    3.405837] usb usb1: SerialNumber: xhci-hcd.0.auto
[    3.411006] hub 1-0:1.0: USB hub found
[    3.414733] hub 1-0:1.0: 1 port detected
[    3.418820] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.424280] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    3.431980] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.440138] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    3.446906] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.454111] usb usb2: Product: xHCI Host Controller
[    3.461159] usb usb2: Manufacturer: Linux 4.14.0-xilinx-v2018.2 xhci-hcd
[    3.470004] usb usb2: SerialNumber: xhci-hcd.0.auto
[    3.477275] hub 2-0:1.0: USB hub found
[    3.483217] hub 2-0:1.0: 1 port detected
[    3.490945] i2c i2c-1: Added multiplexed i2c bus 3
[    3.498093] i2c i2c-1: Added multiplexed i2c bus 4
[    3.505220] i2c i2c-1: Added multiplexed i2c bus 5
[    3.512290] i2c i2c-1: Added multiplexed i2c bus 6
[    3.519735] tps65086 7-005e: Device: TPS650864, OTP: C, Rev: 0
[    3.530744] i2c i2c-1: Added multiplexed i2c bus 7
[    3.538271] ina2xx 8-0040: power monitor ina226 (Rshunt = 10000 uOhm)
[    3.546814] i2c i2c-1: Added multiplexed i2c bus 8
[    3.553780] i2c i2c-1: Added multiplexed i2c bus 9
[    3.560697] i2c i2c-1: Added multiplexed i2c bus 10
[    3.567508] pca954x 1-0075: registered 8 multiplexed busses for I2C switch pca9548
[    3.577060] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 31
[    3.586605] sdhci-arasan ff170000.sdhci: allocated mmc-pwrseq
[    3.637495] mmc1: SDHCI controller on ff170000.sdhci [ff170000.sdhci] using ADMA 64-bit
[    3.654966] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    3.663980] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01 00:00:06 UTC (6)
[    3.674160] clk: Not disabling unused clocks
[    3.680421] ALSA device list:
[    3.685292]   #0: DisplayPort monitor
[    3.693132] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    3.703685] sdhci-arasan ff170000.sdhci: card claims to support voltages below defined range
[    3.719951] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.730063] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    3.744222] mmc1: new high speed SDIO card at address 0001
[    3.746632] devtmpfs: mounted
[    3.746822] Freeing unused kernel memory: 512K
[    3.763056] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    3.774097] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
[    3.786755] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
[    3.799439] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
[    3.810226] wlcore: WARNING falling back to default config
INIT: version 2.88 booting
[    3.918029] usb 1-1: New USB device found, idVendor=0424, idProduct=2744
[    3.926803] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.935956] usb 1-1: Product: USB2744
[    3.941597] usb 1-1: Manufacturer: Microchip Tech
[    3.976190] hub 1-1:1.0: USB hub found
[    3.981989] hub 1-1:1.0: 4 ports detected
[    4.045591] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    4.073912] usb 2-1: New USB device found, idVendor=0424, idProduct=5744
Starting udev
[    4.082648] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[    4.091759] usb 2-1: Product: USB5744
[    4.097338] usb 2-1: Manufacturer: Microchip Tech
[    4.110009] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    4.121220] wlcore: loaded
[    4.126105] hub 2-1:1.0: USB hub found
[    4.131836] hub 2-1:1.0: 3 ports detected
[    4.205572] Bluetooth: hci0: change remote baud rate command in firmware
[    4.257992] udevd[1794]: starting version 3.2.2
[    4.293511] usb 1-1.4: new high-speed USB device number 3 using xhci-hcd
[    4.316817] udevd[1795]: starting eudev-3.2.2
[    4.402438] usb 1-1.4: New USB device found, idVendor=0424, idProduct=2740
[    4.411670] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.421266] usb 1-1.4: Product: Hub Controller
[    4.427905] usb 1-1.4: Manufacturer: Microchip Tech
[    4.460793] mali: loading out-of-tree module taints kernel.
[    4.482696] zynqmp_r5_remoteproc ff9a0100.zynqmp_r5_rproc: RPU core_conf: split0
[    4.493693] remoteproc remoteproc0: ff9a0100.zynqmp_r5_rproc is available
[    5.129688] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Wed Apr 10 19:26:43 UTC 2019
Starting internet superserver: inetd.
Configuring packages on first boot....
 (This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
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
Starting Ultra96 AP setup daemon.
Starting Ultra96 Power Button daemon.
Starting Flask server deamon to serve Ultra96 startup pagelibmraa[2366]: libmraa version v1.7.0 initialised by user 'root' with EUID 0
libmraa[2366]: libmraa initialised for platform 'ULTRA96' of type 9
.
INIT: Entering runlevel: 5
Configuring network interfaces... Successfully initialized wpa_supplicant
[    7.779027] wlcore: PHY firmware version: Rev 8.2.0.0.236
[    7.879810] wlcore: firmware booted (Rev 8.9.0.0.69)
[    7.896777] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
udhcpc (v1.24.1) started
Sending discover...
[    8.997500] Bluetooth: hci0 command 0xff05 tx timeout
[   10.009381] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
Sending discover...
Sending discover...
[   17.125500] Bluetooth: hci0: send command failed
[   17.132268] Bluetooth: hci0: download firmware failed, retrying...
No lease, forking to background
Cannot find device "eth0"
[   17.265886] wlcore: down
[   17.336662] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Starting system message bus: dbus.
Starting Xserver
Starting Dropbear SSH server: Generating key, this may take a while...


X.Org X Server 1.19.3
Release Date: 2017-03-15
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.10.0-327.el7.x86_64 x86_64 
Current Operating System: Linux xilinx-ultra96-reva-2018_2 4.14.0-xilinx-v2018.2 #3 SMP Wed Apr 10 [   17.672963] Bluetooth: hci0: change remote baud rate command in firmware
19:13:08 UTC 2019 aarch64
Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
Build Date: 11 June 2018  06:52:05PM
 
Current version of pixman: 0.34.0
 Before reporting problems, check http://wiki.x.org
 to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
 (++) from command line, (!!) notice, (II) informational,
 (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Apr 10 19:26:55 2019
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
D-BUS per-session daemon address is: unix:abstract=/tmp/dbus-PvD1qbim0r,guid=0c3df4c42e287e8aac45e58d5cae437f
Opening webpage
Error: No calibratable devices found.
matchbox: Cant find a keycode for keysym 269025056
matchbox: ignoring key shortcut XF86Calendar=!$contacts

matchbox: Cant find a keycode for keysym 2809
matchbox: ignoring key shortcut telephone=!$dates

matchbox: Cant find a keycode for keysym 269025050
matchbox: ignoring key shortcut XF86Start=!matchbox-remote -desktop

GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
Activating service name='org.a11y.atspi.Registry'
Successfully activated service 'org.a11y.atspi.Registry'
SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
[settings daemon] Forking. run with -n to prevent fork

** (matchbox-panel:2534): WARNING **: Failed to load applet "battery" (/usr/lib/matchbox-panel/libbattery.so: cannot open shared object file: No such file or directory).
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5fOYVDpHyCUUMPX43w5HHe85mO4T0OznSbenFUxAP1PV5VOQMkq1vabZWJtstdXm6A8m0L+heS9NI9A+f7W5t/i2a/94loXj+dPLVCFoaixU0eqWHeoQ7OFV0dpY/U1pNKj0NiR1CI+yVUzESlU7W09l8Vp42EP9aBcsZawLdflbApPpHvUKkYMC52Ko6oM3ybUzVUx9Ck8tYXhQ3jkk8EU/AFxpW2V3Dpejy6znPiVbUuge7mIAYZujQpWpuwoij4BP/JZgJPtaaZjHdQ1PLUbfhGjigrcfg3GlnJB0zYHeWIiAHtwDqbq1OLqfGwt53I0nqE5AMi1gxtGelt6zl root@xilinx-ultra96-reva-2018_2
Fingerprint: md5 ed:a5:73:d1:fb:84:5b:ef:90:79:92:f8:25:05:17:a2
dropbear.
Starting rpcbind daemon...done.
[   22.469538] Bluetooth: hci0 command 0xff05 tx timeout
Starting watchdog: [  OK  ]
starting statd: done
Starting bluetooth: bluetoothd.
Starting Distributed Compiler Daemon: distcc.
exportfs: can't open /etc/exports for reading
NFS daemon support not enabled in kernel
Starting ntpd: done
Starting syslogd/klogd: done
Starting internet superserver: xinetd.
 * Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
Starting Telephony daemon
Starting Linux NFC daemon
Starting tcf-agent: OK

PetaLinux 2018.2 xilinx-ultra96-reva-2018_2 /dev/ttyPS0

xilinx-ultra96-reva-2018_2 login: [2823:2823:0410/192701:ERROR:gl_factory.cc(48)] Requested GL implementation is not available.
[2823:2823:0410/192701:ERROR:gpu_child_thread.cc(348)] Exiting GPU process due to errors during initialization
[2507:2706:0410/192703:ERROR:browser_gpu_channel_host_factory.cc(123)] Failed to launch GPU process.
[2507:2706:0410/192703:ERROR:browser_gpu_channel_host_factory.cc(123)] Failed to launch GPU process.
[   29.107238] random: crng init done
[   30.693560] Bluetooth: hci0: send command failed
[   30.698184] Bluetooth: hci0: download firmware failed, retrying...
[   31.241219] Bluetooth: hci0: change remote baud rate command in firmware
[   36.005510] Bluetooth: hci0 command 0xff05 tx timeout
[   44.005569] Bluetooth: hci0: send command failed
[   44.010141] Bluetooth: hci0: download firmware failed, retrying...
[   44.552513] Bluetooth: hci0: change remote baud rate command in firmware
[   49.317502] Bluetooth: hci0 command 0xff05 tx timeout
[   57.317505] Bluetooth: hci0: send command failed
[   57.322078] Bluetooth: hci0: download firmware failed, retrying...

PetaLinux 2018.2 xilinx-ultra96-reva-2018_2 /dev/ttyPS0

xilinx-ultra96-reva-2018_2 login: 

  1. 2019年04月11日 05:07 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

Docker 上のUbuntu 16.04 のPetaLinux 2018.3でRootFSを使用するUltra96のPetaLinuxをビルドしたが失敗した

Docker 上のUbuntu 16.04 のPetaLinux 2018.2でRootFSを使用するUltra96のPetaLinuxをビルドする”の続き。

前回、PetaLinux 2018.2 を使用したら MicroSD カードの第2パーティションに入れたRoot File system でブートできたので、PetaLinux 2018.3 を使って同様に MicroSD カードの第2パーティションに入れたRoot File system でブートできるかどうか?やってみたら失敗した。

(2019/04/11 :追記)”Docker 上のUbuntu 16.04 のPetaLinux 2018.2で、Vivado 2018.3のSDKのディレクトリを使用してRootFSを使用するUltra96のPetaLinuxをビルドする(Ultra96 BSPを使用)”でUltra96 BSP を使って、cam_dp_183.sdk のpetalinux-config がうまく行っているので、この記事でもしつこく gtk-term を再起動すれば、もしかしてうまく行っていたのかもしれない?



前回同様に、、”Ultra96 cannot boot Petalinux Custom rootfs and kernel from SD Card”に従って、petalinux-build で 3 つの設定を行ってみよう。
その 3 つの設定を下に引用する。

1. petalinux-config ---> DTG Settings ---> (zcu100-revc) MACHINE_NAME
2. petalinux-config ---> u-boot Configuration ---> (xilinx_zynqmp_zcu100_revC_defconfig) u-boot config target
3. petalinux-config ---> Yocto Settings ---> (ultra96-zynqmp) YOCTO_MACHINE_NAME


この設定を petalinux-config で行ってから、 petalinux-build を実行すると、エラーが発生した。
PetaLinux183_47_190408.png

エラー内容を示す。

masaaki@4a1504aab5e2:~/cam_dp_183$ LANG=en_US.UTF-8 petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3460 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:04
Parsing of 2569 .bb files complete (2527 cached, 42 parsed). 3461 targets, 133 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:07
Checking sstate mirror object availability: 100% |###############| Time: 0:00:08
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: device-tree-xilinx+gitAUTOINC+b7466bbeee-r0 do_compile: Function failed: do_compile (log file is located at /home/masaaki/cam_dp_183/build/tmp/work/ultra96_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.15557)
ERROR: Logfile of failure stored in: /home/masaaki/cam_dp_183/build/tmp/work/ultra96_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.15557
Log data follows:
| DEBUG: Executing shell function do_compile
| Error: /home/masaaki/cam_dp_183/build/../components/plnx_workspace/device-tree/device-tree/mipi-support-ultra96.dtsi:9.1-17 Label or path axi_uart16550_0 not found
| FATAL ERROR: Syntax error parsing input tree
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/masaaki/cam_dp_183/build/tmp/work/ultra96_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.15557)
ERROR: Task (/home/masaaki/pkg/petalinux183/components/yocto/source/aarch64/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3195 tasks of which 3171 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/masaaki/pkg/petalinux183/components/yocto/source/aarch64/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
ERROR: Failed to build project


エラー・メッセージによると、/home/masaaki/cam_dp_183/build/tmp/work/ultra96_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.15557 にログがあることがわかったので、見てみよう。
log.do_compile.15557 の内容をコピペする。

DEBUG: Executing shell function do_compile
Error: /home/masaaki/cam_dp_183/build/../components/plnx_workspace/device-tree/device-tree/mipi-support-ultra96.dtsi:9.1-17 Label or path axi_uart16550_0 not found
FATAL ERROR: Syntax error parsing input tree
WARNING: exit code 1 from a shell command.
ERROR: Function failed: do_compile (log file is located at /home/masaaki/cam_dp_183/build/tmp/work/ultra96_zynqmp-xilinx-linux/device-tree/xilinx+gitAUTOINC+b7466bbeee-r0/temp/log.do_compile.15557)


これによると、components/plnx_workspace/device-tree/device-tree/mipi-support-ultra96.dtsi ファイルに axi_uart16550_0 のラベルかパスが無いと言っているようだ。

components/plnx_workspace/device-tree/device-tree ディレクトリに、mipi-support-ultra96.dtsi ファイルがあった。
PetaLinux183_48_190409.png

内容を確認してみると、 axi_uart16550_0 のラベル?はあるようだ?
PetaLinux183_49_190409.png

とりあえず、PetaLinux 2018.2 ではうまく行っているので、そちらで試してみよう。
  1. 2019年04月09日 04:31 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

Docker 上のUbuntu 16.04 のPetaLinux 2018.2でRootFSを使用するUltra96のPetaLinuxをビルドする

Docker 上のUbuntu 16.04 のPetaLinux 2018.3でRootFSを使用するUltra96のPetaLinuxをビルドする2”の続き。

Ultra96 用のPetaLinux 2018.3 を使用して、MicroSD カードの第2パーティションに入れたRoot File system でブートしたいということで、前回は、uImage, BOOT.BIN を作成してUltra96 ボードでMicroSD カードから起動したのだが、”Waiting for root device /dev/mmcblk0p2...”で止まってしまい、Linux をブートできなかった。今回は、PetaLinux 2018.2 を使用したら MicroSD カードの第2パーティションに入れたRoot File system でブートできたので、紹介する。

まずは、”Docker 上のUbuntu 16.04 のPetaLinux 2018.2 でビルドしてみた3”のPetaLinux 2018.2 のプロジェクトを使用する。

まずは petalinux-config を行って、Image Packaging Configuration -> Root filesystem type -> SDカードを選択する(”ZYBO (Zynq) 初心者ガイド (9) Linuxカーネルを少しカスタマイズする”から引用)
petalinux-config --get-hw-description=/home/masaaki/PetaLProj/cam_test_ov5642_182/cam_test_182.sdk/
PetaLinux183_42_190408.png

手順に従って、BOOT.BIN をビルドした。
LANG=en_US.UTF-8 petalinux-build
LANG=en_US.UTF-8 petalinux-package --image -c kernel --format uImage
LANG=en_US.UTF-8 petalinux-package --boot --fsbl /home/masaaki/PetaLProj/cam_test_ov5642_182/components/plnx_workspace/fsbl/fsbl/Release/fsbl.elf --fpga /home/masaaki/PetaLProj/cam_test_ov5642_182/components/plnx_workspace/fsbl/fsbl_hwproj/cam_test_wrapper.bit --pmufw /home/masaaki/PetaLProj/cam_test_ov5642_182/images/linux/pmufw.elf --u-boot


Docker 上のUbuntu 16.04 のPetaLinux 2018.3でRootFSを使用するUltra96のPetaLinuxをビルドする2”と同様に MicroSD カードに書いて、PetaLinux をブートしたが、やはり、”Waiting for root device /dev/mmcblk0p2...”で止まってしまって、Linux が起動しなかった。

そこで、対処歩法を検索してみると、”Ultra96 cannot boot Petalinux Custom rootfs and kernel from SD Card”が見つかった。
それによると petalinux-config で次の 3 つの設定を行うそうだ。設定を引用する。

1. petalinux-config ---> DTG Settings ---> (zcu100-revc) MACHINE_NAME
2. petalinux-config ---> u-boot Configuration ---> (xilinx_zynqmp_zcu100_revC_defconfig) u-boot config target
3. petalinux-config ---> Yocto Settings ---> (ultra96-zynqmp) YOCTO_MACHINE_NAME


petalinux-config を起動して設定を行った。
petalinux-config --get-hw-description=/home/masaaki/PetaLProj/cam_test_ov5642_182/cam_test_182.sdk/
PetaLinux183_43_190408.png

PetaLinux183_44_190408.png

PetaLinux183_45_190408.png

手順に従って、BOOT.BIN をビルドした。
LANG=en_US.UTF-8 petalinux-build
LANG=en_US.UTF-8 petalinux-package --image -c kernel --format uImage
LANG=en_US.UTF-8 petalinux-package --boot --fsbl /home/masaaki/PetaLProj/cam_test_ov5642_182/components/plnx_workspace/fsbl/fsbl/Release/fsbl.elf --fpga /home/masaaki/PetaLProj/cam_test_ov5642_182/components/plnx_workspace/fsbl/fsbl_hwproj/cam_test_wrapper.bit --pmufw /home/masaaki/PetaLProj/cam_test_ov5642_182/images/linux/pmufw.elf --u-boot


100MB のFAT32 でフォーマットされた第1パーティションと 7.8 GB の ext4 でフォーマットされた第2パーティションを持つ 8 GB のMicroSD カードを用意した。
まずは、第1パーティションに image/linux ディレクトリのBOOT.BIN とImage.ub を書いた。
次にRoot File system をMicroSD カードの第2パーティションにコピーした。
sudo tar fxz rootfs.tar.gz -C /media/masaaki/ROOT_FS/
sync


この MicroSD カードを Ultra96 ボードに挿入して電源オンした。
すると無事にLinux が起動した。
ログインもできた。ID は root でパスワードも root だった。
PetaLinux183_46_190408.png

Starting Kernel からの起動メッセージを貼っておく。

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-xilinx-v2018.2 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP Sun Apr 7 09:13:23 UTC 2019
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc07fe73000 s46488 r8192 d31336 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516867
[    0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1785084K/2096128K available (9980K kernel code, 644K rwdata, 3128K rodata, 512K init, 2168K bss, 48900K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a40000   (  9984 KB)
[    0.000000]     .rodata : 0xffffff8008a40000 - 0xffffff8008d60000   (  3200 KB)
[    0.000000]       .init : 0xffffff8008d60000 - 0xffffff8008de0000   (   512 KB)
[    0.000000]       .data : 0xffffff8008de0000 - 0xffffff8008e81200   (   645 KB)
[    0.000000]        .bss : 0xffffff8008e81200 - 0xffffff800909f2b0   (  2169 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01bfc800   (    27 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc07ff00000   (  2047 MB)
[    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: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024ee1c, max_idle_ns: 440795203561 ns
[    0.000004] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008386] Console: colour dummy device 80x25
[    0.012646] console [tty0] enabled
[    0.016011] bootconsole [cdns0] disabled
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-xilinx-v2018.2 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP Sun Apr 7 09:13:23 UTC 2019
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: ZynqMP ZCU100 RevC
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc07fe73000 s46488 r8192 d31336 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516867
[    0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1785084K/2096128K available (9980K kernel code, 644K rwdata, 3128K rodata, 512K init, 2168K bss, 48900K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a40000   (  9984 KB)
[    0.000000]     .rodata : 0xffffff8008a40000 - 0xffffff8008d60000   (  3200 KB)
[    0.000000]       .init : 0xffffff8008d60000 - 0xffffff8008de0000   (   512 KB)
[    0.000000]       .data : 0xffffff8008de0000 - 0xffffff8008e81200   (   645 KB)
[    0.000000]        .bss : 0xffffff8008e81200 - 0xffffff800909f2b0   (  2169 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01bfc800   (    27 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc07ff00000   (  2047 MB)
[    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: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024ee1c, max_idle_ns: 440795203561 ns
[    0.000004] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008386] Console: colour dummy device 80x25
[    0.012646] console [tty0] enabled
[    0.016011] bootconsole [cdns0] disabled
[    0.019924] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
[    0.019939] pid_max: default: 32768 minimum: 301
[    0.020057] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020074] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.020815] ASID allocator initialised with 65536 entries
[    0.020871] Hierarchical SRCU implementation.
[    0.021184] EFI services will not be available.
[    0.021212] zynqmp_plat_init Platform Management API v1.0
[    0.021220] zynqmp_plat_init Trustzone version v1.0
[    0.021333] smp: Bringing up secondary CPUs ...
[    0.021628] Detected VIPT I-cache on CPU1
[    0.021667] CPU1: Booted secondary processor [410fd034]
[    0.021973] Detected VIPT I-cache on CPU2
[    0.021991] CPU2: Booted secondary processor [410fd034]
[    0.022278] Detected VIPT I-cache on CPU3
[    0.022298] CPU3: Booted secondary processor [410fd034]
[    0.022339] smp: Brought up 1 node, 4 CPUs
[    0.022372] SMP: Total of 4 processors activated.
[    0.022381] CPU features: detected feature: 32-bit EL0 Support
[    0.022393] CPU: All CPU(s) started at EL2
[    0.022412] alternatives: patching kernel code
[    0.023429] devtmpfs: initialized
[    0.027254] random: get_random_u32 called from bucket_table_alloc+0x108/0x260 with crng_init=0
[    0.027480] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.027506] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.027728] random: fast init done
[    0.033748] xor: measuring software checksum speed
[    0.072018]    8regs     :  2303.000 MB/sec
[    0.112046]    8regs_prefetch:  2053.000 MB/sec
[    0.152076]    32regs    :  2830.000 MB/sec
[    0.192107]    32regs_prefetch:  2381.000 MB/sec
[    0.192115] xor: using function: 32regs (2830.000 MB/sec)
[    0.192207] pinctrl core: initialized pinctrl subsystem
[    0.192943] NET: Registered protocol family 16
[    0.193709] cpuidle: using governor menu
[    0.194202] vdso: 2 pages (1 code @ ffffff8008a46000, 1 data @ ffffff8008de4000)
[    0.194221] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.194845] DMA: preallocated 256 KiB pool for atomic allocations
[    0.225376] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
[    0.225891] ARM CCI_400_r1 PMU driver probed
[    0.230411] zynqmp-pinctrl ff180000.pinctrl: zynqmp pinctrl initialized
[    0.239416] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.304342] raid6: int64x1  gen()   402 MB/s
[    0.372345] raid6: int64x1  xor()   446 MB/s
[    0.440402] raid6: int64x2  gen()   688 MB/s
[    0.508401] raid6: int64x2  xor()   603 MB/s
[    0.576444] raid6: int64x4  gen()  1042 MB/s
[    0.644519] raid6: int64x4  xor()   742 MB/s
[    0.712583] raid6: int64x8  gen()   980 MB/s
[    0.780593] raid6: int64x8  xor()   745 MB/s
[    0.848640] raid6: neonx1   gen()   726 MB/s
[    0.916700] raid6: neonx1   xor()   853 MB/s
[    0.984728] raid6: neonx2   gen()  1168 MB/s
[    1.052798] raid6: neonx2   xor()  1207 MB/s
[    1.120851] raid6: neonx4   gen()  1506 MB/s
[    1.188879] raid6: neonx4   xor()  1442 MB/s
[    1.256934] raid6: neonx8   gen()  1652 MB/s
[    1.324990] raid6: neonx8   xor()  1534 MB/s
[    1.324998] raid6: using algorithm neonx8 gen() 1652 MB/s
[    1.325006] raid6: .... xor() 1534 MB/s, rmw enabled
[    1.325015] raid6: using neon recovery algorithm
[    1.326286] SCSI subsystem initialized
[    1.326510] usbcore: registered new interface driver usbfs
[    1.326551] usbcore: registered new interface driver hub
[    1.326594] usbcore: registered new device driver usb
[    1.326670] media: Linux media interface: v0.10
[    1.326703] Linux video capture interface: v2.00
[    1.326750] pps_core: LinuxPPS API ver. 1 registered
[    1.326759] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.326782] PTP clock support registered
[    1.326814] EDAC MC: Ver: 3.0.0
[    1.327210] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[    1.327386] FPGA manager framework
[    1.327503] fpga-region fpga-full: FPGA Region probed
[    1.327605] Advanced Linux Sound Architecture Driver Initialized.
[    1.327911] Bluetooth: Core ver 2.22
[    1.327942] NET: Registered protocol family 31
[    1.327950] Bluetooth: HCI device and connection manager initialized
[    1.327965] Bluetooth: HCI socket layer initialized
[    1.327975] Bluetooth: L2CAP socket layer initialized
[    1.328004] Bluetooth: SCO socket layer initialized
[    1.328923] clocksource: Switched to clocksource arch_sys_counter
[    1.329021] VFS: Disk quotas dquot_6.6.0
[    1.329081] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.333403] NET: Registered protocol family 2
[    1.333768] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.333883] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.334226] TCP: Hash tables configured (established 16384 bind 16384)
[    1.334332] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.334376] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.334518] NET: Registered protocol family 1
[    1.334780] RPC: Registered named UNIX socket transport module.
[    1.334790] RPC: Registered udp transport module.
[    1.334798] RPC: Registered tcp transport module.
[    1.334805] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.335335] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.335504] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.336306] audit: initializing netlink subsys (disabled)
[    1.336719] audit: type=2000 audit(1.316:1): state=initialized audit_enabled=0 res=1
[    1.336767] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    1.338180] NFS: Registering the id_resolver key type
[    1.338209] Key type id_resolver registered
[    1.338216] Key type id_legacy registered
[    1.338231] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.338256] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    1.361958] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    1.361975] io scheduler noop registered
[    1.361983] io scheduler deadline registered
[    1.362004] io scheduler cfq registered (default)
[    1.362013] io scheduler mq-deadline registered
[    1.362021] io scheduler kyber registered
[    1.363441] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    1.363884] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[    1.364040] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[    1.364199] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[    1.364354] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[    1.364510] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[    1.364665] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[    1.364824] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[    1.364999] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[    1.365223] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[    1.365378] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[    1.365532] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[    1.365686] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[    1.365839] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[    1.365999] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[    1.366154] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[    1.366311] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[    1.393736] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.397119] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.401862] brd: module loaded
[    1.406043] loop: module loaded
[    1.406938] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.409184] libphy: Fixed MDIO Bus: probed
[    1.410290] tun: Universal TUN/TAP device driver, 1.6
[    1.410534] CAN device driver interface
[    1.411432] usbcore: registered new interface driver asix
[    1.411505] usbcore: registered new interface driver ax88179_178a
[    1.411538] usbcore: registered new interface driver cdc_ether
[    1.411569] usbcore: registered new interface driver net1080
[    1.411602] usbcore: registered new interface driver cdc_subset
[    1.411633] usbcore: registered new interface driver zaurus
[    1.411681] usbcore: registered new interface driver cdc_ncm
[    1.412061] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    1.412559] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.412571] ehci-pci: EHCI PCI platform driver
[    1.412839] usbcore: registered new interface driver uas
[    1.412880] usbcore: registered new interface driver usb-storage
[    1.413762] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0
[    1.413839] i2c /dev entries driver
[    1.414801] IR NEC protocol handler initialized
[    1.414812] IR RC5(x/sz) protocol handler initialized
[    1.414820] IR RC6 protocol handler initialized
[    1.414828] IR JVC protocol handler initialized
[    1.414835] IR Sony protocol handler initialized
[    1.414843] IR SANYO protocol handler initialized
[    1.414850] IR Sharp protocol handler initialized
[    1.414857] IR MCE Keyboard/mouse protocol handler initialized
[    1.414865] IR XMP protocol handler initialized
[    1.415914] usbcore: registered new interface driver uvcvideo
[    1.415923] USB Video Class driver (1.1.1)
[    1.415994] ltc2952-poweroff ltc2954: pm_power_off already registered
[    1.416008] ltc2952-poweroff: probe of ltc2954 failed with error -16
[    1.416865] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer at ffffff8009135000 with timeout 10s
[    1.417143] Bluetooth: HCI UART driver ver 2.3
[    1.417155] Bluetooth: HCI UART protocol H4 registered
[    1.417163] Bluetooth: HCI UART protocol BCSP registered
[    1.417192] Bluetooth: HCI UART protocol LL registered
[    1.417201] Bluetooth: HCI UART protocol ATH3K registered
[    1.417209] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    1.417255] Bluetooth: HCI UART protocol Intel registered
[    1.417264] Bluetooth: HCI UART protocol QCA registered
[    1.417325] usbcore: registered new interface driver bcm203x
[    1.417362] usbcore: registered new interface driver bpa10x
[    1.417398] usbcore: registered new interface driver bfusb
[    1.417437] usbcore: registered new interface driver btusb
[    1.417446] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[    1.417500] usbcore: registered new interface driver ath3k
[    1.417639] EDAC MC: ECC not enabled
[    1.417909] EDAC DEVICE0: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    1.418949] sdhci: Secure Digital Host Controller Interface driver
[    1.418958] sdhci: Copyright(c) Pierre Ossman
[    1.418966] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.464994] mmc0: SDHCI controller on ff160000.sdhci [ff160000.sdhci] using ADMA 64-bit
[    1.471044] sdhci-arasan ff170000.sdhci: parsing dt failed (-517)
[    1.471503] ledtrig-cpu: registered to indicate activity on CPUs
[    1.471682] usbcore: registered new interface driver usbhid
[    1.471691] usbhid: USB HID core driver
[    1.473630] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    1.475516] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    1.477777] Netfilter messages via NETLINK v0.30.
[    1.477923] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.478087] Initializing XFRM netlink socket
[    1.478165] NET: Registered protocol family 10
[    1.478613] Segment Routing with IPv6
[    1.478665] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    1.478852] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.479223] NET: Registered protocol family 17
[    1.479240] NET: Registered protocol family 15
[    1.479265] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.479280] Ebtables v2.0 registered
[    1.479383] can: controller area network core (rev 20170425 abi 9)
[    1.479427] NET: Registered protocol family 29
[    1.479436] can: raw protocol (rev 20170425)
[    1.479444] can: broadcast manager protocol (rev 20170425 t)
[    1.479456] can: netlink gateway (rev 20170425) max_hops=1
[    1.479726] Bluetooth: RFCOMM TTY layer initialized
[    1.479740] Bluetooth: RFCOMM socket layer initialized
[    1.479757] Bluetooth: RFCOMM ver 1.11
[    1.479769] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    1.479777] Bluetooth: BNEP filters: protocol multicast
[    1.479788] Bluetooth: BNEP socket layer initialized
[    1.479796] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    1.479807] Bluetooth: HIDP socket layer initialized
[    1.479945] 9pnet: Installing 9P2000 support
[    1.479969] Key type dns_resolver registered
[    1.480420] registered taskstats version 1
[    1.481826] Btrfs loaded, crc32c=crc32c-generic
[    1.490624] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 40, base_baud = 6249999) is a xuartps
[    1.490828] serial serial0: tty port ttyPS1 registered
[    1.491165] ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 41, base_baud = 6249999) is a xuartps
[    1.627394] mmc0: new high speed SDHC card at address aaaa
[    1.631624] mmcblk0: mmc0:aaaa SL08G 7.40 GiB 
[    1.639209]  mmcblk0: p1 p2
[    3.011468] console [ttyPS0] enabled
[    3.016462] xilinx-psgtr fd400000.zynqmp_phy: Lane:1 type:8 protocol:4 pll_locked:yes
[    3.024627] PLL: shutdown
[    3.027306] PLL: shutdown
[    3.030287] PLL: enable
[    3.032778] PLL: shutdown
[    3.036234] PLL: enable
[    3.038712] xilinx-dp-snd-codec fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
[    3.049317] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
[    3.057272] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
[    3.065587] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    3.077977] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    3.090617] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
[    3.100729] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
[    3.107688] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    3.114225] [drm] No driver support for vblank timestamp query.
[    3.120202] xlnx-drm xlnx-drm.0: bound fd4a0000.zynqmp-display (ops 0xffffff8008af7228)
[    3.149434] PLL: enable
[    3.270083] Console: switching to colour frame buffer device 128x48
[    3.295397] zynqmp-display fd4a0000.zynqmp-display: fb0:  frame buffer device
[    3.302735] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.zynqmp-display on minor 0
[    3.310841] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsystem driver probed
[    3.320596] xilinx-psgtr fd400000.zynqmp_phy: Lane:2 type:0 protocol:3 pll_locked:yes
[    3.330223] xilinx-psgtr fd400000.zynqmp_phy: Lane:3 type:1 protocol:3 pll_locked:yes
[    3.338338] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.343807] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    3.351714] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x22010010
[    3.360447] xhci-hcd xhci-hcd.0.auto: irq 49, io mem 0xfe300000
[    3.366473] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    3.373249] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.380455] usb usb1: Product: xHCI Host Controller
[    3.385292] usb usb1: Manufacturer: Linux 4.14.0-xilinx-v2018.2 xhci-hcd
[    3.391990] usb usb1: SerialNumber: xhci-hcd.0.auto
[    3.397165] hub 1-0:1.0: USB hub found
[    3.400886] hub 1-0:1.0: 1 port detected
[    3.404991] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    3.410450] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    3.418147] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.426310] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    3.433077] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.440282] usb usb2: Product: xHCI Host Controller
[    3.447325] usb usb2: Manufacturer: Linux 4.14.0-xilinx-v2018.2 xhci-hcd
[    3.456175] usb usb2: SerialNumber: xhci-hcd.0.auto
[    3.463444] hub 2-0:1.0: USB hub found
[    3.469387] hub 2-0:1.0: 1 port detected
[    3.477087] i2c i2c-1: Added multiplexed i2c bus 3
[    3.484217] i2c i2c-1: Added multiplexed i2c bus 4
[    3.491348] i2c i2c-1: Added multiplexed i2c bus 5
[    3.498414] i2c i2c-1: Added multiplexed i2c bus 6
[    3.505862] tps65086 7-005e: Device: TPS650864, OTP: C, Rev: 0
[    3.516852] i2c i2c-1: Added multiplexed i2c bus 7
[    3.524370] ina2xx 8-0040: power monitor ina226 (Rshunt = 10000 uOhm)
[    3.532921] i2c i2c-1: Added multiplexed i2c bus 8
[    3.539882] i2c i2c-1: Added multiplexed i2c bus 9
[    3.546796] i2c i2c-1: Added multiplexed i2c bus 10
[    3.553609] pca954x 1-0075: registered 8 multiplexed busses for I2C switch pca9548
[    3.563153] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 31
[    3.572662] sdhci-arasan ff170000.sdhci: allocated mmc-pwrseq
[    3.624935] mmc1: SDHCI controller on ff170000.sdhci [ff170000.sdhci] using ADMA 64-bit
[    3.642318] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    3.651321] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01 00:00:07 UTC (7)
[    3.661486] clk: Not disabling unused clocks
[    3.667746] ALSA device list:
[    3.672612]   #0: DisplayPort monitor
[    3.680293] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    3.682364] sdhci-arasan ff170000.sdhci: card claims to support voltages below defined range
[    3.695007] mmc1: new high speed SDIO card at address 0001
[    3.695698] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
[    3.695725] wl18xx_driver wl18xx.3.auto: Direct firmware load for ti-connectivity/wl18xx-conf.bin failed with error -2
[    3.695729] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
[    3.695731] wlcore: WARNING falling back to default config
[    3.744932] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    3.780540] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.790712] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    3.801668] devtmpfs: mounted
[    3.806878] Freeing unused kernel memory: 512K
INIT: [    3.889763] usb 1-1: New USB device found, idVendor=0424, idProduct=2744
[    3.898529] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.898534] usb 1-1: Product: USB2744
[    3.898537] usb 1-1: Manufacturer: Microchip Tech
version 2.88 booting
[    3.930272] hub 1-1:1.0: USB hub found
[    3.936031] hub 1-1:1.0: 4 ports detected
[    4.001464] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[    4.012740] wlcore: loaded
[    4.017625] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[    4.045332] usb 2-1: New USB device found, idVendor=0424, idProduct=5744
[    4.054077] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=0
[    4.063188] usb 2-1: Product: USB5744
[    4.068807] usb 2-1: Manufacturer: Microchip Tech
[    4.090451] hub 2-1:1.0: USB hub found
[    4.090505] hub 2-1:1.0: 3 ports detected
Starting udev
[    4.191360] Bluetooth: hci0: change remote baud rate command in firmware
[    4.221016] udevd[1776]: starting version 3.2.2
[    4.256948] usb 1-1.4: new high-speed USB device number 3 using xhci-hcd
[    4.264678] udevd[1777]: starting eudev-3.2.2
[    4.370348] usb 1-1.4: New USB device found, idVendor=0424, idProduct=2740
[    4.379570] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.389107] usb 1-1.4: Product: Hub Controller
[    4.395708] usb 1-1.4: Manufacturer: Microchip Tech
[    4.775045] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Sun Apr  7 09:22:28 UTC 2019
Starting internet superserver: inetd.
Configuring packages on first boot....
 (This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
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
Starting Ultra96 Power Button daemon.
INIT: Entering runlevel: 5
Configuring network interfaces... libmraa[2176]: libmraa version v1.7.0 initialised by user 'root' with EUID 0
libmraa[2176]: libmraa initialised for platform 'ULTRA96' of type 9
Cannot find device "eth0"
Starting Dropbear SSH server: Generating key, this may take a while...
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzAonGTubru0GkET/R8QYsQ+ogL/f8/VZRRULfYk3UtNqgH59yNT/KS7qLB+2S41BvWTKztUFhp8XWRvFecNSKKkGDqDjYuITYsHh7f8uUn1/kZxTl/9UeLJbNxTAs7kR1XJN0kYaFh9QUcJ7LL04bW9CGgDixp0jLez8IrnzyW3vYbXIKydiy0FYNjjTXIedgLnmZgNDbwUZgGayzsBSlaVwQd0tMi4BTcFxAqTORbM26VZj1ot0w/JSv6X5EXIqhc2ALa4PDBv9rs0KZrEf1TVPckoab0IxJCNxcxlhyWmAtnU0mHAUKN/27ILzHRp+Tx0G5R+niLP7ni8CLIMWN root@cam_test_ov5642_182
Fingerprint: md5 c0:12:29:c2:09:b0:52:99:4c:4e:17:4b:ba:61:b9:f7
dropbear.
Starting syslogd/klogd: done
Starting tcf-agent: OK

PetaLinux 2018.2 cam_test_ov5642_182 /dev/ttyPS0

cam_test_ov5642_182 login: root

  1. 2019年04月08日 04:22 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

Docker 上のUbuntu 16.04 のPetaLinux 2018.3でRootFSを使用するUltra96のPetaLinuxをビルドする2

Docker 上のUbuntu 16.04 のPetaLinux 2018.3でRootFSを使用するUltra96のPetaLinuxをビルドする1”の続き。

Ultra96 用のPetaLinux 2018.3 をMicroSD カードの第2パーティションに入れたRoot File system でブートしたいということで前回は、petalinux-build までやってみた。今回は、uImage, BOOT.BIN を作成してUltra96 ボードでMicroSD カードから起動してみよう。

今回は最初に uImage を生成しよう。
LANG=en_US.UTF-8 petalinux-package --image -c kernel --format uImage
PetaLinux183_34_190406.png

uImage が生成された。
PetaLinux183_35_190406.png

次に、BOOT.BIN を生成する。
components/plnx_workspace/fsbl ディレクトリが無くなっているので、image/linux ディレクトリのものを使用した。
LANG=en_US.UTF-8 petalinux-package --boot --fsbl images/linux/zynqmp_fsbl.elf --fpga cam_dp_183.sdk/cam_dp_wrapper.bit --pmufw images/linux/pmufw.elf --u-boot
PetaLinux183_36_190406.png

BOOT.BIN が生成された。
PetaLinux183_37_190406.png

100MB のFAT32 でフォーマットされた第1パーティションと7.8GB の ext4 でフォーマットされた第2パーティションを持つ 8 GB のMicroSD カードを用意した。
まずは、第1パーティションに image/linux ディレクトリのBOOT.BIN とImage.ub を書いた。
PetaLinux183_38_190406.png

これは、Docker コンテナからホストパソコンにマウントされたMicroSD カードが見えないので、Docker コンテナでマウントされている~/Docker/PetaLinux183/masaaki/cam_dp_183/images/linux/ からコピーした。

次にRoot File system をMicroSD カードの第2パーティションにコピーする。
cd ~/Docker/PetaLinux183/masaaki/cam_dp_183/images/linux/
sudo tar fxz rootfs.tar.gz -C /media/masaaki/ROOT_FS/
sync

PetaLinux183_39_190406.png

PetaLinux183_40_190406.png

この MIcroSD カードをUltra96 ボードに入れて電源オンした。
残念ながら、”Waiting for root device /dev/mmcblk0p2...”で止まっている。
ログを示す。

Xilinx Zynq MP First Stage Boot Loader 
Release 2018.3   Apr  5 2019  -  11:49:27
PMUFW: v1.1


U-Boot 2018.01 (Apr 05 2019 - 11:48:33 +0000) Xilinx ZynqMP ZCU102 rev1.0

I2C:   ready
DRAM:  2 GiB
usb dr_mode not found
usb dr_mode not found
EL Level: EL2
Chip ID: zu3eg
MMC:   Card did not respond to voltage select!
mmc_init: -95, time 26
mmc@ff170000 - probe failed: -95
mmc@ff160000: 0 (SD)Card did not respond to voltage select!
mmc_init: -95, time 27

*** Warning - bad CRC, using default environment

In:    serial@ff010000
Out:   serial@ff010000
Err:   serial@ff010000
Board: Xilinx ZynqMP
Bootmode: SD_MODE
U-BOOT for cam_dp_183

Hit any key to stop autoboot:  0 
Device: mmc@ff160000
Manufacturer ID: 3
OEM: 5344
Name: SL08G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
7119412 bytes read in 566 ms (12 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x10000104
     Data Size:    7083878 Bytes = 6.8 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
     Hash algo:    sha1
     Hash value:   be23b084d36a79354f35d33863fd0510ef18fd90
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x106c1970
     Data Size:    33614 Bytes = 32.8 KiB
     Architecture: AArch64
     Hash algo:    sha1
     Hash value:   5a227de054e45d2eb5bdbd4140f74e5901b9de21
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x106c1970
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 0000000007ff4000, end 0000000007fff34d ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-xilinx-v2018.3 (oe-user@oe-host) (gcc version 7.3.0 (GCC)) #1 SMP Fri Apr 5 11:53:17 UTC 2019
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: xlnx,zynqmp
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc07fe74000 s46488 r8192 d31336 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516867
[    0.000000] Kernel command line: earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1784876K/2096128K available (10108K kernel code, 664K rwdata, 3224K rodata, 512K init, 2167K bss, 49108K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a60000   ( 10112 KB)
[    0.000000]     .rodata : 0xffffff8008a60000 - 0xffffff8008d90000   (  3264 KB)
[    0.000000]       .init : 0xffffff8008d90000 - 0xffffff8008e10000   (   512 KB)
[    0.000000]       .data : 0xffffff8008e10000 - 0xffffff8008eb6200   (   665 KB)
[    0.000000]        .bss : 0xffffff8008eb6200 - 0xffffff80090d40b0   (  2168 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01bfc800   (    27 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc07ff00000   (  2047 MB)
[    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: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 100.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024e7e0, max_idle_ns: 440795205315 ns
[    0.000004] sched_clock: 56 bits at 100MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008387] Console: colour dummy device 80x25
[    0.012479] Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=400000)
[    0.022840] pid_max: default: 32768 minimum: 301
[    0.027537] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.034094] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.041921] ASID allocator initialised with 65536 entries
[    0.046594] Hierarchical SRCU implementation.
[    0.051170] EFI services will not be available.
[    0.055385] zynqmp_plat_init Platform Management API v1.1
[    0.060729] zynqmp_plat_init Trustzone version v1.0
[    0.065676] smp: Bringing up secondary CPUs ...
[    0.070348] Detected VIPT I-cache on CPU1
[    0.070384] CPU1: Booted secondary processor [410fd034]
[    0.070682] Detected VIPT I-cache on CPU2
[    0.070701] CPU2: Booted secondary processor [410fd034]
[    0.070979] Detected VIPT I-cache on CPU3
[    0.070998] CPU3: Booted secondary processor [410fd034]
[    0.071040] smp: Brought up 1 node, 4 CPUs
[    0.101641] SMP: Total of 4 processors activated.
[    0.106314] CPU features: detected feature: 32-bit EL0 Support
[    0.112112] CPU: All CPU(s) started at EL2
[    0.116185] alternatives: patching kernel code
[    0.121609] devtmpfs: initialized
[    0.127736] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.133573] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.145950] xor: measuring software checksum speed
[    0.183893]    8regs     :  2303.000 MB/sec
[    0.223921]    8regs_prefetch:  2053.000 MB/sec
[    0.263950]    32regs    :  2830.000 MB/sec
[    0.303981]    32regs_prefetch:  2379.000 MB/sec
[    0.304013] xor: using function: 32regs (2830.000 MB/sec)
[    0.308406] pinctrl core: initialized pinctrl subsystem
[    0.314180] NET: Registered protocol family 16
[    0.318766] cpuidle: using governor menu
[    0.322303] vdso: 2 pages (1 code @ ffffff8008a66000, 1 data @ ffffff8008e14000)
[    0.329180] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.336543] DMA: preallocated 256 KiB pool for atomic allocations
[    0.363404] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
[    0.365375] ARM CCI_400_r1 PMU driver probed
[    0.369995] zynqmp-pinctrl ff180000.pinctrl: zynqmp pinctrl initialized
[    0.385017] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.453747] raid6: int64x1  gen()   401 MB/s
[    0.521775] raid6: int64x1  xor()   446 MB/s
[    0.589790] raid6: int64x2  gen()   687 MB/s
[    0.657822] raid6: int64x2  xor()   603 MB/s
[    0.725891] raid6: int64x4  gen()  1042 MB/s
[    0.793935] raid6: int64x4  xor()   742 MB/s
[    0.862007] raid6: int64x8  gen()   980 MB/s
[    0.930043] raid6: int64x8  xor()   745 MB/s
[    0.998108] raid6: neonx1   gen()   726 MB/s
[    1.066136] raid6: neonx1   xor()   853 MB/s
[    1.134206] raid6: neonx2   gen()  1167 MB/s
[    1.202223] raid6: neonx2   xor()  1203 MB/s
[    1.270266] raid6: neonx4   gen()  1502 MB/s
[    1.338317] raid6: neonx4   xor()  1437 MB/s
[    1.406382] raid6: neonx8   gen()  1649 MB/s
[    1.474420] raid6: neonx8   xor()  1526 MB/s
[    1.474450] raid6: using algorithm neonx8 gen() 1649 MB/s
[    1.478408] raid6: .... xor() 1526 MB/s, rmw enabled
[    1.483339] raid6: using neon recovery algorithm
[    1.488588] XGpio: /amba_pl@0/gpio@a0013000: registered, base is 510
[    1.494519] XGpio: /amba_pl@0/gpio@a0012000: registered, base is 509
[    1.501514] SCSI subsystem initialized
[    1.504466] usbcore: registered new interface driver usbfs
[    1.509754] usbcore: registered new interface driver hub
[    1.515043] usbcore: registered new device driver usb
[    1.520081] media: Linux media interface: v0.10
[    1.524533] Linux video capture interface: v2.00
[    1.529133] pps_core: LinuxPPS API ver. 1 registered
[    1.534028] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.543121] PTP clock support registered
[    1.547022] EDAC MC: Ver: 3.0.0
[    1.550274] PLL: shutdown
[    1.552721] zynqmp_pll_disable() clock disable failed for iopll_int, ret = -13
[    1.561527] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[    1.566944] FPGA manager framework
[    1.570216] fpga-region fpga-full: FPGA Region probed
[    1.575226] Advanced Linux Sound Architecture Driver Initialized.
[    1.581467] Bluetooth: Core ver 2.22
[    1.584740] NET: Registered protocol family 31
[    1.589131] Bluetooth: HCI device and connection manager initialized
[    1.595448] Bluetooth: HCI socket layer initialized
[    1.600290] Bluetooth: L2CAP socket layer initialized
[    1.605316] Bluetooth: SCO socket layer initialized
[    1.610786] clocksource: Switched to clocksource arch_sys_counter
[    1.616378] VFS: Disk quotas dquot_6.6.0
[    1.620143] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.631244] NET: Registered protocol family 2
[    1.631624] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.638546] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.645334] TCP: Hash tables configured (established 16384 bind 16384)
[    1.651593] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.657502] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.663996] NET: Registered protocol family 1
[    1.668422] RPC: Registered named UNIX socket transport module.
[    1.674078] RPC: Registered udp transport module.
[    1.678744] RPC: Registered tcp transport module.
[    1.683414] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.690393] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    1.697076] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[    1.705352] audit: initializing netlink subsys (disabled)
[    1.710071] audit: type=2000 audit(1.656:1): state=initialized audit_enabled=0 res=1
[    1.710474] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    1.724840] NFS: Registering the id_resolver key type
[    1.729108] Key type id_resolver registered
[    1.733238] Key type id_legacy registered
[    1.737224] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.743893] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    1.773538] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    1.775298] io scheduler noop registered
[    1.779180] io scheduler deadline registered
[    1.783429] io scheduler cfq registered (default)
[    1.788089] io scheduler mq-deadline registered
[    1.792586] io scheduler kyber registered
[    1.797998] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[    1.803270] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[    1.809953] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[    1.816867] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[    1.823787] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[    1.830705] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[    1.837624] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[    1.844549] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[    1.851465] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[    1.858455] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[    1.865307] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[    1.872224] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[    1.879149] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[    1.886070] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[    1.892988] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[    1.899908] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[    1.906836] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[    1.941137] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.945272] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.952399] brd: module loaded
[    1.956577] loop: module loaded
[    1.957483] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.962674] libphy: Fixed MDIO Bus: probed
[    1.965628] tun: Universal TUN/TAP device driver, 1.6
[    1.969795] CAN device driver interface
[    1.974282] usbcore: registered new interface driver asix
[    1.978815] usbcore: registered new interface driver ax88179_178a
[    1.984824] usbcore: registered new interface driver cdc_ether
[    1.990636] usbcore: registered new interface driver net1080
[    1.996239] usbcore: registered new interface driver cdc_subset
[    2.002121] usbcore: registered new interface driver zaurus
[    2.007670] usbcore: registered new interface driver cdc_ncm
[    2.013675] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[    2.019998] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.025974] ehci-pci: EHCI PCI platform driver
[    2.030654] usbcore: registered new interface driver uas
[    2.035695] usbcore: registered new interface driver usb-storage
[    2.042237] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0
[    2.048868] i2c /dev entries driver
[    2.052661] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 31
[    2.058416] IR NEC protocol handler initialized
[    2.062652] IR RC5(x/sz) protocol handler initialized
[    2.067667] IR RC6 protocol handler initialized
[    2.072162] IR JVC protocol handler initialized
[    2.076660] IR Sony protocol handler initialized
[    2.081244] IR SANYO protocol handler initialized
[    2.085915] IR Sharp protocol handler initialized
[    2.090586] IR MCE Keyboard/mouse protocol handler initialized
[    2.096382] IR XMP protocol handler initialized
[    2.102247] usbcore: registered new interface driver uvcvideo
[    2.106592] USB Video Class driver (1.1.1)
[    2.111219] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer at ffffff800917d000 with timeout 60s
[    2.119732] cdns-wdt ff150000.watchdog: Xilinx Watchdog Timer at ffffff8009185000 with timeout 10s
[    2.128677] Bluetooth: HCI UART driver ver 2.3
[    2.132893] Bluetooth: HCI UART protocol H4 registered
[    2.137989] Bluetooth: HCI UART protocol BCSP registered
[    2.143291] Bluetooth: HCI UART protocol LL registered
[    2.148370] Bluetooth: HCI UART protocol ATH3K registered
[    2.153732] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    2.159997] Bluetooth: HCI UART protocol Intel registered
[    2.165324] Bluetooth: HCI UART protocol QCA registered
[    2.170547] usbcore: registered new interface driver bcm203x
[    2.176164] usbcore: registered new interface driver bpa10x
[    2.181701] usbcore: registered new interface driver bfusb
[    2.187151] usbcore: registered new interface driver btusb
[    2.192571] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[    2.198240] usbcore: registered new interface driver ath3k
[    2.203768] EDAC MC: ECC not enabled
[    2.207411] EDAC DEVICE0: Giving out device to module zynqmp-ocm-edac controller zynqmp_ocm: DEV ff960000.memory-controller (INTERRUPT)
[    2.220269] sdhci: Secure Digital Host Controller Interface driver
[    2.225442] sdhci: Copyright(c) Pierre Ossman
[    2.229765] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.278795] mmc0: SDHCI controller on ff160000.mmc [ff160000.mmc] using ADMA 64-bit
[    2.330790] mmc1: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
[    2.338768] ledtrig-cpu: registered to indicate activity on CPUs
[    2.339306] usbcore: registered new interface driver usbhid
[    2.344676] usbhid: USB HID core driver
[    2.350460] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[    2.356274] usbcore: registered new interface driver snd-usb-audio
[    2.361865] pktgen: Packet Generator for packet performance testing. Version: 2.75
[    2.370878] Netfilter messages via NETLINK v0.30.
[    2.373346] ip_tables: (C) 2000-2006 Netfilter Core Team
[    2.378644] Initializing XFRM netlink socket
[    2.382813] NET: Registered protocol family 10
[    2.388592] Segment Routing with IPv6
[    2.390826] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    2.398321] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.402385] NET: Registered protocol family 17
[    2.406446] NET: Registered protocol family 15
[    2.410863] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.423736] Ebtables v2.0 registered
[    2.427407] can: controller area network core (rev 20170425 abi 9)
[    2.428860] mmc0: error -110 whilst initialising SD card
[    2.438732] NET: Registered protocol family 29
[    2.443113] can: raw protocol (rev 20170425)
[    2.447349] can: broadcast manager protocol (rev 20170425 t)
[    2.452974] can: netlink gateway (rev 20170425) max_hops=1
[    2.458477] Bluetooth: RFCOMM TTY layer initialized
[    2.463273] Bluetooth: RFCOMM socket layer initialized
[    2.468382] Bluetooth: RFCOMM ver 1.11
[    2.472090] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.477367] Bluetooth: BNEP filters: protocol multicast
[    2.482557] Bluetooth: BNEP socket layer initialized
[    2.487485] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.493370] Bluetooth: HIDP socket layer initialized
[    2.498439] 9pnet: Installing 9P2000 support
[    2.502555] Key type dns_resolver registered
[    2.507503] registered taskstats version 1
[    2.511207] Btrfs loaded, crc32c=crc32c-generic
[    2.520854] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 40, base_baud = 6249999) is a xuartps
�    2.525088] f�&��''NMW���k׋��+W/�*LW�Y�X��ed010000 (irq = 41, base_baud = 6249999) is a xuartps
[    2.538885] console [ttyPS0] enabled
[    2.542469] bootconsole [cdns0] disabled
[    2.542469] bootconsole [cdns0] disabled
[    2.551373] xilinx-psgtr fd400000.zynqmp_phy: Lane:1 type:8 protocol:4 pll_locked:yes
[    2.562031] PLL: shutdown
[    2.564744] PLL: shutdown
[    2.567802] PLL: enable
[    2.570325] PLL: shutdown
[    2.574056] zynqmp_clk_divider_set_rate() set divider failed for pl1_ref_div1, ret = -13
[    2.582414] PLL: enable
[    2.584942] xilinx-dp-snd-codec fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0: Xilinx DisplayPort Sound Codec probed
[    2.595625] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed
[    2.603655] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed
[    2.612071] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.624526] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilinx-dp-snd-codec-dai <-> xilinx-dp-snd-codec-dai mapping ok
[    2.637263] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: Xilinx DisplayPort Sound Card probed
[    2.647446] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
[    2.654464] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.661074] [drm] No driver support for vblank timestamp query.
[    2.667066] xlnx-drm xlnx-drm.0: bound fd4a0000.zynqmp-display (ops 0xffffff8008b17868)
[    2.696356] PLL: enable
[    2.812854] Console: switching to colour frame buffer device 128x48
[    2.838254] zynqmp-display fd4a0000.zynqmp-display: fb0:  frame buffer device
[    2.845674] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.zynqmp-display on minor 0
[    2.853780] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsystem driver probed
[    2.862755] dwc3-of-simple ff9d0000.usb0: dwc3_simple_set_phydata: Can't find usb3-phy
[    2.871822] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    2.877315] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    2.885221] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x22010010
[    2.893950] xhci-hcd xhci-hcd.0.auto: irq 49, io mem 0xfe200000
[    2.899997] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.906782] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.913992] usb usb1: Product: xHCI Host Controller
[    2.918861] usb usb1: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    2.925555] usb usb1: SerialNumber: xhci-hcd.0.auto
[    2.930737] hub 1-0:1.0: USB hub found
[    2.934502] hub 1-0:1.0: 1 port detected
[    2.938615] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    2.944102] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    2.951797] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.959953] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    2.966734] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.973945] usb usb2: Product: xHCI Host Controller
[    2.978814] usb usb2: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    2.985506] usb usb2: SerialNumber: xhci-hcd.0.auto
[    2.990615] hub 2-0:1.0: USB hub found
[    2.994381] hub 2-0:1.0: 1 port detected
[    2.998486] dwc3 fe200000.dwc3: couldn't register cable notifier
[    3.004485] dwc3 fe200000.dwc3: failed to initialize dual-role
[    3.010335] platform fe200000.dwc3: runtime PM trying to suspend device but active child
[    3.018413] dwc3: probe of fe200000.dwc3 failed with error -22
[    3.024693] dwc3-of-simple ff9e0000.usb1: dwc3_simple_set_phydata: Can't find usb3-phy
[    3.033929] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    3.039425] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[    3.047450] xhci-hcd xhci-hcd.1.auto: hcc params 0x0238f625 hci version 0x100 quirks 0x22010010
[    3.056174] xhci-hcd xhci-hcd.1.auto: irq 52, io mem 0xfe300000
[    3.062189] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[    3.068969] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.076182] usb usb3: Product: xHCI Host Controller
[    3.081048] usb usb3: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    3.087739] usb usb3: SerialNumber: xhci-hcd.1.auto
[    3.092882] hub 3-0:1.0: USB hub found
[    3.096639] hub 3-0:1.0: 1 port detected
[    3.100729] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    3.106213] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[    3.113905] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.122067] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003
[    3.128850] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.136063] usb usb4: Product: xHCI Host Controller
[    3.140931] usb usb4: Manufacturer: Linux 4.14.0-xilinx-v2018.3 xhci-hcd
[    3.147623] usb usb4: SerialNumber: xhci-hcd.1.auto
[    3.152742] hub 4-0:1.0: USB hub found
[    3.156505] hub 4-0:1.0: 1 port detected
[    3.160609] dwc3 fe300000.dwc3: couldn't register cable notifier
[    3.166610] dwc3 fe300000.dwc3: failed to initialize dual-role
[    3.172454] platform fe300000.dwc3: runtime PM trying to suspend device but active child
[    3.180537] dwc3: probe of fe300000.dwc3 failed with error -22
[    3.187470] rtc_zynqmp ffa60000.rtc: setting system clock to 1970-01-01 00:00:13 UTC (13)
[    3.195644] of_cfs_init
[    3.198098] of_cfs_init: OK
[    3.201004] clk: Not disabling unused clocks
[    3.205496] ALSA device list:
[    3.208451]   #0: DisplayPort monitor
[    3.212666] Waiting for root device /dev/mmcblk0p2...

  1. 2019年04月07日 07:39 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

Docker 上のUbuntu 16.04 のPetaLinux 2018.3でRootFSを使用するUltra96のPetaLinuxをビルドする1

Docker コンテナにUbuntu 16.04 のPetaLinux 2018.3をインストールできたので、今度はUltra96 用のPetaLinux をビルドしてみよう。

以前に、
Docker 上のUbuntu 16.04 のPetaLinux 2018.2 でビルドしてみた1
Docker 上のUbuntu 16.04 のPetaLinux 2018.2 でビルドしてみた2
Docker 上のUbuntu 16.04 のPetaLinux 2018.2 でビルドしてみた3
でUltra96 用のPetaLinux をビルドしてブートできたのだが、RAMDISK で起動したのみでSDカードに書いたRootFS からは起動していないので、これをやってみたい。

今回、参考にしたのは、PetaLinux 2018.3 の英語のリファレンス・マニュアルの”PetaLinux Tools Documentation Reference Guide UG1144 (v2018.3) December 5, 2018”とPetaLinux の日本語資料”PetaLinux ツール資料 リファレンス ガイド UG1144 (v2017.2) 2017 年 6 月 29 日”。

参考にしたWeb ページは”ZYBO (Zynq) 初心者ガイド (9) Linuxカーネルを少しカスタマイズする”。

PetaLinux 2018.3 のコマンドが使えるようにする。
source ~/pkg/petalinux183/settings.sh
PetaLinux183_12_190405.png

PetaLinux の cam_dp_183 プロジェクトを作成する。
petalinux-create --type project --template zynqMP --name cam_dp_183
PetaLinux183_13_190405.png

カメラ画像をDisplayPortに出力する7(ブロックデザインの変更)”の cam_dp_183.sdk ディレクトリをホストパソコンの ~/Docker/PetaLInux183/masaaki/cam_dp_183 ディレクトリ(PetaLinux プロジェクトのディレクトリ)の下にコピペする。
PetaLinux183_14_190405.png

docker run コマンドで ~/Docker/PetaLInux183/masaaki ディレクトリをマウントしてあるので、Docker コンテナでもすぐに cam_dp_183 ディレクトリが見える。
PetaLinux183_15_190405.png

次に環境設定を行う。
cd cam_dp_183/
petalinux-config --get-hw-description=cam_dp_183.sdk

すると、しばらくソフトウェアが走ってから、System Config画面が表示される。
この画面でやることをまとめる。

1. Image Packaging Configuration -> Root filesystem type -> SDカードを選択する(”ZYBO (Zynq) 初心者ガイド (9) Linuxカーネルを少しカスタマイズする”から引用)
2. Yocto Settings -> Enable Debug Tweaks を有効にする (Spaceキーを押す)(”ZYBO (Zynq) 初心者ガイド (9) Linuxカーネルを少しカスタマイズする”から引用)
3. Subsystem AUTO Hardware Settings -> Serial Settings -> Primary stdin/stdout を psu_uart_1 に変更(”Docker 上のUbuntu 16.04 のPetaLinux 2018.2 でビルドしてみた3”より引用)


なお、新千葉 ガーベージ・コレクションのZynq + Yoctoから引用すると

debug-tweaks はデバッグ用にセキュリティを弱くするみたい。login 時に root でパスワードがないなど。

だそうだ。このオプションは要らないかも?

さて、最初に 1. からやってみよう。
まずは、Image Packaging Configuration に入る。
PetaLinux183_16_190405.png

Root filesystem type (INITRAMFS) に入る。
PetaLinux183_17_190405.png

SD card でリターンキーを押す。(この図は2回めに入ったところ)
PetaLinux183_18_190405.png

Root filesystem type (SD card) になっている。
PetaLinux183_19_190405.png

< Exit > で一番上に戻って、Yocto Settings に入る。
PetaLinux183_20_190405.png

Enable Debug Tweaks でスペースキーを押して、チェックを入れる。
PetaLinux183_21_190405.png

< Exit > で一番上に戻って、Subsystem AUTO Hardware Settings に入る。
PetaLinux183_24_190405.png

Serial Settings に入る。(リターンキー)
PetaLinux183_25_190405.png

Primary stdin/stdout (psu_uart_0) に入る。
PetaLinux183_26_190405.png

psu_uart_1 でリターンキーを押す。(この図は2回めに入った時)
PetaLinux183_27_190405.png

上の画面では、Primary stdin/stdout (psu_uart_1) に変更されている。
PetaLinux183_28_190405.png

一番上の画面に戻ってから < Exit > を選択する。
PetaLinux183_29_190405.png

設定をセーブして、設定画面を抜けた。
PetaLinux183_30_190405.png

設定は成功した。
PetaLinux183_31_190405.png

ログを示す。

masaaki@afe35354e423:~/cam_dp_183$ petalinux-config --get-hw-description=cam_dp_183.sdk
INFO: Getting hardware description...
INFO: Rename cam_dp_wrapper.hdf to system.hdf
[INFO] generating Kconfig for project
[INFO] menuconfig project
configuration written to /home/masaaki/cam_dp_183/project-spec/configs/config

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating machine configuration
[INFO] generating bbappends for project . This may take time !
[INFO] generating u-boot configuration files
[INFO] generating kernel configuration files
[INFO] generating kconfig for Rootfs
[INFO] oldconfig rootfs
[INFO] generating petalinux-user-image.bb


次にビルドしよう。
LANG=en_US.UTF-8 petalinux-build
PetaLinux183_32_190405.png

ビルドが成功した。
ログを示す。

masaaki@afe35354e423:~/cam_dp_183$ LANG=en_US.UTF-8 petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3460 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:04
Parsing of 2569 .bb files complete (2527 cached, 42 parsed). 3461 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |#######################################| Time: 0:00:07
Checking sstate mirror object availability: 100% |###############| Time: 0:00:13
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: petalinux-user-image-1.0-r0 do_rootfs: [log_check] petalinux-user-image: found 1 warning message in the logfile:
[log_check] warning: %post(sysvinit-inittab-2.88dsf-r10.plnx_zynqmp) scriptlet failed, exit status 1

NOTE: Tasks Summary: Attempted 3132 tasks of which 2525 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
INFO: Copying Images from deploy to images
NOTE: Failed to copy built images to tftp dir: /tftpboot
[INFO] successfully built project


cam_dp_183 プロジェクトの imagas/linux にはたくさんのファイルが生成された。
PetaLinux183_33_190406.png
  1. 2019年04月05日 05:34 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

Docker上ののUbuntu 16.04にPetaLinux 2018.3をインストールする2(インストールできた)

Docker上ののUbuntu 16.04にPetaLinux 2018.3をインストールする”の続き。

前回は、武内先生の”Petalinux2018.3環境を整える”を参考にさせていただいて、Docker 上のUbuntu 16.04 にPetaLinux 2018.3 をインストールしてみたが”ERROR: Failed to install Yocto SDK for aarch64.”でエラーになってしまってインストールできなかった。全く原因は分からない。そこで、PetaLinux 2018.2 をインストールしてみて、その結果から何のパッケージが足りないか?を探って行った。結局PetaLinux 2018.2 がインストールできたら、PetaLinux 2018.3 もインストールできた。

PetaLinux 2018.2 は、”Docker でPetaLinux 2018.2 をインストールする”でインストールしてあるので、どのようなパッケージが足りないか?を分かっている。またしっかりとエラーメッセージを出してくれるので、インストールしやすい。
PetaLinux 2018.2 をインストールしてみた結果、以下のコマンドを実行すれば良いことがわかった。
sudo apt install -y xvfb libtool-bin cpio
sudo apt install language-pack-en
sudo update-locale LANG=en_US.UTF-8


これを踏まえて、また新たな気持ちでインストールできるように、PetaLinux183 ディレクトリを作成して、新たな気持ちでPetaLinux 2018.3 をインストールすることにした。
~/Docker/PetaLinux183 ディレクトリの下には、masaaki ディレクトリを作成した。そして、例によって、boot.sh, build.sh, Dockerfile の各ファイルを配置してある。また、masaaki ディレクトリの下には .bashrc ファイルを置いた。
PetaLinux183_9_190403.png

build.sh を示す。

docker build -t patalinux183 .


boot.sh を示す。

docker run -ti --rm --name petalinux183c -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix --mount type=bind,src=/home/masaaki/Docker/PetaLinux183/masaaki,dst=/home/masaaki patalinux183 /bin/bash


Dockerfile を示す。

FROM ubuntu:16.04
 
RUN apt-get update && apt-get install -y x11-apps
RUN apt-get install -y sudo
RUN apt-get install -y net-tools gedit nautilus
 
# Replace 1000 with your user / group id
ARG uid=1000
ARG gid=1000
RUN groupadd -g ${uid} masaaki && \
    useradd -u ${gid} -g masaaki -G sudo -r masaaki && \
    mkdir /home/masaaki && \
    chown ${uid}:${gid} -R /home/masaaki

RUN echo 'Defaults visiblepw'             >> /etc/sudoers
RUN echo 'masaaki ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

USER masaaki
WORKDIR /home/masaaki


~/Docker/PetaLinux183 ディレクトリに cd してから、build.sh を起動して、Docker 環境を構築する。(当然、boot.sh, build.sh は実行権限を与えておく)
cd ~/Docker/PetaLinux183
./build.sh


Docker コンテナの petalinux183c を起動した。
./boot.sh

必要なパッケージをインストールする。
sudo dpkg --add-architecture i386
sudo apt-get update

sudo apt-get install -y gcc git make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib build-essential libsdl1.2-dev libglib2.0-dev zlib1g:i386 screen pax gzip gawk tofrodos xvfb libtool-bin cpio language-pack-en lsb-release

sudo update-locale LANG=en_US.UTF-8

PetaLinux183_10_190403.png

Xilinx 社のダウンロードサイトからPetaLinux 2018.3 のインストーラー petalinux-v2018.3-final-installer.run をダウンロードした。

petalinux-v2018.3-final-installer.run に実行権限を与えた。
masaaki ディレクトリの下に pkg ディレクトリを作り、その下に petalinux183 ディレクトリを作成した。
petalinux-v2018.3-final-installer.run を起動した。
chmod +x petalinux-v2018.3-final-installer.run
mkdir pkg
mkdir pkg/petalinux183
./petalinux-v2018.3-final-installer.run /home/masaaki/pkg/petalinux183

ライセンスが3回示されるので、 q を押してから、 y を押した。
そして、PetaLinux 2018.3 がインストールできた。
PetaLinux183_11_190403.png

ログを示す。

masaaki@afe35354e423:~$ ./petalinux-v2018.3-final-installer.run /home/masaaki/pkg/petalinux183
INFO: Checking installation environment requirements...
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
WARNING: No tftp server found - please refer to "PetaLinux SDK Installation Guide" for its impact and solution
INFO: Checking installer checksum...
INFO: Extracting PetaLinux installer...

LICENSE AGREEMENTS

PetaLinux SDK contains software from a number of sources. Please review
the following licenses and indicate your acceptance of each to continue.

You do not have to accept the licenses, however if you do not then you may
not use PetaLinux SDK.

Use PgUp/PgDn to navigate the license viewer, and press 'q' to close

Press Enter to display the license agreements
Do you accept Xilinx End User License Agreement? [y/N] > y
Do you accept Webtalk Terms and Conditions? [y/N] > y
Do you accept Third Party End User License Agreement? [y/N] > y
INFO: Installing PetaLinux...
INFO: Checking PetaLinux installer integrity...
INFO: Installing PetaLinux SDK to "/home/masaaki/pkg/petalinux183/."
INFO: Installing aarch64 Yocto SDK to "/home/masaaki/pkg/petalinux183/./components/yocto/source/aarch64"...
INFO: Installing arm Yocto SDK to "/home/masaaki/pkg/petalinux183/./components/yocto/source/arm"...
INFO: Installing microblaze_full Yocto SDK to "/home/masaaki/pkg/petalinux183/./components/yocto/source/microblaze_full"...
INFO: Installing microblaze_lite Yocto SDK to "/home/masaaki/pkg/petalinux183/./components/yocto/source/microblaze_lite"...
INFO: PetaLinux SDK has been installed to /home/masaaki/pkg/petalinux183/.


PetaLinux 、特に 2018.3 はインストールするためのトラップが多すぎる。みんな、すんなりとインストールできているのだろうか?
  1. 2019年04月04日 04:44 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

Docker上ののUbuntu 16.04にPetaLinux 2018.3をインストールする

武内先生の”Petalinux2018.3環境を整える”を参考にさせていただいて、Docker 上のUbuntu 16.04 にPetaLinux 2018.3 をインストールしてみよう。

まずは、ホストパソコンの ~/Docker ディレクトリ下に vivado183ub16 ディレクトリを作成し、その下にmasaaki ディレクトリを作成した。
そして、vivado183ub16 ディレクトリに boot.sh, build.sh, Dockerfile をコピペした。
PetaLinux183_1_190401.png

masaaki ディレクトリには、 .bashrc をコピペした。
PetaLinux183_2_190401.png

boot.sh を貼っておく。

docker run -ti --rm --name vivado183ub16c -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix --privileged --mount type=bind,src=/home/masaaki/Docker/vivado183ub16/masaaki,dst=/home/masaaki vivado183ub16 /bin/bash


build.sh を貼っておく。

docker build -t vivado183ub16 .


Dockerfile を貼っておく。

FROM ubuntu:16.04
 
RUN apt-get update && apt-get install -y x11-apps
RUN apt-get install -y sudo
RUN apt-get install -y net-tools gedit nautilus
 
# Replace 1000 with your user / group id
ARG uid=1000
ARG gid=1000
RUN groupadd -g ${uid} masaaki && \
    useradd -u ${gid} -g masaaki -G sudo -r masaaki && \
    mkdir /home/masaaki && \
    chown ${uid}:${gid} -R /home/masaaki

RUN echo 'Defaults visiblepw'             >> /etc/sudoers
RUN echo 'masaaki ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

USER masaaki
WORKDIR /home/masaaki


./build.sh を実行した。
PetaLinux183_3_190401.png

./boot.sh でDocker を起動した。
起動後に、Vivado 2018.3 もインストールしようと思ったので、tools ディレクトリを生成した。
./boot.sh
mkdir tools

PetaLinux183_4_190401.png

必要なパッケージをインストールした。
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y gcc git make net-tools libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib build-essential libsdl1.2-dev libglib2.0-dev zlib1g:i386 screen pax gzip
sudo apt upgrade
sudo apt install -y gawk
sudo apt install -y tofrodos

PetaLinux183_5_190403.png

Xilinx 社のダウンロードサイトからPetaLinux 2018.3 のインストーラー petalinux-v2018.3-final-installer.run をダウンロードした。

petalinux-v2018.3-final-installer.run に実行権限を与えた。
masaaki ディレクトリの下に pkg ディレクトリを作り、その下に petalinux ディレクトリを作成した。
petalinux-v2018.3-final-installer.run を起動した。
chmod +x petalinux-v2018.3-final-installer.run
mkdir pkg
mkdir pkg/petalinux
./petalinux-v2018.3-final-installer.run /home/masaaki/pkg/petalinux

ライセンスが3回示されるので、 q を押してから、 y を押した。
PetaLinux183_6_190403.png

インストールが進んでいったが、

INFO: Installing aarch64 Yocto SDK to "/home/masaaki/pkg/petalinux/./components/yocto/source/aarch64"...

の次にエラーになってしまった。
PetaLinux183_7_190403.png

エラーのログを示す。

masaaki@6e017cd18ba3:~$ ./petalinux-v2018.3-final-installer.run /home/masaaki/pkg/petalinux
INFO: Checking installation environment requirements...
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
WARNING: No tftp server found - please refer to "PetaLinux SDK Installation Guide" for its impact and solution
INFO: Checking installer checksum...
INFO: Extracting PetaLinux installer...

LICENSE AGREEMENTS

PetaLinux SDK contains software from a number of sources.  Please review
the following licenses and indicate your acceptance of each to continue.

You do not have to accept the licenses, however if you do not then you may 
not use PetaLinux SDK.

Use PgUp/PgDn to navigate the license viewer, and press 'q' to close

Press Enter to display the license agreements
Do you accept Xilinx End User License Agreement? [y/N] > y
Do you accept Webtalk Terms and Conditions? [y/N] > y
Do you accept Third Party End User License Agreement? [y/N] > y
INFO: Installing PetaLinux...
*********************************************
WARNING: PetaLinux installation directory: /home/masaaki/pkg/petalinux/. is not empty!
*********************************************
Please input "y" to continue to install PetaLinux in that directory?[n]y
INFO: Checking PetaLinux installer integrity...
INFO: Installing PetaLinux SDK to "/home/masaaki/pkg/petalinux/."
INFO: Installing aarch64 Yocto SDK to "/home/masaaki/pkg/petalinux/./components/yocto/source/aarch64"...
*********************************************
ERROR: Failed to install Yocto SDK for aarch64.
*********************************************

Please refer to the PetaLinux Tools Installation Guide.

Check the troubleshooting guide at the end of that manual, and if you are
unable to resolve the issue please contact customer support with file:
   /home/masaaki/petalinux_installation_log

  1. 2019年04月03日 05:06 |
  2. PetaLinux
  3. | トラックバック:0
  4. | コメント:0

NVIDIA JETSON NANO 開発者キットが届いた

昨日、NVIDIA JETSON NANO 開発者キットが届いた。
Jetson_Nano_1_190402.jpg

中を開けるとこうなっていた。
Jetson_Nano_2_190402.jpg

基板を取り出してみる。
Jetson_Nano_3_190402.jpg

Jetson のモジュールが高そうなコネクタに搭載されいてる。
Jetson_Nano_4_190402.jpg

脇にはRaspberry Pi の汎用コネクタの様なヘッダがある。
Jetson_Nano_5_190402.jpg

反対側には、カメラをつなぐMIPI コネクタかな?
Jetson_Nano_6_190402.jpg

インターフェース・コネクタは、たくさんある。
Jetson_Nano_7_190402.jpg

反対側、サブモジュールがスペーサーで取り付けられている。
Jetson_Nano_8_190402.jpg

いやーとても1万3千円程度の基板じゃない。。。数倍してもおかしくない。

Jetson Nano の情報
ロボスタ 「
個人でもAI自律移動ロボットが作れる情報をNVIDIAが公開!「Jetson Nano」をAIやDNN教育用ツールとして活用推進へ

「Jetson Nano」を使って自律走行ロボットを作成するための情報が「GitHub」で公開されている。http://github.com/NVIDIA-AI-IOT/JetBot

JetBot 作ってみたいな。
  1. 2019年04月02日 05:39 |
  2. Jetson Nano
  3. | トラックバック:0
  4. | コメント:0

(目標)Vivado HLSで1クロック毎に結果を出力できるNNを作る5(チューンナップ2)

(目標)Vivado HLSで1クロック毎に結果を出力できるNNを作る4(チューンナップ1)”の続き。

MNIST データセットを使った2層の全結合層を持ったニューラル・ネットワークについて、目標の1クロック毎に結果を出力できるようにチューンナップしようとしたが、large runtime and excessive memory usage エラーになってしまった。今回は、そのエラーを回避するために 1/4 の入力数に変更して高位合成してみよう。

入力数を 784 から 196 つまり 14 x 14 に変更してみよう。
mnist_nn.cpp に一部を示す。

int mnist_nn(ap_ufixed<8, 0, AP_TRN, AP_WRAP> in[196], ap_fixed<13, 7, AP_TRN, AP_WRAP> out[10]){
#pragma HLS PIPELINE II=1
#pragma HLS ARRAY_PARTITION variable=af2_bias complete dim=0
#pragma HLS ARRAY_PARTITION variable=af2_weight complete dim=0
#pragma HLS ARRAY_PARTITION variable=af1_bias complete dim=0
#pragma HLS ARRAY_PARTITION variable=af1_weight complete dim=0
#pragma HLS ARRAY_PARTITION variable=out complete dim=0
#pragma HLS ARRAY_PARTITION variable=in complete dim=0

    ap_fixed<13, 7, AP_TRN, AP_WRAP> dot1[20];
#pragma HLS ARRAY_PARTITION variable=dot1 complete dim=1
    ap_fixed<13, 7, AP_TRN, AP_WRAP> dot2[10];
#pragma HLS ARRAY_PARTITION variable=dot2 complete dim=1

    af1_dot1: for(int col=0; col<20; col++){
        dot1[col] = 0;
        af1_dot2: for(int row=0; row<196; row++){
            dot1[col] += in[row]*af1_weight[row][col];
        }
        dot1[col] += af1_bias[col];

        if(dot1[col] < 0)    // ReLU
            dot1[col] = 0;
    }

    af2_dot1: for(int col=0; col<10; col++){
        dot2[col] = 0;
        af2_dot2: for(int row=0; row<20; row++){
            dot2[col] += dot1[row]*af2_weight[row][col];
        }
        dot2[col] += af2_bias[col];

        if(dot2[col] < 0)    // ReLU
            dot2[col] = 0;
        out[col] = dot2[col];
    }

    return(0);
}


これで合成した。結果を示す。
all_deploy_afnet4mnist_21_190401.png

Latency は 33 クロックだが、Interval は 1 クロックになった。目標達成だ。
DSP48E は 607 個で 168 % 、LUTが 137589 個で 194 % でオーバーしているので、Ultra96 には実装できない。

さて、次に 10 回連続でニューラル・ネットワークの推論をさせてみよう。
mnist_nn.cpp の一部を示す。

int mnist_nn(ap_ufixed<8, 0, AP_TRN, AP_WRAP> in[1960], ap_fixed<13, 7, AP_TRN, AP_WRAP> out[100]){
#pragma HLS ARRAY_PARTITION variable=af2_bias complete dim=0
#pragma HLS ARRAY_PARTITION variable=af2_weight complete dim=0
#pragma HLS ARRAY_PARTITION variable=af1_bias complete dim=0
#pragma HLS ARRAY_PARTITION variable=af1_weight complete dim=0
#pragma HLS ARRAY_PARTITION variable=out complete dim=0
#pragma HLS ARRAY_PARTITION variable=in complete dim=0

    ap_fixed<13, 7, AP_TRN, AP_WRAP> dot1[20];
#pragma HLS ARRAY_PARTITION variable=dot1 complete dim=1
    ap_fixed<13, 7, AP_TRN, AP_WRAP> dot2[10];
#pragma HLS ARRAY_PARTITION variable=dot2 complete dim=1

    itre_10: for(int i=0; i<10; i++){
#pragma HLS PIPELINE II=1
        af1_dot1: for(int col=0; col<20; col++){
            dot1[col] = 0;
            af1_dot2: for(int row=0; row<196; row++){
                dot1[col] += in[row+i*196]*af1_weight[row][col];
            }
            dot1[col] += af1_bias[col];

            if(dot1[col] < 0)    // ReLU
                dot1[col] = 0;
        }

        af2_dot1: for(int col=0; col<10; col++){
            dot2[col] = 0;
            af2_dot2: for(int row=0; row<20; row++){
                dot2[col] += dot1[row]*af2_weight[row][col];
            }
            dot2[col] += af2_bias[col];

            if(dot2[col] < 0)    // ReLU
                dot2[col] = 0;
            out[col+i*10] = dot2[col];
        }
    }

    return(0);
}


このコードで合成した。結果を示す。
all_deploy_afnet4mnist_22_190401.png

Latency の Detail -> Loop を見るとInitiation Interval の Target が 1 クリックで、 achieved も 1 クロックであるのが分かる。
リソース使用量は DSP48E は 607 個 168 % で変わらないが、 LUT が 147368 個で 208 % と増えてしまっている。

これで、Vivado HLSで1クロック毎に結果を出力できるNNを作るという目標は達成できたのだが、通常のMNIST のニューラル・ネットワークだと、Vivado HLS が large runtime and excessive memory usage エラーになって音を上げてしまう。ランタイムが大きくてもやってくれれば良いのだが。。。

なお、このmnist_nn.cpp を合成する時に”ARRAY_PARTITION COMPLETE has exceeded the threshold (1024)”のエラーが出てしまう。
” ARRAY_PARTITION COMPLETE has exceeded the threshold (1024)”の解決策”を参照しながら、maximum_size に 2000 を入れたら問題なく合成ができた。
all_deploy_afnet4mnist_23_190330.png

all_deploy_afnet4mnist_24_190330.png

  1. 2019年04月01日 04:26 |
  2. Vivado HLS
  3. | トラックバック:0
  4. | コメント:0