Skip to content

Commit

Permalink
chore: Update build scripts for lkms and modules
Browse files Browse the repository at this point in the history
  • Loading branch information
wjz304 committed Aug 14, 2024
1 parent 1cffe4a commit 9be78df
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 166 deletions.
123 changes: 0 additions & 123 deletions .github/workflows/addons-eudev.yml

This file was deleted.

44 changes: 24 additions & 20 deletions .github/workflows/cks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,41 +80,43 @@ jobs:
exit 1
fi
. rp-modules/compile-ck.sh
echo "----------------- Env -----------------"
makeEnvDeploy ${ROOT_PATH} ${VERSION} ${PLATFORM}
. ${ROOT_PATH}/rp-modules/compile-ck.sh
echo "-------------- Make Kernel -------------"
echo "makeEnvDeploy"
makeEnvDeploy "${ROOT_PATH}" "${VERSION}" "${PLATFORM}"
echo "makekernel"
if [ -n "${CONFIG}" ]; then
if [ -f linux_dsm_epyc7002/synology/synoconfigs/${PLATFORM}_${CONFIG} ]; then
cp -f linux_dsm_epyc7002/synology/synoconfigs/${PLATFORM}_${CONFIG} linux_dsm_epyc7002/synology/synoconfigs/${PLATFORM}
if [ -f "${ROOT_PATH}/linux_dsm_epyc7002/synology/synoconfigs/${PLATFORM}_${CONFIG}" ]; then
cp -f "${ROOT_PATH}/linux_dsm_epyc7002/synology/synoconfigs/${PLATFORM}_${CONFIG}" "${ROOT_PATH}/linux_dsm_epyc7002/synology/synoconfigs/${PLATFORM}"
else
echo "Config ${PLATFORM}_${CONFIG} does not exist."
exit 1
fi
fi
makekernel ${ROOT_PATH} ${VERSION} ${PLATFORM} linux_dsm_epyc7002 output
makekernel "${ROOT_PATH}" "${VERSION}" "${PLATFORM}" "${ROOT_PATH}/linux_dsm_epyc7002" "${ROOT_PATH}/output"
echo "-------------- Make modules ------------"
makemodules ${ROOT_PATH} ${VERSION} ${PLATFORM} linux_dsm_epyc7002 rp-modules/src/5.10.55-ck modules
cp -rf modules/* output
echo "makemodules"
KVER="$(getKver "${ROOT_PATH}" "${VERSION}" "${PLATFORM}" "${ROOT_PATH}/linux_dsm_epyc7002")"
cp -f "${ROOT_PATH}/rp-modules/src/${KVER}-ck/defines.${PLATFORM}" "${ROOT_PATH}/rp-modules/src/${KVER}-ck/defines"
makemodules "${ROOT_PATH}" "${VERSION}" "${PLATFORM}" "${ROOT_PATH}/linux_dsm_epyc7002" "${ROOT_PATH}/rp-modules/src/${KVER}-ck" "${ROOT_PATH}/modules"
cp -rf "${ROOT_PATH}/modules/"* "${ROOT_PATH}/output"
if [ ! "${CONFIG}" = "drm" ]; then
echo "--------------- Make i915 --------------"
makei915 ${ROOT_PATH} ${VERSION} ${PLATFORM} linux_dsm_epyc7002 intel-gpu-i915-backports i915
cp -rf i915/* output
echo "makei915"
makei915 "${ROOT_PATH}" "${VERSION}" "${PLATFORM}" "${ROOT_PATH}/linux_dsm_epyc7002" "${ROOT_PATH}/intel-gpu-i915-backports" "${ROOT_PATH}/i915"
cp -rf "${ROOT_PATH}/i915/"* "${ROOT_PATH}/output"
fi
- name: Tar to Artifacts
run: |
. rp-modules/compile-ck.sh
ROOT_PATH=${{ github.workspace }}
VERSION=${{ matrix.version }}
PLATFORM=${{ matrix.platform }}
KVER="$(getKver "${ROOT_PATH}" "${VERSION}" "${PLATFORM}" "linux_dsm_epyc7002")"
[ -z "${KVER}" ] && exit 1
. ${ROOT_PATH}/rp-modules/compile-ck.sh
KVER="$(getKver "${ROOT_PATH}" "${VERSION}" "${PLATFORM}" "linux_dsm_epyc7002")"
if [ "${PLATFORM}" = "epyc7002" ]; then
PARTY3RD_PATH="${ROOT_PATH}/rr-cks/thirdparty/${PLATFORM}-${VERSION}-${KVER}"
else
Expand Down Expand Up @@ -201,11 +203,13 @@ jobs:

- name: firmware
run: |
mkdir -p firmware
ROOT_PATH=${{ github.workspace }}
mkdir -p ${ROOT_PATH}/firmware
echo "copy 3rd modules"
PARTY3RD_PATH="${{ github.workspace }}/rr-cks/thirdparty/firmware"
cp -rf ${PARTY3RD_PATH}/* firmware/
PARTY3RD_PATH="${ROOT_PATH}/rr-cks/thirdparty/firmware"
cp -rf ${PARTY3RD_PATH}/* ${ROOT_PATH}/firmware/
echo "extract all modules"
for F in output/*.tgz; do
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/lkms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ jobs:
# # checkout 6.2.4
# - version: 6.2
# platform: grantley
# # checkout 6.2.4
## - version: 6.2
## platform: kvmx64
# ## checkout 6.2.4
# ## - version: 6.2
# ## platform: kvmx64
# # checkout 6.2.4
# - version: 6.2
# platform: purley
Expand Down Expand Up @@ -136,11 +136,17 @@ jobs:
- name: Make lkms
run: |
. rr-lkms/compile.sh
echo "----------------- Env -----------------"
makeEnvDeploy ${{ github.workspace }} ${{ matrix.version }} ${{ matrix.platform }}
echo "----------------- Make -----------------"
makelkms ${{ github.workspace }} ${{ matrix.version }} ${{ matrix.platform }} rr-lkms output
ROOT_PATH=${{ github.workspace }}
VERSION=${{ matrix.version }}
PLATFORM=${{ matrix.platform }}
. ${ROOT_PATH}/rr-lkms/compile.sh
echo "makeEnvDeploy"
makeEnvDeploy "${ROOT_PATH}" "${VERSION}" "${PLATFORM}"
echo "makemodules"
makelkms "${ROOT_PATH}" "${VERSION}" "${PLATFORM}" "${ROOT_PATH}/rr-lkms" "${ROOT_PATH}/output"
- name: Upload to Artifacts
uses: actions/upload-artifact@v4
Expand Down
39 changes: 24 additions & 15 deletions .github/workflows/modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ jobs:
# # checkout 6.2.4
# - version: 6.2
# platform: grantley
# # checkout 6.2.4
## - version: 6.2
## platform: kvmx64
# ## checkout 6.2.4
# ## - version: 6.2
# ## platform: kvmx64
# # checkout 6.2.4
# - version: 6.2
# platform: purley
Expand Down Expand Up @@ -143,22 +143,29 @@ jobs:
- name: Make modules
run: |
. rp-modules/compile.sh
echo "----------------- Env -----------------"
makeEnvDeploy ${{ github.workspace }} ${{ matrix.version }} ${{ matrix.platform }}
echo "----------------- Make -----------------"
makemodules ${{ github.workspace }} ${{ matrix.version }} ${{ matrix.platform }} rp-modules/src output
ROOT_PATH=${{ github.workspace }}
VERSION=${{ matrix.version }}
PLATFORM=${{ matrix.platform }}
. ${ROOT_PATH}/rp-modules/compile.sh
echo "makeEnvDeploy"
makeEnvDeploy "${ROOT_PATH}" "${VERSION}" "${PLATFORM}"
echo "makemodules"
KVER="$(getKver "${ROOT_PATH}" "${VERSION}" "${PLATFORM}")"
cp -f "${ROOT_PATH}/rp-modules/src/${KVER}/defines.${PLATFORM}" "${ROOT_PATH}/rp-modules/src/${KVER}/defines"
makemodules "${ROOT_PATH}" "${VERSION}" "${PLATFORM}" "${ROOT_PATH}/rp-modules/src/${KVER}" "${ROOT_PATH}/output"
- name: Tar to Artifacts
run: |
. rp-modules/compile.sh
ROOT_PATH=${{ github.workspace }}
VERSION=${{ matrix.version }}
PLATFORM=${{ matrix.platform }}
KVER="$(getKver "${ROOT_PATH}" "${VERSION}" "${PLATFORM}")"
[ -z "${KVER}" ] && exit 1
. ${ROOT_PATH}/rp-modules/compile.sh
KVER="$(getKver "${ROOT_PATH}" "${VERSION}" "${PLATFORM}")"
if [ "${PLATFORM}" = "epyc7002" ]; then
OFFICIAL_PATH="${ROOT_PATH}/rp-modules/official/hda1/${PLATFORM}-${VERSION}-${KVER}"
PARTY3RD_PATH="${ROOT_PATH}/rr-modules/thirdparty/${PLATFORM}-${VERSION}-${KVER}"
Expand Down Expand Up @@ -257,11 +264,13 @@ jobs:

- name: firmware
run: |
mkdir -p firmware
ROOT_PATH=${{ github.workspace }}
mkdir -p ${ROOT_PATH}/firmware
echo "copy 3rd modules"
PARTY3RD_PATH="${{ github.workspace }}/rr-modules/thirdparty/firmware"
cp -rf ${PARTY3RD_PATH}/* firmware/
PARTY3RD_PATH="${ROOT_PATH}/rr-modules/thirdparty/firmware"
cp -rf ${PARTY3RD_PATH}/* ${ROOT_PATH}/firmware/
echo "extract all modules"
for F in output/*.tgz; do
Expand Down

0 comments on commit 9be78df

Please sign in to comment.