https://github.com/jwillikers/gnu-arm-embedded-image
A container image for running the bare metal ARM GCC toolchain for C and C++, built on Fedora
https://github.com/jwillikers/gnu-arm-embedded-image
buildah c cpp fedora gnu-arm-embedded-toolchain oci-image
Last synced: 12 days ago
JSON representation
A container image for running the bare metal ARM GCC toolchain for C and C++, built on Fedora
- Host: GitHub
- URL: https://github.com/jwillikers/gnu-arm-embedded-image
- Owner: jwillikers
- License: other
- Archived: true
- Created: 2021-06-17T21:29:14.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-12T16:25:27.000Z (over 3 years ago)
- Last Synced: 2025-04-06T21:52:13.038Z (21 days ago)
- Topics: buildah, c, cpp, fedora, gnu-arm-embedded-toolchain, oci-image
- Language: Shell
- Homepage: https://quay.io/repository/jwillikers/gnu-arm-embedded
- Size: 53.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE.adoc
- Code of conduct: CODE_OF_CONDUCT.adoc
Awesome Lists containing this project
README
= GNU Arm Embedded Image
Jordan Williams
:experimental:
:icons: font
ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
endif::[]
:Asciidoctor: https://asciidoctor.org/[Asciidoctor]
:Black-Magic-Probe: https://github.com/blacksphere/blackmagic/wiki[Black-Magic-Probe]
:Buildah: https://buildah.io/[Buildah]
:CLion: https://www.jetbrains.com/clion/[CLion]
:Fedora: https://getfedora.org/[Fedora]
:Fedora-Silverblue: https://silverblue.fedoraproject.org/[Fedora Silverblue]
:fish: https://fishshell.com/[fish]
:GCC: https://gcc.gnu.org/[GCC]
:Git: https://git-scm.com/[Git]
:GNU-Arm-Embedded-Toolchain: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads[GNU Arm Embedded Toolchain]
:Linux: https://www.linuxfoundation.org/[Linux]
:OpenSSH: https://www.openssh.com/[OpenSSH]
:Podman: https://podman.io/[Podman]
:pre-commit: https://pre-commit.com/[pre-commit]
:Python: https://www.python.org/[Python]
:Rouge: https://rouge.jneen.net/[Rouge]
:Ruby: https://www.ruby-lang.org/en/[Ruby]
:Visual-Studio-Code: https://code.visualstudio.com/[Visual Studio Code]image:https://img.shields.io/github/workflow/status/jwillikers/gnu-arm-embedded-image/CI/main[GitHub Workflow Status]
image:https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white[pre-commit, link=https://github.com/pre-commit/pre-commit]A container image for running the {GNU-Arm-Embedded-Toolchain} for C and {cpp}, built on {Fedora}.
Comes complete with Black, CMake, Conan, Ninja, and Clang tools.== Synopsis
Image:: https://quay.io/repository/jwillikers/gnu-arm-embedded[quay.io/jwillikers/gnu-arm-embedded]
Tags::
* `latest`Supported architectures::
* `amd64` _(x86_64)_
* `arm` _(armhfp)_
* `arm64` _(aarch64)_User:: The default user inside the container is named `user`.
Working directory:: By default, the working directory is the default user's home directory: `/home/user/project`.
Labels::
`io.containers.autoupdate=registry`::: Enables automatic updates when using Podman and the _fully-qualified_ image name.== Quick Start
First, ensure your user is in the `dialout` group allowing access to serial devices.
[source,sh]
----
sudo usermod -aG $USER dialout
----NOTE: You'll have to log out and back in for the changes to take effect
Use the following command to run the container via {Podman} and access the GNU Arm Embedded Toolchain.
The example enters the container, mounting the current working directory, Conan's configuration directory, and Git's configuration directory.
Additionally, it mounts the serial device `/dev/ttyBmpGdb`, the hosted GDB server on a {Black-Magic-Probe} which allows flashing firmware to a target board.[source,sh]
----
podman run \
--rm \
--userns keep-id \
--group-add keep-groups \
--device /dev/ttyBmpGdb:/dev/ttyBmpGdb \
--security-opt label=disable \
--volume "$PWD":/home/user/project \
--volume "$HOME/.conan":/home/user/.conan \
--volume "$HOME/.config/git":/home/user/.config/git \
--name gnu-arm-embedded \
-it \
quay.io/jwillikers/gnu-arm-embedded:latest
----== Build
This project uses {Buildah} and {Podman} for building and testing the image.
A set of {pre-commit} checks are readily available to ensure your code is up-to-spec at the time it is committed.
Instructions for setting up a development environment, building the image, and testing the image follow.
These instructions are intended for users of {Fedora-Silverblue}, where the packages `buildah`, `git`, and `podman` are already available.
Moreover, I use the {fish} shell.. Install the {fish} shell.
+
[source,sh]
----
sudo rpm-ostree install fish
----. Reboot to finish the installation.
+
[source,sh]
----
systemctl reboot
----. Clone this repository.
+
[source,sh]
----
git -C ~/Projects clone [email protected]:jwillikers/gnu-arm-embedded-image.git
----. Install {pre-commit}.
+
[source,sh]
----
pip install pre-commit
----. Change into the project directory.
+
[source,sh]
----
cd ~/Projects/gnu-arm-embedded-image
----. Install pre-commit's Git hooks.
+
[source,sh]
----
pre-commit install
----. Run the `build.fish` shell script using `buildah unshare` to create the image.
+
[source,sh]
----
buildah unshare ~/Projects/gnu-arm-embedded-image/build.fish
----. Verify the image with works correctly by running the `test.fish` shell script.
+
[source,sh]
----
~/Projects/gnu-arm-embedded-image/test.fish
----== Contributing
Contributions in the form of issues, feedback, and even pull requests are welcome.
Make sure to adhere to the project's link:CODE_OF_CONDUCT.adoc[Code of Conduct].== Open Source Software
This project is built on the hard work of countless open source contributors.
Several of these projects are enumerated below.* {Asciidoctor}
* {Buildah}
* {Fedora}
* {Fedora-Silverblue}
* {GCC}
* {Git}
* {Linux}
* {OpenSSH}
* {Podman}
* {pre-commit}
* {Python}
* {Rouge}
* {Ruby}== Code of Conduct
Refer to the project's link:CODE_OF_CONDUCT.adoc[Code of Conduct] for details.
== License
This repository is licensed under the https://www.gnu.org/licenses/gpl-3.0.html[GPLv3], a copy of which is provided in the link:LICENSE.adoc[license file].
© 2021 Jordan Williams
== Authors
mailto:{email}[{author}]