organize tools

This commit is contained in:
2023-06-06 08:58:08 -04:00
parent 27e92e9e06
commit 53877f7b6e
6 changed files with 1 additions and 0 deletions

89
tools/bldr/README.bldr Normal file
View File

@@ -0,0 +1,89 @@
+------+
| bldr |
+------+
bldr is a program that builds binary packages from an Everest package. It is intened for system image development.
bldr is compatible with Everest packages. That being said, it's only recommended to build packages designated as bldr compatible.
+--------------+
| Installation |
+--------------+
Copy bldr to a convenient location:
(user)$ cp bldr PROJECT_DIR
Then, copy bldr.conf to either of the following locations:
/etc/bldr.conf
$HOME/.config/bldr.conf
PROJECT_DIR/bldr.conf
+-------+
| Usage |
+-------+
bldr [-h] [-v] [-b] PACKAGE
+-------------------+
| Building packages |
+-------------------+
(user)$ ./bldr -b /path/to/package
It is important to provide the full path.
bldr will compile the package, and install it to $BLDR_OUT_DIR/pkgs/PACKAGE_NAME.
$BLDR_OUT_DIR can be defined in bldr.conf.
After a package has been compiled, you can either import the package-agnostic installation script,
or write your own.
+---------------------------+
| Writing packages for bldr |
+---------------------------+
Everest packages only require slight modification in order to be compatible with bldr.
First, ensure the getsource() function looks similar to this:
getsource() {
command1
command2
cd ${SOURCES[1]}
}
The last command in this function is very important. It MUST be "cd ${SOURCES[1]}", otherwise
bldr will throw an error when a user attempts to build.
It is safe to assume most people using bldr will be cross compiling packages.
In this case, ensure the toolchain is being used. Toolchains will always be located
in $BLDR_OUT_DIR/toolchain.
When configuring a package for compilation, ensure the target triplet matches the
desired system profile. In the case of "x86-musl":
TARGET="x86_64-linux-musl"
ALWAYS install bldr packages to $BLDR_OUT_DIR/pkgs/PACKAGE_NAME
bldr packages must not support system functions.
+-----------+
| Copyright |
+-----------+
(C) 2023 Everest Linux
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
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, see <https://www.gnu.org/licenses/>.

18
tools/bldr/bldr.conf Normal file
View File

@@ -0,0 +1,18 @@
#
# bldr.conf - settings for bldr
#
# Which directory bldr will output packages to
export BLDR_OUT_DIR="/home/arco/Projects/bldr-pkgs"
# Compilation flags
export CFLAGS="-O2 -fstack-protector-strong -static -pie"
export CXXFLAGS="${CFLAGS}"
export LDFLAGS="-static"
# Path to Everest toolchain
export TOOLCHAIN_PATH="/home/arco/Projects/x86_64-linux-musl-toolchain"
#
# end bldr.conf
#