annotate main.yml @ 5:db07c91fb677

add -j8 for moudle make
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 17 Dec 2017 13:39:42 +0900
parents 1ee02bb450bd
children 93892172f7fb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
1a0de5121165 add comments
kono
parents: 2
diff changeset
1 # build Feora Linux kernel from sourcr
1a0de5121165 add comments
kono
parents: 2
diff changeset
2 # kono@ie.u-ryukyu.ac.jp
1a0de5121165 add comments
kono
parents: 2
diff changeset
3 #
4
1ee02bb450bd fix comment
kono
parents: 3
diff changeset
4 #
1ee02bb450bd fix comment
kono
parents: 3
diff changeset
5 # prepare at least 30GB of file space
1ee02bb450bd fix comment
kono
parents: 3
diff changeset
6 # ( Fedora default is 15GB, no matter how HDD big size )
1ee02bb450bd fix comment
kono
parents: 3
diff changeset
7 #
1ee02bb450bd fix comment
kono
parents: 3
diff changeset
8 # rsync -av -e 'ssh -p 2222' ~/.ssh/id_rsa.pub xxx@localhost:.ssh/authorized_keys
1ee02bb450bd fix comment
kono
parents: 3
diff changeset
9 # screen -L ansible-playbook -i hosts main.yml --ask-become-pass
3
1a0de5121165 add comments
kono
parents: 2
diff changeset
10
1a0de5121165 add comments
kono
parents: 2
diff changeset
11
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
12 - hosts: all
c5546384da86 build fedora kernel
kono
parents:
diff changeset
13 remote_user: one
c5546384da86 build fedora kernel
kono
parents:
diff changeset
14 become: yes
c5546384da86 build fedora kernel
kono
parents:
diff changeset
15 become_method: sudo
c5546384da86 build fedora kernel
kono
parents:
diff changeset
16 tasks:
c5546384da86 build fedora kernel
kono
parents:
diff changeset
17
c5546384da86 build fedora kernel
kono
parents:
diff changeset
18 - name: install kernel dev packages
c5546384da86 build fedora kernel
kono
parents:
diff changeset
19 dnf: name={{ item }} state=present
c5546384da86 build fedora kernel
kono
parents:
diff changeset
20 with_items:
c5546384da86 build fedora kernel
kono
parents:
diff changeset
21 - fedpkg
c5546384da86 build fedora kernel
kono
parents:
diff changeset
22 - fedora-packager
c5546384da86 build fedora kernel
kono
parents:
diff changeset
23 - rpmdevtools
c5546384da86 build fedora kernel
kono
parents:
diff changeset
24 - ncurses-devel
c5546384da86 build fedora kernel
kono
parents:
diff changeset
25 - pesign
2
kono
parents: 1
diff changeset
26 - libselinux-python
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
27
c5546384da86 build fedora kernel
kono
parents:
diff changeset
28 - name: fedpkg clone
c5546384da86 build fedora kernel
kono
parents:
diff changeset
29 command: fedpkg clone -a kernel
c5546384da86 build fedora kernel
kono
parents:
diff changeset
30 args:
c5546384da86 build fedora kernel
kono
parents:
diff changeset
31 chdir: /usr/src/
c5546384da86 build fedora kernel
kono
parents:
diff changeset
32 creates: /usr/src/kernel
3
1a0de5121165 add comments
kono
parents: 2
diff changeset
33
1a0de5121165 add comments
kono
parents: 2
diff changeset
34 # this should be cd /usr/src/kernel ; git checkout
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
35 - name: git clone kernel
c5546384da86 build fedora kernel
kono
parents:
diff changeset
36 git: >
c5546384da86 build fedora kernel
kono
parents:
diff changeset
37 repo=git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git
c5546384da86 build fedora kernel
kono
parents:
diff changeset
38 dest=/usr/src/kernels/fedora
c5546384da86 build fedora kernel
kono
parents:
diff changeset
39
3
1a0de5121165 add comments
kono
parents: 2
diff changeset
40 # this does not work and unnecessary
1
b36051f1a652 add old config
kono
parents: 0
diff changeset
41 # - name: authorize user script
b36051f1a652 add old config
kono
parents: 0
diff changeset
42 # shell: /usr/libexec/pesign/pesign-authorize-users
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
43
1
b36051f1a652 add old config
kono
parents: 0
diff changeset
44 #
2
kono
parents: 1
diff changeset
45 # this does not work, we have to chdir to /usr/src/kernel
1
b36051f1a652 add old config
kono
parents: 0
diff changeset
46 # - name: install kernel dev packages
b36051f1a652 add old config
kono
parents: 0
diff changeset
47 # dnf: name={{ item }} state=present
b36051f1a652 add old config
kono
parents: 0
diff changeset
48 # with_items:
b36051f1a652 add old config
kono
parents: 0
diff changeset
49 # - builddep
b36051f1a652 add old config
kono
parents: 0
diff changeset
50 # - kernel.spec
b36051f1a652 add old config
kono
parents: 0
diff changeset
51 #
b36051f1a652 add old config
kono
parents: 0
diff changeset
52 # args:
b36051f1a652 add old config
kono
parents: 0
diff changeset
53 # chdir: /usr/src/kernels/fedora
3
1a0de5121165 add comments
kono
parents: 2
diff changeset
54 # use shell command instead
1a0de5121165 add comments
kono
parents: 2
diff changeset
55 #
1a0de5121165 add comments
kono
parents: 2
diff changeset
56 - name: dnf builddep kernel.spec
1a0de5121165 add comments
kono
parents: 2
diff changeset
57 command: dnf -y builddep kernel.spec
1a0de5121165 add comments
kono
parents: 2
diff changeset
58 args:
1a0de5121165 add comments
kono
parents: 2
diff changeset
59 chdir: /usr/src/kernel
1a0de5121165 add comments
kono
parents: 2
diff changeset
60 creates: /bin/gcc
1
b36051f1a652 add old config
kono
parents: 0
diff changeset
61
3
1a0de5121165 add comments
kono
parents: 2
diff changeset
62 # olddefconfig requires old config file
2
kono
parents: 1
diff changeset
63 - name: copy old .config
1
b36051f1a652 add old config
kono
parents: 0
diff changeset
64 copy:
b36051f1a652 add old config
kono
parents: 0
diff changeset
65 src: old.config
b36051f1a652 add old config
kono
parents: 0
diff changeset
66 dest: /usr/src/kernels/fedora/.config
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
67
2
kono
parents: 1
diff changeset
68 - name: make olddefconfig
kono
parents: 1
diff changeset
69 shell: "{{ item }}"
kono
parents: 1
diff changeset
70 with_items:
kono
parents: 1
diff changeset
71 - make olddefconfig
kono
parents: 1
diff changeset
72 args:
kono
parents: 1
diff changeset
73 chdir: /usr/src/kernels/fedora
1
b36051f1a652 add old config
kono
parents: 0
diff changeset
74
2
kono
parents: 1
diff changeset
75 - name: make kernel
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
76 shell: "{{ item }}"
c5546384da86 build fedora kernel
kono
parents:
diff changeset
77 with_items:
c5546384da86 build fedora kernel
kono
parents:
diff changeset
78 - make -j8
2
kono
parents: 1
diff changeset
79 args:
kono
parents: 1
diff changeset
80 chdir: /usr/src/kernels/fedora
kono
parents: 1
diff changeset
81
kono
parents: 1
diff changeset
82 - name: make bzImage
kono
parents: 1
diff changeset
83 shell: "{{ item }}"
kono
parents: 1
diff changeset
84 with_items:
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
85 - make bzImage
2
kono
parents: 1
diff changeset
86 args:
kono
parents: 1
diff changeset
87 chdir: /usr/src/kernels/fedora
kono
parents: 1
diff changeset
88
kono
parents: 1
diff changeset
89 - name: make modules
kono
parents: 1
diff changeset
90 shell: "{{ item }}"
kono
parents: 1
diff changeset
91 with_items:
5
db07c91fb677 add -j8 for moudle make
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
92 - make -j8 modules
db07c91fb677 add -j8 for moudle make
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
93 - make -j8 modules_install
2
kono
parents: 1
diff changeset
94 args:
kono
parents: 1
diff changeset
95 chdir: /usr/src/kernels/fedora
kono
parents: 1
diff changeset
96
kono
parents: 1
diff changeset
97 - name: install kernel
kono
parents: 1
diff changeset
98 shell: "{{ item }}"
kono
parents: 1
diff changeset
99 with_items:
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
100 - make install
c5546384da86 build fedora kernel
kono
parents:
diff changeset
101 args:
c5546384da86 build fedora kernel
kono
parents:
diff changeset
102 chdir: /usr/src/kernels/fedora