-
Notifications
You must be signed in to change notification settings - Fork 8
Build usr-space with MUSL #227
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
Merged
Merged
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
fde2c2c
[usr] Use musl as libc - It does not compile !
jmi-reds 9c09570
[musl] Fix build errors & warnings when building so3/usr
jmi-reds 47d95c7
[usr] arm32 - complile usr with MUSL lib
jmi-reds c37164c
[musl] Add script to generate arm & aarch64 MUSL toolchain
jmi-reds 22347ad
[musl] small clean-up in toolchain compilation script
jmi-reds 9b7a41b
[doc] Add info on how to build MUSL toolchain
jmi-reds a4d7cc3
update CI with MUSL toolchains
jmi-reds 5f0c556
Generate updated Docker - needed to get MUSL toolchain
jmi-reds a6d9367
[CI] Test
jmi-reds b39cc2b
[ci] Add test branch
jmi-reds 849a2ad
[ci] new test with added musl toolchain
jmi-reds 18afa9e
[CI] Add new docker image to build toolchains
jmi-reds 049925f
[CI] Add tags for docker toolchains image
jmi-reds fd9fc92
[ci] Dockerfile.env update for ubuntu 24.04
jmi-reds 8a65664
[CI] Add toolchains dependency for usr build
jmi-reds aea9df9
[CI] Fix issue with lvgl 32 docker image
jmi-reds 51474f8
[CI] Fix bug in lvgl 32b docker image
jmi-reds 02e00a0
[CI] Fix bug in lvgl 32b docker image (again)
jmi-reds 95527d8
[ci] Some fixes
jmi-reds 3543a93
Add missing <sys/ioctl.h> header file
jmi-reds 1e626b2
[musl] remove the original so3 libc src
jmi-reds 0553699
[musl] remove old cmake toolchain files
jmi-reds 3c915d8
[musl] small fixes based on review
jmi-reds File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Create a Docker image which prepare the toolchains needed by SO3 env. | ||
| # | ||
| # Copyright (c) 2025 REDS Institute, HEIG-VD | ||
| # | ||
| # Set 'aarch64-none-elf' toolchain & build arm & aarch64 musl toolchains | ||
| # | ||
| # Note: 'arm-none-eabi-' is installed for package manager in the others docker images | ||
|
|
||
| FROM ubuntu:24.04 AS toolchains-utils | ||
|
|
||
| RUN apt-get update && apt-get install -y gcc-arm-none-eabi gcc-11 g++-11 git make \ | ||
| patch sudo xz-utils wget && \ | ||
| update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10 && \ | ||
| update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 10 && \ | ||
| apt clean && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Download aarch64-none-elf toolchain | ||
| RUN wget https://developer.arm.com/-/media/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-elf.tar.xz | ||
| RUN tar -xvf arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-elf.tar.xz | ||
| RUN rm arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-elf.tar.xz | ||
|
|
||
| ENV PATH="$PATH:/arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-elf/bin" | ||
|
|
||
| COPY toolchains /toolchains | ||
| RUN /toolchains/build-toolchain.sh && rm -rf /toolchains/musl-cross-make | ||
|
|
||
| ENV PATH=$PATH:/toolchains/aarch64-linux-musl/bin | ||
| ENV PATH=$PATH:/toolchains/arm-linux-musleabihf/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Copyright (C) 2025 Jean-Pierre Miceli <jean-pierre.miceli@heig-vd.ch> | ||
| # | ||
| # This program is free software; you can redistribute it and/or modify | ||
| # it under the terms of the GNU General Public License version 2 as | ||
| # published by the Free Software Foundation. | ||
| # | ||
| # This program is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| # GNU General Public License for more details. | ||
| # | ||
| # You should have received a copy of the GNU General Public License | ||
| # along with this program; if not, write to the Free Software | ||
| # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
| # | ||
|
|
||
| # This script build 'arm' & 'aarch64' MUSL toolchains | ||
|
|
||
| SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
|
|
||
| # output PATH - select where the toolchain will be installed | ||
| # | ||
| # The final path will be: | ||
| # * arm: <OUTPUT_PATH>/arm-linux-musleabihf | ||
| # * aarch64: <OUTPUT_PATH>/aarch64-linux-musl | ||
| # default: '<CURRENT DIR>/aarch64-linux-musl' and '<CURRENT DIR>/arm-linux-musleabihf' | ||
| #OUTPUT_PATH= | ||
|
|
||
| GIT_COMMIT="3635262" | ||
|
|
||
| AARCH64_PATH='aarch64-linux-musl' | ||
| ARM_PATH='arm-linux-musleabihf' | ||
|
|
||
| if [[ $EUID -ne 0 ]]; then | ||
| echo "Please run as root" | ||
| exit 1 | ||
| fi | ||
|
|
||
| pushd $SCRIPTPATH | ||
|
|
||
| if [[ -v $OUTPUT_PATH ]]; then | ||
| OUTPUT=$OUTPUT_PATH | ||
| else | ||
| OUTPUT=$SCRIPTPATH | ||
| fi | ||
|
|
||
| echo "== base installation path is '$SCRIPTPATH'" | ||
|
|
||
| # 1. Retrieve the repo | ||
| git clone https://github.com/richfelker/musl-cross-make | ||
| cd musl-cross-make | ||
| git checkout $GIT_COMMIT | ||
|
|
||
| # Compile & install 'aarch64-linux-musl' | ||
| echo "== Compiling 'aarch64-linux-musl' (installation path: $OUTPUT/$AARCH64_PATH" | ||
| cp ../config.mak.aarch64 config.mak | ||
| echo "OUTPUT = $OUTPUT/$AARCH64_PATH" >> config.mak | ||
| make && sudo make install | ||
|
|
||
| # Compile & install 'arm-linux-musleabihf' | ||
| echo "== Compiling 'arm-linux-musleabihf'" | ||
| make clean | ||
| cp ../config.mak.arm config.mak | ||
| echo "OUTPUT = $OUTPUT/$ARM_PATH" >> config.mak | ||
| make && sudo make install | ||
|
|
||
| popd |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.