An open API service indexing awesome lists of open source software.

https://github.com/openhd/openhd-chrootcompiler


https://github.com/openhd/openhd-chrootcompiler

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

          

= ChrootCompiler

The ChrootCompiler is a tool designed to compile software directly on images executed in Chroot. It facilitates direct emulation of various architectures and libraries with minimal setup.

== Features

- Directly compile software within Chroot environments
- Emulate different architectures and libraries effortlessly
- Simplify the setup process for building and compiling software

== Usage

=== Preparation

First, clone the ChrootCompiler repository and set up the necessary files:

[source,bash]
----
git clone https://github.com/OpenHD/OpenHD-ChrootCompiler
mkdir -p OpenHD-ChrootCompiler/additionalFiles
cp YOURFILES OpenHD-ChrootCompiler/additionalFiles/
echo $CLOUDSMITH_API_KEY > OpenHD-ChrootCompiler/additionalFiles/cloudsmith_api_key.txt
touch build_chroot.sh OpenHD-ChrootCompiler/additionalFiles/
----

- Replace `YOURFILES` with the files you need to include.
- Ensure you have your `CLOUDSMITH_API_KEY` ready and place it in the `additionalFiles` directory.

=== Building

Update your system and install the required dependencies:

[source,bash]
----
sudo apt update
sudo bash install_dep.sh
----

Then, run the build script with the necessary parameters:

[source,bash]
----
sudo bash ./build.sh x20 $API_KEY DISTRO FLAVOR
----

- `x20` is an example parameter for the script.
- Replace `$API_KEY` with your actual API key.
- Specify the `DISTRO` and `FLAVOR` according to your needs.

=== Executing Commands in Chroot

Any commands listed in the `build_chroot.sh` file will be executed within the Chroot environment when the tool is run. Ensure that your `build_chroot.sh` script is properly configured and placed in the `additionalFiles` directory.

== Example `build_chroot.sh`

Here is an example of what your `build_chroot.sh` might look like:

[source,bash]
----
#!/bin/bash

Example commands to run in chroot
apt-get update
apt-get install -y build-essential
make
cp *.deb /out
----

Adjust the script as needed for your specific build and compilation tasks.

To push files outside of Chroot, copy the file to the /out directory, it'll appear in the out folder of the host.
== Additional Information

For more details, visit the official repository at:
https://github.com/OpenHD/OpenHD-ChrootCompiler

Feel free to contribute to the project or report any issues you encounter.

== License

This project is licensed under the terms of the GPL-3.0 license . For more information, see the `LICENSE` file in the repository.

== Legal

All logos, names, and brands belong to OpenHD and are not permitted to be used by individuals who are not affiliated with OpenHD.