Skip to content

Adding feature for cross-compilation hbosng#8

Draft
LarsGrootkarzijn wants to merge 3 commits intohifiberry:mainfrom
LarsGrootkarzijn:main
Draft

Adding feature for cross-compilation hbosng#8
LarsGrootkarzijn wants to merge 3 commits intohifiberry:mainfrom
LarsGrootkarzijn:main

Conversation

@LarsGrootkarzijn
Copy link

@LarsGrootkarzijn LarsGrootkarzijn commented Sep 24, 2025

  • Added --arch variable to sbuild. The value for this is given as a parameter.

For example:

build.sh arm64

This will however most likely introduce a lot of redundant code; Sanity architecture check in build-all -> Sanity architecture check in build.sh acr folder hbosng -> sanity architecture check in build.sh acr repository.

Technically, you can run each build.sh separately which means these checks are necessary. While when running build-all the sanity check is conducted immediately, and does not have to be conducted in the build.sh script(s).

build.sh Outdated
fi

sbuild --chroot-mode=unshare \
--arch=$1 \
Copy link
Owner

Choose a reason for hiding this comment

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

build.sh should be able to compile without any argument.
The --arch should only be applied when the user explicitely wants to build for a specific architecture. This is optional.

The best way to check is to add --arch xxx as a command line argument to build.sh, parse it and add it only when given

Copy link
Author

Choose a reason for hiding this comment

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

Hi, Yes, I fully agree, this should have been a draft, I improved this yesterday night, will push in a bit.

@LarsGrootkarzijn LarsGrootkarzijn marked this pull request as draft September 25, 2025 17:14
@LarsGrootkarzijn
Copy link
Author

Hi @hifiberry, I changed the script, let me know what you think of this structure, so I can start working out the others. Currently, arch is standard at arm64. I could change this to the target architecture being the same as the host machine, but I think in most cases arm64 is goto.

@hifiberry
Copy link
Owner

Looks good now

@hifiberry
Copy link
Owner

Hi @hifiberry, I changed the script, let me know what you think of this structure, so I can start working out the others. Currently, arch is standard at arm64. I could change this to the target architecture being the same as the host machine, but I think in most cases arm64 is goto.

I think arm64 as default is fine

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

Comments