Showing posts with label Linux kernel. Show all posts
Showing posts with label Linux kernel. Show all posts
Friday, November 11, 2016
Wednesday, November 2, 2016
Ubuntu: Clean Up Before Rebuilding (Build Debian Kernel Packages from Linux kernel Sources)
Command:
$ make-kpkg clean
Result:
exec make kpkg_version=13.018 -f /usr/share/kernel-package/ruleset/minimal.mk clean
====== making target minimal_clean [new prereqs: ]======
This is kernel package version 13.018.
test ! -f .config || cp -pf .config config.precious
test ! -e stamp-building || rm -f stamp-building
test ! -f Makefile || \
make ARCH=x86_64 distclean
make[1]: Entering directory '/home/USERNAME/kernel/linux-4.8.6'
CLEAN scripts/basic
CLEAN scripts/kconfig
CLEAN include/config include/generated
CLEAN .config
make[1]: Leaving directory '/home/USERNAME/kernel/linux-4.8.6'
test ! -f config.precious || mv -f config.precious .config
rm -f modules/modversions.h modules/ksyms.ver scripts/cramfs/cramfsck scripts/cramfs/mkcramfs
$ make-kpkg clean
Result:
exec make kpkg_version=13.018 -f /usr/share/kernel-package/ruleset/minimal.mk clean
====== making target minimal_clean [new prereqs: ]======
This is kernel package version 13.018.
test ! -f .config || cp -pf .config config.precious
test ! -e stamp-building || rm -f stamp-building
test ! -f Makefile || \
make ARCH=x86_64 distclean
make[1]: Entering directory '/home/USERNAME/kernel/linux-4.8.6'
CLEAN scripts/basic
CLEAN scripts/kconfig
CLEAN include/config include/generated
CLEAN .config
make[1]: Leaving directory '/home/USERNAME/kernel/linux-4.8.6'
test ! -f config.precious || mv -f config.precious .config
rm -f modules/modversions.h modules/ksyms.ver scripts/cramfs/cramfsck scripts/cramfs/mkcramfs
Ubuntu: Patch (Unix): Linux Kernel Patch Example
Command:
$ mkdir kernel
$ cd kernel
$ wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.6.tar.xz
Result:
--2016-11-02 15:24:10-- https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.6.tar.xz
Resolving cdn.kernel.org (cdn.kernel.org)... 151.101.72.69
Connecting to cdn.kernel.org (cdn.kernel.org)|151.101.72.69|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 91969848 (88M) [application/x-xz]
Saving to: 'linux-4.8.6.tar.xz'
linux-4.8.6.tar.xz 100%[===============================================================================>] 87.71M 2.95MB/s in 31s
2016-11-02 15:24:41 (2.85 MB/s) - 'linux-4.8.6.tar.xz' saved [91969848/91969848]
Command:
$ tar xf linux-4.8.6.tar.xz
$ ln -s linux-4.8.6 linux
$ wget http://ck.kolivas.org/patches/bfs/4.0/4.8/4.8-sched-bfs-512.patch
Result:
--2016-11-02 15:38:58-- http://ck.kolivas.org/patches/bfs/4.0/4.8/4.8-sched-bfs-512.patch
Resolving ck.kolivas.org (ck.kolivas.org)... 193.19.136.183
Connecting to ck.kolivas.org (ck.kolivas.org)|193.19.136.183|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 271237 (265K) [text/plain]
Saving to: '4.8-sched-bfs-512.patch'
4.8-sched-bfs-512.patch 100%[===============================================================================>] 264.88K 142KB/s in 1.9s
2016-11-02 15:39:02 (142 KB/s) - '4.8-sched-bfs-512.patch' saved [271237/271237]
Command:
$ wget http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch
Result:
--2016-11-02 15:41:01-- http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch
Resolving algo.ing.unimo.it (algo.ing.unimo.it)... 155.185.5.10
Connecting to algo.ing.unimo.it (algo.ing.unimo.it)|155.185.5.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3445 (3.4K) [text/x-diff]
Saving to: '0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch'
0001-block-cgroups-kconfig-build-bits-fo 100%[===============================================================================>] 3.36K --.-KB/s in 0s
2016-11-02 15:41:02 (695 MB/s) - '0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch' saved [3445/3445]
Command:
$ wget http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch
Result:
--2016-11-02 15:41:33-- http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch
Resolving algo.ing.unimo.it (algo.ing.unimo.it)... 155.185.5.10
Connecting to algo.ing.unimo.it (algo.ing.unimo.it)|155.185.5.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 227645 (222K) [text/x-diff]
Saving to: '0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch'
0002-block-introduce-the-BFQ-v7r11-I-O-s 100%[===============================================================================>] 222.31K 51.7KB/s in 4.3s
2016-11-02 15:41:39 (51.7 KB/s) - '0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch' saved [227645/227645]
Command:
$ wget http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch
Result:
--2016-11-02 15:41:55-- http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch
Resolving algo.ing.unimo.it (algo.ing.unimo.it)... 155.185.5.10
Connecting to algo.ing.unimo.it (algo.ing.unimo.it)|155.185.5.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36350 (35K) [text/x-diff]
Saving to: '0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch'
0003-block-bfq-add-Early-Queue-Merge-EQM 100%[===============================================================================>] 35.50K 50.9KB/s in 0.7s
2016-11-02 15:41:57 (50.9 KB/s) - '0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch' saved [36350/36350]
Command:
$ wget http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch
Result:
--2016-11-02 15:42:04-- http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch
Resolving algo.ing.unimo.it (algo.ing.unimo.it)... 155.185.5.10
Connecting to algo.ing.unimo.it (algo.ing.unimo.it)|155.185.5.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 273468 (267K) [text/x-diff]
Saving to: '0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch'
0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4. 100%[===============================================================================>] 267.06K 66.9KB/s in 4.0s
2016-11-02 15:42:09 (66.9 KB/s) - '0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch' saved [273468/273468]
Command:
$ ls
Result:
0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch 0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch linux-4.8.6
0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch 4.8-sched-bfs-512.patch linux-4.8.6.tar.xz
0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch linux
Command:
$ cd linux
$ cp ../0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch .
$ cp ../0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch .
$ cp ../0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch .
$ cp ../0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch .
$ cp ../4.8-sched-bfs-512.patch .
$ patch -p1 < 0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch
Result:
patching file block/Kconfig.iosched
patching file block/Makefile
patching file include/linux/blkdev.h
Command:
$ patch -p1 < 0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch
Result:
patching file block/Kconfig.iosched
patching file block/bfq-cgroup.c
patching file block/bfq-ioc.c
patching file block/bfq-iosched.c
patching file block/bfq-sched.c
patching file block/bfq.h
Command:
$ patch -p1 < 0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch
Result:
patching file block/bfq-cgroup.c
patching file block/bfq-iosched.c
patching file block/bfq.h
Command:
$ patch -p1 < 0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch
Result:
patching file block/Kconfig.iosched
patching file block/bfq-cgroup.c
patching file block/bfq-iosched.c
patching file block/bfq-sched.c
patching file block/bfq.h
Command:
$ patch -p1 < 4.8-sched-bfs-512.patch
Result:
patching file arch/powerpc/platforms/cell/spufs/sched.c
patching file Documentation/scheduler/sched-BFS.txt
patching file Documentation/sysctl/kernel.txt
patching file fs/proc/base.c
patching file include/linux/init_task.h
patching file include/linux/ioprio.h
patching file include/linux/sched.h
patching file init/Kconfig
patching file init/main.c
patching file kernel/delayacct.c
patching file kernel/exit.c
patching file kernel/sysctl.c
patching file lib/Kconfig.debug
patching file include/linux/jiffies.h
patching file drivers/cpufreq/cpufreq_ondemand.c
patching file kernel/sched/bfs.c
patching file include/uapi/linux/sched.h
patching file drivers/cpufreq/cpufreq_conservative.c
Hunk #1 succeeded at 31 (offset 1 line).
patching file kernel/time/Kconfig
patching file kernel/sched/Makefile
patching file kernel/sched/bfs_sched.h
patching file kernel/sched/stats.c
patching file arch/x86/Kconfig
patching file include/linux/sched/prio.h
patching file kernel/sched/idle.c
patching file kernel/time/posix-cpu-timers.c
patching file kernel/trace/trace_selftest.c
patching file kernel/sched/cpufreq.c
patching file kernel/sched/cpufreq_schedutil.c
patching file kernel/skip_lists.c
patching file include/linux/skip_lists.h
patching file kernel/Makefile
patching file kernel/smpboot.c
Patch used:
$ mkdir kernel
$ cd kernel
$ wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.6.tar.xz
Result:
--2016-11-02 15:24:10-- https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.6.tar.xz
Resolving cdn.kernel.org (cdn.kernel.org)... 151.101.72.69
Connecting to cdn.kernel.org (cdn.kernel.org)|151.101.72.69|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 91969848 (88M) [application/x-xz]
Saving to: 'linux-4.8.6.tar.xz'
linux-4.8.6.tar.xz 100%[===============================================================================>] 87.71M 2.95MB/s in 31s
2016-11-02 15:24:41 (2.85 MB/s) - 'linux-4.8.6.tar.xz' saved [91969848/91969848]
Command:
$ tar xf linux-4.8.6.tar.xz
$ ln -s linux-4.8.6 linux
$ wget http://ck.kolivas.org/patches/bfs/4.0/4.8/4.8-sched-bfs-512.patch
Result:
--2016-11-02 15:38:58-- http://ck.kolivas.org/patches/bfs/4.0/4.8/4.8-sched-bfs-512.patch
Resolving ck.kolivas.org (ck.kolivas.org)... 193.19.136.183
Connecting to ck.kolivas.org (ck.kolivas.org)|193.19.136.183|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 271237 (265K) [text/plain]
Saving to: '4.8-sched-bfs-512.patch'
4.8-sched-bfs-512.patch 100%[===============================================================================>] 264.88K 142KB/s in 1.9s
2016-11-02 15:39:02 (142 KB/s) - '4.8-sched-bfs-512.patch' saved [271237/271237]
Command:
$ wget http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch
Result:
--2016-11-02 15:41:01-- http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch
Resolving algo.ing.unimo.it (algo.ing.unimo.it)... 155.185.5.10
Connecting to algo.ing.unimo.it (algo.ing.unimo.it)|155.185.5.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3445 (3.4K) [text/x-diff]
Saving to: '0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch'
0001-block-cgroups-kconfig-build-bits-fo 100%[===============================================================================>] 3.36K --.-KB/s in 0s
2016-11-02 15:41:02 (695 MB/s) - '0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch' saved [3445/3445]
Command:
$ wget http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch
Result:
--2016-11-02 15:41:33-- http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch
Resolving algo.ing.unimo.it (algo.ing.unimo.it)... 155.185.5.10
Connecting to algo.ing.unimo.it (algo.ing.unimo.it)|155.185.5.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 227645 (222K) [text/x-diff]
Saving to: '0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch'
0002-block-introduce-the-BFQ-v7r11-I-O-s 100%[===============================================================================>] 222.31K 51.7KB/s in 4.3s
2016-11-02 15:41:39 (51.7 KB/s) - '0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch' saved [227645/227645]
Command:
$ wget http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch
Result:
--2016-11-02 15:41:55-- http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch
Resolving algo.ing.unimo.it (algo.ing.unimo.it)... 155.185.5.10
Connecting to algo.ing.unimo.it (algo.ing.unimo.it)|155.185.5.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36350 (35K) [text/x-diff]
Saving to: '0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch'
0003-block-bfq-add-Early-Queue-Merge-EQM 100%[===============================================================================>] 35.50K 50.9KB/s in 0.7s
2016-11-02 15:41:57 (50.9 KB/s) - '0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch' saved [36350/36350]
Command:
$ wget http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch
Result:
--2016-11-02 15:42:04-- http://algo.ing.unimo.it/people/paolo/disk_sched/patches/4.8.0-v8r4/0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch
Resolving algo.ing.unimo.it (algo.ing.unimo.it)... 155.185.5.10
Connecting to algo.ing.unimo.it (algo.ing.unimo.it)|155.185.5.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 273468 (267K) [text/x-diff]
Saving to: '0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch'
0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4. 100%[===============================================================================>] 267.06K 66.9KB/s in 4.0s
2016-11-02 15:42:09 (66.9 KB/s) - '0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch' saved [273468/273468]
Command:
$ ls
Result:
0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch 0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch linux-4.8.6
0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch 4.8-sched-bfs-512.patch linux-4.8.6.tar.xz
0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch linux
Command:
$ cd linux
$ cp ../0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch .
$ cp ../0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch .
$ cp ../0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch .
$ cp ../0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch .
$ cp ../4.8-sched-bfs-512.patch .
$ patch -p1 < 0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r11-4.8.0.patch
Result:
patching file block/Kconfig.iosched
patching file block/Makefile
patching file include/linux/blkdev.h
Command:
$ patch -p1 < 0002-block-introduce-the-BFQ-v7r11-I-O-sched-to-be-ported.patch
Result:
patching file block/Kconfig.iosched
patching file block/bfq-cgroup.c
patching file block/bfq-ioc.c
patching file block/bfq-iosched.c
patching file block/bfq-sched.c
patching file block/bfq.h
Command:
$ patch -p1 < 0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r11-to-.patch
Result:
patching file block/bfq-cgroup.c
patching file block/bfq-iosched.c
patching file block/bfq.h
Command:
$ patch -p1 < 0004-Turn-BFQ-v7r11-into-BFQ-v8r4-for-4.8.0.patch
Result:
patching file block/Kconfig.iosched
patching file block/bfq-cgroup.c
patching file block/bfq-iosched.c
patching file block/bfq-sched.c
patching file block/bfq.h
Command:
$ patch -p1 < 4.8-sched-bfs-512.patch
Result:
patching file arch/powerpc/platforms/cell/spufs/sched.c
patching file Documentation/scheduler/sched-BFS.txt
patching file Documentation/sysctl/kernel.txt
patching file fs/proc/base.c
patching file include/linux/init_task.h
patching file include/linux/ioprio.h
patching file include/linux/sched.h
patching file init/Kconfig
patching file init/main.c
patching file kernel/delayacct.c
patching file kernel/exit.c
patching file kernel/sysctl.c
patching file lib/Kconfig.debug
patching file include/linux/jiffies.h
patching file drivers/cpufreq/cpufreq_ondemand.c
patching file kernel/sched/bfs.c
patching file include/uapi/linux/sched.h
patching file drivers/cpufreq/cpufreq_conservative.c
Hunk #1 succeeded at 31 (offset 1 line).
patching file kernel/time/Kconfig
patching file kernel/sched/Makefile
patching file kernel/sched/bfs_sched.h
patching file kernel/sched/stats.c
patching file arch/x86/Kconfig
patching file include/linux/sched/prio.h
patching file kernel/sched/idle.c
patching file kernel/time/posix-cpu-timers.c
patching file kernel/trace/trace_selftest.c
patching file kernel/sched/cpufreq.c
patching file kernel/sched/cpufreq_schedutil.c
patching file kernel/skip_lists.c
patching file include/linux/skip_lists.h
patching file kernel/Makefile
patching file kernel/smpboot.c
Patch used:
- Brain Fuck Scheduler
- Budget Fair Queueing (BFQ) Storage-I/O Scheduler
Saturday, September 17, 2016
Git: Cloning Linux kernel source tree
Command:
$ git clone https://github.com/torvalds/linux.git
Result:
Cloning into 'linux'...
remote: Counting objects: 4916150, done.
remote: Compressing objects: 100% (393/393), done.
remote: Total 4916150 (delta 374), reused 186 (delta 186), pack-reused 4915571
Receiving objects: 100% (4916150/4916150), 1.58 GiB | 867.00 KiB/s, done.
Resolving deltas: 100% (4068017/4068017), done.
Checking out files: 100% (55502/55502), done.
$ git clone https://github.com/torvalds/linux.git
Result:
Cloning into 'linux'...
remote: Counting objects: 4916150, done.
remote: Compressing objects: 100% (393/393), done.
remote: Total 4916150 (delta 374), reused 186 (delta 186), pack-reused 4915571
Receiving objects: 100% (4916150/4916150), 1.58 GiB | 867.00 KiB/s, done.
Resolving deltas: 100% (4068017/4068017), done.
Checking out files: 100% (55502/55502), done.
ラベル:
Git,
GitHub,
Linux kernel
Subscribe to:
Posts (Atom)