Skip to content

makefile: Support cross compile#7

Merged
daeyeong-XCENA merged 1 commit into
mainfrom
dev_makefile
May 19, 2025
Merged

makefile: Support cross compile#7
daeyeong-XCENA merged 1 commit into
mainfrom
dev_makefile

Conversation

@daeyeong-XCENA
Copy link
Copy Markdown
Collaborator

수정 사항

  • module(.ko)을 수행할 환경 밖에서 cross compile할 수 있도록 Makefile 수정
  • BUILDSYSTEM_DIR, Kernel version, Install path를 지정할 수 있도록 수정

Signed-off-by: DAEYEONG LEE <daeyeong.lee@metisx.com>
@daeyeong-XCENA daeyeong-XCENA requested a review from a team May 19, 2025 06:47
@daeyeong-XCENA daeyeong-XCENA self-assigned this May 19, 2025
@daeyeong-XCENA daeyeong-XCENA requested a review from Copilot May 19, 2025 07:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables cross-compilation of kernel modules by updating the Makefile and installation scripts.

  • Updates install.sh to use the modern subshell syntax for determining the number of processors and adds a depmod invocation.
  • Modifies the Makefile to support specifying BUILDSYSTEM_DIR, kernel version, and an optional installation path, and overrides DEPMOD during install.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
install.sh Updated to use $(nproc) instead of backticks and adds depmod.
Makefile Now allows cross compilation with configurable paths and settings.
Comments suppressed due to low confidence (1)

Makefile:9

  • Consider adding a comment to explain the removal of the conditional debug flag block so that future maintainers understand its intentional omission in cross compile scenarios.
ifneq ($(DEBUG),)

Comment thread Makefile
install: all
$(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) modules_install
depmod -a
$(MAKE) -C $(BUILDSYSTEM_DIR) M=$(PWD) modules_install $(INSTALL_MOD_PATH_ARG) DEPMOD=/bin/true
Copy link

Copilot AI May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment explaining the override of DEPMOD to '/bin/true' to clarify its purpose in the cross compile context.

Copilot uses AI. Check for mistakes.
@daeyeong-XCENA daeyeong-XCENA merged commit 6f34586 into main May 19, 2025
@daeyeong-XCENA daeyeong-XCENA deleted the dev_makefile branch May 19, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants