linux 查看主板sn_如何使用您的工业边缘计算单元:第三章:使用你的JayBox 主板...
这篇文章是介器开源十一章节PlayBook的一部分,欢迎来给我们的提PR,我们的git地址是:https://github.com/Jieqiio/BaseJay/wiki
如何使用您的工业边缘计算单元:第三章:使用你的JayBox 主板
JayBox的主板和其他的linux主板类似,都是基于linux内核开发的系统,这个系统我们称之为BlueJayOS。使用的是高通的4G处理器,因此使用的是内核是基于高通定制的linux内核。
1. 登录终端
如果您是使用Linux,Mac电脑,则将电脑的网线接口插入到JayBox 主板,如果没有的话,需要购买一个USB/Type-C转千兆网口的转接器,电脑会自动获得IP地址,JayBox 主板的默认IP是10.100.1.254
,用户名是xguard或者root,密码都是jieqi
登录后可以查看JayBox嵌入式系统的相关信息:
CPU信息
root@localhost:~# cat /proc/cpuinfoprocessor : 0model name : ARMv7 Processor rev 5 (v7l)BogoMIPS : 38.40Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpaeCPU implementer : 0x41CPU architecture: 7CPU variant : 0x0CPU part : 0xc07CPU revision : 5Hardware : Qualcomm Technologies, Inc MDM9607Revision : 0000Serial : 0000000000000000Processor : ARMv7 Processor rev 5 (v7l)
系统信息
root@localhost:~# uname -aLinux localhost 3.18.20 #1 PREEMPT Mon Sep 2 14:34:31 CST 2019 armv7l GNU/Linuxroot@localhost:~# cat /proc/versionLinux version 3.18.20 (release@jieqi.io) (gcc version 4.9.2 (GCC) ) #1 PREEMPT Mon Sep 2 14:34:31 CST 2019
内存信息
root@localhost:~# free total used free shared buffersMem: 157012 108964 48048 172 0-/+ buffers: 108964 48048Swap: 0 0 0root@localhost:~# cat /proc/meminfoMemTotal: 157012 kBMemFree: 48080 kBMemAvailable: 106732 kBBuffers: 0 kBCached: 58704 kBSwapCached: 0 kBActive: 66416 kBInactive: 9496 kBActive(anon): 17232 kBInactive(anon): 148 kBActive(file): 49184 kBInactive(file): 9348 kBUnevictable: 0 kBMlocked: 0 kBSwapTotal: 0 kBSwapFree: 0 kBDirty: 4 kBWriteback: 0 kBAnonPages: 17232 kBMapped: 8100 kBShmem: 172 kBSlab: 15384 kBSReclaimable: 6024 kBSUnreclaim: 9360 kBKernelStack: 2176 kBPageTables: 1488 kBNFS_Unstable: 0 kBBounce: 0 kBWritebackTmp: 0 kBCommitLimit: 78504 kBCommitted_AS: 992240 kBVmallocTotal: 761856 kBVmallocUsed: 30464 kBVmallocChunk: 722940 kB
存储空间
root@localhost:~# df -hFilesystem Size Used Available Use% Mounted onubi0:rootfs 72.1M 46.1M 26.0M 64% /tmpfs 64.0K 4.0K 60.0K 6% /devtmpfs 76.3M 32.0K 76.3M 0% /runtmpfs 76.3M 72.0K 76.3M 0% /var/volatiletmpfs 76.3M 0 76.3M 0% /media/ramubi0:usrfs 8.6M 36.0K 8.6M 0% /data/dev/ubi1_0 38.8M 31.3M 7.5M 81% /firmwareubi2:appfs 15.2M 24.0K 15.2M 0% /vendor/appubi2:datafs 63.6M 10.4M 53.2M 16% /vendor/dataubi0:cachefs 58.3M 24.0K 55.3M 0% /cache
网络信息
JayBox主板不带Wifi,含有两个网络端口LAN和WAN,同时自带4G,标准版的主板不带eSIM,用户可以自己使用SIM卡,有没有4G,会体现在rmnet_data0这个网络适配器上,以下的的状态说明4G是正常连接中,JayBox检查到eSIM或者SIM卡后,会自动连接。
root@localhost:/bin# ifconfigbridge0 Link encap:Ethernet HWaddr 22:0C:E6:EC:B7:4F inet addr:192.168.1.254 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::200c:e6ff:fee9:b44c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2770 errors:0 dropped:0 overruns:0 frame:0 TX packets:2596 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:231954 (226.5 KiB) TX bytes:196048 (191.4 KiB)eth0 Link encap:Ethernet HWaddr 6E:80:A8:BA:D1:30 inet6 addr: fe80::6c80:a8ff:feba:d130/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3051 errors:0 dropped:0 overruns:0 frame:0 TX packets:3701 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:350829 (342.6 KiB) TX bytes:339391 (331.4 KiB) Interrupt:108eth0.1 Link encap:Ethernet HWaddr 6E:80:A8:BA:D1:31 inet addr:169.254.4.1 Bcast:169.254.4.255 Mask:255.255.255.0 inet6 addr: fe80::6c80:a8ff:feba:d131/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3051 errors:0 dropped:0 overruns:0 frame:0 TX packets:2556 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:295911 (288.9 KiB) TX bytes:228848 (223.4 KiB)eth0.3 Link encap:Ethernet HWaddr 6E:80:A8:BA:D1:33 inet addr:169.254.5.1 Bcast:169.254.5.255 Mask:255.255.255.0 inet6 addr: fe80::6c80:a8ff:feba:d133/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:1136 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:65975 (64.4 KiB)lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:33 errors:0 dropped:0 overruns:0 frame:0 TX packets:33 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2604 (2.5 KiB) TX bytes:2604 (2.5 KiB)rmnet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 UP RUNNING MTU:2000 Metric:1 RX packets:622 errors:0 dropped:0 overruns:0 frame:0 TX packets:745 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:81236 (79.3 KiB) TX bytes:71936 (70.2 KiB)rmnet_data0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.42.120.164 Mask:255.255.255.248 inet6 addr: fe80::ea9c:f228:6c01:2574/64 Scope:Link UP RUNNING MTU:1500 Metric:1 RX packets:622 errors:0 dropped:0 overruns:0 frame:0 TX packets:745 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:75522 (73.7 KiB) TX bytes:71936 (70.2 KiB)
2. 格式化EMMC
JayBox 标准配备有一颗8GB Toshiba 出品的工业级 Premium 级别的eMMC, 版本是5.1, 采用15nm工艺制造,最大数据传输速度是400MB/s ,工作温度是工业级的 -25 ̊C~85 ̊C, 目前的初始化系统没有格式化EMMC,首次使用需要先进行格式化,并制作文件系统后才能挂载使用。
2.1 确认EMMC已加载
ls /dev/mmcb*/dev/mmcblk0 /dev/mmcblk0rpmb
2.2 创建分区
fdisk /dev/mmcblk0The number of cylinders for this disk is set to 238592.There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause problems with:1) software that runs at boot time (e.g., old versions of LILO)2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)Command (m for help): n (输入n,添加新分区)Command action e extended p primary partition (1-4)p (输入p,添加新分区为主分区)Partition number (1-4): 1 (输入1,添加分区号为1)First cylinder (1-238592, default 1): (回车,使用默认值)Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-238592, default 238592): (回车,使用默认值)Using default value 238592Command (m for help): w (输入w,回写分区信息并退出程序)The partition table has been altered.Calling ioctl() to re-read partition table
2.3 查看块设备
上一步骤完成后会新生成一个mmcblk0p1的块设备,如下
ls /dev/mmc*/dev/mmcblk0 /dev/mmcblk0p1 /dev/mmcblk0rpmb
2.4.制作ext4文件系统
mkfs.ext4 /dev/mmcblk0p1root@localhost:~# mkfs.ext4 /dev/mmcblk0p1mke2fs 1.42.9 (28-Dec-2013)Discarding device blocks: doneFilesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)Stride=0 blocks, Stripe width=0 blocks477664 inodes, 1908734 blocks95436 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=195454566459 block groups32768 blocks per group, 32768 fragments per group8096 inodes per groupSuperblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632Allocating group tables: doneWriting inode tables: doneCreating journal (32768 blocks): doneWriting superblocks and filesystem accounting information:done
2.5.挂载
手动挂载命令,
mount -t ext4 /dev/mmcblk0p1 /media/cardroot@localhost:~# df -hFilesystem Size Used Available Use% Mounted onubi0:rootfs 72.1M 45.8M 26.3M 63% /tmpfs 64.0K 4.0K 60.0K 6% /devtmpfs 76.3M 32.0K 76.3M 0% /runtmpfs 76.3M 72.0K 76.3M 0% /var/volatiletmpfs 76.3M 0 76.3M 0% /media/ramubi0:usrfs 8.6M 36.0K 8.6M 0% /data/dev/ubi1_0 38.8M 31.3M 7.5M 81% /firmwareubi2:appfs 15.2M 24.0K 15.2M 0% /vendor/appubi2:datafs 63.6M 10.4M 53.2M 16% /vendor/dataubi0:cachefs 58.3M 24.0K 55.3M 0% /cache/dev/mmcblk0p1 7.0G 16.4M 6.6G 0% /media/card
或重启设备,由系统开机自动挂载。
挂载完毕后,可以看到一个/media/card的分区,可用大小是6.6GB,接下就可以使用了。
3. 使用python
BlueJayOS内置2个版本的python,系统默认的是python2.7.9:
root@localhost:~# pythonpython python2 python2.7 python3 python3.4 python3.4m
Python2.7.9的相关信息和默认安装包
root@localhost:~# pythonPython 2.7.9 (default, Sep 2 2019, 14:41:50)[GCC 4.9.2] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import sys as s>>> s.modules.keys()['copy_reg', 'sre_compile', '_sre', 'site', '__builtin__', 'sysconfig', 'atexit', '__main__', 'abc', 'posixpath', '_weakrefset', 'errno', 'sre_constants', 're', '_abcoll', 'types', '_warnings', 'genericpath', 'stat', 'zipimport', '_sysconfigdata', 'warnings', 'UserDict', 'sys', 'readline', 'os.path', 'sitecustomize', 'rlcompleter', 'signal', 'traceback', 'linecache', 'posix', 'exceptions', 'sre_parse', 'os', '_weakref']
Python3.4.3 的相关信息和默认安装包
root@localhost:~# python3Python 3.4.3 (default, Sep 2 2019, 14:41:56)[GCC 4.9.2] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import sys as s>>> s.moduels.keys()Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'moduels'>>> s.modules.keys()dict_keys(['encodings.latin_1', '_imp', 'zipimport', 'marshal', '_weakref', 'sysconfig', 'os', 'encodings.utf_8', 'genericpath', '_stat', 'sitecustomize', 'io', 'errno', 'signal', '_sysconfigdata', '_frozen_importlib', 'encodings.aliases', 'posix', 'codecs', 'abc', 'os.path', 'encodings.ascii', '_weakrefset', 'sys', '_io', 'readline', '_collections_abc', '_thread', 'encodings', 'rlcompleter', 'site', '_codecs', 'stat', '_warnings', '_sitebuiltins', 'builtins', '__main__', 'posixpath', 'atexit'])
4. 使用Perl
BlueJayOS内置Perl,版本是Perl 5.20.0
root@localhost:~# perlperl perl5.20.0root@localhost:~# perl -versionThis is perl 5, version 20, subversion 0 (v5.20.0) built for arm-linux-gnueabiCopyright 1987-2014, Larry WallPerl may be copied only under the terms of either the Artistic License or theGNU General Public License, which may be found in the Perl 5 source kit.Complete documentation for Perl, including FAQ lists, should be found onthis system using "man perl" or "perldoc perl". If you have access to theInternet, point your browser at http://www.perl.org/, the Perl Home Page.
5 使用GPIO
5.1 引脚编号
5.2 使有电平转换:
echo 11 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio11/directionecho 1 > /sys/class/gpio/gpio11/value
5.3 打开GPIO0
echo 0 > /sys/class/gpio/exportecho out > /sys/class/gpio/gpio0/directionecho 1 > /sys/class/gpio/gpio0/value
5.4 关闭GPIO_0
echo 0 > /sys/class/gpio/gpio0/value
5.5 再次打开
echo 1 > /sys/class/gpio/gpio0/value
以上为第三章节内容,我们陆续会推出以下新章节:
如何使用您的工业边缘计算单元
内容
第一章:了解您的JayBox 主板
第二章:开始使用您的JayBox 主板
第三章:使用你的JayBox 主板
第四章:使用易于编译的BaseJay开始编写程序
第五章:使用用Python编程
第六章:使用用C语言编程
第七章:使用BaseJay并编译你的应用
第八章:使用GPIO引脚进行物理计算
第9章:编程使用Modbus。
第10章:编程使用OPC-UA
第11章:使用MQTT的编程。
附录
附录A:命令行界面
附录B:JayBox 主板规格
附录C:JayBox主板4G及以太网带宽测试
开发板购买
linux 查看主板sn_如何使用您的工业边缘计算单元:第三章:使用你的JayBox 主板...相关推荐
- Linux 查看ip没有ens33解决方法
Linux 查看ip没有ens33解决方法 在命令台执行以下三条语句 systemctl stop NetworkManager 临时关闭 systemctl disable NetworkManag ...
- linux 读取内存颗粒,linux查看主板内存槽与内存信息的命令dmidecode怎么用
在Linux中,我们常常使用命令来实现许多操作,比如查看内存信息等,下面小编就为大家带来一篇linux查看主板内存槽与内存信息的命令dmidecode方法.小编觉得挺不错的,现在就分享给大家,也给大家 ...
- linux查看主板最大内存容量,Linux 查看内存插槽数、最大容量的方法
Linux 查看内存插槽数.最大容量的方法 查看内存插槽数: dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|grep -v R ...
- linux 查看主板sn_Linux系统查看硬件信息
一.查看服务器型号.序列号: [root@Master ~]#dmidecode|grep "System Information" -A9|egrep "Manufac ...
- Linux查看进程线程个数
1.根据进程号进行查询: # pstree -p 进程号 # top -Hp 进程号 2.根据进程名字进行查询: # pstree -p `ps -e | grep server | awk '{pr ...
- 转:Linux查看CPU信息、机器型号等硬件信
原文出处:http://www.51testing.com/?uid-225738-action-viewspace-itemid-210333 测试机器的硬件信息: 查看CPU信息(型号) # c ...
- Linux 查看系统硬件信息
Linux 查看系统硬件信息(实例详解) linux查看系统的硬件信息,并不像windows那么直观,这里我罗列了查看系统信息的实用命令,并做了分类,实例解说. cpu lscpu命令,查看的是cpu ...
- 查看硬件配置的Linux命令,LINUX 查看硬件配置命令的教程
你还在为不知道linux 查看硬件配置命令的教程而烦恼么?接下来是小编为大家收集的linux 查看硬件配置命令的教程教程,希望能帮到大家. linux 查看硬件配置命令的教程 系统 # uname - ...
- linux下查看系统硬件,Linux 查看系统硬件信息 Linux 查看系统硬件信息(实例详解)...
linux查看系统的硬件信息,并不像windows那么直观,这里我罗列了查看系统信息的实用命令,并作了分类,实例解说.html cpu lscpu命令,查看的是cpu的统计信息.linux blue@ ...
最新文章
- openldap 2.3 安装配置详解
- C# 集合类(四):Hashtable
- 选择select 标签中指定值的option
- Ubuntu LXC
- php引用下级目录文件夹,使用PHP遍历文件夹与子目录的函数代码
- python基础入门(8)之集合
- iphone three20 保存本地的图片
- 好书分享:TP311.561《深度学习入门:基于python的理论与实现》[日] 斋藤康毅 著
- python基础-读写txt文件
- 微服务架构学习与思考(03):微服务总体架构图解
- at+cipstart返回state:tcp close解决方案 SIM868模块使用
- “天鹅”类谜解大全!-
- 【大杂烩】杂7杂8的东西
- 返还delegation
- pandas行/列删除
- ValueError: array must not contain infs or NaNs
- Windows 罕见技巧全集1
- RFID技术在服装领域的具体应用
- 财报汇总 | 特步、埃森哲、中通、朴新教育等8家企业公布最新业绩
- 判断字符串中的字母大小写、数字