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版。