Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support arm64 in fetch-linux-headers.sh #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions build/init/fetch-linux-headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ generate_headers()
elif [ -e "/boot.host/config-${KERNEL_VERSION}" ]; then
cp "/boot.host/config-${KERNEL_VERSION}" .config
fi
make ARCH=x86 oldconfig > /dev/null
make ARCH=x86 prepare > /dev/null

arch="$(uname -m)"
[[ "${arch}" == "x86_64" ]] && arch="x86"
[[ "${arch}" == "aarch64" ]] && arch="arm64"

make ARCH="${arch}" oldconfig > /dev/null
make ARCH="${arch}" prepare > /dev/null

# Clean up abundant non-header files to speed-up copying
find "${BUILD_DIR}" -regex '.*\.c\|.*\.txt\|.*Makefile\|.*Build\|.*Kconfig' -type f -delete
Expand Down Expand Up @@ -112,6 +117,7 @@ check_headers()
kdir="${modules_path}/${KERNEL_VERSION}"

[[ "${arch}" == "x86_64" ]] && arch="x86"
[[ "${arch}" == "aarch64" ]] && arch="arm64"

[[ ! -e "${kdir}" ]] && return 1
[[ ! -e "${kdir}/source" ]] && [[ ! -e "${kdir}/build" ]] && return 1
Expand Down
Loading