changeset 2:3d8479f80403

fix
author kono
date Sun, 17 Dec 2017 09:30:46 +0900
parents b36051f1a652
children 1a0de5121165
files main.yml
diffstat 1 files changed, 34 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/main.yml	Sun Dec 17 08:36:23 2017 +0900
+++ b/main.yml	Sun Dec 17 09:30:46 2017 +0900
@@ -12,6 +12,7 @@
     - rpmdevtools
     - ncurses-devel
     - pesign
+    - libselinux-python
 
   - name: fedpkg clone
     command: fedpkg clone -a kernel
@@ -33,6 +34,7 @@
       chdir: /usr/src/kernel
       creates: /bin/gcc
 #
+#  this does not work, we have to chdir to /usr/src/kernel
 #  - name: install kernel dev packages
 #    dnf: name={{ item }} state=present
 #    with_items:
@@ -42,27 +44,49 @@
 #    args:
 #      chdir: /usr/src/kernels/fedora
 
-  - name: create empty .config
-    command:  touch /usr/src/kernels/fedora/.config
-    args:
-      chdir: /usr/src/kernels/fedora
-      creates: /usr/src/kernels/fedora/.config
-
-  - name: create empty .config
+  - name: copy old  .config
     copy:  
       src: old.config
       dest: /usr/src/kernels/fedora/.config
 
-  - name: make and install kernel
+  - name: make olddefconfig
+    shell: "{{ item }}"
+    with_items:
+    #  this will fail at the first time, do make menuconfig manually
+    # - make silentoldconfig .config
+    - make olddefconfig 
+    args:
+      chdir: /usr/src/kernels/fedora
 
+  - name: make kernel
     shell: "{{ item }}"
     with_items:
-    - make silentoldconfig .config
-#    - make oldconfig 
+    #  this will fail at the first time, do make menuconfig manually
+    # - make silentoldconfig .config
     - make -j8
+    args:
+      chdir: /usr/src/kernels/fedora
+
+  - name: make bzImage 
+    shell: "{{ item }}"
+    with_items:
+    #  this will fail at the first time, do make menuconfig manually
+    # - make silentoldconfig .config
     - make bzImage
+    args:
+      chdir: /usr/src/kernels/fedora
+
+  - name: make modules
+    shell: "{{ item }}"
+    with_items:
     - make modules
     - make modules_install
+    args:
+      chdir: /usr/src/kernels/fedora
+
+  - name: install kernel
+    shell: "{{ item }}"
+    with_items:
     - make install
     args:
       chdir: /usr/src/kernels/fedora