From 1ea892eed32199ca1bc98a176a8977406367e8c3 Mon Sep 17 00:00:00 2001 From: marcosfad Date: Fri, 3 Sep 2021 12:34:28 +0200 Subject: [PATCH 1/6] Improve build process --- .github/FUNDING.yml | 11 +++++ .github/workflows/CI.yml | 31 ++++++++------ build.sh | 92 ++++++++++++++++++++-------------------- build_in_docker.sh | 11 ++++- files/chroot_build.sh | 50 +++++++++++++++------- files/preseed/mbp.seed | 2 +- 6 files changed, 122 insertions(+), 75 deletions(-) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..f6ea77d --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,11 @@ +--- +github: ['marcosfad'] +patreon: +open_collective: +ko_fi: +tidelift: +community_bridge: +liberapay: +issuehunt: +otechie: +custom: ['https://www.paypal.com/paypalme/marcosfad'] diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4ba07fc..19f40f8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,23 +10,29 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Configure variables + id: variables + run: | + sudo apt install curl + VERSION=5.10 + ALTERNATIVE=mbp + LATEST_BUILD=$(curl -s https://mbp-ubuntu-kernel.herokuapp.com/ -L | + grep "linux-image-5.10" | grep ${ALTERNATIVE} | + grep a | cut -d'>' -f2 | cut -d'<' -f1 |sort -r | head -n 1 | cut -d'_' -f1 | + cut -d'-' -f 3-20) + echo "Using kernel ${LATEST_BUILD}" + echo "::set-output name=version::${LATEST_BUILD}" + - name: Build - run: sudo ./build.sh + run: KERNEL_VERSION=${{ steps.variables.outputs.version }} sudo ./build.sh - name: print sha256sum run: cat output/sha256 - - name: Generate Tag - id: tag - run: | - VER=$(egrep ^KERNEL_VERSION build.sh|cut -d= -f2) - echo Version is $VER - echo "::set-output name=tag::${VER}" - - name: Upload iso artifact uses: actions/upload-artifact@v2 with: - name: mbp-ubuntu-${{ steps.tag.outputs.tag }}.z01 + name: mbp-ubuntu-${{ steps.variables.outputs.version }} path: ${{ github.workspace }}/output/* - name: Instructions for putting it back together @@ -35,15 +41,16 @@ jobs: Download all the artifacts, and put them in a folder without other files. Then run:" unzip "*.z??.zip" - cat livecd-${{ steps.tag.outputs.tag }}-mbp.z?? > cd.zip + cat livecd-${{ steps.variables.outputs.version }}-mbp.z?? > cd.zip echo unzip cd.zip EOF + - name: Release if: github.ref == 'refs/heads/master' uses: softprops/action-gh-release@v1 with: - data: ${{ github.workspace }}/output/* - tag_name: v20.04-${{ steps.tag.outputs.tag }} + files: ${{ github.workspace }}/output/* + tag_name: v20.04-${{ steps.variables.outputs.version }} draft: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.sh b/build.sh index b4e04e7..12fea88 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,10 @@ ROOT_PATH=$(pwd) WORKING_PATH=/root/work CHROOT_PATH="${WORKING_PATH}/chroot" IMAGE_PATH="${WORKING_PATH}/image" -KERNEL_VERSION=5.10.52 +if [ -z "${KERNEL_VERSION}" ]; then + echo "Kernel version is undefined, fallback set." + KERNEL_VERSION=5.10.52-mbp +fi if [ -d "$WORKING_PATH" ]; then rm -rf "$WORKING_PATH" @@ -32,55 +35,52 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::=" isolinux \ syslinux -echo >&2 "===]> Info: Start loop... " -for ALTERNATIVE in mbp mbp-16x-wifi -do - echo >&2 "===]> Info: Start building ${ALTERNATIVE}... " +echo >&2 "===]> Info: Start building ${KERNEL_VERSION}... " - echo >&2 "===]> Info: Build Ubuntu FS... " - /bin/bash -c " - ROOT_PATH=${ROOT_PATH} \\ - WORKING_PATH=${WORKING_PATH} \\ - CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\ - IMAGE_PATH=${IMAGE_PATH} \\ - KERNEL_VERSION=${KERNEL_VERSION}-${ALTERNATIVE} \\ - ${ROOT_PATH}/01_build_file_system.sh - " +echo >&2 "===]> Info: Build Ubuntu FS... " +/bin/bash -c " + ROOT_PATH=${ROOT_PATH} \\ + WORKING_PATH=${WORKING_PATH} \\ + CHROOT_PATH=${CHROOT_PATH} \\ + IMAGE_PATH=${IMAGE_PATH} \\ + KERNEL_VERSION=${KERNEL_VERSION}\\ + ${ROOT_PATH}/01_build_file_system.sh +" - echo >&2 "===]> Info: Build Image FS... " - /bin/bash -c " - ROOT_PATH=${ROOT_PATH} \\ - WORKING_PATH=${WORKING_PATH} \\ - CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\ - IMAGE_PATH=${IMAGE_PATH} \\ - KERNEL_VERSION=${KERNEL_VERSION}-${ALTERNATIVE} \\ - ${ROOT_PATH}/02_build_image.sh - " +echo >&2 "===]> Info: Build Image FS... " +/bin/bash -c " + ROOT_PATH=${ROOT_PATH} \\ + WORKING_PATH=${WORKING_PATH} \\ + CHROOT_PATH=${CHROOT_PATH} \\ + IMAGE_PATH=${IMAGE_PATH} \\ + KERNEL_VERSION=${KERNEL_VERSION} \\ + ${ROOT_PATH}/02_build_image.sh +" - echo >&2 "===]> Info: Prepare Boot for ISO... " - /bin/bash -c " - IMAGE_PATH=${IMAGE_PATH} \\ - CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\ - ${ROOT_PATH}/03_prepare_iso.sh - " +echo >&2 "===]> Info: Prepare Boot for ISO... " +/bin/bash -c " + IMAGE_PATH=${IMAGE_PATH} \\ + CHROOT_PATH=${CHROOT_PATH} \\ + ${ROOT_PATH}/03_prepare_iso.sh +" + +echo >&2 "===]> Info: Create ISO... " +/bin/bash -c " + ROOT_PATH=${ROOT_PATH} \\ + IMAGE_PATH=${IMAGE_PATH} \\ + CHROOT_PATH=${CHROOT_PATH} \\ + KERNEL_VERSION=${KERNEL_VERSION} \\ + ${ROOT_PATH}/04_create_iso.sh +" +livecd_exitcode=$? +if [ "${livecd_exitcode}" -ne 0 ]; then + echo "Error building ${KERNEL_VERSION}" + exit "${livecd_exitcode}" +fi +### Zip iso and split it into multiple parts - github max size of release attachment is 2GB, where ISO is sometimes bigger than that +cd "${ROOT_PATH}" +zip -s 1500m "${ROOT_PATH}/output/livecd-${KERNEL_VERSION}.zip" "${ROOT_PATH}/ubuntu-20.04-${KERNEL_VERSION}.iso" - echo >&2 "===]> Info: Create ISO... " - /bin/bash -c " - ROOT_PATH=${ROOT_PATH} \\ - IMAGE_PATH=${IMAGE_PATH} \\ - CHROOT_PATH=${CHROOT_PATH}_${ALTERNATIVE} \\ - KERNEL_VERSION=${KERNEL_VERSION}-${ALTERNATIVE} \\ - ${ROOT_PATH}/04_create_iso.sh - " - livecd_exitcode=$? - if [ "${livecd_exitcode}" -ne 0 ]; then - echo "Error building ${KERNEL_VERSION}-${ALTERNATIVE}" - exit "${livecd_exitcode}" - fi - ### Zip iso and split it into multiple parts - github max size of release attachment is 2GB, where ISO is sometimes bigger than that - cd "${ROOT_PATH}" - zip -s 1500m "${ROOT_PATH}/output/livecd-${KERNEL_VERSION}-${ALTERNATIVE}.zip" "${ROOT_PATH}/ubuntu-20.04-${KERNEL_VERSION}-${ALTERNATIVE}.iso" -done ### Calculate sha256 sums of built ISO sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256" diff --git a/build_in_docker.sh b/build_in_docker.sh index b603421..045fc46 100755 --- a/build_in_docker.sh +++ b/build_in_docker.sh @@ -5,10 +5,19 @@ set -eu -o pipefail DOCKER_IMAGE=ubuntu:20.04 docker pull ${DOCKER_IMAGE} + +VERSION=5 +ALTERNATIVE=mbp +LATEST_BUILD=$(curl -s https://mbp-ubuntu-kernel.herokuapp.com/ -L | + grep "linux-image-${VERSION}" | grep ${ALTERNATIVE} | + grep a | cut -d'>' -f2 | cut -d'<' -f1 |sort -r | head -n 1 | cut -d'_' -f1 | + cut -d'-' -f 3-20) +echo "Using kernel ${LATEST_BUILD}" + docker run \ --privileged \ --rm \ -t \ -v "$(pwd)":/repo \ ${DOCKER_IMAGE} \ - /bin/bash -c 'cd /repo && ./build.sh' + /bin/bash -c "cd /repo && KERNEL_VERSION=${LATEST_BUILD} ./build.sh" diff --git a/files/chroot_build.sh b/files/chroot_build.sh index 59c272c..8c9ba51 100755 --- a/files/chroot_build.sh +++ b/files/chroot_build.sh @@ -60,8 +60,8 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::=" locales \ initramfs-tools \ binutils \ - linux-generic \ - linux-headers-generic \ + linux-generic-hwe-20.04 \ + linux-headers-generic-hwe-20.04 \ grub-efi-amd64-signed \ "linux-image-${KERNEL_VERSION}" \ "linux-headers-${KERNEL_VERSION}" \ @@ -107,22 +107,13 @@ APPLE_BCE_DRIVER_COMMIT_HASH=f93c6566f98b3c95677de8010f7445fa19f75091 APPLE_BCE_DRIVER_MODULE_NAME=apple-bce APPLE_BCE_DRIVER_MODULE_VERSION=0.2 -APPLE_IB_DRIVER_GIT_URL=https://github.com/t2linux/apple-ib-drv -APPLE_IB_DRIVER_BRANCH_NAME=mbp15 -APPLE_IB_DRIVER_COMMIT_HASH=fc9aefa5a564e6f2f2bb0326bffb0cef0446dc05 -APPLE_IB_DRIVER_MODULE_NAME=apple-ibridge -APPLE_IB_DRIVER_MODULE_VERSION=0.2 - -# thunderbolt is working for me. -#printf '\nblacklist thunderbolt' >>/etc/modprobe.d/blacklist.conf - git clone --single-branch --branch ${APPLE_BCE_DRIVER_BRANCH_NAME} ${APPLE_BCE_DRIVER_GIT_URL} \ /usr/src/"${APPLE_BCE_DRIVER_MODULE_NAME}-${APPLE_BCE_DRIVER_MODULE_VERSION}" git -C /usr/src/"${APPLE_BCE_DRIVER_MODULE_NAME}-${APPLE_BCE_DRIVER_MODULE_VERSION}" checkout "${APPLE_BCE_DRIVER_COMMIT_HASH}" cat << EOF > /usr/src/${APPLE_BCE_DRIVER_MODULE_NAME}-${APPLE_BCE_DRIVER_MODULE_VERSION}/dkms.conf PACKAGE_NAME=apple-bce -PACKAGE_VERSION=0.1 +PACKAGE_VERSION=0.2 CLEAN="make clean" MAKE="make" BUILT_MODULE_NAME[0]="apple-bce" @@ -132,16 +123,45 @@ REMAKE_INITRD="yes" EOF dkms install -m "${APPLE_BCE_DRIVER_MODULE_NAME}" -v "${APPLE_BCE_DRIVER_MODULE_VERSION}" -k "${KERNEL_VERSION}" -printf '\n### apple-bce start ###\nhid-apple\nbcm5974\nsnd-seq\napple-bce\n### apple-bce end ###' >>/etc/modules-load.d/apple-bce.conf -printf '\n### apple-bce start ###\nhid-apple\nsnd-seq\napple-bce\n### apple-bce end ###' >>/etc/initramfs-tools/modules +printf '\n### apple-bce start ###\napple-bce\n### apple-bce end ###' >>/etc/modules-load.d/apple-bce.conf +printf '\n### apple-bce start ###\nhapple-bce\n### apple-bce end ###' >>/etc/initramfs-tools/modules + +APPLE_IB_DRIVER_GIT_URL=https://github.com/t2linux/apple-ib-drv +APPLE_IB_DRIVER_BRANCH_NAME=mbp15 +APPLE_IB_DRIVER_COMMIT_HASH=fc9aefa5a564e6f2f2bb0326bffb0cef0446dc05 +APPLE_IB_DRIVER_MODULE_NAME=apple-ibridge +APPLE_IB_DRIVER_MODULE_VERSION=0.1 git clone --single-branch --branch ${APPLE_IB_DRIVER_BRANCH_NAME} ${APPLE_IB_DRIVER_GIT_URL} \ /usr/src/"${APPLE_IB_DRIVER_MODULE_NAME}-${APPLE_IB_DRIVER_MODULE_VERSION}" git -C /usr/src/"${APPLE_IB_DRIVER_MODULE_NAME}-${APPLE_IB_DRIVER_MODULE_VERSION}" checkout "${APPLE_IB_DRIVER_COMMIT_HASH}" dkms install -m "${APPLE_IB_DRIVER_MODULE_NAME}" -v "${APPLE_IB_DRIVER_MODULE_VERSION}" -k "${KERNEL_VERSION}" -printf '\n### applespi start ###\napple_ibridge\napple_ib_tb\napple_ib_als\n### applespi end ###' >>/etc/modules-load.d/applespi.conf +printf '\n### applespi start ###\napple_ib_tb\napple_ib_als\n### applespi end ###' >>/etc/modules-load.d/applespi.conf printf '\n# display f* key in touchbar\noptions apple-ib-tb fnmode=2\n' >> /etc/modprobe.d/apple-touchbar.conf +## Add optional dkms for brcm80211-mbp16x +#cd /tmp +#wget https://gist.github.com/hexchain/22932a13a892e240d71cb98fad62a6a0/archive/50ce4513d2865b1081a972bc09e8da639f94a755.zip +#unzip *55.zip +#cd 22* +#cp -r /usr/src/linux-headers-*-generic/drivers/net/wireless/broadcom/brcm80211 . +#cd brcm80211 +#patch -Np6 -i "../8001-corellium-wifi-bigsur.patch" +#patch -Np6 -i "../8002-brcmfmac-4377-mod.patch" +#patch -Np6 -i "../8003-brcmfmac-4377-64bit-regs.patch" +#patch -Np6 -i "../8004-brcmfmac-4377-chip-ids.patch" +#patch -Np1 -i "../out-of-tree.patch" +#mv Makefile Kbuild +#cp ../Makefile . +#sed -e "s,@PACKAGE_NAME@,brcm80211-mbp16x," -e "s,@PACKAGE_VERSION@,2.0," ../dkms.conf.in > dkms.conf +#cp ./brcm80211 /usr/src/brcm80211-mbp16x-2.0 +#cd /tmp +#rm -rf *55.zip 22* + +echo >&2 "===]> Configure amdgpu" +cat << EOF > /etc/udev/rules.d/30-amdgpu-pm.rules +KERNEL=="card0", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="high" +EOF echo >&2 "===]> Info: Update initramfs... " diff --git a/files/preseed/mbp.seed b/files/preseed/mbp.seed index 4c56c7b..46c2ca0 100644 --- a/files/preseed/mbp.seed +++ b/files/preseed/mbp.seed @@ -8,4 +8,4 @@ # well keep them installed. #ubiquity ubiquity/keep-installed string icedtea6-plugin openoffice.org -d-i debian-installer/add-kernel-opts string efi=noruntime pcie_ports=compat acpi=force +d-i debian-installer/add-kernel-opts string efi=noruntime pcie_ports=compat From 0ab1f3c5d57a6e4840b722dadfbc0690a44297f1 Mon Sep 17 00:00:00 2001 From: marcosfad Date: Sun, 12 Sep 2021 00:15:37 +0200 Subject: [PATCH 2/6] Build image with multiple kernels --- .github/workflows/CI.yml | 19 ++++------ .gitignore | 1 + .travis.yml | 49 ------------------------- 01_build_file_system.sh | 2 +- 02_build_image.sh | 45 +++++++++++++++++++++-- 04_create_iso.sh | 2 +- README.md | 15 ++++++-- build.sh | 13 ++----- build_in_docker.sh | 10 +----- files/chroot_build.sh | 77 +++++++++++++++++++++++++++++----------- files/grub/grub.cfg | 32 ----------------- 11 files changed, 124 insertions(+), 141 deletions(-) delete mode 100644 .travis.yml delete mode 100644 files/grub/grub.cfg diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 19f40f8..a9aa7c3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -13,18 +13,11 @@ jobs: - name: Configure variables id: variables run: | - sudo apt install curl - VERSION=5.10 - ALTERNATIVE=mbp - LATEST_BUILD=$(curl -s https://mbp-ubuntu-kernel.herokuapp.com/ -L | - grep "linux-image-5.10" | grep ${ALTERNATIVE} | - grep a | cut -d'>' -f2 | cut -d'<' -f1 |sort -r | head -n 1 | cut -d'_' -f1 | - cut -d'-' -f 3-20) - echo "Using kernel ${LATEST_BUILD}" - echo "::set-output name=version::${LATEST_BUILD}" + BUILD=$(date '+%Y%m%d%H%M%S') + echo "::set-output name=build::${BUILD}" - name: Build - run: KERNEL_VERSION=${{ steps.variables.outputs.version }} sudo ./build.sh + run: sudo ./build.sh - name: print sha256sum run: cat output/sha256 @@ -32,7 +25,7 @@ jobs: - name: Upload iso artifact uses: actions/upload-artifact@v2 with: - name: mbp-ubuntu-${{ steps.variables.outputs.version }} + name: mbp-ubuntu-${{ steps.variables.outputs.build }} path: ${{ github.workspace }}/output/* - name: Instructions for putting it back together @@ -41,7 +34,7 @@ jobs: Download all the artifacts, and put them in a folder without other files. Then run:" unzip "*.z??.zip" - cat livecd-${{ steps.variables.outputs.version }}-mbp.z?? > cd.zip + cat livecd-${{ steps.variables.outputs.build }}-mbp.z?? > cd.zip echo unzip cd.zip EOF @@ -50,7 +43,7 @@ jobs: uses: softprops/action-gh-release@v1 with: files: ${{ github.workspace }}/output/* - tag_name: v20.04-${{ steps.variables.outputs.version }} + tag_name: v20.04-${{ steps.variables.outputs.build }} draft: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index b0e16d3..59b82e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ output /.idea +/files/kernels diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 80f4515..0000000 --- a/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -language: bash - -os: - - linux - -services: - - docker - -# branches: -# only: -# - master - -stages: - - test - - build_deploy - -jobs: - include: - - stage: test - name: "YamlLint" - script: | - docker run --rm -v $(pwd):/repo -it alpine:latest /bin/sh -c ' - cd /repo - apk add --no-cache python3 py-pip - pip install yamllint - yamllint . - ' - - stage: test - name: "ShellCheck" - script: | - docker run --rm -v $(pwd):/repo -it alpine:latest /bin/sh -c ' - cd /repo - apk add --no-cache shellcheck bash - shellcheck ./*.sh - shellcheck ./files/*.sh - ' - - stage: build_deploy - name: "Build Ubuntu and Deploy to GitHub Releases" - script: ./build_in_docker.sh - deploy: - provider: releases - api_key: "$GITHUB_TOKEN" - file_glob: true - file: "output/*" - skip_cleanup: true - # yamllint disable-line rule:truthy - on: - tags: true diff --git a/01_build_file_system.sh b/01_build_file_system.sh index e812ad2..335a4a2 100755 --- a/01_build_file_system.sh +++ b/01_build_file_system.sh @@ -14,7 +14,7 @@ mount --bind /dev "${CHROOT_PATH}/dev" mount --bind /run "${CHROOT_PATH}/run" cp -r "${ROOT_PATH}/files" "${CHROOT_PATH}/tmp/setup_files" -chroot "${CHROOT_PATH}" /bin/bash -c "KERNEL_VERSION=${KERNEL_VERSION} /tmp/setup_files/chroot_build.sh" +chroot "${CHROOT_PATH}" /bin/bash -c "/tmp/setup_files/chroot_build.sh" echo >&2 "===]> Info: Cleanup the chroot environment... " # In docker there is no run? diff --git a/02_build_image.sh b/02_build_image.sh index b843809..a37ff41 100755 --- a/02_build_image.sh +++ b/02_build_image.sh @@ -9,15 +9,54 @@ if [ -d "${IMAGE_PATH}" ]; then fi mkdir -p "${IMAGE_PATH}"/{casper,install,isolinux} -cp "${CHROOT_PATH}"/boot/vmlinuz-"${KERNEL_VERSION}" "${IMAGE_PATH}"/casper/vmlinuz -cp "${CHROOT_PATH}"/boot/initrd.img-"${KERNEL_VERSION}" "${IMAGE_PATH}"/casper/initrd echo >&2 "===]> Info: Grub configuration... " # we add an empty file to use it with the search command in grub later on. touch "${IMAGE_PATH}"/ubuntu cp -r "${ROOT_PATH}"/files/preseed "${IMAGE_PATH}"/preseed -cp "${ROOT_PATH}/files/grub/grub.cfg" "${IMAGE_PATH}"/isolinux/grub.cfg +cat < "${IMAGE_PATH}"/isolinux/grub.cfg +search --set=root --file /ubuntu +insmod all_video +EOF + +find "${CHROOT_PATH}"/boot -maxdepth 1 -type f -name 'vmlinuz-*' +find "${CHROOT_PATH}"/boot -maxdepth 1 -type f -name 'initrd*' + +for file in $(find "${CHROOT_PATH}"/boot -maxdepth 1 -type f -name 'vmlinuz-*' | grep t2 | cut -d'/' -f 6 | cut -d'-' -f2-10 | sort); do + echo "==> Adding $file" + cp "${CHROOT_PATH}/boot/vmlinuz-${file}" "${IMAGE_PATH}/casper/vmlinuz-${file}" + cp "${CHROOT_PATH}/boot/initrd.img-${file}" "${IMAGE_PATH}/casper/initrd-${file}" + cat <> "${IMAGE_PATH}"/isolinux/grub.cfg +submenu "Ubuntu, with Linux $file" { + + menuentry "Try Ubuntu FS without installing" { + linux /casper/vmlinuz-$file file=/cdrom/preseed/mbp.seed boot=casper ro efi=noruntime pcie_ports=compat --- + initrd /casper/initrd-$file + } + menuentry "Try Ubuntu FS without installing (blacklist=thunderbolt)" { + linux /casper/vmlinuz-$file file=/cdrom/preseed/mbp.seed boot=casper ro efi=noruntime pcie_ports=compat --- modprobe.blacklist=thunderbolt + initrd /casper/initrd-$file + } + menuentry "Install Ubuntu FS" { + linux /casper/vmlinuz-$file preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity efi=noruntime pcie_ports=compat --- + initrd /casper/initrd-$file + } + menuentry "Install Ubuntu FS (blacklist=thunderbolt)" { + linux /casper/vmlinuz-$file preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity efi=noruntime pcie_ports=compat --- modprobe.blacklist=thunderbolt + initrd /casper/initrd-$file + } + menuentry "Check disc for defects" { + linux /casper/vmlinuz-$file boot=casper integrity-check efi=noruntime enforcing=0 efi=noruntime pcie_ports=compat --- + initrd /casper/initrd-$file + } + menuentry "Check disc for defects (blacklist=thunderbolt)" { + linux /casper/vmlinuz-$file boot=casper integrity-check efi=noruntime enforcing=0 efi=noruntime pcie_ports=compat --- modprobe.blacklist=thunderbolt + initrd /casper/initrd-$file + } +} +EOF +done echo >&2 "===]> Info: Compress the chroot... " cd "${WORKING_PATH}" diff --git a/04_create_iso.sh b/04_create_iso.sh index e039b74..231ad75 100755 --- a/04_create_iso.sh +++ b/04_create_iso.sh @@ -23,7 +23,7 @@ xorriso -as mkisofs \ -no-emul-boot \ -isohybrid-mbr "${ROOT_PATH}/files/isohdpfx.bin" \ -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \ - -output "${ROOT_PATH}/ubuntu-20.04-${KERNEL_VERSION}.iso" \ + -output "${ROOT_PATH}/ubuntu-20.04.iso" \ -graft-points \ "." \ /boot/grub/bios.img=isolinux/bios.img \ diff --git a/README.md b/README.md index 1000ed8..b95dfa6 100644 --- a/README.md +++ b/README.md @@ -17,14 +17,21 @@ I'm using the Kernel from - Using additional drivers: - [Apple T2 (apple-bce) (audio, keyboard, touchpad)](https://github.com/t2linux/apple-bce-drv) - [Touchbar (apple-ibridge, apple-ib-tb, apple-ib-als)](https://github.com/t2linux/apple-ib-drv) +- [mbpfan](https://github.com/networkException/mbpfan) Bootloader is configure correctly out of the box. No workaround needed. -## Before I begin, what version should I use? "mbp" or "mbp-16x-wifi"? +## Which kernel to choose -The difference between the two is that the mbp-16x-wifi version includes a different version of the brcmfmac wifi driver, made by corellium for M1 macs. This version of the wifi driver works on some models that the brcmfmac driver included with the mbp version doesn't support. Refer to the table on [this page](https://wiki.t2linux.org/guides/wifi/) to figure out which versions will work (Look at the "Firmware Options" column, Mojave means you can use the "mbp" version, and Big Sur means you can use the "mbp-16x-wifi" version). +I've pre installed several different kernel, to allow better support to different hardware. -**!! Please note that as of the v20.04-5.10.52 release, the mbp-16x-wifi iso does not support wifi on models with the BCM4377 chipset. For now, you can install a kernel from [here](https://github.com/AdityaGarg8/mbp-16.x-ubuntu-kernel/releases/tag/v5.13.12-1) after installing ubuntu if you have the BCM4377 chipset.** +If your macbook came with Big Sur preinstalled, you should use a bigsur version of kernel. + +If your macbook came with mojave, you should use a mojave version of the kernel. + +This will allow you to activate wifi in your macbook. See [this page for more information about wifi drivers](https://wiki.t2linux.org/guides/wifi/) + +I've recommend starting with the HWE Kernel. That one comes from Ubuntu own repository and I have had great performance with it. ## Installation @@ -50,6 +57,8 @@ sudo gdd bs=4M if=ubuntu-20.04-5.6.10-mbp.iso of=/dev/diskX conv=fdatasync statu 12. Start again using the option key. Select the new efi boot. 13. Enjoy. +See for more details. + ## Configuration - See diff --git a/build.sh b/build.sh index 12fea88..08188ac 100755 --- a/build.sh +++ b/build.sh @@ -5,10 +5,6 @@ ROOT_PATH=$(pwd) WORKING_PATH=/root/work CHROOT_PATH="${WORKING_PATH}/chroot" IMAGE_PATH="${WORKING_PATH}/image" -if [ -z "${KERNEL_VERSION}" ]; then - echo "Kernel version is undefined, fallback set." - KERNEL_VERSION=5.10.52-mbp -fi if [ -d "$WORKING_PATH" ]; then rm -rf "$WORKING_PATH" @@ -35,7 +31,7 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::=" isolinux \ syslinux -echo >&2 "===]> Info: Start building ${KERNEL_VERSION}... " +echo >&2 "===]> Info: Start building... " echo >&2 "===]> Info: Build Ubuntu FS... " /bin/bash -c " @@ -43,7 +39,6 @@ echo >&2 "===]> Info: Build Ubuntu FS... " WORKING_PATH=${WORKING_PATH} \\ CHROOT_PATH=${CHROOT_PATH} \\ IMAGE_PATH=${IMAGE_PATH} \\ - KERNEL_VERSION=${KERNEL_VERSION}\\ ${ROOT_PATH}/01_build_file_system.sh " @@ -53,7 +48,6 @@ echo >&2 "===]> Info: Build Image FS... " WORKING_PATH=${WORKING_PATH} \\ CHROOT_PATH=${CHROOT_PATH} \\ IMAGE_PATH=${IMAGE_PATH} \\ - KERNEL_VERSION=${KERNEL_VERSION} \\ ${ROOT_PATH}/02_build_image.sh " @@ -69,17 +63,16 @@ echo >&2 "===]> Info: Create ISO... " ROOT_PATH=${ROOT_PATH} \\ IMAGE_PATH=${IMAGE_PATH} \\ CHROOT_PATH=${CHROOT_PATH} \\ - KERNEL_VERSION=${KERNEL_VERSION} \\ ${ROOT_PATH}/04_create_iso.sh " livecd_exitcode=$? if [ "${livecd_exitcode}" -ne 0 ]; then - echo "Error building ${KERNEL_VERSION}" + echo "Error building" exit "${livecd_exitcode}" fi ### Zip iso and split it into multiple parts - github max size of release attachment is 2GB, where ISO is sometimes bigger than that cd "${ROOT_PATH}" -zip -s 1500m "${ROOT_PATH}/output/livecd-${KERNEL_VERSION}.zip" "${ROOT_PATH}/ubuntu-20.04-${KERNEL_VERSION}.iso" +zip -s 1500m "${ROOT_PATH}/output/livecd.zip" "${ROOT_PATH}/ubuntu-20.04.iso" ### Calculate sha256 sums of built ISO sha256sum "${ROOT_PATH}"/*.iso >"${ROOT_PATH}/output/sha256" diff --git a/build_in_docker.sh b/build_in_docker.sh index 045fc46..acf1856 100755 --- a/build_in_docker.sh +++ b/build_in_docker.sh @@ -6,18 +6,10 @@ DOCKER_IMAGE=ubuntu:20.04 docker pull ${DOCKER_IMAGE} -VERSION=5 -ALTERNATIVE=mbp -LATEST_BUILD=$(curl -s https://mbp-ubuntu-kernel.herokuapp.com/ -L | - grep "linux-image-${VERSION}" | grep ${ALTERNATIVE} | - grep a | cut -d'>' -f2 | cut -d'<' -f1 |sort -r | head -n 1 | cut -d'_' -f1 | - cut -d'-' -f 3-20) -echo "Using kernel ${LATEST_BUILD}" - docker run \ --privileged \ --rm \ -t \ -v "$(pwd)":/repo \ ${DOCKER_IMAGE} \ - /bin/bash -c "cd /repo && KERNEL_VERSION=${LATEST_BUILD} ./build.sh" + /bin/bash -c "cd /repo && ./build.sh" diff --git a/files/chroot_build.sh b/files/chroot_build.sh index 8c9ba51..33387ae 100755 --- a/files/chroot_build.sh +++ b/files/chroot_build.sh @@ -43,6 +43,7 @@ ln -s /bin/true /sbin/initctl echo >&2 "===]> Info: Install packages needed for Live System... " +# todo: Install the latest kernel automatically export DEBIAN_FRONTEND=noninteractive apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ ubuntu-standard \ @@ -60,20 +61,42 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::=" locales \ initramfs-tools \ binutils \ - linux-generic-hwe-20.04 \ - linux-headers-generic-hwe-20.04 \ + linux-firmware \ grub-efi-amd64-signed \ - "linux-image-${KERNEL_VERSION}" \ - "linux-headers-${KERNEL_VERSION}" \ intel-microcode \ + linux-headers-5.11.22-t2-hwe-bigsur \ + linux-headers-5.11.22-t2-hwe-mojave \ + linux-headers-5.12.19-t2-a-bigsur \ + linux-headers-5.12.19-t2-a-mojave \ + linux-headers-5.13.15-t2-j-bigsur \ + linux-headers-5.13.15-t2-j-mojave \ + linux-image-5.11.22-t2-hwe-bigsur \ + linux-image-5.11.22-t2-hwe-mojave \ + linux-image-5.12.19-t2-a-bigsur \ + linux-image-5.12.19-t2-a-mojave \ + linux-image-5.13.15-t2-j-bigsur \ + linux-image-5.13.15-t2-j-mojave \ thermald +echo >&2 "===]> Info: Add firmwares" +for file in skl_guc_49.0.1.bin bxt_guc_49.0.1.bin kbl_guc_49.0.1.bin glk_guc_49.0.1.bin kbl_guc_49.0.1.bin kbl_guc_49.0.1.bin cml_guc_49.0.1.bin icl_guc_49.0.1.bin ehl_guc_49.0.1.bin ehl_guc_49.0.1.bin tgl_huc_7.5.0.bin tgl_guc_49.0.1.bin tgl_huc_7.5.0.bin tgl_guc_49.0.1.bin tgl_huc_7.5.0.bin tgl_guc_49.0.1.bin dg1_dmc_ver2_02.bin +do +curl -L https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/i915/$file \ + --output /lib/firmware/i915/$file +done + +if [ -d /tmp/setup_files/kernels ]; then + echo >&2 "===]> Info: Install patched kernels... " + dpkg -i /tmp/setup_files/kernels/*.deb +fi + echo >&2 "===]> Info: Install window manager... " apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ plymouth-theme-ubuntu-logo \ ubuntu-desktop-minimal \ ubuntu-gnome-wallpapers \ + netplan.io \ snapd echo >&2 "===]> Info: Install Graphical installer... " @@ -87,7 +110,7 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::=" echo >&2 "===]> Info: Install useful applications... " -apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ +apt-get install -y --no-install-recommends -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ git \ curl \ nano \ @@ -112,17 +135,17 @@ git clone --single-branch --branch ${APPLE_BCE_DRIVER_BRANCH_NAME} ${APPLE_BCE_D git -C /usr/src/"${APPLE_BCE_DRIVER_MODULE_NAME}-${APPLE_BCE_DRIVER_MODULE_VERSION}" checkout "${APPLE_BCE_DRIVER_COMMIT_HASH}" cat << EOF > /usr/src/${APPLE_BCE_DRIVER_MODULE_NAME}-${APPLE_BCE_DRIVER_MODULE_VERSION}/dkms.conf -PACKAGE_NAME=apple-bce -PACKAGE_VERSION=0.2 +PACKAGE_NAME="apple-bce" +PACKAGE_VERSION="${APPLE_BCE_DRIVER_MODULE_VERSION}" +MAKE[0]="make KVERSION=\$kernelver" CLEAN="make clean" -MAKE="make" BUILT_MODULE_NAME[0]="apple-bce" -DEST_MODULE_LOCATION[0]="/updates" +DEST_MODULE_LOCATION[0]="/kernel/drivers/misc" AUTOINSTALL="yes" -REMAKE_INITRD="yes" EOF -dkms install -m "${APPLE_BCE_DRIVER_MODULE_NAME}" -v "${APPLE_BCE_DRIVER_MODULE_VERSION}" -k "${KERNEL_VERSION}" +dkms install -m "${APPLE_BCE_DRIVER_MODULE_NAME}" -v "${APPLE_BCE_DRIVER_MODULE_VERSION}" --all + printf '\n### apple-bce start ###\napple-bce\n### apple-bce end ###' >>/etc/modules-load.d/apple-bce.conf printf '\n### apple-bce start ###\nhapple-bce\n### apple-bce end ###' >>/etc/initramfs-tools/modules @@ -135,8 +158,10 @@ APPLE_IB_DRIVER_MODULE_VERSION=0.1 git clone --single-branch --branch ${APPLE_IB_DRIVER_BRANCH_NAME} ${APPLE_IB_DRIVER_GIT_URL} \ /usr/src/"${APPLE_IB_DRIVER_MODULE_NAME}-${APPLE_IB_DRIVER_MODULE_VERSION}" git -C /usr/src/"${APPLE_IB_DRIVER_MODULE_NAME}-${APPLE_IB_DRIVER_MODULE_VERSION}" checkout "${APPLE_IB_DRIVER_COMMIT_HASH}" -dkms install -m "${APPLE_IB_DRIVER_MODULE_NAME}" -v "${APPLE_IB_DRIVER_MODULE_VERSION}" -k "${KERNEL_VERSION}" -printf '\n### applespi start ###\napple_ib_tb\napple_ib_als\n### applespi end ###' >>/etc/modules-load.d/applespi.conf + +dkms install -m "${APPLE_IB_DRIVER_MODULE_NAME}" -v "${APPLE_IB_DRIVER_MODULE_VERSION}" --all + +printf '\n### applespi start ###\napple_ib_tb\napple_ib_als\n### applespi end ###' >> /etc/modules-load.d/applespi.conf printf '\n# display f* key in touchbar\noptions apple-ib-tb fnmode=2\n' >> /etc/modprobe.d/apple-touchbar.conf ## Add optional dkms for brcm80211-mbp16x @@ -158,6 +183,9 @@ printf '\n# display f* key in touchbar\noptions apple-ib-tb fnmode=2\n' >> /etc #cd /tmp #rm -rf *55.zip 22* +echo >&2 "===]> Debug dkms status" +dkms status + echo >&2 "===]> Configure amdgpu" cat << EOF > /etc/udev/rules.d/30-amdgpu-pm.rules KERNEL=="card0", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="high" @@ -166,8 +194,18 @@ EOF echo >&2 "===]> Info: Update initramfs... " ## Add custom drivers to be loaded at boot -/usr/sbin/depmod -a "${KERNEL_VERSION}" -update-initramfs -u -v -k "${KERNEL_VERSION}" +for kernel in $(dpkg -l | grep linux-image | grep ii | grep t2 | cut -d' ' -f3|cut -d'-' -f3-10); do + echo "==> Adding $kernel" + /usr/sbin/depmod -a "$kernel" + update-initramfs -u -v -k "$kernel" +done + +#echo >&2 "===]> Info: install mpbfan ... " +#git clone https://github.com/networkException/mbpfan /tmp/mbpfan +#cd /tmp/mbpfan +#make install +#cp mbpfan.service /etc/systemd/system/ +#systemctl enable mbpfan.service echo >&2 "===]> Info: Remove unused applications ... " @@ -185,13 +223,12 @@ apt-get purge -y -qq \ vim \ binutils \ linux-generic \ - linux-headers-5.4.0-28 \ - linux-headers-5.4.0-28-generic \ + '^linux-headers-5\.4\..*' \ linux-headers-generic \ - linux-image-5.4.0-28-generic \ + '^linux-image-5\.4\..*' \ linux-image-generic \ - linux-modules-5.4.0-28-generic \ - linux-modules-extra-5.4.0-28-generic + '^linux-modules-5\.4\..*' \ + '^linux-modules-extra-5\.4\..*' apt-get autoremove -y diff --git a/files/grub/grub.cfg b/files/grub/grub.cfg deleted file mode 100644 index d36ad48..0000000 --- a/files/grub/grub.cfg +++ /dev/null @@ -1,32 +0,0 @@ - -search --set=root --file /ubuntu - -insmod all_video - -set default="0" -set timeout=30 - -menuentry "Try Ubuntu FS without installing" { - linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro efi=noruntime pcie_ports=compat acpi=force --- - initrd /casper/initrd -} -menuentry "Try Ubuntu FS without installing (blacklist=thunderbolt)" { - linux /casper/vmlinuz file=/cdrom/preseed/mbp.seed boot=casper ro efi=noruntime pcie_ports=compat acpi=force --- modprobe.blacklist=thunderbolt - initrd /casper/initrd -} -menuentry "Install Ubuntu FS" { - linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity efi=noruntime pcie_ports=compat acpi=force --- - initrd /casper/initrd -} -menuentry "Install Ubuntu FS (blacklist=thunderbolt)" { - linux /casper/vmlinuz preseed/file=/cdrom/preseed/mbp.seed boot=casper only-ubiquity efi=noruntime pcie_ports=compat acpi=force --- modprobe.blacklist=thunderbolt - initrd /casper/initrd -} -menuentry "Check disc for defects" { - linux /casper/vmlinuz boot=casper integrity-check efi=noruntime enforcing=0 efi=noruntime pcie_ports=compat acpi=force --- - initrd /casper/initrd -} -menuentry "Check disc for defects (blacklist=thunderbolt)" { - linux /casper/vmlinuz boot=casper integrity-check efi=noruntime enforcing=0 efi=noruntime pcie_ports=compat --- modprobe.blacklist=thunderbolt - initrd /casper/initrd -} From 91ed59cc6ea0cf543ac38729b886127a906f59ab Mon Sep 17 00:00:00 2001 From: marcosfad Date: Sun, 19 Sep 2021 01:12:17 +0200 Subject: [PATCH 3/6] Force linux-headers link --- files/chroot_build.sh | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/files/chroot_build.sh b/files/chroot_build.sh index 33387ae..47c168c 100755 --- a/files/chroot_build.sh +++ b/files/chroot_build.sh @@ -135,16 +135,24 @@ git clone --single-branch --branch ${APPLE_BCE_DRIVER_BRANCH_NAME} ${APPLE_BCE_D git -C /usr/src/"${APPLE_BCE_DRIVER_MODULE_NAME}-${APPLE_BCE_DRIVER_MODULE_VERSION}" checkout "${APPLE_BCE_DRIVER_COMMIT_HASH}" cat << EOF > /usr/src/${APPLE_BCE_DRIVER_MODULE_NAME}-${APPLE_BCE_DRIVER_MODULE_VERSION}/dkms.conf -PACKAGE_NAME="apple-bce" +PACKAGE_NAME="${APPLE_BCE_DRIVER_MODULE_NAME}" PACKAGE_VERSION="${APPLE_BCE_DRIVER_MODULE_VERSION}" MAKE[0]="make KVERSION=\$kernelver" CLEAN="make clean" -BUILT_MODULE_NAME[0]="apple-bce" +BUILT_MODULE_NAME[0]="${APPLE_BCE_DRIVER_MODULE_NAME}" DEST_MODULE_LOCATION[0]="/kernel/drivers/misc" AUTOINSTALL="yes" EOF -dkms install -m "${APPLE_BCE_DRIVER_MODULE_NAME}" -v "${APPLE_BCE_DRIVER_MODULE_VERSION}" --all +while IFS= read -r kernel; do + echo "==> Debug: Adding $kernel" + rm -rf "/lib/modules/$kernel/build" + ln -sf "/usr/src/linux-headers-$kernel" "/lib/modules/$kernel/build" + dkms --verbose install -m "${APPLE_BCE_DRIVER_MODULE_NAME}" -v "${APPLE_BCE_DRIVER_MODULE_VERSION}" -k "$kernel" + if [ -f "/var/lib/dkms/${APPLE_BCE_DRIVER_MODULE_NAME}/${APPLE_BCE_DRIVER_MODULE_VERSION}/build/make.log" ]; then + cat "/var/lib/dkms/${APPLE_BCE_DRIVER_MODULE_NAME}/${APPLE_BCE_DRIVER_MODULE_VERSION}/build/make.log" + fi +done < <(dpkg -l | grep linux-image | grep t2 | grep ii | grep t2 | cut -d' ' -f3|cut -d'-' -f3-10) printf '\n### apple-bce start ###\napple-bce\n### apple-bce end ###' >>/etc/modules-load.d/apple-bce.conf printf '\n### apple-bce start ###\nhapple-bce\n### apple-bce end ###' >>/etc/initramfs-tools/modules @@ -159,7 +167,18 @@ git clone --single-branch --branch ${APPLE_IB_DRIVER_BRANCH_NAME} ${APPLE_IB_DRI /usr/src/"${APPLE_IB_DRIVER_MODULE_NAME}-${APPLE_IB_DRIVER_MODULE_VERSION}" git -C /usr/src/"${APPLE_IB_DRIVER_MODULE_NAME}-${APPLE_IB_DRIVER_MODULE_VERSION}" checkout "${APPLE_IB_DRIVER_COMMIT_HASH}" -dkms install -m "${APPLE_IB_DRIVER_MODULE_NAME}" -v "${APPLE_IB_DRIVER_MODULE_VERSION}" --all +echo >&2 "===]> Debug: Add apple-ib-drv ... " +cat /usr/src/"${APPLE_IB_DRIVER_MODULE_NAME}-${APPLE_IB_DRIVER_MODULE_VERSION}"/dkms.conf +while IFS= read -r kernel; do + echo "==> Debug: Adding $kernel" + rm -rf "/lib/modules/$kernel/build" + ln -sf "/usr/src/linux-headers-$kernel" "/lib/modules/$kernel/build" + dkms --verbose install -m "${APPLE_IB_DRIVER_MODULE_NAME}" -v "${APPLE_IB_DRIVER_MODULE_VERSION}" -k "$kernel" + if [ -f "/var/lib/dkms/${APPLE_IB_DRIVER_MODULE_NAME}/${APPLE_IB_DRIVER_MODULE_VERSION}/build/make.log" ]; then + cat "/var/lib/dkms/${APPLE_IB_DRIVER_MODULE_NAME}/${APPLE_IB_DRIVER_MODULE_VERSION}/build/make.log" + fi +done < <(dpkg -l | grep linux-image | grep t2 | grep ii | grep t2 | cut -d' ' -f3|cut -d'-' -f3-10) + printf '\n### applespi start ###\napple_ib_tb\napple_ib_als\n### applespi end ###' >> /etc/modules-load.d/applespi.conf printf '\n# display f* key in touchbar\noptions apple-ib-tb fnmode=2\n' >> /etc/modprobe.d/apple-touchbar.conf @@ -209,7 +228,7 @@ done echo >&2 "===]> Info: Remove unused applications ... " -apt-get purge -y -qq \ +apt-get purge \ transmission-gtk \ transmission-common \ gnome-mahjongg \ @@ -218,10 +237,7 @@ apt-get purge -y -qq \ aisleriot \ hitori \ xiterm+thai \ - make \ - gcc \ vim \ - binutils \ linux-generic \ '^linux-headers-5\.4\..*' \ linux-headers-generic \ From a1668a6a8fd9bed2246ec865008130e085951aed Mon Sep 17 00:00:00 2001 From: marcosfad Date: Sat, 20 Nov 2021 15:53:34 +0100 Subject: [PATCH 4/6] Fix build --- files/chroot_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/chroot_build.sh b/files/chroot_build.sh index 47c168c..4293bb7 100755 --- a/files/chroot_build.sh +++ b/files/chroot_build.sh @@ -110,7 +110,7 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::=" echo >&2 "===]> Info: Install useful applications... " -apt-get install -y --no-install-recommends -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ +apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \ git \ curl \ nano \ From bef7b9767aa288d6a3052191e0ad781ff28984e0 Mon Sep 17 00:00:00 2001 From: marcosfad Date: Sat, 20 Nov 2021 16:59:44 +0100 Subject: [PATCH 5/6] Fix build --- files/chroot_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/chroot_build.sh b/files/chroot_build.sh index 4293bb7..2396908 100755 --- a/files/chroot_build.sh +++ b/files/chroot_build.sh @@ -228,7 +228,7 @@ done echo >&2 "===]> Info: Remove unused applications ... " -apt-get purge \ +apt-get purge -y \ transmission-gtk \ transmission-common \ gnome-mahjongg \ From 9a0609fb9889ad4d29973fc0ff3c6a9667531a3d Mon Sep 17 00:00:00 2001 From: marcosfad Date: Sat, 20 Nov 2021 17:07:23 +0100 Subject: [PATCH 6/6] Fix build --- files/chroot_build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/chroot_build.sh b/files/chroot_build.sh index 2396908..51d875a 100755 --- a/files/chroot_build.sh +++ b/files/chroot_build.sh @@ -64,6 +64,7 @@ apt-get install -y -qq -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::=" linux-firmware \ grub-efi-amd64-signed \ intel-microcode \ + linux-headers-azure \ linux-headers-5.11.22-t2-hwe-bigsur \ linux-headers-5.11.22-t2-hwe-mojave \ linux-headers-5.12.19-t2-a-bigsur \ @@ -239,6 +240,7 @@ apt-get purge -y \ xiterm+thai \ vim \ linux-generic \ + linux-headers-azure \ '^linux-headers-5\.4\..*' \ linux-headers-generic \ '^linux-image-5\.4\..*' \