Mercurial > hg > Ansible > fedora_kernel_build
changeset 0:c5546384da86
build fedora kernel
author | kono |
---|---|
date | Sat, 16 Dec 2017 20:13:42 +0900 |
parents | |
children | b36051f1a652 |
files | main.yml |
diffstat | 1 files changed, 48 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.yml Sat Dec 16 20:13:42 2017 +0900 @@ -0,0 +1,48 @@ +- 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 + + - name: fedpkg clone + command: fedpkg clone -a kernel + args: + chdir: /usr/src/ + creates: /usr/src/kernel + + - name: git clone kernel + git: > + repo=git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git + dest=/usr/src/kernels/fedora + + - name: authorize user script + shell: /usr/libexec/pesign/pesign-authorize-users + + - name: install kernel dev packages + dnf: name={{ item }} state=present + with_items: + - builddep + - kernel.spec + args: + chdir: /usr/src/kernels/fedora + + - name: make and install kernel + shell: "{{ item }}" + with_items: + - make silentoldconfig .config + - make -j8 + - make bzImage + - make modules + - make modules_install + - make install + args: + chdir: /usr/src/kernels/fedora