ubuntu安装minisat_为LattePanda安装Lubuntu 20.04并优化内核(已更新)
Latest Linux Distributions on LattePanda and Kernel Customization
前言 Preface
原創(chuàng)文章,轉(zhuǎn)載引用請(qǐng)務(wù)必注明鏈接,水平有限,如有疏漏,歡迎指正。從此以后,盡量使用雙語(yǔ),英語(yǔ)水平有限,貽笑大方,萬(wàn)事開(kāi)頭難。
有時(shí)候買(mǎi)到心儀的東西,特別盼著早點(diǎn)到貨,然后隔一會(huì)就去打開(kāi)手機(jī)客戶(hù)端刷新一下查看快遞信息,時(shí)間久了浪費(fèi)生命,所以想著用電腦幫我查,有變動(dòng)告訴我。
[TOC]
軟硬件環(huán)境:
LattePanda、Python3.8、Arduino 18.12、Lubuntu 20.04。
本項(xiàng)目將分為三個(gè)部分:
Latest Linux Distributions on LattePanda and Kernel Customization | 為L(zhǎng)attePanda安裝Ubuntu 20.04并重新編譯優(yōu)化內(nèi)核
Core Code to Track the Packages | 包裹監(jiān)視追蹤項(xiàng)目的核心代碼
Additional Features like Tracking People with Wifi Using Kismet | 額外功能例如識(shí)別人在旁邊時(shí)的智能化動(dòng)作
本項(xiàng)目預(yù)計(jì)實(shí)現(xiàn)以下功能Features:
網(wǎng)頁(yè)前端添加待監(jiān)視信息
查詢(xún)的所有快遞歷史記錄
自定義查詢(xún)頻率
快遞信息變動(dòng)時(shí)微信通知
人在家中時(shí)額外LED、Speaker、Dashboard等提醒
本項(xiàng)目后期準(zhǔn)備添加以下功能TODO:
使用微信等添加待監(jiān)視快遞信息,或者小程序
添加中文語(yǔ)音播報(bào)
整合進(jìn)Home Assisant Dashboard
最后可以了解到的知識(shí)包括:
Install and setup latest Ubuntu for LattePanda | 在LattePanda上安裝配置最新版Ubuntu
Interaction??between MPU and MCU on LattePanda with Firmata protocol | LattePanda上Linux和Arduino使用Firmata協(xié)議進(jìn)行交互
Python GUI Programming with remi | Python圖形化編程(使用remi)
Usage of TinyDB——a lightweight database 破折號(hào)還是逗號(hào)?| 介紹輕量級(jí)數(shù)據(jù)庫(kù)TinyDB的使用
Wechat notification via ServerChan | 使用Server醬實(shí)現(xiàn)微信通知功能
Tracking people with wifi using kismet | 使用Kismet識(shí)別人是否在旁邊
Using Kismet REST-like API | 使用Kismet的API
Text To Speech with Python | 語(yǔ)音合成播報(bào)
Home Assistant | HA的一些整合與應(yīng)用
本文為第一部分。看到社區(qū)的活動(dòng),覺(jué)得很有趣,加上有個(gè)Intel 和 DFRobot合辦的活動(dòng),需要Intel CPU,我的是AMD CPU,也沒(méi)有神經(jīng)開(kāi)發(fā)棒,然后拿出LattePanda(以下稱(chēng)胖噠) 作為可行性驗(yàn)證。基板準(zhǔn)備用LattePanda v1,系統(tǒng)準(zhǔn)備轉(zhuǎn)成Linux,方便開(kāi)發(fā)。安裝Linux的過(guò)程中發(fā)現(xiàn)一些問(wèn)題,本文分享相關(guān)經(jīng)驗(yàn)。另外LattePanda Alpha / Delta 相關(guān)架構(gòu)類(lèi)似,一些內(nèi)容也有參考價(jià)值。
1. 準(zhǔn)備
為什么要使用Linux | Why do we prefer to use Linux
Linux可定制化更高,用來(lái)開(kāi)發(fā)更熟悉。
選擇Ubuntu還是Mint | Ubuntu or Mint: which one to choose?
Mint 最新版基于Ubuntu 18.04,pass。但不喜歡Ubuntu的Unity桌面,加上LattePanda性能捉襟見(jiàn)肘,所以我們選擇使用比較輕量級(jí)的LXQt桌面(之前是LXDE,使用Qt重寫(xiě))的Lubuntu,基于openbox,能看到遺留。感興趣的也可以看看來(lái)自TW的LXQt開(kāi)發(fā)者洪任諭醫(yī)師的一些介紹:一、二。
1.1 現(xiàn)狀
通過(guò)網(wǎng)上沖浪可知,目前關(guān)于在LattePanda上運(yùn)行Linux有以下信息:
Caution:
官方文檔寫(xiě)著Official Supported Version: S70CR200 Version,但實(shí)際我的S70CR110也是可用。
mop講的設(shè)置bios里的南橋相關(guān),新版ubuntu里無(wú)需設(shè)置。
以上三個(gè)都有一個(gè)共同的特點(diǎn):OUTDATED。我們需要更好的軟硬件兼容性以及主流的Linux版本和內(nèi)核支持。當(dāng)然,從以上還是能獲得一些有價(jià)值的信息,也就是我們需要解決的問(wèn)題。
1.2 面臨的問(wèn)題
rtl8723bs wifi & bluetooth driver
HDMI audio output issue
Goodix touch panel dirver
PWM? 這個(gè)我暫時(shí)不知道啥問(wèn)題
1.3 探索
為啥LattePanda有上述問(wèn)題要解決呢,主要和胖噠采用的Intel Atom x5 z8350 CPU有關(guān),其規(guī)格如下:
Intel Atom x5 z8350, (Code Name: Cherry Tail, Original Target: Lightweight tablets / High-end Smartphones. Microarchitectures: Airmont——the 14 nm die shrink of Silvermont, more info, Via), remember that there is no avx instruction set supported, therefore, recompile is need to run newer version of Tensorflow.
原來(lái)z8350設(shè)計(jì)用于Windows平板以及手機(jī),并沒(méi)有考慮Linux兼容性,所以有很多問(wèn)題,特別是驅(qū)動(dòng)上,總結(jié)起來(lái)有以下:
無(wú)線(xiàn)和藍(lán)牙功能:使用RTL8723BS模塊,SDIO接口,2.4GHz 802.11bgn,bt4.0,RealTek官網(wǎng)僅提供了Windows驅(qū)動(dòng)
觸摸屏:使用Goodix gt911 方案
甚至默認(rèn)最大僅支持2GB內(nèi)存,不過(guò)國(guó)內(nèi)魔改支持4GB,但是據(jù)說(shuō)內(nèi)存帶寬也減半。
202006294851..png (93.03 KB, 下載次數(shù): 1)
2020-6-29 14:48 上傳
在Linux Kernel 4.12之前,需要手動(dòng)安裝RTL8723BS模塊的驅(qū)動(dòng),但是Since Linux 4.12, rtl8723bs has been merged,這就很像早幾年在樹(shù)莓派上使用小米隨身wifi(mt7601u芯片),最初需要自己編譯安裝驅(qū)動(dòng),后來(lái)也合并到內(nèi)核里開(kāi)箱即用了,可以看到mop的內(nèi)核還是4.11。
Caution:
LattePanda Delta 采用的Intel Celeron N4100同樣不支持avx指令集,所以想要運(yùn)行新版的Tensorflow,需要自行編譯。參考《Tensorflow-Intel-Atom-CPU》
采用z8350的設(shè)備有很多,比如Lenovo Miix 310 和Chuwi Hi10 Pro,其中聯(lián)想的miix310屬于筆記本,更接近胖噠的使用情景。
參考鏈接:
1.4 發(fā)現(xiàn)
字里行間我們發(fā)現(xiàn)兩個(gè)東西:Ian Morrison's isorespin.sh 和kernel_gcc_patch。
1.4.1 isorespin.sh
簡(jiǎn)而言之,就是使用Intel Bay Trail 和 Cherry Trail處理器的設(shè)備安裝Linux會(huì)遇到一些兼容性問(wèn)題,特別是HDMI輸出、系統(tǒng)假死以及無(wú)線(xiàn)驅(qū)動(dòng),Linux 4.11 解決了HDMI音頻輸出和系統(tǒng)假死的問(wèn)題,4.12解決了無(wú)線(xiàn)驅(qū)動(dòng)的問(wèn)題。而Ian Morrison(Linuxium)則更進(jìn)一步,開(kāi)發(fā)了isorespin.sh這個(gè)工具,可以制作適合上述CPU的帶有Linux Mainline內(nèi)核的新版Ubuntu ISO安裝鏡像。另外Ian也是 cnx-software網(wǎng)站的作者之一?!猇ia
我們使用該腳本來(lái)定制化Linux系統(tǒng),而且作者有做好的最新系統(tǒng)鏡像可供下載。目前支持自定義64bit Ubuntu、Ubuntu Flavoured、LinuxMint等等。
202006291895..png (225.34 KB, 下載次數(shù): 1)
2020-6-29 14:48 上傳
該腳本針對(duì)Intel Atom處理器做了如下改進(jìn):
Add a GRUB 32-bit bootloader to allow ISOs to boot on the many Intel Atom devices limited by their BIOS.
Add functionality to boot ISOs on any Intel Apollo device regardless of the BIOS settings.
Upgrade the kernel to the latest mainline version or to a specific version to benefit from recent patch functionality e.g. for audio and wifi/bluetooth or to use a rolling (HWE) kernel.
Add (or remove) repositories, software packages, scripts and files to allow the installation of firmware and favourite programs.
Preseed or perform set-up commands and scripts and also change system defaults and kernel boot parameters.
Add persistence so that the ISO can retain data, installed software packages and settings across reboots.
Create a server ISO that works on both 32-bit and 64-bit bootloaders found on various low cost Intel Atom mini PCs or one that works on the more recent Apollo and Gemini Lake mini PCs..
--atom include the flags, packages, scripts and commands that I recommend when respinning an ISO for a device with an Intel Atom (Bay Trail or Cherry Trail) processor and mirrors the manual invocations of??'-l rtl8723bX_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh'.
遇著寶了,似乎我們的問(wèn)題都可以一攬子解決,是否真的可以高枕無(wú)憂(yōu)呢?這里下載Lunbutu 20.04 LTS Atom。
1.4.2 kernel_gcc_patch
項(xiàng)目主頁(yè) | Kernel patch enables gcc optimizations for additional CPUs.
由于A(yíng)tom x5-8350和Celeron N4100相對(duì)性能比較低,操作系統(tǒng)默認(rèn)會(huì)使用generic內(nèi)核,著眼于兼容性普適性,就是安裝好之后大多數(shù)的硬件都可以運(yùn)行起來(lái)。所以我們可以針對(duì)性地重新編譯內(nèi)核,以期獲得更高的性能。另外本項(xiàng)目也支持Celeron N4100 (Intel Goldmont Plus family of low-power Atom processors——Gemini Lake)。
202006292844..png (45.81 KB, 下載次數(shù): 1)
2020-6-29 14:48 上傳
注意這里是我理解錯(cuò)了,generic是實(shí)時(shí)性方面的東西,具體見(jiàn)參考鏈接所述
2. 整活
2.1 Install Lubuntu Customized for Cherry Trail CPU
制作安裝U盤(pán)
我用balenaEtcher將作者ISO安裝鏡像燒錄到U盤(pán)上,插上制作好的U盤(pán)(不支持從mSD卡啟動(dòng)),開(kāi)機(jī)按ESC或者Del進(jìn)入到bios,更改boot設(shè)置即可,忘記看是不是 默認(rèn)U盤(pán)啟動(dòng)順序最高了,大家可以試試。
可以從清華鏡像站下載原版鏡像以供定制。
硬盤(pán)分區(qū)
esp分區(qū) | 必須要有,100MB就行,flag: boot
root分區(qū),xfs文件系統(tǒng),反正ext4不是emmc的最優(yōu)解,后續(xù)還要改改默認(rèn)調(diào)度模式
swap,根據(jù)內(nèi)存大小,2-4G選擇1:1即可。我這里4G。
插電!啟動(dòng)!
我是插HDMI連接顯示器,不是用的MIPI接口的顯示屏(以下稱(chēng)IGD, 內(nèi)置圖形顯示),然后顯示器上只有壁紙沒(méi)有圖標(biāo)和任務(wù)欄,原來(lái)主輸出跑到?jīng)]連接的IGD上了。這整的真的是。。。盲開(kāi)終端,然后輸入sudo poweroff先關(guān)上機(jī),然后插上顯示屏和觸控面板,發(fā)現(xiàn)觸控面板沒(méi)反應(yīng)。
202006298275..png (320.69 KB, 下載次數(shù): 1)
2020-6-29 14:48 上傳
#### 2.2 Post-Installation Setup
好的,目前需要測(cè)試上面提到的問(wèn)題以及解決HDMI輸出和觸控面板的問(wèn)題。先插上專(zhuān)用IPS屏,設(shè)置HDMI為主輸出,然后安裝OpenSSH,我們通過(guò)MobaXterm連接到LP,具體可以參考我的文章《忘掉VNC/RDP,拿起手中的MobaXterm輕松上手遠(yuǎn)程桌面》。
選擇Openbox desktop 是圖形界面,默認(rèn)的LXQt目前MobaXterm不支持,僅支持LXDE。
選擇Interactive shell 是傳統(tǒng)終端界面
202006292472..png (181.34 KB, 下載次數(shù): 1)
2020-6-29 14:49 上傳
安裝必要的軟件:
sudo apt install openssh-server tmux
2.2.1 測(cè)試無(wú)線(xiàn)、藍(lán)牙、音頻輸出功能
我們下載的是作者為atom處理器制作的鏡像,根據(jù)isorespin.sh使用介紹:
--atom include the flags, packages, scripts and commands that I recommend when respinning an ISO for a device with an Intel Atom (Bay Trail or Cherry Trail) processor and mirrors the manual invocations of??'-l rtl8723bX_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh'.
也就是安裝了rtl8723bs的無(wú)線(xiàn)藍(lán)牙固件,注意有些是系統(tǒng)帶驅(qū)動(dòng)driver但是不帶正確的固件firmware,也不能正確使用。增加了音頻輸出的UCM文件。
我們來(lái)測(cè)試一下:
202006291536..png (80.31 KB, 下載次數(shù): 1)
2020-6-29 14:49 上傳
藍(lán)牙部分使用bluetoothctl,參考https://wiki.archlinux.org/index.php/Bluetooth#Console,成功連上了我的手機(jī)
202006296470..png (502.56 KB, 下載次數(shù): 1)
2020-6-29 14:49 上傳
無(wú)線(xiàn)部分可以用iwconfig、iw list等命令,可以看到該無(wú)線(xiàn)網(wǎng)卡支持``monitor模式,為我們下面使用kismet進(jìn)行無(wú)線(xiàn)嗅探提供了硬件基礎(chǔ),關(guān)于無(wú)線(xiàn)網(wǎng)卡的介紹可以參考我的文章:UP Board USB無(wú)線(xiàn)網(wǎng)卡選購(gòu)指南。
連接無(wú)線(xiàn)網(wǎng)絡(luò) CLI
了解一番發(fā)現(xiàn)使用的是networkmanager,圖形化很好弄,CLI的話(huà)就是nmcli:
$ nmcli device status
DEVICE? ?? ?? ???TYPE? ?? ?STATE? ?? ?? ?CONNECTION
wlx001f1fa92b87??wifi? ?? ?connected? ???nww
wlan0? ?? ?? ?? ?wifi? ?? ?disconnected??--
$ nmcli device wifi list ifname wlan0
$ sudo nmcli device wifi connect nww password PASSWORD ifname wlan0
以上命令即可,注意改成你的無(wú)線(xiàn)網(wǎng)絡(luò)名稱(chēng)SSID和密碼。具體可以參考nm操作指南。
202006292338..png (135.61 KB, 下載次數(shù): 1)
2020-6-29 14:49 上傳
聲音輸出的話(huà),LXQt桌面自帶的任務(wù)欄右下角調(diào)節(jié)widget支持不好,使用的是pavucontrol進(jìn)行控制,圖形菜單欄里也有,實(shí)測(cè)HDMI音頻輸出和3.5mm都正常。
其他相關(guān)命令:
dmesg | grep XXX
lsmod | grep XXX
lshw
lsusb
lspci
2.2.2 默認(rèn)輸出設(shè)置為HDMI
這個(gè)很頭疼,我是先用專(zhuān)用屏上去連無(wú)線(xiàn)網(wǎng)安裝ssh server后從SSH里面暫時(shí)用。雖然進(jìn)入桌面后手動(dòng)更改主/副輸出后,可以正常使用,但是重啟還是一個(gè)樣,所以干脆關(guān)閉IGD輸出。
查看How to Disable Internal Display from BIOS?,官方說(shuō)的BIOS->"Chipset"->"North Bridge"->"IGD - LCD Control"->"Force Lid Status"->"Off"沒(méi)用,最后參考k3dAR的回帖解決: add kernel parameter: video=DSI-1:d
怎么做到的呢?查看archwiki的Kernel parameters頁(yè)面:
sudo nano /etc/default/grub
# 在GRUB_CMDLINE_LINUX_DEFAULT這行處”前添加video=DSI-1:d
# 例如GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=cb38daad-4618-4b36-98de-1915abb168cf video=DSI-1:d"
# 重新生成grub.cfg文件
sudo grub-mkconfig -o /boot/grub/grub.cfg
# TODO:使用sed進(jìn)行更改
重啟生效,想要啟用IGD,步驟同上,刪除添加的那句話(huà)。如果我們想要生成默認(rèn)關(guān)閉IGD的鏡像,參考isorespin.sh的介紹,添加grub內(nèi)容,生成iso鏡像參數(shù)為isorespin.sh -i xxx.iso --atom -g "video=DSI-1:d"
2.2.3 解決觸控面板驅(qū)動(dòng)問(wèn)題
安裝之后主要功能正常,但是觸摸屏不行,以為是我沒(méi)插好,試了好幾次都一樣,使用xinput list命令沒(méi)看到,使用dmesg | grep Goodix可以看到識(shí)別了一個(gè)設(shè)備,但是沒(méi)有正確驅(qū)動(dòng);進(jìn)系統(tǒng)使用lsmod goodix也有加載,懷疑是驅(qū)動(dòng)不正確問(wèn)題。
202006292379..png (649.22 KB, 下載次數(shù): 1)
2020-6-29 14:49 上傳
可以看到觸控面板主控芯片為Goodix GT911
dmesg | grep goodix # 能識(shí)別到設(shè)備,但是有報(bào)錯(cuò)
lsmod # 我不記得輸出什么樣的,大家可以自己瞅瞅
xinput list # 識(shí)別不到Goodix Capacitive TouchScreen
參考以下內(nèi)容,可以發(fā)現(xiàn)Goodix驅(qū)動(dòng)確實(shí)存在問(wèn)題。而且在Linux內(nèi)核里能看到GT911相關(guān)內(nèi)容,很困惑。
# 編譯驅(qū)動(dòng)
git clone https://gitlab.com/AdyaAdya/goodix-touchscreen-linux-driver
cd goodix-touchscreen-linux-driver
make
# 測(cè)試驅(qū)動(dòng)(刪除原驅(qū)動(dòng)并加載剛編譯的驅(qū)動(dòng)),我這里成功
sudo su
rmmod goodix
insmod goodix.ko
# 安裝驅(qū)動(dòng)
xz goodix.ko
mv goodix.ko.xz /lib/modules/$(uname -r)/kernel/drivers/input/touchscreen/goodix.ko.xz
重啟之后可用。
完整的debug命令:
$ dmesg | grep -i goodix
$ cat /proc/bus/input/devices | grep -B 1 -A 8 -i goodix
# libinput list-devices | grep -A 17 -i goodix
# libinput debug-events
$ xinput list
2.3 Recompile kernel to increase performance | 重新編譯內(nèi)核(待優(yōu)化)
前文說(shuō)過(guò)針對(duì)Atom X5 z8350重新編譯內(nèi)核,可以些許提高性能,現(xiàn)在就來(lái)實(shí)際操作一番。
sjqlwy@LattePanda:~$ uname -a
Linux LattePanda 5.6.8 #1 SMP Sat May 2 23:36:54 CST 2020 x86_64 x86_64 x86_64 GNU/Linux
sjqlwy@LattePanda:~$ cat /proc/version
Linux version 5.6.8 (sjqlwy@LattePanda) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #1 SMP Sat May 2 23:36:54 CST 2020
202006295293..png (49.93 KB, 下載次數(shù): 1)
2020-6-29 14:49 上傳
這是我在LattePanda上為它自己編譯的內(nèi)核,不帶genetic字樣。編譯花了一個(gè)多小時(shí)?建議在其他性能更強(qiáng)的電腦上進(jìn)行編譯。
2.3.1 下載源碼并打上補(bǔ)丁
打開(kāi)Linux Kernel網(wǎng)站可以看到最新的Stable版是5.6.x,下載下來(lái)備用。建議閱讀Linux內(nèi)核版本介紹與查詢(xún)。Ubuntu自帶的內(nèi)核講究一個(gè)通用性,所以我們使用patch來(lái)針對(duì)z8350重新編譯內(nèi)核,以期獲得更好的性能。好在已經(jīng)有人做了,并且進(jìn)行了日常維護(hù),移步:kernel_gcc_patch。
CPU Family
GCC Optimization
Intel Silvermont family of low-power Atom processors
-march=silvermont
Intel Goldmont family of low-power Atom processors (Apollo Lake and Denverton)
-march=goldmont
Intel Goldmont Plus family of low-power Atom processors (Gemini Lake)
-march=goldmont-plus
教程使用silvermont,怎么沒(méi)看到我們需要的Cherry Trail ,這些代碼都是啥意思?查找Intel Atom的相關(guān)Wiki,了解到如下內(nèi)容。
Cherry Trail、Apollo Lake、Gemini Lake等是Code Name開(kāi)發(fā)代號(hào)
Silvermont、Goldmont、Airmont等是CPU微架構(gòu)
微架構(gòu)下又有子集,例如Airmont是Silvermont的子集,Goldmont Plus是的子集
Goldmont Plus——Gemini Lake——Celeron N4100(Mobile processors)
Airmont——Cherry Trail ——Atom X5 z8350(consumer SoCs aimed at tablets)
Airmont is the 14 nm die shrink of Silvermont(22 nm)
2.3.2 編譯內(nèi)核
這里我們下載enable_additional_cpu_optimizations_for_gcc_v9.1+_kernel_v5.5+.patch(5.6)放到Linux源碼所在文件夾里。
This patch works with gcc versions 9.1+ and with kernel version 5.5+ and should
NOT be applied when compiling on older versions of gcc due to key name changes
of the march flags introduced with the version 4.9 release of gcc
如果使用Ubuntu 20.04則編譯環(huán)境gcc版本、kernel版本都滿(mǎn)足,否則需要進(jìn)行設(shè)置
patch -p1 < PATCH_NAME.patch 會(huì)報(bào)錯(cuò)
sudo apt-get install gcc make libncurses5-dev libssl-dev bison flex libelf-dev
patch -Np1 -i /path/to/patch
make menuconfig
此時(shí)在 "Processor type and features -> Processor family"中可以選擇 "Intel Silvermont family of low-power Atom processors (Silvermont)"了。
202006299673..png (206.59 KB, 下載次數(shù): 1)
2020-6-29 14:49 上傳
make -j4 bindeb-pkg # 編譯內(nèi)核,根據(jù)機(jī)器性能大約需要20m-2h不等
sudo dpkg -i linux*.deb # 安裝編譯好的內(nèi)核,會(huì)自動(dòng)設(shè)置grub
重啟即可看到已經(jīng)啟用了新的內(nèi)核。
參考:
2.3.3 番外1 升級(jí)gcc
上面講到使用該補(bǔ)丁需要gcc 9.1以上,但是我在我的其他機(jī)器上(Ubuntu 18.04 LTS)可以看到默認(rèn)安裝的是gcc 7.5,這將導(dǎo)致安裝失敗。
ubuntu@VM-126-41-ubuntu:~$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
你正在運(yùn)行 Debian穩(wěn)定版 因?yàn)槟愀眠x擇 Debian 穩(wěn)定版分支。它運(yùn)行得很好,但是只有一個(gè)問(wèn)題:與其他發(fā)行版相比,它的軟件有一點(diǎn)過(guò)時(shí)了。這便是 backports 出現(xiàn)的原因。
root@build-server:~# gcc --version
gcc (Ubuntu 9.3.0-11ubuntu0~18.04.1) 9.3.0
# Ubuntu 20.04 不存在該問(wèn)題
sjqlwy@LattePanda:~$ gcc --version
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
2.3.4 番外2 阻止apt更改內(nèi)核
我們運(yùn)行apt upgrade時(shí)會(huì)提醒你安裝generic內(nèi)核,我們使用apt-mark命令來(lái)阻止這一行為。
apt list --installed
dpkg-query -l # 輸出更清晰
apt-mark hold # 將改為apt upgrade里提示的所有內(nèi)核相關(guān)的包
apt-mark unhold
apt-mark showhold
參考:
2.3.5 docker 支持
2.3.6 TODO
更改默認(rèn)IO調(diào)度,增加文件系統(tǒng)支持,提高emmc性能和壽命
3. 總結(jié)
最終我們比較完美地在LattePanda上安裝了Lunbutu 20.04,解決了BT/Wifi/Audio Output/Touch Panel以及IGD的問(wèn)題,并使用優(yōu)化內(nèi)核提高了LP的性能,后續(xù)有時(shí)間的話(huà)可以自己定制適合LP的ISO鏡像,包括:
默認(rèn)關(guān)閉內(nèi)置輸出,采用HDMI輸出信號(hào)
優(yōu)化過(guò)的內(nèi)核,支持Docker,更好的性能
預(yù)裝觸摸屏驅(qū)動(dòng)
更改io調(diào)度和添加更多文件系統(tǒng)支持
預(yù)裝SSH Server
4、Reference | 參考
--debug | 顯示更多信息
--interactive | 進(jìn)入root shell,自定義更改。例如修改mirrorlist
--dist-upgrade | 更徹底的升級(jí),可以配合--debug使用
If you do not require low latency for your system then please use the -generic kernel.
If you need a low latency system (e.g. for recording audio) then please use the -preempt kernel as a first choice. This reduces latency but doesn't sacrifice power saving features. It is available only for 64 bit systems (also called amd64).
If the -preempt kernel does not provide enough low latency for your needs (or you have an 32 bit system) then you should try the -lowlatency kernel.
If the -lowlatency kernel isn't enough then you should try the -rt kernel
If the -rt kernel isn't enough stable for you then you should try the -realtime kernel
-generic——>preempt——>lowlatency——>rt——>realtime,越往后延遲越低,耗電越高
Latest improvements to isorespin.sh | rclone copy GDrive:rclone/ ~/downloads
總結(jié)
以上是生活随笔為你收集整理的ubuntu安装minisat_为LattePanda安装Lubuntu 20.04并优化内核(已更新)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 渗透工程师测试的流程步骤
- 下一篇: ubuntu18.04安装pycharm