diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f78ce880b8a6..8495c516a374f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,118 +45,9 @@ jobs: fi echo "Done" - - name: Generate kernel modules package - run: | - echo "Check kernel version" - IFS=- read -r var1 var2 var3 version <<< ${{ env.TAG_VERSION }} - echo "Kernel verison: $version" - cd linux - echo "Download kernel modules package installer script" - wget https://gist.githubusercontent.com/Nevuly/cf1d17db72cdfde6ed149461eef0215c/raw/e8a4fb449aa7606377a789bcc08c7eb667296d18/modules-install.sh - chmod 775 modules-install.sh - echo "Generate kernel modules tarball" - mkdir -p ${{ matrix.image-name }}-modules_install && make modules_install INSTALL_MOD_PATH=${{ matrix.image-name }}-modules_install - cp modules-install.sh ${{ matrix.image-name }}-modules_install/ - rm -rf ${{ matrix.image-name }}-modules_install/lib/modules/$version-WSL2-STABLE+/build - echo "$version" >> ${{ matrix.image-name }}-modules_install/kernel_version.txt - tar -czf ${{ matrix.image-name }}-modules_install.tar.gz ${{ matrix.image-name }}-modules_install && mv ${{ matrix.image-name }}-modules_install.tar.gz ../ - echo "Done" - - - name: Generate kernel optional package (headers, docs) - run: | - echo "Check kernel version" - IFS=- read -r var1 var2 var3 version <<< ${{ env.TAG_VERSION }} - echo "Kernel verison: $version" - cd linux - echo "Download kernel optionals package installer script" - wget https://gist.githubusercontent.com/Nevuly/b203682442ba2c6cf4cad3b35afb6f4b/raw/72cffc2e83a6c9298667a79c91cfe53bbcfcc6e1/optionals-install.sh - chmod 775 optionals-install.sh - echo "Generate kernel headers tarball" - mkdir -p ${{ matrix.image-name }}-optional_install/build - export optional_path=${{ matrix.image-name }}-optional_install/build - install -Dt "$optional_path" -m644 Makefile Module.symvers System.map vmlinux - install -Dt "$optional_path/kernel" -m644 kernel/Makefile - if [ ${{ matrix.arch }} == "x86" ] - then - install -Dt "$optional_path/arch/x86" -m644 arch/x86/Makefile - else - install -Dt "$optional_path/arch/arm64" -m644 arch/arm64/Makefile - fi - cp -t "$optional_path" -a scripts - if [ ${{ matrix.arch }} == "x86" ] - then - install -Dt "$optional_path/tools/objtool" tools/objtool/objtool - install -Dt "$optional_path/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids - fi - cp -t "$optional_path" -a include - if [ ${{ matrix.arch }} == "x86" ] - then - cp -t "$optional_path/arch/x86" -a arch/x86/include - install -Dt "$optional_path/arch/x86/kernel" -m644 arch/x86/kernel/asm-offsets.s - else - cp -t "$optional_path/arch/arm64" -a arch/arm64/include - install -Dt "$optional_path/arch/arm64/kernel" -m644 arch/arm64/kernel/asm-offsets.s - mkdir -p "$optional_path/arch/arm" - cp -t "$optional_path/arch/arm" -a arch/arm/include - fi - install -Dt "$optional_path/drivers/md" -m644 drivers/md/*.h - install -Dt "$optional_path/net/mac80211" -m644 net/mac80211/*.h - install -Dt "$optional_path/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h - install -Dt "$optional_path/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h - install -Dt "$optional_path/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h - install -Dt "$optional_path/drivers/media/tuners" -m644 drivers/media/tuners/*.h - install -Dt "$optional_path/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h - find . -name 'Kconfig*' -exec install -Dm644 {} "$optional_path/{}" \; - export arch - if [ ${{ matrix.arch }} == "x86" ] - then - for arch in "$optional_path"/arch/*/; do - [[ $arch = */x86/ ]] && continue - echo "Removing $(basename "$arch")" - rm -r "$arch" - done - else - for arch in "$optional_path"/arch/*/; do - [[ $arch = */arm64/ ]] && continue - echo "Removing $(basename "$arch")" - rm -r "$arch" - done - fi - rm -r $optional_path/Documentation - find -L "$optional_path" -type l -printf 'Removing %P\n' -delete - find -L "$optional_path" -type f -name '*.o' -printf 'Removing %P\n' -delete - export file - export STRIP_SHARED - export STRIP_STATIC - export STRIP_BINARIES - while read -rd '' $file; do - case "$(file -Sib "$file")" in - application/x-sharedlib\;*) - strip -v $STRIP_SHARED $file ;; - application/x-archive\;*) - strip -v $STRIP_STATIC $file ;; - application/x-executable\;*) - strip -v $STRIP_BINARIES $file ;; - application/x-pie-executable\;*) - strip -v $STRIP_SHARED $file ;; - esac - done < <(find "$optional_path" -type f -perm -u+x ! -name vmlinux -print0) - if [ ${{ matrix.arch }} == "x86" ] - then - strip -v $STRIP_STATIC "$optional_path/vmlinux" - fi - echo "Generate kernel documentations tarball" - cp -r Documentation $optional_path/Documentation - cp optionals-install.sh ${{ matrix.image-name }}-optional_install/ - echo "$version" >> ${{ matrix.image-name }}-optional_install/kernel_version.txt - tar -czf ${{ matrix.image-name }}-optional_install.tar.gz ${{ matrix.image-name }}-optional_install && mv ${{ matrix.image-name }}-optional_install.tar.gz ../ - echo "Done" - - name: Generate sha256 Checksum run: | sha256sum ${{ matrix.image-name }} > ${{ matrix.image-name }}.sha256 - sha256sum ${{ matrix.image-name }}-modules_install.tar.gz > ${{ matrix.image-name }}-modules_install.sha256 - sha256sum ${{ matrix.image-name }}-optional_install.tar.gz > ${{ matrix.image-name }}-optional_install.sha256 - name: Upload kernel Images uses: actions/upload-artifact@main @@ -165,10 +56,6 @@ jobs: path: | ${{ matrix.image-name }} ${{ matrix.image-name }}.sha256 - ${{ matrix.image-name }}-modules_install.tar.gz - ${{ matrix.image-name }}-modules_install.sha256 - ${{ matrix.image-name }}-optional_install.tar.gz - ${{ matrix.image-name }}-optional_install.sha256 release: runs-on: ubuntu-latest @@ -190,6 +77,7 @@ jobs: body: | **NOTICE** ARM64 kernel has not been tested. If you have any issues, please leave an issue on the [Issues tab](https://github.com/Nevuly/WSL2-Rolling-Kernel-Issue/issues)! + This version not included kernel modules and kernel optionals temporarily. **How to apply this kernel?** Before you try to apply this kernel, You **MUST** shutdown your WSL. (wsl --shutdown)