annotate main.yml @ 10:3d1d5f6304c9 default tip

fix gdb script flag
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 28 Jul 2022 16:25:46 +0900
parents 42be4c53efc5
children
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
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
14 remote_user: ie-user
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
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
20 dnf:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
21 state: present
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
22 name:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
23 - fedpkg
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
24 - fedora-packager
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
25 - rpmdevtools
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
26 - ncurses-devel
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
27 - pesign
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
28 - libselinux-python3
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
29
c5546384da86 build fedora kernel
kono
parents:
diff changeset
30 - name: fedpkg clone
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
31 command: fedpkg clone -a --depth 1 kernel
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
32 args:
c5546384da86 build fedora kernel
kono
parents:
diff changeset
33 chdir: /usr/src/
c5546384da86 build fedora kernel
kono
parents:
diff changeset
34 creates: /usr/src/kernel
3
1a0de5121165 add comments
kono
parents: 2
diff changeset
35
6
93892172f7fb add comment
kono
parents: 5
diff changeset
36 # we need not to this as root
93892172f7fb add comment
kono
parents: 5
diff changeset
37 #
3
1a0de5121165 add comments
kono
parents: 2
diff changeset
38 # this should be cd /usr/src/kernel ; git checkout
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
39 - name: git clone kernel
c5546384da86 build fedora kernel
kono
parents:
diff changeset
40 git: >
c5546384da86 build fedora kernel
kono
parents:
diff changeset
41 repo=git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git
c5546384da86 build fedora kernel
kono
parents:
diff changeset
42 dest=/usr/src/kernels/fedora
c5546384da86 build fedora kernel
kono
parents:
diff changeset
43
3
1a0de5121165 add comments
kono
parents: 2
diff changeset
44 # this does not work and unnecessary
1
b36051f1a652 add old config
kono
parents: 0
diff changeset
45 # - name: authorize user script
b36051f1a652 add old config
kono
parents: 0
diff changeset
46 # shell: /usr/libexec/pesign/pesign-authorize-users
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
47
1
b36051f1a652 add old config
kono
parents: 0
diff changeset
48 #
2
kono
parents: 1
diff changeset
49 # this does not work, we have to chdir to /usr/src/kernel
1
b36051f1a652 add old config
kono
parents: 0
diff changeset
50 # - name: install kernel dev packages
b36051f1a652 add old config
kono
parents: 0
diff changeset
51 # dnf: name={{ item }} state=present
b36051f1a652 add old config
kono
parents: 0
diff changeset
52 # with_items:
b36051f1a652 add old config
kono
parents: 0
diff changeset
53 # - builddep
b36051f1a652 add old config
kono
parents: 0
diff changeset
54 # - kernel.spec
b36051f1a652 add old config
kono
parents: 0
diff changeset
55 #
b36051f1a652 add old config
kono
parents: 0
diff changeset
56 # args:
b36051f1a652 add old config
kono
parents: 0
diff changeset
57 # chdir: /usr/src/kernels/fedora
3
1a0de5121165 add comments
kono
parents: 2
diff changeset
58 # use shell command instead
1a0de5121165 add comments
kono
parents: 2
diff changeset
59 #
1a0de5121165 add comments
kono
parents: 2
diff changeset
60 - name: dnf builddep kernel.spec
1a0de5121165 add comments
kono
parents: 2
diff changeset
61 command: dnf -y builddep kernel.spec
1a0de5121165 add comments
kono
parents: 2
diff changeset
62 args:
1a0de5121165 add comments
kono
parents: 2
diff changeset
63 chdir: /usr/src/kernel
1a0de5121165 add comments
kono
parents: 2
diff changeset
64 creates: /bin/gcc
1
b36051f1a652 add old config
kono
parents: 0
diff changeset
65
3
1a0de5121165 add comments
kono
parents: 2
diff changeset
66 # olddefconfig requires old config file
2
kono
parents: 1
diff changeset
67 - name: copy old .config
1
b36051f1a652 add old config
kono
parents: 0
diff changeset
68 copy:
b36051f1a652 add old config
kono
parents: 0
diff changeset
69 src: old.config
b36051f1a652 add old config
kono
parents: 0
diff changeset
70 dest: /usr/src/kernels/fedora/.config
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
71
2
kono
parents: 1
diff changeset
72 - name: make olddefconfig
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
73 become: yes
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
74 make:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
75 target: olddefconfig
2
kono
parents: 1
diff changeset
76 chdir: /usr/src/kernels/fedora
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
77 params:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
78 NUM_THREADS: 8
1
b36051f1a652 add old config
kono
parents: 0
diff changeset
79
2
kono
parents: 1
diff changeset
80 - name: make kernel
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
81 become: yes
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
82 make:
2
kono
parents: 1
diff changeset
83 chdir: /usr/src/kernels/fedora
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
84 params:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
85 NUM_THREADS: 8
2
kono
parents: 1
diff changeset
86
kono
parents: 1
diff changeset
87 - name: make bzImage
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
88 become: yes
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
89 make:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
90 target: bzImage
2
kono
parents: 1
diff changeset
91 chdir: /usr/src/kernels/fedora
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
92 params:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
93 NUM_THREADS: 8
2
kono
parents: 1
diff changeset
94
kono
parents: 1
diff changeset
95 - name: make modules
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
96 become: yes
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
97 make:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
98 target: modules
2
kono
parents: 1
diff changeset
99 chdir: /usr/src/kernels/fedora
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
100 params:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
101 NUM_THREADS: 8
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
102
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
103 - name: make modules_install
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
104 become: yes
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
105 make:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
106 target: modules_install
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
107 chdir: /usr/src/kernels/fedora
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
108 params:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
109 NUM_THREADS: 8
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
110
2
kono
parents: 1
diff changeset
111
kono
parents: 1
diff changeset
112 - name: install kernel
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
113 become: yes
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
114 make:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
115 target: install
0
c5546384da86 build fedora kernel
kono
parents:
diff changeset
116 chdir: /usr/src/kernels/fedora
9
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
117 params:
42be4c53efc5 modified main.yml
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 8
diff changeset
118 NUM_THREADS: 8