From cb5d1ec9d10aff00ecc81f0016c21d55bf84d9d3 Mon Sep 17 00:00:00 2001 From: marcosfad Date: Fri, 25 Feb 2022 23:13:48 +0100 Subject: [PATCH] Fix not booting --- .github/workflows/CI.yml | 25 ++++++++++++++++++++++++- 01_build_file_system.sh | 19 ------------------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d5efe37..ce7662c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,9 +16,32 @@ jobs: KERNEL_VERSION=$(curl -Ls https://github.com/t2linux/T2-Ubuntu-Kernel/releases/ | grep deb | grep download | grep "${MBP_VERSION}" | cut -d'/' -f6 | head -n1 | cut -d'v' -f2) echo "::set-output name=build::${KERNEL_VERSION}" - - name: Build + - name: Download kernel packages env: KERNEL_VERSION: ${{ steps.variables.outputs.build }} + run: | + KERNEL_PACKAGES=() + if [[ -n "${KERNEL_VERSION:-}" ]]; then + MBP_KERNEL_TAG=${KERNEL_VERSION} + echo >&2 "===]> Info: Downloading specified kernel: ${MBP_KERNEL_TAG}"; + else + MBP_VERSION=t2 + MBP_KERNEL_TAG=$(curl -Ls https://github.com/t2linux/T2-Ubuntu-Kernel/releases/ | grep deb | grep download | grep "${MBP_VERSION}" | cut -d'/' -f6 | head -n1 | cut -d'v' -f2) + echo >&2 "===]> Info: Downloading latest ${MBP_VERSION} kernel: ${MBP_KERNEL_TAG}"; + fi + + while IFS='' read -r line; do KERNEL_PACKAGES+=("$line"); done < <(curl -sL https://github.com/t2linux/T2-Ubuntu-Kernel/releases/tag/v"${MBP_KERNEL_TAG}" | grep deb | grep span | cut -d'>' -f2 | cut -d'<' -f1) + + mkdir -p "${{ github.workspace }}/files/kernels" + + for i in "${KERNEL_PACKAGES[@]}"; do + curl -L https://github.com/t2linux/T2-Ubuntu-Kernel/releases/download/v"${MBP_KERNEL_TAG}"/"${i}" -o "${{ github.workspace }}/files/kernels/${i}" + done + + - name: Check kernel files + run: ls -al "${{ github.workspace }}/files/kernels" + + - name: Build run: sudo ./build.sh - name: print sha256sum diff --git a/01_build_file_system.sh b/01_build_file_system.sh index 2d57ae7..6218bc9 100755 --- a/01_build_file_system.sh +++ b/01_build_file_system.sh @@ -9,25 +9,6 @@ debootstrap \ "${CHROOT_PATH}" \ http://archive.ubuntu.com/ubuntu/ -### Download kernel packages -KERNEL_PACKAGES=() -if [[ -n "${KERNEL_VERSION:-}" ]]; then - MBP_KERNEL_TAG=${KERNEL_VERSION} - echo >&2 "===]> Info: Downloading specified kernel: ${MBP_KERNEL_TAG}"; -else - MBP_VERSION=t2 - MBP_KERNEL_TAG=$(curl -Ls https://github.com/t2linux/T2-Ubuntu-Kernel/releases/ | grep deb | grep download | grep "${MBP_VERSION}" | cut -d'/' -f6 | head -n1 | cut -d'v' -f2) - echo >&2 "===]> Info: Downloading latest ${MBP_VERSION} kernel: ${MBP_KERNEL_TAG}"; -fi - -while IFS='' read -r line; do KERNEL_PACKAGES+=("$line"); done < <(curl -sL https://github.com/t2linux/T2-Ubuntu-Kernel/releases/tag/v"${MBP_KERNEL_TAG}" | grep deb | grep span | cut -d'>' -f2 | cut -d'<' -f1) - -mkdir -p "${ROOT_PATH}/files/kernels" - -for i in "${KERNEL_PACKAGES[@]}"; do - curl -L https://github.com/t2linux/T2-Ubuntu-Kernel/releases/download/v"${MBP_KERNEL_TAG}"/"${i}" -o "${ROOT_PATH}/files/kernels/${i}" -done - echo >&2 "===]> Info: Creating chroot environment... " mount --bind /dev "${CHROOT_PATH}/dev" mount --bind /run "${CHROOT_PATH}/run"