Update main.yml #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |