-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (73 loc) · 3.83 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Build Live Image with Custom Kernel
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y wget
sudo apt-get install -y build-essential fakeroot libncurses5-dev libssl-dev ccache bison flex libelf-dev libudev-dev libpci-dev libiberty-dev debhelper dpkg-dev debootstrap gpg debian-archive-keyring
wget https://ftp.debian.org/debian/pool/main/l/live-build/live-build_20240810_all.deb
sudo dpkg -i live-build_20240810_all.deb
- name: Download and Compile Custom Kernel
run: |
KERNEL_VERSION=6.10.7
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${KERNEL_VERSION}.tar.xz
tar -xvf linux-${KERNEL_VERSION}.tar.xz
cd linux-${KERNEL_VERSION}
make defconfig
sed -i 's/# CONFIG_IPU_BRIDGE is not set/CONFIG_IPU_BRIDGE=y/' .config
sed -i 's/# CONFIG_VIDEO_INTEL_IPU6 is not set/CONFIG_VIDEO_INTEL_IPU6=y/' .config
sed -i 's/# CONFIG_INTEL_VSC is not set/CONFIG_INTEL_VSC=y/' .config
sed -i 's/# CONFIG_VIDEO_IPU3_CIO2 is not set/CONFIG_VIDEO_IPU3_CIO2=y/' .config
sed -i 's/# CONFIG_VIDEO_ATOMISP is not set/CONFIG_VIDEO_ATOMISP=y/' .config
sed -i 's/# CONFIG_VIDEO_ATOMISP_OV2722 is not set/CONFIG_VIDEO_ATOMISP_OV2722=y/' .config
sed -i 's/# CONFIG_VIDEO_ATOMISP_GC2235 is not set/CONFIG_VIDEO_ATOMISP_GC2235=y/' .config
sed -i 's/# CONFIG_VIDEO_ATOMISP_MSRLIST_HELPER is not set/CONFIG_VIDEO_ATOMISP_MSRLIST_HELPER=y/' .config
sed -i 's/# CONFIG_VIDEO_ATOMISP_MT9M114 is not set/CONFIG_VIDEO_ATOMISP_MT9M114=y/' .config
sed -i 's/# CONFIG_VIDEO_ATOMISP_GC0310 is not set/CONFIG_VIDEO_ATOMISP_GC0310=y/' .config
echo "CONFIG_IPU_BRIDGE=y" >> .config
echo "CONFIG_VIDEO_INTEL_IPU6=y" >> .config
echo "CONFIG_INTEL_VSC=y" >> .config
echo "CONFIG_VIDEO_IPU3_CIO2=y" >> .config
echo "CONFIG_VIDEO_ATOMISP=y" >> .config
echo "CONFIG_VIDEO_ATOMISP_OV2722=y" >> .config
echo "CONFIG_VIDEO_ATOMISP_GC2235=y" >> .config
echo "CONFIG_VIDEO_ATOMISP_MSRLIST_HELPER=y" >> .config
echo "CONFIG_VIDEO_ATOMISP_MT9M114=y" >> .config
echo "CONFIG_VIDEO_ATOMISP_GC0310=y" >> .config
make -j$(nproc) bindeb-pkg
- name: Clean up previous build
run: sudo lb clean
- name: Configure live-build for Debian with Custom Kernel
run: |
mkdir -p live-build/config/packages.chroot
mkdir -p live-build/config/package-lists
mkdir -p live-build/config/hooks/normal
# Move custom kernel .deb files to live-build package directory
mv ./*.deb live-build/config/packages.chroot/
echo "efivar" > live-build/config/package-lists/my.list.chroot
echo "efibootmgr" >> live-build/config/package-lists/my.list.chroot
# Create a hook to update initramfs after installing the custom kernel
cat << EOF > live-build/config/hooks/normal/0100-update-initramfs.hook.chroot
#!/bin/sh
set -e
update-initramfs -u -k all
EOF
chmod +x live-build/config/hooks/normal/0100-update-initramfs.hook.chroot
cd live-build
lb config -d bookworm --debian-installer none --archive-areas "main contrib non-free" \
--debootstrap-options "--keyring=/usr/share/keyrings/debian-archive-keyring.gpg --variant=minbase"
- name: Build Debian Live ISO with Custom Kernel
run: |
cd live-build
sudo lb build
- name: Upload Live ISO
uses: actions/upload-artifact@v3
with:
name: debian-live-custom-kernel.iso
path: live-build/*.iso