Mercurial > hg > Ansible > fedora_kernel_build
view 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 |
line wrap: on
line source
# build Feora Linux kernel from sourcr # kono@ie.u-ryukyu.ac.jp # # # prepare at least 30GB of file space # ( Fedora default is 15GB, no matter how HDD big size ) # # rsync -av -e 'ssh -p 2222' ~/.ssh/id_rsa.pub xxx@localhost:.ssh/authorized_keys # screen -L ansible-playbook -i hosts main.yml --ask-become-pass - hosts: all remote_user: one become: yes become_method: sudo tasks: - name: install kernel dev packages dnf: name={{ item }} state=present with_items: - fedpkg - fedora-packager - rpmdevtools - ncurses-devel - pesign - libselinux-python - name: fedpkg clone command: fedpkg clone -a kernel args: chdir: /usr/src/ creates: /usr/src/kernel # this should be cd /usr/src/kernel ; git checkout - name: git clone kernel git: > repo=git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git dest=/usr/src/kernels/fedora # this does not work and unnecessary # - name: authorize user script # shell: /usr/libexec/pesign/pesign-authorize-users # # this does not work, we have to chdir to /usr/src/kernel # - name: install kernel dev packages # dnf: name={{ item }} state=present # with_items: # - builddep # - kernel.spec # # args: # chdir: /usr/src/kernels/fedora # use shell command instead # - name: dnf builddep kernel.spec command: dnf -y builddep kernel.spec args: chdir: /usr/src/kernel creates: /bin/gcc # olddefconfig requires old config file - name: copy old .config copy: src: old.config dest: /usr/src/kernels/fedora/.config - name: make olddefconfig shell: "{{ item }}" with_items: - make olddefconfig args: chdir: /usr/src/kernels/fedora - name: make kernel shell: "{{ item }}" with_items: - make -j8 args: chdir: /usr/src/kernels/fedora - name: make bzImage shell: "{{ item }}" with_items: - make bzImage args: chdir: /usr/src/kernels/fedora - name: make modules shell: "{{ item }}" with_items: - make -j8 modules - make -j8 modules_install args: chdir: /usr/src/kernels/fedora - name: install kernel shell: "{{ item }}" with_items: - make install args: chdir: /usr/src/kernels/fedora