栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

笔记(五)HiKey970安装Ubuntu系统并升级

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

笔记(五)HiKey970安装Ubuntu系统并升级

笔记(五)HiKey970安装Ubuntu系统并升级

HiKey970的Ubuntu系统下载地址:http://mirror.lemaker.org/Hikey%20970%20Lebuntu.rar

目前只找到了HiKey970开发板的Ubuntu16.04系统,但在刷入Ubuntu16.04后,可通过命令升级至Ubuntu最新系统。

一、刷入系统

刷Ubuntu系统和刷Debian系统基本一致,

第一步:切换开发板上的拨码开关为:

Switch 1 : ON
Switch 2 : OFF
Switch 3 : ON
Switch 4 : OFF

Note: If the switches are not in correct order then fastboot will not work.

第二步:连接开发板

  • 将电脑和开发板的TYPE-C接口连接
  • 然后连接电源适配器

第三步:烧录系统

下载系统镜像后,解压系统:

tar -zxvf ./hikey970-lebuntu-16.04.tar.gz

进入解压后的文件夹,使用脚本烧录系统

cd hikey970-lebuntu-16.04
./binaries/flash-minimum-binaries.sh

第四步:移除电源适配器,切换拨码开关状态为:

Switch 1 : ON
Switch 2 : OFF
Switch 3 : OFF
Switch 4 : OFF

Note: If the switches are not in correct order then console will not work.

第五步:SSH连接开发板

在同一网络下,通过路由器管理界面可以获取HiKey970的IP地址,然后通过SSH登陆,系统默认用户名及密码如下,如果想更改用户名及主机名,可以阅读博主之前的博文

Username:shunya
Password:shunya
二、升级系统

系统默认镜像源为:http://ports.ubuntu.com/ubuntu-ports,国内访问速度可能会比较慢,可以更换为清华的镜像源,更换教程为:清华tuna镜像源,注意选择Ubuntu16.04 LTS的镜像配置文件,然后按照教程更换即可。

升级系统之前,需要先将系统软件升级为最新版本:

sudo apt update
sudo apt upgrade -y

Ubuntu版本可以通过更改apt /etc/apt/sources.list(可指定软件包存储库)然后apt-get dist-upgrade用于执行升级本身来升级。

但Ubuntu提供了一个工具do-release-upgrade,可以更安全,更轻松升级。do-release-upgrade会检查新版本,然后更新sources.list和一系列其他任务。

输入下述命令,开始升级:

sudo do-release-upgrade

如果您通过SSH连接到系统,系统会询问您是否要继续。

If you continue, an additional ssh daemon will be started at port
'1022'.
Do you want to continue?

Continue [yN] y

接下来,将会提示正在1022端口上启动sshd的新实例,输入y即可。

Starting additional sshd

To make recovery in case of failure easier, an additional sshd will
be started on port '1022'. If anything goes wrong with the running
ssh you can still connect to the additional one.
If you run a firewall, you may need to temporarily open this port. As
this is potentially dangerous it's not done automatically. You can
open the port with e.g.:
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'

To continue please press [ENTER]

下载新的软件包列表并计算更改,系统会询问是否要开始升级,再次,输入y继续。现在系统将检索,解压缩和安装新包。

即使系统处于快速连接状态,也需要一段时间,耐心等待即可。在安装过程中,可能会收到各种问题的交互式对话框,按照自己需要更改即可,反正博主是一路y。

升级完成后,使用hostnamectl或者lsb_release -a查看当前系统信息,当前系统为Ubuntu 18.04 LTS

   Static hostname: hikey970
         Icon name: computer
        Machine ID: 2048092ebdfa4e54bef59373d39875e5
           Boot ID: 5202b7655ef54ff2ae46f35a769dd884
  Operating System: Ubuntu 18.04.6 LTS
            Kernel: Linux 4.9.78-147538-g244928755bbe
      Architecture: arm64

【注意】如果还想继续升级,按照上述方法,再次使用命令sudo do-release-upgrade升级即可。

三、错误排查
  • 出现错误-bash: do-release-upgrade: command not found:表示升级工具未安装,通过命令sudo apt install update-manager-core安装升级工具。
  • 命令执行过程中出现错误UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128):这是python的编码问题,可以在命令行下设置编码export LANG="en_US.UTF-8",然后重新执行升级命令。
参考链接
  • 清华tuna Ubuntu Ports 镜像使用帮助
  • Lebuntu For HiKey970
  • Distribution upgrade problem “No new release found”
  • 如何将Ubuntu升级到18.04最新版
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/360918.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号