Xillinux 章节三 Xillinux 的启动验证

经过前两节的操作TF卡已具备 Xillinux 操作系统启动所需的全部文件以及准备工作了,本节将对TF中的操作系统进行启动验证操作

一、准备工作

要完整的启动Xillinux操作系统(包括图形化桌面部分),请在开机之前连做好下列连接准备:

  • 将写入系统的TF卡插入 Smart ZYNQ SP 主板中(TF卡已按前两节的操作写入好系统)
  • 通过HDMI数据线连接HDMI显示器和Smart ZYNQ SP 主板
  • 外接USB键盘和USB鼠标(推荐使用 共用一个USB适配器的无线键鼠套装, 这样就不需要额外接USB HUB了
  • 一个USB HUB 扩展坞 (USB2.0 USB A接口,用于拓展USB接口用)
  • 使用网线和路由器进行有线连接(如果需要访问网络的话)
  • 将板子上的UART口通过TYPE C线连接到电脑(如不需要查看boot启动信息,TYPE C可以直接接连电源适配器供电)

二、上电验证

将板子的启动方式调整成SD启动,如下图所示

接下来可以对主板进行上电。 上电之后板子上的LED1亮起并周期性的呼吸闪烁,同时LED2将指示TF卡的读写状态(就像PC 的硬盘指示灯一样),如果我们的UART和电脑连接了,此时用putty等专业软件查看串口信息(波特率115200),可以看到系统已经启动,串口正在发送启动的日志信息(完整的LOG贴在本文的最后)。

与此同时HDMI显示屏也会闪过 XILLYBUS的 LOGO(持续几秒钟)

紧接着屏幕就变成了Xillinux 的启动信息

当系统出现root@localhost:~# 就代表系统已经成功启动了(HDMI 和 UART都会同时输出root@localhost:~#)

要想开启图形化桌面,我们只需要在与主板连接的键盘上敲下startx 命令,并按下回车键

如果一切顺利的话,几秒钟后你就能看到完整的Xillinux 桌面

网络部分的验证

如果主板此时通过网络和路由器连接,此时可以打开桌面上的LXTerminal终端,输入ifconfig 命令来查看网络信息: 如下图所示,系统已自动获取IP 192.168.1.113

此时可以尝试ping路由器的ip,如果能ping通证明网络功能一切正常。

至此,我们的Xillinux 图形化桌面也已经启动完成,你可以在Xillinux操作系统上尽情的尝试各种好玩的应用了。 后续会整理更多的文档, 大家可以先自行摸索功能

boot 期间 UART 输出的启动信息(Smart ZYNQ SP输出),仅供参考。如果boot 启动失败,可以通过错误消息查出哪个阶段出了问题,以及可能的原因。

U-Boot 2013.07 (Sep 06 2023 - 12:47:37)

Detected device ID code 0x7 (XC7Z020) with 2 CPU(s), PS_VERSION = 3
Strapped boot mode: 5 (SD Card)

Memory: ECC disabled
DRAM:  512 MiB
MMC:   zynq_sdhci: 0
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   Gem.e000b000
Hit any key to stop autoboot:  0
Device: zynq_sdhci
Manufacturer ID: 3
OEM: 5344
Name: SN64G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 59.5 GiB
Bus Width: 4-bit
Booting Xillinux...
reading xillydemo.bit
4045669 bytes read in 298 ms (12.9 MiB/s)
  design filename = "xillydemo;UserID=0XFFFFFFFF;Version=2018.3"
  part number = "7z020clg484"
  date = "2023/10/12"
  time = "00:23:04"
  bytes in bitstream = 4045564
zynq_load: Align buffer at 100069 to 100080(swap 1)
reading uImage
4487984 bytes read in 326 ms (13.1 MiB/s)
reading devicetree.dtb
9744 bytes read in 16 ms (594.7 KiB/s)
## Booting kernel from Legacy Image at 03000000 ...
   Image Name:   Linux-4.4.30-xillinux-2.0
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4487920 Bytes = 4.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 02a00000
   Booting using the fdt blob at 0x2a00000
   Loading Kernel Image ... OK
   Loading Device Tree to 1fb51000, end 1fb5660f ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.30-xillinux-2.0 (eli@ruhe) (gcc version 4.7.3 (Sourcery CodeBench Lite 2013.05-40) ) #1 SMP PREEMPT Tue Oct 3 12:03:35 IDT 2023 ()
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Xilinx Zynq
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] cma: Reserved 16 MiB at 0x1e800000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 12 pages/cpu @dfb39000 s18880 r8192 d22080 u49152
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
[    0.000000] Kernel command line: console=ttyPS0,115200n8 console=tty0 consoleblank=0 root=/dev/mmcblk0p2 rw rootwait earlyprintk
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 493232K/524288K available (6155K kernel code, 294K rwdata, 2192K rodata, 312K init, 472K bss, 14672K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc082f0cc   (8349 kB)
[    0.000000]       .init : 0xc0830000 - 0xc087e000   ( 312 kB)
[    0.000000]       .data : 0xc087e000 - 0xc08c7840   ( 295 kB)
[    0.000000]        .bss : 0xc08c7840 - 0xc093da38   ( 473 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] slcr mapped to e0800000
[    0.000000] L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
[    0.000000] L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
[    0.000000] L2C-310 erratum 769419 enabled
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
[    0.000000] zynq_clock_init: clkc starts at e0800100
[    0.000000] Zynq clock init
[    0.000000] clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
[    0.000000] sched_clock: 16 bits at 54kHz, resolution 18432ns, wraps every 603975816ns
[    0.007999] ps7-ttc #0 at e0808000, irq=17
[    0.012266] sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
[    0.020216] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
[    0.031581] Console: colour dummy device 80x30
[    0.035939] console [tty0] enabled
[    0.039409] bootconsole [earlycon0] disabled
[    0.043772] Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096)
[    0.130884] pid_max: default: 32768 minimum: 301
[    0.131011] Security Framework initialized
[    0.131030] Yama: becoming mindful.
[    0.131109] AppArmor: AppArmor initialized
[    0.131170] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.131195] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.131940] Initializing cgroup subsys io
[    0.131971] Initializing cgroup subsys memory
[    0.132017] Initializing cgroup subsys devices
[    0.132046] Initializing cgroup subsys freezer
[    0.132070] Initializing cgroup subsys net_cls
[    0.132092] Initializing cgroup subsys perf_event
[    0.132116] Initializing cgroup subsys net_prio
[    0.132138] Initializing cgroup subsys pids
[    0.132192] CPU: Testing write buffer coherency: ok
[    0.132473] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.132540] Setting up static identity map for 0x82c0 - 0x82f4
[    0.310868] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.310971] Brought up 2 CPUs
[    0.311009] SMP: Total of 2 processors activated (2664.03 BogoMIPS).
[    0.311027] CPU: All CPU(s) started in SVC mode.
[    0.312027] devtmpfs: initialized
[    0.314718] evm: security.selinux
[    0.314740] evm: security.SMACK64
[    0.314754] evm: security.SMACK64EXEC
[    0.314767] evm: security.SMACK64TRANSMUTE
[    0.314781] evm: security.SMACK64MMAP
[    0.314811] evm: security.ima
[    0.314830] evm: security.capability
[    0.315267] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.315652] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.316852] pinctrl core: initialized pinctrl subsystem
[    0.318169] NET: Registered protocol family 16
[    0.320224] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.323724] zynq_gpio e000a000.ps7-gpio: This is the Xillinux-1.3 compliant legacy GPIO driver.
[    0.324321] zynq_gpio e000a000.ps7-gpio: gpio at 0xe000a000 mapped to 0xe0814000
[    0.329305] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.329365] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.373764] vgaarb: loaded
[    0.376322] SCSI subsystem initialized
[    0.376838] usbcore: registered new interface driver usbfs
[    0.376970] usbcore: registered new interface driver hub
[    0.377123] usbcore: registered new device driver usb
[    0.377484] media: Linux media interface: v0.10
[    0.377592] Linux video capture interface: v2.00
[    0.377760] pps_core: LinuxPPS API ver. 1 registered
[    0.377790] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.377878] PTP clock support registered
[    0.381515] EDAC MC: Ver: 3.0.0
[    0.392727] NetLabel: Initializing
[    0.392768] NetLabel:  domain hash size = 128
[    0.392791] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.392871] NetLabel:  unlabeled traffic allowed by default
[    0.393287] clocksource: Switched to clocksource arm_global_timer
[    0.394041] AppArmor: AppArmor Filesystem Enabled
[    0.407842] NET: Registered protocol family 2
[    0.408648] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.408744] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.408853] TCP: Hash tables configured (established 4096 bind 4096)
[    0.408934] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.408986] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.409251] NET: Registered protocol family 1
[    0.410060] RPC: Registered named UNIX socket transport module.
[    0.410102] RPC: Registered udp transport module.
[    0.410126] RPC: Registered tcp transport module.
[    0.410150] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.410854] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.412364] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.412533] audit: initializing netlink subsys (disabled)
[    0.412615] audit: type=2000 audit(0.370:1): initialized
[    0.413142] Initialise system trusted keyring
[    0.414010] VFS: Disk quotas dquot_6.6.0
[    0.414114] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.414531] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.415344] NFS: Registering the id_resolver key type
[    0.415418] Key type id_resolver registered
[    0.415444] Key type id_legacy registered
[    0.415490] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.415598] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.416085] Allocating IMA MOK and blacklist keyrings.
[    0.417785] Key type asymmetric registered
[    0.417834] Asymmetric key parser 'x509' registered
[    0.417980] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.428203] io scheduler noop registered
[    0.428249] io scheduler deadline registered (default)
[    0.428310] io scheduler cfq registered
[    0.459811] Console: switching to colour frame buffer device 128x48
[    0.488811] e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 158, base_baud = 3125000) is a xuartps
[    1.282755] console [ttyPS0] enabled
[    1.287175] xdevcfg f8007000.ps7-dev-cfg: ioremap 0xf8007000 to e0874000
[    1.310276] brd: module loaded
[    1.320905] loop: module loaded
[    1.334779] libphy: Fixed MDIO Bus: probed
[    1.340373] libphy: MACB_mii_bus: probed
[    1.483437] macb e000b000.ps7-ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 31 (00:0a:35:00:01:22)
[    1.493971] macb e000b000.ps7-ethernet eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e000b000.ps7-eth:00, irq=-1)
[    1.505638] macb e000b000.ps7-ethernet eth0: Talking to gmii_to_rgmii at MDIO address 8
[    1.515227] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.521938] ehci-pci: EHCI PCI platform driver
[    1.526585] ehci-platform: EHCI generic platform driver
[    1.539243] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.552702] ohci-pci: OHCI PCI platform driver
[    1.564409] ohci-platform: OHCI generic platform driver
[    1.576981] uhci_hcd: USB Universal Host Controller Interface driver
[    1.590838] usbcore: registered new interface driver usb-storage
[    1.604747] mousedev: PS/2 mouse device common for all mice
[    1.618404] i2c /dev entries driver
[    1.630400] device-mapper: uevent: version 1.0.3
[    1.642624] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: dm-devel@redhat.com
[    1.658605] sdhci: Secure Digital Host Controller Interface driver
[    1.672237] sdhci: Copyright(c) Pierre Ossman
[    1.684009] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.698726] sdhci-arasan e0100000.ps7-sdio: No vmmc regulator found
[    1.712530] sdhci-arasan e0100000.ps7-sdio: No vqmmc regulator found
[    1.763346] mmc0: SDHCI controller on e0100000.ps7-sdio [e0100000.ps7-sdio] using ADMA
[    1.783560] ledtrig-cpu: registered to indicate activity on CPUs
[    1.798163] Key type dns_resolver registered
[    1.810262] zynq_pm_ioremap: no compatible node found for 'xlnx,zynq-ddrc-a05'
[    1.827281] zynq_pm_late_init: Unable to map DDRC IO memory.
[    1.842706] Registering SWP/SWPB emulation handler
[    1.860130] registered taskstats version 1
[    1.871829] Loading compiled-in X.509 certificates
[    1.885630] Key type encrypted registered
[    1.897302] AppArmor: AppArmor sha1 policy hashing enabled
[    1.910376] ima: No TPM chip found, activating TPM-bypass!
[    1.923480] evm: HMAC attrs: 0x1
[    1.934460] hctosys: unable to open rtc device (rtc0)
[    1.952483] md: Waiting for all devices to be available before autodetect
[    1.967029] md: If you don't use raid, use raid=noautodetect
[    1.981481] md: Autodetecting RAID arrays.
[    1.993122] md: Scanned 0 and added 0 devices.
[    2.004919] md: autorun ...
[    2.014923] md: ... autorun DONE.
[    2.025535] Waiting for root device /dev/mmcblk0p2...
[    2.045636] mmc0: new high speed SDXC card at address aaaa
[    2.059025] mmcblk0: mmc0:aaaa SN64G 59.5 GiB
[    2.072352]  mmcblk0: p1 p2
[    2.144062] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    2.160042] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[    2.506238] EXT4-fs (mmcblk0p2): recovery complete
[    2.518939] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    2.533976] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.548069] devtmpfs: mounted
[    2.558202] Freeing unused kernel memory: 312K (c0830000 - c087e000)
[    2.767388] systemd[1]: System time before build time, advancing clock.
[    2.878306] NET: Registered protocol family 10
[    2.918590] random: systemd: uninitialized urandom read (16 bytes read, 20 bits of entropy available)
[    2.937475] random: systemd: uninitialized urandom read (16 bytes read, 20 bits of entropy available)
[    2.962112] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
[    2.995587] systemd[1]: Detected architecture arm.
[    3.032414] systemd[1]: Set hostname to <localhost.localdomain>.
[    3.111729] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 21 bits of entropy available)
[    3.135121] random: systemd-cryptse: uninitialized urandom read (16 bytes read, 21 bits of entropy available)
[    3.156625] random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 22 bits of entropy available)
[    3.174028] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 22 bits of entropy available)
▒+HH▒▒4.500974] systemd[1]: Started Journal Service.les.nel File Systems. nodes for the current kernel....lable)
Ubuntu 16.04 LTS localhost.localdomain ttyPS0

localhost login: root (automatic login)

Last login: Thu Feb 11 16:28:16 UTC 2016 on tty1
Welcome to the Xillinux-2.0 distribution for Xilinx Zynq.

You may communicate data with standard FPGA FIFOs in the logic fabric by
writing to or reading from the /dev/xillybus_* device files. Additional
pipe files of that sort can be set up with a custom Xillybus IP core.

For more information: http://www.xillybus.com.

To start a graphical X-Windows session, type "startx" at shell prompt.

root@localhost:~#

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注