当前位置: 首页 > news >正文

20250516使用TF卡将NanoPi NEO core开发板出厂的Ubuntu core22.04.3系统降级到Ubuntu core16.04.2

20250516使用TF卡将NanoPi NEO core开发板出厂的Ubuntu core22.04.3系统降级到Ubuntu core16.04.2
2025/5/16 10:58


缘起:NanoPi NEO core核心板出厂预制的OS操作系统为Ubuntu core22.04.3系统。
【虽然是友善之臂提供的最新的系统,但是缺少很多用用程序。新的程序可能并不一定那么稳定!】
由于Ubuntu core16.04.2久经考验,我们也在Ubuntu core16.04.2上做了很多开发了。
根据领导要求,降级了。

以前/生产线要求,插入TF卡,给一个时间点,多长时间断电拔卡。
为了满足它们的要求。现在开始琢磨升级卡了。


1、你们这个呼吸灯【快闪2次,然后等一秒^_】、 快闪【一秒2/3/5次】 慢闪【一秒一次?2秒一次】。没有量化指标。
2、大概知道了。你们 在后台自动升级的时候 ,前台的串口还是要输入 账号 密码的。
3、如果是 配置成为上电 自动刷机。我希望的是 刷机成功之后2-5秒钟?执行 poweroff操作。这样安全的关电 拔卡[表情]


https://wiki.friendlyelec.com/wiki/index.php/EFlasher/zh#.E5.BC.80.E6.9C.BA.E8.87.AA.E5.8A.A8.E7.83.A7.E5.86.99.E6.8C.87.E5.AE.9A.E7.9A.84.E7.B3.BB.E7.BB.9F
EFlasher/zh

7 开机自动烧写指定的系统
7.1 默认已开启自动烧写
所有文件名为XXXX-eflasher-OS-YYYYMMDD.img.gz的单个OS的固件,默认情况下均开启了自动烧写,如果你不希望开机自动烧写,请使用文件名为 XXXX-eflasher-multiple-os-YYYYMMDD-30g.img.gz 的固件。

7.2 配置方法
有三种途径可以进行配置:
方法1:在图形界面上,选择你要烧写的系统,在Ready to Go预览界面上,在屏幕下方钩选 "Start automatically at startup" 。
方法2: 将SD卡挂载到Windows电脑上,用notepad+文本编辑器在SD卡的Fat分区上新建一个名为eflasher.conf文件 (如果已存在就直接编辑即可),其内容如下:
[General]
autoStart=/mnt/sdcard/XXXXXX
其中,XXXXXX替换成SD卡中存放固件的目录名,例如H3平台的FriendlyCore系统目录名为 friendlycore-xenial_4.14_armhf。

方法3: 开发板运行状态下,通过串口终端,用vi编辑文件:/mnt/sdcard/eflasher.conf,文件不存在就新增一个,内容同上面的方法2。
7.3 自动烧写的进度指示
上电开机时,板上的状态灯先是呈呼吸灯状态,开机烧写固件时状态灯会快闪,烧写完成后变成慢闪,并一直停留在慢闪状态。
状态灯通常为蓝灯,某些平台板子可能会是其他颜色。
也可以利用 LCD2USB 模块,或者LCD和HDMI屏幕,得到可视化的进度指示。
8 烧写或恢复系统完成后做些其他事情
在量产时,你可能会希望在烧写系统完成后做一些额外的事情,比如点亮某个LED,你可以修改 /opt/run-eflasher.sh 脚本,在 "./eflasher-gui" 开头这一行的后面加入代码,例如下面的示例,在烧写完成后,设置某个GPIO针脚:

./eflasher-gui -qws >/dev/null 2>&1
echo 13 > /sys/class/gpio/export 
echo out > /sys/class/gpio/gpio13/direction 
echo 0 > /sys/class/gpio/gpio13/value
echo 13 > /sys/class/gpio/unexport
以下脚本则演示在S5P4418/S5P6818平台上, 烧写系统后, 将cpu id写入到eMMC系统的 /etc/cpuid.txt 文件中:

./eflasher-gui -qws >/dev/null 2>&1
partprobe /dev/mmcblk1
mount /dev/mmcblk1p2 /media/
cat /sys/devices/platform/cpu/uuid > /media/etc/cpuid.txt
umount /media/
要让上面的脚本正常运作,我们还需要设置让 eflasher-gui 在烧写完成后自动退出,需要做以下设置:
用notepad+文本编辑器在SD卡的Fat分区上编辑并新建一个名为eflasher.conf文件,将AutoExit字段设置为True:
[General]
autoStart=/mnt/sdcard/friendlycore-xenial
autoExit=true
autoStart字段则是指定开机自动烧写指定的系统而无需交互, 如果没有连接屏幕, 可以通过 LED 烧来识别烧写状态, 默认情况下, 绿色LED快闪表示正在烧写.


H:\eflasher.conf

; This is the eFlasher configuration file.
; See http://wiki.friendlyarm.com/wiki/index.php/EFlasher for detailed information.

[General]
; Automate OS installation at system startup,
; Use the "autoStart" field to specify the image path or RAW image file,
; The RAW image file can be a gzip compressed file,
; The RAW image file extension must be ".raw" or ".gz",
; Available values: friendlycore
autoStart=friendlycore

; If the "autoExit" field set to true, the eflasher-gui will automatically exit after burning or restoring is completed, 
; You can do something else after burning or restoring by modifying /opt/run-eflasher.sh.
autoExit=false

; Don't erase the flash before burning, useful if you only want to update part of the system files
disableLowFormatting=false

[UI]
; HDMI overscan option, examples:
;     screenSizePercent=auto
;     screenSizePercent=90
screenSizePercent=auto

welcomeMessage=
hideMenuButton=false
hideBackupAndRestoreButton=false
hideStatusBar=false
autoRebootWhenSDBeEjected=true

修改:

; This is the eFlasher configuration file.
; See http://wiki.friendlyarm.com/wiki/index.php/EFlasher for detailed information.

[General]
; Automate OS installation at system startup,
; Use the "autoStart" field to specify the image path or RAW image file,
; The RAW image file can be a gzip compressed file,
; The RAW image file extension must be ".raw" or ".gz",
; Available values: friendlycore
autoStart=/mnt/sdcard/friendlycore

; If the "autoExit" field set to true, the eflasher-gui will automatically exit after burning or restoring is completed, 
; You can do something else after burning or restoring by modifying /opt/run-eflasher.sh.
autoExit=false

; Don't erase the flash before burning, useful if you only want to update part of the system files
disableLowFormatting=false

[UI]
; HDMI overscan option, examples:
;     screenSizePercent=auto
;     screenSizePercent=90
screenSizePercent=auto

welcomeMessage=
hideMenuButton=false
hideBackupAndRestoreButton=false
hideStatusBar=false
autoRebootWhenSDBeEjected=true


如果要升级到出厂的Ubuntu core22.04.3系统
H:\eflasher.conf
autoStart=friendlycore-jammy
修改为:
autoStart=/mnt/sdcard/friendlycore-jammy


打印LOG:
[  OK  ] Reached target Network.
         Starting /etc/rc.local...
         Starting OpenBSD Secure Shell server...
         Starting Permit User Sessions...
[  OK  ] Started /etc/rc.local.
[  OK  ] Finished Permit User Sessions.
[  OK  ] Started Serial Getty on ttyS0.
         Starting Set console scheme...
[  OK  ] Finished Set console scheme.
[  OK  ] Created slice Slice /system/getty.
[  OK  ] Finished Load/Save Random Seed.
[  OK  ] Started OpenBSD Secure Shell server.

Ubuntu 22.04 LTS NanoPi-NEO-Core ttyS0

Default Login:
Username = pi
Password = pi

NanoPi-NEO-Core login: root
Password: 
root@NanoPi-NEO-Core:~# 
root@NanoPi-NEO-Core:~# whoami
root
root@NanoPi-NEO-Core:~# 
root@NanoPi-NEO-Core:~# pwd
/root
root@NanoPi-NEO-Core:~# cd /
root@NanoPi-NEO-Core:/# 
root@NanoPi-NEO-Core:/# cd /mnt/sdcard/
root@NanoPi-NEO-Core:/mnt/sdcard# ls -l
total 96
drwxr-xr-x 2 root root 32768 May 16  2025 'System Volume Information'
-rwxr-xr-x 1 root root  1023 May 16  2025  eflasher.conf
drwxr-xr-x 2 root root 32768 Apr  2  2025  friendlycore
root@NanoPi-NEO-Core:/mnt/sdcard# cd friendlycore/
root@NanoPi-NEO-Core:/mnt/sdcard/friendlycore# 
root@NanoPi-NEO-Core:/mnt/sdcard/friendlycore# ls -l
total 1063424
-rwxr-xr-x 1 root root   41943040 Nov  5  2024 boot.img
-rwxr-xr-x 1 root root         53 Apr  2  2025 info.conf
-rwxr-xr-x 1 root root        416 Apr  2  2025 partmap.txt
-rwxr-xr-x 1 root root 1044652408 Apr  2  2025 rootfs.img
-rwxr-xr-x 1 root root    2088960 Nov  9  2023 u-boot-sunxi-with-spl.bin
-rwxr-xr-x 1 root root     159868 Apr  2  2025 userdata.img
root@NanoPi-NEO-Core:/mnt/sdcard/friendlycore# 
root@NanoPi-NEO-Core:/mnt/sdcard/friendlycore# cd /
root@NanoPi-NEO-Core:/# 
root@NanoPi-NEO-Core:/# uname -a
Linux NanoPi-NEO-Core 4.14.111 #193 SMP Thu Jun 10 18:20:47 CST 2021 armv7l armv7l armv7l GNU/Linux
root@NanoPi-NEO-Core:/# 
root@NanoPi-NEO-Core:/# cat /etc/issue
Ubuntu 22.04 LTS \n \l

Default Login:
Username = pi
Password = pi

root@NanoPi-NEO-Core:/# 
root@NanoPi-NEO-Core:/# 

相关文章:

  • 视频抽帧并保存blob
  • 用户现场不支持路由映射,如何快速将安防监控EasyCVR视频汇聚平台映射到公网?
  • 分布式锁: Redisson红锁(RedLock)原理与实现细节
  • TC8:SOMEIP_ETS_029-030
  • R语言如何解决导出pdf中文不显示的问题
  • 【C++】 —— 笔试刷题day_30
  • 现在环保方面有什么新的技术动态
  • Python - 爬虫;Scrapy框架之items,Pipeline管道持久化存储(二)
  • 云计算与大数据进阶 | 26、解锁云架构核心:深度解析可扩展数据库的5大策略与挑战(上)
  • 主流数据库运维故障排查卡片式速查表与视觉图谱
  • 25-05-16计算机网络学习笔记Day1
  • SQLMesh 增量模型从入门到精通:5步实现高效数据处理
  • 基于Linux环境实现Oracle goldengate远程抽取MySQL同步数据到MySQL
  • OceanBase 的系统变量、配置项和用户变量有何差异
  • 捌拾伍- 量子傅里叶变换 (3)
  • 数据结构进阶:AVL树与红黑树
  • C++23:ranges::iota、ranges::shift_left和ranges::shift_right详解
  • JavaScript性能优化实战(10):前端框架性能优化深度解析
  • 嵌入式EasyRTC音视频实时通话SDK在工业制造领域的智能巡检/AR协作等应用
  • 医学影像系统性能优化与调试技术:深度剖析与实践指南
  • 涉案资金超2亿元 “健康投资”骗局,专挑老年人下手
  • “养胃骗局”大公开,真正有用的方法究竟是?
  • 泽连斯基启程前往土耳其
  • 上海国际电影节纪录片单元,还世界真实色彩
  • 经济日报:美国滥施汽车关税损人不利己
  • 白天气温超30℃的北京,晚间下起了冰雹