REF:https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
(1) sudo apt install git
(2) git clone git://kernel.ubuntu.com/ubuntu/ubuntu-precise.git
wutingan@WuTingAn:~$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-precise.gitCloning into 'ubuntu-precise'... remote: Counting objects: 3935130, done. remote: Compressing objects: 100% (574487/574487), done. remote: Total 3935130 (delta 3338000), reused 3927278 (delta 3330258) Receiving objects: 100% (3935130/3935130), 955.06 MiB | 1.81 MiB/s, done. Resolving deltas: 100% (3338000/3338000), done. Checking out files: 100% (38041/38041), done.
(3)
wutingan@WuTingAn:~$ sudo vi /etc/apt/sources.list
:
deb-src http://archive.ubuntu.com/ubuntu trusty main restricted #Added by software-properties deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty restricted main universe multiverse #Added by software-properties deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty-updates restricted main universe multiverse #Added by software-properties deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse #Added by software-properties deb-src http://security.ubuntu.com/ubuntu trusty-security restricted main universe multiverse #Added by software-properties deb-src http://gb.archive.ubuntu.com/ubuntu/ trusty-proposed restricted main universe multiverse #Added by software-properties
wutingan@WuTingAn:~$
(4)
wutingan@WuTingAn:~$ sudo apt-get update
(5)
wutingan@WuTingAn:~$ sudo apt-get source linux-image-$(uname -r) : 取得 126 MB 用了 1分19秒 (1,577 kB/s) sh: 1: dpkg-source: not found W: Download is performed unsandboxed as root as file 'linux_3.13.0-153.203.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: 拒絕不符權限的操作) E: 解開指令 'dpkg-source --no-check -x linux_3.13.0-153.203.dsc' 失敗。 N: 請檢查是否已安裝了 'dpkg-dev' 套件。 wutingan@WuTingAn:~$
(6)
wutingan@WuTingAn:~$ sudo apt-get install dpkg-dev
(7)
wutingan@WuTingAn:~$ sudo apt-get source linux-image-$(uname -r)
(8)
wutingan@WuTingAn:~$ sudo apt-get build-dep linux-image-$(uname -r)
(9)
wutingan@WuTingAn:~$ ls -l 總計 123224 -rw-rw-r-- 1 wutingan wutingan 427 7月 9 19:43 20180709virtualboxInstall -rw-r--r-- 1 wutingan wutingan 1620 12月 30 2017 a.f95 -rwxr-xr-x 1 wutingan wutingan 13056 12月 30 2017 a.out -rw-r--r-- 1 wutingan wutingan 8980 12月 30 2017 examples.desktop drwxr-xr-x 26 root root 4096 7月 26 09:12 linux-3.13.0 -rw-r--r-- 1 root root 9668878 6月 15 15:33 linux_3.13.0-153.203.diff.gz -rw-r--r-- 1 root root 8127 6月 15 15:33 linux_3.13.0-153.203.dsc -rw-r--r-- 1 root root 116419243 2月 4 2014 linux_3.13.0.orig.tar.gz drwxr-xr-x 27 wutingan wutingan 4096 7月 26 08:20 ubuntu-precise drwxr-xr-x 3 wutingan wutingan 4096 7月 9 17:50 VirtualBox VMs
wutingan@WuTingAn:~$ cd linux-3.13.0/ wutingan@WuTingAn:~/linux-3.13.0$ la arch CREDITS debian.master dropped.txt .gitignore ipc kernel MAINTAINERS net REPORTING-BUGS security ubuntu block crypto Documentation firmware include Kbuild lib Makefile notes.txt samples sound usr COPYING debian drivers fs init Kconfig .mailmap mm README scripts tools virt wutingan@WuTingAn:~/linux-3.13.0$
(9)
wutingan@WuTingAn:~/linux-3.13.0$ sudo chmod a+x debian/rules [sudo] password for wutingan:
wutingan@WuTingAn:~/linux-3.13.0$ sudo chmod a+x debian/scripts/*
wutingan@WuTingAn:~/linux-3.13.0$ sudo chmod a+x debian/scripts/misc/*
wutingan@WuTingAn:~/linux-3.13.0$ sudo fakeroot debian/rules clean
:
recipe for target 'debian/control' failed make: *** [debian/control] Error 255
debian/rules:141:
recipe for target 'debian/control' failed
(10)
wutingan@WuTingAn:~/linux-3.13.0$ fakeroot debian/rules editconfigs :
*** Install ncurses (ncurses-devel) and try again. ***
(11)
sudo apt-get install libncurses-dev
(12)
wutingan@WuTingAn:~/linux-3.13.0$ sudo fakeroot debian/rules editconfigs
:
*** ERROR: 10 config-check failures detected
rm -rf build
|