annotate main.yml @ 8:b0ed6906392e

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