樹心幽徑

« 20190111將Fedora19 的3.14.27-100Linux核心(32位元)昇級成3.19.8 | Main | 20190114列出selldb資料庫的cust資料表的所有資料錄並編修選定的資料錄(a5.php) »

20190112將Ubuntu1604的64位元Linux核心由4.13.0-45更新成linux-4.20.0成功
2019/01/12,22:46

REF:https://newtoypia.blogspot.com/2013/12/gnupg-pgp.html

(0)現況

$ uname -a
Linux treehrt-fire 4.13.0-45-generic #50~16.04.1-Ubuntu SMP Wed May 30 11:18:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[treehrt ~]$ date
六  1月 12 22:45:45 CST 2019

(1)取得最新版核心:

$ wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.20.tar.xz

 

2019-01-12 22:49:14 (1.87 MB/s) - ‘linux-4.20.tar.xz’ saved [104257836/104257836]

[treehrt ~]$

(2)linux-4.20.tar.xz解壓為linux-4.20.tar

[treehrt ~]$ xz -d -v linux-4.20.tar.xz
linux-4.20.tar.xz (1/1)
  100 %        99.4 MiB / 815.2 MiB = 0.122   133 MiB/s       0:06            

(3)$ wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.20.tar.sign

(4)$ gpg --verify linux-4.20.tar.sign
gpg: `/home/treehrt/.gnupg/pubring.gpg' 鑰匙圈已建立
gpg: 假設被簽署的資料在 `linux-4.20.tar'
gpg: 由 2018年12月24日 (週一) 15時46分48秒 CST 建立的簽章, 使用 RSA 金鑰 ID 6092693E
gpg: 無法檢查簽章: 找不到公鑰
[treehrt ~]$

(5) $gpg --keyserver keyserver.ubuntu.com  --recv-keys 6092693E

gpg: `/home/treehrt/.gnupg/secring.gpg' 鑰匙圈已建立

gpg: 正在請求金鑰 6092693E 自 hkp 伺服器 keyserver.ubuntu.com
gpg: /home/treehrt/.gnupg/trustdb.gpg: 建立了信任資料庫
gpg: 金鑰 6092693E: 公鑰 "Greg Kroah-Hartman <gregkh@linuxfoundation.org>" 已匯入
gpg: 金鑰 6092693E: 公鑰 "Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>" 已匯入
gpg: 金鑰 6092693E: 公鑰 "Totally Legit Signing Key <mallory@example.org>" 已匯入
gpg: 沒有找到任何徹底信任的金鑰
gpg: 處理總量: 3
gpg:               已匯入: 3  (RSA: 3)

(6)$ gpg --verify linux-4.20.tar.sign

 gpg: 假設被簽署的資料在 `linux-4.20.tar'
gpg: 由 2018年12月24日 (週一) 15時46分48秒 CST 建立的簽章, 使用 RSA 金鑰 ID 6092693E
gpg: 完好的簽章來自於 "Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
gpg:                 亦即 "Greg Kroah-Hartman <gregkh@kernel.org>"
gpg:                 亦即 "Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com>"
gpg: 警告: 這把金鑰並非以受信任的簽章所認證!
gpg:          沒有證據指出這個簽章屬於這個持有者.
主鑰指紋: 647F 2865 4894 E3BD 4571  99BE 38DB BDC8 6092 693E

(7)$ tar xvf linux-4.20.tar

(8)拷用現有的組態為預設值建立核心組態

$ uname -r
4.13.0-45-generic

$ ls /boot/config-$(uname -r) -l
-rw-r--r-- 1 root root 213220  5月 31  2018 /boot/config-4.13.0-45-generic

$ cp -v /boot/config-$(uname -r)  linux-4.20/.config
'/boot/config-4.13.0-45-generic' -> 'linux-4.20/.config'

(9)  $ make menuconfig沒成功,要先裝ncurses

* Unable to find the ncurses package.

(10)安裝編繹套件成功 

$ sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev

(11)再次組態

$ sudo make menuconfig

(12)編譯核心

$ make

 

(13a) sudo apt autoremover


(13b)$  安裝模組:

sudo make modules_install

:

  INSTALL virt/lib/irqbypass.ko
  DEPMOD  4.20.0

(14)列出安裝的modules

$ ls -l /lib/modules/
總計 60
drwxr-xr-x 3 root root 4096  7月 26 14:10 4.13.0-43-generic
drwxr-xr-x 6 root root 4096  7月 11  2018 4.13.0-45-generic
drwxr-xr-x 3 root root 4096 12月 30 06:47 4.15.0-29-generic
drwxr-xr-x 2 root root 4096 12月 29 07:07 4.15.0-30-generic
drwxr-xr-x 3 root root 4096 12月 30 06:47 4.15.0-32-generic
drwxr-xr-x 3 root root 4096 12月 30 06:47 4.15.0-33-generic
drwxr-xr-x 3 root root 4096 12月 30 06:47 4.15.0-34-generic
drwxr-xr-x 3 root root 4096 12月 30 06:47 4.15.0-36-generic
drwxr-xr-x 2 root root 4096  1月 13 06:55 4.15.0-39-generic
drwxr-xr-x 6 root root 4096 12月 14 22:28 4.15.0-42-generic
drwxr-xr-x 6 root root 4096 12月 30 07:43 4.15.0-43-generic
drwxr-xr-x 3 root root 4096  7月 29 12:25 4.17.10
drwxr-xr-x 3 root root 4096  1月 13 06:59 4.20.0
drwxr-xr-x 2 root root 4096  8月 16 23:07 4.4.0-130-generic
drwxr-xr-x 2 root root 4096 12月 30 06:48 4.4.0-141-generic
[treehrt ~/linux-4.20]$

 

(15)列出新編成功的核心,好像有點胖。

ls arch/x86/boot/bzImage -l
-rw-rw-r-- 1 treehrt treehrt 8191328  1月 13 00:03 arch/x86/boot/bzImage

(16)進行核心安裝(會自動更新grub2開機組態,最新核心將為預設開機選項)

$ sudo make install
sh ./arch/x86/boot/install.sh 4.20.0 arch/x86/boot/bzImage \
    System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.20.0 /boot/vmlinuz-4.20.0
run-parts: executing /etc/kernel/postinst.d/dkms 4.20.0 /boot/vmlinuz-4.20.0
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.20.0 /boot/vmlinuz-4.20.0
update-initramfs: Generating /boot/initrd.img-4.20.0
W: Possible missing firmware /lib/firmware/i915/icl_dmc_ver1_07.bin for module i915
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.20.0 /boot/vmlinuz-4.20.0
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.20.0 /boot/vmlinuz-4.20.0
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.20.0 /boot/vmlinuz-4.20.0
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.20.0 /boot/vmlinuz-4.20.0

正在產生 grub 設定檔 ...
找到 linux 映像檔:/boot/vmlinuz-4.20.0
找到 initrd 映像檔:/boot/initrd.img-4.20.0
找到 linux 映像檔:/boot/vmlinuz-4.15.0-43-generic
找到 linux 映像檔:/boot/vmlinuz-4.15.0-42-generic
找到 linux 映像檔:/boot/vmlinuz-4.13.0-45-generic
找到 initrd 映像檔:/boot/initrd.img-4.13.0-45-generic
找到 Ubuntu 16.04.5 LTS (16.04) [於 /dev/sdc5]
Adding boot menu entry for EFI firmware configuration
完成
[treehrt ~/linux-4.20]$

 

(17) $  ls /boot -l
總計 534096
-rw-r--r-- 1 root root   1501528  5月 31  2018 abi-4.13.0-45-generic
-rw-r--r-- 1 root root   1538114 11月 19 23:32 abi-4.15.0-42-generic
-rw-r--r-- 1 root root   1235761  7月  9  2018 abi-4.4.0-21-generic
-rw-r--r-- 1 root root    213220  5月 31  2018 config-4.13.0-45-generic
-rw-r--r-- 1 root root    217026 11月 19 23:32 config-4.15.0-42-generic
-rw-r--r-- 1 root root    217026 12月  8 00:05 config-4.15.0-43-generic
-rw-r--r-- 1 root root    213210  7月 29 16:14 config-4.17.10
-rw-r--r-- 1 root root    220889  1月 13 07:40 config-4.20.0
-rw-r--r-- 1 root root    192900  7月  9  2018 config-4.4.0-21-generic
drwx------ 3 root root      4096  1月  1  1970 efi
drwxr-xr-x 5 root root      4096  1月 13 07:42 grub
-rw-r--r-- 1 root root  50330949 12月 15 06:11 initrd.img-4.13.0-45-generic
-rw-r--r-- 1 root root 427412103  1月 13 07:41 initrd.img-4.20.0
-rw-r--r-- 1 root root    182704  1月 28  2016 memtest86+.bin
-rw-r--r-- 1 root root    184380  1月 28  2016 memtest86+.elf
-rw-r--r-- 1 root root    184840  1月 28  2016 memtest86+_multiboot.bin
-rw-r--r-- 1 root root       255  5月 31  2018 retpoline-4.13.0-45-generic
-rw-r--r-- 1 root root         0 11月 19 23:32 retpoline-4.15.0-42-generic
-rw------- 1 root root   3883942  5月 31  2018 System.map-4.13.0-45-generic
-rw------- 1 root root   4047229 11月 19 23:32 System.map-4.15.0-42-generic
-rw------- 1 root root   4047366 12月  8 00:05 System.map-4.15.0-43-generic
-rw-r--r-- 1 root root   3946040  7月 29 16:14 System.map-4.17.10
-rw-r--r-- 1 root root   4140990  1月 13 07:40 System.map-4.20.0
-rw------- 1 root root   3076741  7月  9  2018 System.map-4.4.0-21-generic
-rw------- 1 root root   7712560  5月 31  2018 vmlinuz-4.13.0-45-generic
-rw------- 1 root root   7714488  6月 15  2018 vmlinuz-4.13.0-45-generic.efi.signed
-rw------- 1 root root   8119832 11月 20 18:23 vmlinuz-4.15.0-42-generic
-rw------- 1 root root   8119768 12月  8 17:43 vmlinuz-4.15.0-43-generic
-rw-r--r-- 1 root root   8191328  1月 13 07:40 vmlinuz-4.20.0

(18a) $  lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Device 3e92

cat /proc/cpuinfo | grep "model name"
model name    : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
model name    : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
model name    : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
model name    : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
model name    : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
model name    : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
model name    : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
model name    : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
model name    : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
model name    : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
model name    : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
model name    : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz

$ sudo wget https://github.com/wkennington/linux-firmware/raw/master/i915/icl_dmc_ver1_07.bin

 

sudo cp icl_dmc_ver1_07.bin /lib/firmware/i915/

 

(18b) 重開機 $ reboot

 

 

 

(19)核心4.20.0 #1 SMP 於 Sat Jan 5 13:21:51安裝成功:

$ uname -a
Linux treehrt-BM6AE-BM1AE-BP1AE 4.20.0 #1 SMP Sat Jan 5 13:21:51 CST 2019 i686 i686 i686 GNU/Linux

 

(20) 用舊的核心開機取得機器資訊 以了解 missing firmware /lib/firmware/i915/skl_dmc_ver1_27.bin for module i915

$ uname -a
Linux treehrt-BM6AE-BM1AE-BP1AE 4.4.0-121-generic #145-Ubuntu SMP Fri Apr 13 13:46:32 UTC 2018 i686 i686 i686 GNU/Linux

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

$ cat /proc/cpuinfo | grep "model name"
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz

(21)用新核心開機成功,但有0.045843 TSC_DEADLINE firmware錯誤訊息

$ uname -a
Linux treehrt-BM6AE-BM1AE-BP1AE 4.20.0 #1 SMP Sat Jan 5 13:21:51 CST 2019 i686 i686 i686 GNU/Linux

treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$  lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

$  cat /proc/cpuinfo | grep "model name"
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
model name    : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz

 

 

 

(22)$  locate i915/skl_
/lib/firmware/i915/skl_dmc_ver1.bin
/lib/firmware/i915/skl_dmc_ver1_23.bin
/lib/firmware/i915/skl_dmc_ver1_26.bin
/lib/firmware/i915/skl_guc_ver1.bin
/lib/firmware/i915/skl_guc_ver1_1059.bin
/lib/firmware/i915/skl_guc_ver4.bin
/lib/firmware/i915/skl_guc_ver4_3.bin
/lib/firmware/i915/skl_guc_ver6.bin
/lib/firmware/i915/skl_guc_ver6_1.bin
/lib/firmware/i915/skl_huc_ver01_07_1398.bin

(23)

$cd /lib/firmware/i915/
$ ls
bxt_dmc_ver1_04.bin        kbl_dmc_ver1.bin           skl_guc_ver4_3.bin
bxt_dmc_ver1_05.bin        kbl_huc_ver02_00_1810.bin  skl_guc_ver4.bin
bxt_dmc_ver1_06.bin        skl_dmc_ver1_23.bin        skl_guc_ver6_1.bin
bxt_dmc_ver1_07.bin        skl_dmc_ver1_26.bin        skl_guc_ver6.bin
bxt_dmc_ver1.bin           skl_dmc_ver1.bin           skl_huc_ver01_07_1398.bin
bxt_huc_ver01_07_1398.bin  skl_guc_ver1_1059.bin
kbl_dmc_ver1_01.bin        skl_guc_ver1.bin

(24)

$ sudo wget https://github.com/wkennington/linux-firmware/raw/master/i915/skl_dmc_ver1_27.bin

$ sudo wget https://github.com/wkennington/linux-firmware/raw/master/i915/kbl_dmc_ver1_04.bin

$ sudo wget https://github.com/wkennington/linux-firmware/raw/master/i915/cnl_dmc_ver1_07.bin

$ sudo wget https://github.com/wkennington/linux-firmware/raw/master/i915/kbl_guc_ver9_39.bin

$ sudo wget https://github.com/wkennington/linux-firmware/raw/master/i915/bxt_guc_ver9_29.bin

$ sudo wget https://github.com/wkennington/linux-firmware/raw/master/i915/skl_guc_ver9_33.bin


(25)重裝核心:

$ cd /home/treehrt/linux-4.20

$  sudo make install
 

sh ./arch/x86/boot/install.sh 4.20.0 arch/x86/boot/bzImage \
    System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.20.0 /boot/vmlinuz-4.20.0
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.20.0 /boot/vmlinuz-4.20.0
update-initramfs: Generating /boot/initrd.img-4.20.0
W: Possible missing firmware /lib/firmware/i915/glk_dmc_ver1_04.bin for module i915
W: Possible missing firmware /lib/firmware/i915/icl_dmc_ver1_07.bin for module i915(還有二個)
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.20.0 /boot/vmlinuz-4.20.0
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.20.0 /boot/vmlinuz-4.20.0
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.20.0 /boot/vmlinuz-4.20.0
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.20.0 /boot/vmlinuz-4.20.0
正在產生 grub 設定檔 ...
找到 linux 映像檔:/boot/vmlinuz-4.20.0
找到 initrd 映像檔:/boot/initrd.img-4.20.0
找到 linux 映像檔:/boot/vmlinuz-4.20.0.old
找到 initrd 映像檔:/boot/initrd.img-4.20.0
找到 linux 映像檔:/boot/vmlinuz-4.20
找到 linux 映像檔:/boot/vmlinuz-4.4.0-121-generic
找到 initrd 映像檔:/boot/initrd.img-4.4.0-121-generic
找到 linux 映像檔:/boot/vmlinuz-4.4.0-96-generic
找到 initrd 映像檔:/boot/initrd.img-4.4.0-96-generic
找到 linux 映像檔:/boot/vmlinuz-3.13.0-121-generic
找到 initrd 映像檔:/boot/initrd.img-3.13.0-121-generic
找到 linux 映像檔:/boot/vmlinuz-3.13.0-119-generic
找到 initrd 映像檔:/boot/initrd.img-3.13.0-119-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
找到 Windows 7 (loader) [於 /dev/sda1]
找到 Windows Recovery Environment (loader) [於 /dev/sda2]
找到 Windows 7 (loader) [於 /dev/sda3]
找到 Fedora release 19 (Schrödinger’s Cat) [於 /dev/mapper/fedora-root]
完成


(26)

$ ls /boot -l|grep 4.20.0
-rw-r--r-- 1 root root    219781  1月  7 20:34 config-4.20.0
-rw-r--r-- 1 root root    219781  1月  5 20:37 config-4.20.0.old
-rw-r--r-- 1 root root 376119216  1月  7 20:37 initrd.img-4.20.0
-rw-r--r-- 1 root root   3172751  1月  7 20:34 System.map-4.20.0
-rw-r--r-- 1 root root   3172751  1月  5 20:37 System.map-4.20.0.old
-rw-r--r-- 1 root root   7630400  1月  7 20:34 vmlinuz-4.20.0
-rw-r--r-- 1 root root   7630400  1月  5 20:37 vmlinuz-4.20.0.old

(27)REBOOT

(28)補上缺少的i915 fireware

$cd /lib/firmware/i915/

$ sudo wget https://github.com/wkennington/linux-firmware/raw/master/i915/glk_dmc_ver1_04.bin

$ sudo wget https://github.com/wkennington/linux-firmware/raw/master/i915/icl_dmc_ver1_07.bin

(29)重安核心成功,終於沒再出現i915的警告。

$ cd /home/treehrt/linux-4.20
$  sudo make install

(30)reboot

仍有0.045843 TSC_DEADLINE firmware問題

tsc_deadline disabled due to errata please update microcode to version 0x3a (or later)

(31)$ sudo apt-get install intel-microcode
:

下列的額外套件將被安裝:
  iucode-tool
下列【新】套件將會被安裝:
  intel-microcode iucode-tool
:

下載:1 http://tw.archive.ubuntu.com/ubuntu xenial-updates/main i386 iucode-tool i386 1.5.1-1ubuntu0.1 [33.5 kB]
下載:2 http://tw.archive.ubuntu.com/ubuntu xenial-updates/main i386 intel-microcode i386 3.20180807a.0ubuntu0.16.04.1 [1,416 kB]

解開 iucode-tool (1.5.1-1ubuntu0.1) 中...
選取了原先未選的套件 intel-microcode。
準備解開 .../intel-microcode_3.20180807a.0ubuntu0.16.04.1_i386.deb ...
解開 intel-microcode (3.20180807a.0ubuntu0.16.04.1) 中...
Processing triggers for man-db (2.7.5-1) ...
設定 iucode-tool (1.5.1-1ubuntu0.1) ...
設定 intel-microcode (3.20180807a.0ubuntu0.16.04.1) ...
update-initramfs: deferring update (trigger activated)
intel-microcode: microcode will be updated at next boot
Processing triggers for initramfs-tools (0.122ubuntu8.11) ...
update-initramfs: Generating /boot/initrd.img-4.20.0

(32)reboot

(33)成功以新核心開機且不再有「tsc_deadline disabled due to errata please update microcode to version 0x3a (or later)」警告訊息。

$ date
一  1月  7 21:54:47 CST 2019

$ uname -a
Linux treehrt-BM6AE-BM1AE-BP1AE 4.20.0 #1 SMP Sat Jan 5 13:21:51 CST 2019 i686 i686 i686 GNU/Linux

 

迴響

 
Accessible and Valid XHTML 1.0 Strict and CSS Powered by LifeType