本文大量参考了以下文章: Quark-N wiki: https://wiki.seeedstudio.com/cn/Quantum-Mini-Linux-Development-Kit/ 大神项目地址:https://github.com/peng-zhihui/Project-Quantum 对应的外壳:https://gitee.com/coolflyreg163/quark-n-3d Quark-N的使用小技巧:https://gitee.com/coolflyreg163/quark-n “Quark开发板”使用过程与心得:https://www.zigao.info/812
入门指南 1.1需要准备的硬件 1.一台开发用的电脑
2.MicroSD卡 (建议大于16GB)
3.键盘和鼠标(可选)
4.对应散热器(实测没有散热的话长期使用开发板会变得卡顿)
1.2烧录系统进SD卡 1.2.1镜像文件下载: https://files.seeedstudio.com/wiki/Quantum-Mini-Linux-Dev-Kit/quark-n-21-1-11.zip
最新版本: 2021-1-11 sha256: 8f466adf56468b05d622eba27eb7b1a11ef6d4b943272984730a73ddff7cf59a
1.2.2利用烧录软件balenaEtcher: 开源烧录软件 balenaEtcher下载地址:https://www.balena.io/etcher/
选择下载好的系统镜像, 选择您的SD卡,点击Flash等待烧录完成。
1.3配置Wi-Fi 按照以下步骤连接到Wi-Fi:
切换到root用户(密码quark):
开启Wi-Fi:
扫描附近的Wi-Fi:
连接到特定的Wi-Fi:
1 2 3 4 nmcli dev wifi connect "SSID" password "PASSWORD" ifname wlan0 nmcli dev wifi connect "JASUltra" password "99999999" ifname wlan0 nmcli dev wifi connect "360WiFi-8244B5" password "@7741288@" ifname wlan0
重启网卡设备
1 2 sudo ifconfig wlan0 down sudo ifconfig wlan0 up
连接成功后,下次开机,WiFi 也会自动连接。联网成功之后能干的事情就非常多了。
Quark的拷贝和扩容 确定扩容大小和扇区数 更新系统前可能需要进行扩容,否则可能会提示空间不足
注意不能拓展正在运行的系统盘
参考视频:https://www.bilibili.com/video/BV1144y1E7wX/
将TF卡系统拷贝到emmc,count的值需要先确定emmc的扇区数量,使用sudo fdisk -l:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 pi@Quark-N:~$ sudo fdisk -l Disk /dev/mmcblk0: 29.74 GiB, 31914983424 bytes, 62333952 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type : dos Disk identifier: 0x41efd092 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 49152 131071 81920 40M 83 Linux /dev/mmcblk0p2 131072 2588671 2457600 1.2G 83 Linux /dev/mmcblk0p3 2588672 19455999 16867328 8G 83 Linux Disk /dev/mmcblk1: 14.69 GiB, 15758000128 bytes, 30777344 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/mmcblk1boot1: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/mmcblk1boot0: 4 MiB, 4194304 bytes, 8192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
/dev/mmcblk0p3 2588672 19455999 16867328 8G 83 Linux
选取TF卡最后一个扇区结束的地方:19455999,再加上1,即19456000
开始拷贝 确定扇区数后最终的拷贝命令,也可以加上进度显示::
1 sudo dd if =/dev/mmcblk0 of=/dev/mmcblk1 bs=512 count=19456000 & sudo watch -n 5 pkill -USR1 ^dd $
提示
1 9961472000 bytes (10 GB, 9.3 GiB) copied, 1099.98 s, 9.1 MB/s
或者
说明已经复制完毕了 再sudo fdisk -l查看一遍
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 pi@Quark-N:~$ sudo fdisk -l Disk /dev/mmcblk0: 29.74 GiB, 31914983424 bytes, 62333952 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type : dos Disk identifier: 0x41efd092 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 49152 131071 81920 40M 83 Linux /dev/mmcblk0p2 131072 2588671 2457600 1.2G 83 Linux /dev/mmcblk0p3 2588672 19455999 16867328 8G 83 Linux Disk /dev/mmcblk1: 14.69 GiB, 15758000128 bytes, 30777344 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type : dos Disk identifier: 0x41efd092 Device Boot Start End Sectors Size Id Type /dev/mmcblk1p1 49152 131071 81920 40M 83 Linux /dev/mmcblk1p2 131072 2588671 2457600 1.2G 83 Linux /dev/mmcblk1p3 2588672 19455999 16867328 8G 83 Linux
可见复制完还是只有7.8g的系统空间,还有没分配的空间,所以下面进行扩容操作
扩容操作 简单的方法就是使用远程桌面连接 单击左上角,选择Gparted 选择emmc盘 选择最后一个扇区,右键进行Resize 把条拖动到头即可,也可以留一点点的空间 最后Apply一下 完毕后再使用串口sudo fdisk -l查看
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 pi@Quark-N:~$ sudo fdisk -l Disk /dev/mmcblk0: 29.74 GiB, 31914983424 bytes, 62333952 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type : dos Disk identifier: 0x41efd092 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 49152 131071 81920 40M 83 Linux /dev/mmcblk0p2 131072 2588671 2457600 1.2G 83 Linux /dev/mmcblk0p3 2588672 19455999 16867328 8G 83 Linux Disk /dev/mmcblk1: 14.69 GiB, 15758000128 bytes, 30777344 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type : dos Disk identifier: 0x41efd092 Device Boot Start End Sectors Size Id Type /dev/mmcblk1p1 49152 131071 81920 40M 83 Linux /dev/mmcblk1p2 131072 2588671 2457600 1.2G 83 Linux /dev/mmcblk1p3 2588672 30664703 28076032 13.4G 83 Linux
可见已经从8g拓展到了13.4g
Emmc启动,用df -h命令查看可见还有5.9G的可使用空间,扩容成功:
1 2 3 4 5 6 7 8 9 10 pi@Quark-N:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 211M 0 211M 0% /dev tmpfs 50M 2.3M 47M 5% /run overlay 13G 6.5G 5.9G 53% / tmpfs 246M 0 246M 0% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 246M 0 246M 0% /sys/fs/cgroup /dev/mmcblk0p1 40M 24M 16M 60% /boot tmpfs 50M 4.0K 50M 1% /run/user/1000
SD卡的拓展同理,再次注意不能拓展正在运行的系统盘 。可以用读卡器连接quark进行SD卡系统的拓展
进阶 2.1更新系统 1 2 3 4 5 6 7 8 9 10 11 sudo apt-get update sudo apt-get upgrade sudo apt-get autoremove sudo apt dist-upgrade sudo apt-get install update-manager-core sudo do-release-upgrade
2.2说明 由于时间关系随便就写到这里,下面是本人做笔记留存的几条命令
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 passwd systemctl start vsftpd systemctl status vsftpd sudo vi /etc/ftpusers unzip demo.zip -d demo sudo /etc/init.d/nginx start service nginx stop service nginx start service nginx restart vi /etc/nginx/sites-available/default vi _config.yml hexo clean hexo g hexo s //启动服务 hexo d //上传 udhcpc -i eth0
具体更详细可继续参考以下文章: Quark-N wiki: https://wiki.seeedstudio.com/cn/Quantum-Mini-Linux-Development-Kit/ 大神项目地址:https://github.com/peng-zhihui/Project-Quantum 对应的外壳:https://gitee.com/coolflyreg163/quark-n-3d Quark-N的使用小技巧:https://gitee.com/coolflyreg163/quark-n “Quark开发板”使用过程与心得:https://www.zigao.info/812