After downloading the patch-4.6.4.xz from http://kernel.org, what are the next steps to prepare the build of a version 4.6.4 Linux kernel? (Choose two.)
A. Uncompress the file and move the resulting directory to /usr/src/linux
B. Apply the patch file to the kernel source directory containing kernel version 4.6.0
C. Apply the patch file to the kernel source directory containing kernel version 4.6.3
D. Uncompress the file using xz to get the uncompressed patch file
E. Use patch to apply the uncompressed patch file to the source directory of any previous kernel version
題解
「patch-4.6.4.xz」是 XZ 壓縮檔,需要先將其解壓縮,或是使用「xzcat」指令來讀取內容。patch 檔的命名方式為:「patch-4.6.4」是針對「4.6.0」製作的 diff。「patch-4.6.3-4」是針對「4.6.3」製作的 diff。「patch-4.6」是針對「4.5.0」製作的 diff。
選項 A,要編譯 Linux 核心的話,需在「/usr/src/linux」目錄中進行,但 patch 檔並不能直接用來覆寫原始碼,需要搭配「patch」指令來使用。
選項 B,正確,在解壓縮之後,再透過「patch」指令來套用。如果不事先解壓縮的話也可以搭配「xzcat」指令來讀取檔案。
選項 C,先前的 Linux 核心原始碼如果不是 4.6.0 版的話,必須先套用其它 patch 檔來固定到 4.6.0 版。
選項 D,正確。
選項 E,先前的 Linux 核心原始碼如果不是 4.6.0 版的話,必須先套用其它 patch 檔來固定到 4.6.0 版。
