【从零开始一步步学习VSOA开发】快速体验SylixOS
快速体验SylixOS
安装完毕RealEvo-IDE 后,同时也安装了RealEvo-Simulator。RealEvo-Simulator 是一个虚拟运行环境,可以模拟各种体系结构并在其上运行 SylixOS。相比于物理板卡,在 RealEvo-Simulator 进行运行调测更加的方便快捷且成本低廉。
启动 RealEvo-Simulator
- 双击 RealEvo-Simulator 的桌面图标,进入 RealEvo-Simulator 主界面。
- 模拟器已经预置了多款虚拟机板卡,在主界面中单击 zcu102 虚拟机板卡,进入该虚拟机信息页面。
- zcu102 虚拟机信息页面如下,虚拟机默认已经配置完成,不需要进行任何修改。单击 启动,启动虚拟机。
- 虚拟机启动后会出现如下两个界面:
- RealEvo-Simulator:该界面模拟显示器,因为当前系统并未进行任何图像输出,所以无任何显示。
- putty:系统命令行界面,SylixOS 启动时会显示系统启动过程和 logo 信息。
- RealEvo-Simulator:该界面模拟显示器,因为当前系统并未进行任何图像输出,所以无任何显示。
体验 SylixOS 命令行
开发人员对 SylixOS 的控制和操作主要是在命令行下进行的,下面是 SylixOS 命令行一些最基础操作的举例。
- 查看CPU信息。
[root@sylixos:/root]# cat /proc/cpuinfo
CPU : EdgerOS VM (ARMv8 Cortex-A53 x4 Max@1.5GHz)
CPU Family : ARM64(R) 64-Bits
CPU Endian : Little-endian
CPU Cores : 4
CPU Active : 4
PWR Level : Top level
CACHE : 64KBytes L1-Cache (D-32K/I-32K) 1MByte L2-Cache
PACKET : EdgerOS VM QEMU Packet
BogoMIPS 0 : 4311.200
BogoMIPS 1 : 3900.800
BogoMIPS 2 : 4096.00
BogoMIPS 3 : 4096.00
[root@sylixos:/root]#
- 查看所有线程。
[root@sylixos:/root]# ts
thread show >>NAME TID PID PRI STAT LOCK SAFE DELAY PAGEFAILS FPU CPU
---------------- ------- ----- --- ---- ---- ---- ---------- --------- --- ---
t_idle0 4010000 0 255 RDY 0 YES 0 0 0
t_idle1 4010001 0 255 RDY 0 YES 0 0 1
t_idle2 4010002 0 255 RDY 0 YES 0 0 2
t_idle3 4010003 0 255 RDY 0 YES 0 0 3
t_itimer 4010004 0 20 SLP 0 YES 2668 0 0
t_isrdefer 4010005 0 0 SEM 0 YES 0 0 1
t_except 4010006 0 0 SEM 0 YES 0 0 1
t_log 4010007 0 60 MSGQ 0 YES 0 0 0
t_power 4010008 0 254 SLP 0 YES 74 0 1
t_hotplug 4010009 0 250 SEM 0 YES 82 0 1
t_reclaim 401000b 0 253 MSGQ 0 YES 0 0 1
t_ahcimsg 401000c 0 250 MSGQ 0 YES 0 0 0
t_sync 401000d 0 252 SLP 0 11 0 0
t_dcwpipe 401000e 0 160 SEM 0 0 0 0
t_dcwpipe 401000f 0 160 SEM 0 0 0 0
t_dcwpipe 4010010 0 160 SEM 0 0 0 0
t_dcwpipe 4010011 0 160 SEM 0 0 0 0
t_tpsfs 4010012 0 160 SLP 0 11 0 0
t_sdhcisdio 4010013 0 197 SEM 0 0 0 0
t_netjob 4010014 0 110 SEM 0 YES 0 0 0
t_netjob 4010015 0 110 SEM 0 YES 0 0 0
t_netproto 4010016 0 110 MSGQ 0 YES 8 0 3
t_ftpd 4010017 0 160 MSGQ 0 0 0 1
t_telnetd 4010018 0 160 MSGQ 0 YES 0 0 3
t_dcwpipe 4010019 0 160 SEM 0 0 0 1
t_tpsfs 401001a 0 160 SLP 0 79 0 0
t_xinput 401001c 0 199 SEM 0 0 0 2
t_tshell 401001e 0 150 RDY 1 0 0 1thread: 28
[root@sylixos:/root]#
- 查看所有进程。
[root@sylixos:/root]# psNAME FATHER STAT PID GRP MEMORY UID GID USER
---------------- ---------------- ---- ----- ----- ---------- ----- ----- ------
kernel <orphan> R 0 0 40KB 0 0 roottotal vprocess: 1
[root@sylixos:/root]#
- 查看中断信息。
[root@sylixos:/root]# ints
interrupt vector show >>IRQ NAME ENTRY CLEAR ENABLE RND PREEMPT PRIO CPU 0 CPU 1 CPU 2 CPU 3
---- -------------- ---------------- ---------------- ------ --- ------- ---- ------------- ------------- ------------- -------------30 tick_isr 400670 0 false 0 113853 0 0 053 uart_isr 402f64 0 true 127 715 0 0 080 sdhci_isr 63db90 0 true 127 161 0 0 089 gmac0_isr 401ad0 0 true 127 45 0 0 0121 touch_isr 404760 0 true 127 0 0 0 0165 ahci_isr 6014e0 0 true 0 171 0 0 0interrupt nesting show >>CPU MAX NESTING IPI
----- ----------- -------------0 1 1421 1 40712 1 843 1 1369[root@sylixos:/root]#
- 查看网络信息。
[root@sylixos:/root]# ifconfig
en1 Link encap: Ethernet HWaddr: 00:11:22:33:44:97Dev: zynq0 Ifidx: 2 DHCP: D4 D6 Spd: N/Ainet addr: 192.168.7.37 netmask: 255.255.255.0gateway: 192.168.7.1 broadcast: 192.168.7.255inet6 addr: fe80::211:22ff:fe33:4497 Scope:LinkUP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1collisions:0 txqueue:0 tcpaf:2 tcpwnd:65535RX ucast packets:0 nucast packets:57 dropped:0TX ucast packets:0 nucast packets:8 dropped:0RX bytes:8802 (8.5 KB) TX bytes:580 (580.0 B)lo0 Link encap: Local LoopbackDev: N/A Ifidx: 1 DHCP: D4 D6 Spd: N/Ainet addr: 127.0.0.1 netmask: 255.0.0.0P-to-P: 127.0.0.1 broadcast: N/Ainet6 addr: ::1 Scope:LoopbackUP LOOPBACK RUNNING MTU:0 Metric:1collisions:0 txqueue:0 tcpaf:2 tcpwnd:262140RX ucast packets:3 nucast packets:0 dropped:0TX ucast packets:3 nucast packets:0 dropped:0RX bytes:168 (168.0 B) TX bytes:168 (168.0 B)dns0: 0.0.0.0
dns1: 0.0.0.0
dns2: 0.0.0.0
dns3: 0.0.0.0
default device is: en1
list net interface: 2
[root@sylixos:/root]#
- 查看设备文件。
[root@sylixos:/root]# devs
device show (minor device) >>
drv dev open name37 1 0 /dev/input/xmse37 0 0 /dev/input/xkbd23 1 0 /media/sdcard010 1 0 /dev/blk/sdcard-036 0 0 /dev/netbd35 0 0 /dev/netbr34 0 0 /dev/net/vnd33 0 0 /dev/socket32 0 0 /dev/netevent24 0 0 /ram31 0 0 /dev/rtc29 0 1 /dev/input/touch030 0 0 /dev/fb023 0 0 /media/hdd010 0 0 /dev/blk/hdd-018 0 1 /dev/ttyS015 1 0 /dev/urandom15 0 0 /dev/random14 0 0 /dev/shm13 0 0 /proc12 0 1 /dev/hotplug11 0 0 /dev/epollfd9 0 0 /dev/gpiofd8 0 0 /dev/signalfd7 0 0 /dev/hstimerfd6 0 0 /dev/timerfd5 0 0 /dev/semfd4 0 0 /dev/bmsg3 0 0 /dev/eventfd1 0 0 /dev/zero0 0 0 /dev/null2 0 0 /
[root@sylixos:/root]#
- 查看文件与目录。
[root@sylixos:/root]# ls /
apps boot etc lib mnt qt root tmp var
bin dev home media proc ram sbin usr
[root@sylixos:/root]#