Skip to content

Commit 47aa896

Browse files
Refactor kernel configuration and build steps in Makefile CI
1 parent 8de4851 commit 47aa896

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

.github/workflows/makefile.yml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,13 @@ jobs:
4040
run: sudo apt-get install -y libelf-dev
4141

4242
# https://docs.kernel.org/admin-guide/README.html#build-directory-for-the-kernel
43-
# https://docs.kernel.org/admin-guide/README.html#configuring-the-kernel
44-
- name: Configure the kernel
43+
- name: Configure and build the kernel
4544
if: steps.cache-kernel.outputs.cache-hit != 'true'
4645
run: |
4746
cd ${{ env.VERSION }}
48-
make defconfig
49-
50-
# https://docs.kernel.org/admin-guide/README.html#compiling-the-kernel
51-
- name: Compile the kernel
52-
if: steps.cache-kernel.outputs.cache-hit != 'true'
53-
run: |
54-
cd ${{ env.VERSION }}
55-
make
56-
57-
- name: Build root filesystem
58-
run: |
59-
mkdir -p iso/boot
60-
pwd
61-
ls -l
47+
make O=${{ github.workspace }}/iso/boot menuconfig
48+
make O=${{ github.workspace }}/iso/boot
49+
sudo make O=${{ github.workspace }}/iso/boot modules_install install
6250
6351
# https://docs.kernel.org/filesystems/ramfs-rootfs-initramfs.html
6452
# https://docs.kernel.org/filesystems/ramfs-rootfs-initramfs.html#contents-of-initramfs
@@ -78,13 +66,6 @@ jobs:
7866
gcc -static hello.c -o initramfs/init
7967
(cd initramfs; find . | cpio -o -H newc | gzip) > iso/boot/initramfs.cpio.gz
8068
81-
- name: Install the kernel
82-
run: |
83-
cd ${{ env.VERSION }}
84-
install $(make -s image_name) ../iso/boot/vmlinuz
85-
install System.map ../iso/boot/System.map
86-
install .config ../iso/boot/config
87-
8869
# https://www.gnu.org/software/grub/manual/grub/html_node/Making-a-GRUB-bootable-CD_002dROM.html
8970
- name: Make a GRUB bootable CD-ROM
9071
run: |

0 commit comments

Comments
 (0)