Commit Graph

16 Commits

Author SHA1 Message Date
Denis 'GNUtoo' Carikli b175bd85a5
Add topdir ./configure.
The goal here is to be able to add configure options later on.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2024-05-12 22:56:04 +02:00
Denis 'GNUtoo' Carikli 578fda0e90
packages: Add target to test the release.
This makes sure that the release at least has all the expected files.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-11 11:41:15 +01:00
Denis 'GNUtoo' Carikli 5b9dd7adba
packages: fix calls to build descriptors.
Without that fix building images with make release or './build release
all' results in the following error:
    [...]
    Built lenovo/t400 (ThinkPad R400)
    make[1]: Leaving directory '/home/gnutoo/gnuboot/coreboot/default'

    Creating new ROM image: bin/r400_16mb/seabios_withgrub_r400_16mb_libgfxinit_corebootfb_colemak.rom
    Usage:
            ./build <TASK> <PACKAGE>
            ./build --help
    [...]
    Refer to the gnuboot documentation for more information.
    Error: Invalid task 'descriptors'.
    Error:  See './build --help'.
    Error: build/roms: something went wrong
    make: *** [Makefile:47: release] Error 1

This was broken by the commit 857afa42a8
("Switch to packages structure.").

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-11 11:40:31 +01:00
Denis 'GNUtoo' Carikli 4c7895d38b
./build: enable to mask some tasks.
If we list all the packages that have a release task we have:
    $ ./build release list
    Available packages for task 'release':

    roms
    src
    u-boot-libre
    website

If for some reasons we don't want to have u-boot-libre shown (because
for instance it doesn't build and you want to avoid building it as
part of the './build release all' command, then you can mask it by
removing the executable permission:
    $ chmod -x resources/packages/u-boot-libre/release

And it then doesn't show up anymore:
    $ ./build release list
    Available packages for task 'release':

    roms
    src
    website

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-09 15:57:51 +01:00
Denis 'GNUtoo' Carikli e0159d22f4
build: make it pass shellcheck
Without that fix, running 'shellcheck -x build' produces the following
errors/warnings:
    In build line 25:
    [ "x${DEBUG+set}" = 'xset' ] && set -v
      ^-------------^ SC2268 (style): Avoid x-prefix in comparisons
                                      as it no longer serves a purpose.
    In build line 131:
    resources/packages/"${package}"/"${task}" $@
                                              ^-- SC2068 (error):
    Double quote array expansions to avoid re-splitting elements.

    In build line 138:
    "${pkg_dir}"/"${task}" $@
                           ^-- SC2068 (error):
    Double quote array expansions to avoid re-splitting elements.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 17:32:25 +01:00
Denis 'GNUtoo' Carikli c7e28dc660
packages: Add distclean
The various scripts present in GNU Boot are very fragile, so it's a
good idea to have a pristine GNU Boot source code for making releases.

The issue is that 'git clean -dfx' doesn't remove existing git
repositories like coreboot/ grub/ etc, so we need additional code to
take care of that.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 17:32:18 +01:00
Denis 'GNUtoo' Carikli 57050c2985
build: improve help.
This commit corrects linelength (this should have no functional impact)
and adds exit codes (sysexit.sh)

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
neox: wrote the commit message
2023-12-06 17:30:41 +01:00
Denis 'GNUtoo' Carikli fe28bc3c82
dependencies: move into single package.
Having an {arch,debian,fedora35,ubuntu2004,void} GNU Boot package
looked strange. Having a dependencies package instead makes more
sense.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 17:14:30 +01:00
Denis 'GNUtoo' Carikli 857afa42a8
Switch to packages structure.
The various build scripts are scattered around in multiple
places. This make it hard for contributors to understand what they
need to modify.

Most GNU Boot users are interested in running GNU/Linux or BSD
operating systems. And the way to install software on these
operating systems is through a package manager. So most users and
contributors already know the package manager abstraction.

So using that abstraction makes it easier to find where things are.

The scripts to install dependencies don't really fit the new structure
but for now we move them in to make sure that everything works
fine. This could be fixed later on and migrated to a single
dependencies packages by auto-detecting the distribution with
/etc/os-release.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
Signed-off-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 17:14:14 +01:00
Denis 'GNUtoo' Carikli 12a200fc18
build: rename mode(s) to task(s).
Most GNU Boot users are interested in running GNU/Linux or BSD
operating systems. And the way to install software on these
operating systems is through a package manager. So most users and
contributors already know the package manager abstraction.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 17:13:59 +01:00
Denis 'GNUtoo' Carikli 37800705ab
build: rename option(s) to package(s).
Most GNU Boot users are interested in running GNU/Linux or BSD
operating systems. And the way to install software on these
operating systems is through a package manager. So most users and
contributors already know the package manager abstraction.

So referring to packages instead of options makes it easier to
understand what the script is doing.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 17:12:32 +01:00
Denis 'GNUtoo' Carikli 36bcf70f76
build: whitespace and line length cleanups.
This should contain no functional modifications.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 16:05:03 +01:00
shmalebx9 0b3b7f93b7 added workaround for git credentials
this is cherry-picked from osbmk. the cherry-pick was
performed by i, leah rowe. this is adapted from shmalebx's
patch there, in osboot

specifically, these patches from osbmk are being imported:

327a39ef058d5385bf8c1a1b09bac8db6a51b016

5139ad4be4df1835ce154f39161eef4f7c31ee1a
2022-03-16 04:40:59 +00:00
Leah Rowe 67e2365a6d also change the build and update scripts to env bash 2021-06-03 12:59:22 +01:00
Leah Rowe 5573dcd103 build: don't run the versioncheck script if running ./build dependencies
The "dependencies" script are to be run as root. Without this fix, root will
create the version/versiondate file and then the rest of the build system will
break due to lack of root privilege.
2021-05-19 17:58:36 +01:00
Leah Rowe 89517ed6b9 libreboot!
this is forked from the "libre" branch in osboot, which is itself a libre,
deblobbed fork of osboot, a blobbed up fork of libreboot

libreboot needed to be purged clean. this is the new libreboot development
repository. the old one has been abandoned
2021-05-18 13:56:12 +01:00