Commit Graph

131 Commits

Author SHA1 Message Date
Denis 'GNUtoo' Carikli a64d284fd7
.gitignore: order alphabetically
The sort was done with 'sort -u'.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-08-22 21:18:12 +02:00
Adrien Bourmault 0df4fe5fad
GRUB: config from HDD/SSD: Add support for gnuboot_grub.cfg
The "Load Operating System (incl. fully encrypted disks) [o]" GRUB
entry tries to load grub configuration files from the hard disk or SSD
partitions. It tries various files in /boot, /grub, /grub2,
/boot/grub, /boot/grub2.

For consistency we at least need to make it search for the
gnuboot_grub.cfg in these directories as well. Since this is GNU Boot,
the gnuboot_grub.cfg takes precedence over files made for other boot
software distributions.

For libreboot_grub.cfg, it was not replaced because it is still
mentioned in the documentation.

Signed-off-by: Adrien 'neox' Bourmault <neox@gnu.org>
GNUtoo: reworked code and commit message.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-08-22 21:17:29 +02:00
Adrien Bourmault ce13d22c07
GRUB: Use GNU Boot logo
Signed-off-by: Adrien 'neox' Bourmault <neox@gnu.org>
GNUtoo: updated commit message
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-08-22 21:16:59 +02:00
Adrien Bourmault 74b678c023
GRUB: Say the name GNUBoot in the grub menu
Signed-off-by: Adrien Bourmault <neox@a-lec.org>
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2023-08-22 21:16:51 +02:00
Adrien Bourmault eeddd2b610
build/dependencies: debian: adding python-is-python3 to build seabios properly
Without having python-is-python3 installed, on recent PureOS 10
(byzantium) with at least the d510mo target, we have the following
 build failure:
	$ ./build boot roms d510mo
	[...]
	  Compiling (16bit) out/vgaentry.o
	  Compiling whole program out/vgaccode16.raw.s
	  Fixup VGA rom assembler
	make: python: No such file or directory
	make: *** [Makefile:228: out/vgaccode16.o] Error 127

Without python-is-python3, the build also fails on recent
versions of Trisquel and Debian.

Signed-off-by: Adrien 'neox' Bourmault <neox@gnu.org>
GNUtoo: Part of the commit message
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-08-22 21:16:40 +02:00
Adrien Bourmault 58b8e09526
coreboot/fam15h: don't build ada toolchain for generic platforms
These folders (fam15h_rdimm and fam15h_udimm) are generic plateforms to gather
patches in common for multiple boards (e.g. kgpe-16 and kcma-d8), this is why we also
disable crossgcc_ada in the configuration, since it will be built by specific boards
if needed, avoiding double compilation.

Signed-off-by: Adrien 'neox' Bourmault <neox@gnu.org>
GNUtoo: split commit
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-08-22 21:16:19 +02:00
Adrien Bourmault f7c0fec698
coreboot/fam15h: update code base, deblob, unset CONFIG_STM (see bug #64535)
This commit updates the coreboot code base from release 4.11 to 4.11_branch for kgpe-d16,
kcma-d8, kfsn4-dre and addresses one new blob related to this update.

The main reason to update the codebase is to prevent a bug with RAM initialization
that occured with coreboot 4.11 and raised the following critical error:

	fam15_receiver_enable_training_seed: using seed: 0054
	fam15_receiver_enable_training_seed: using seed: 0054
	TrainRcvrEn: Status 2005
	TrainRcvrEn: ErrStatus 4000
	TrainRcvrEn: ErrCode 0
	TrainRcvrEn: Done

	TrainDQSReceiverEnCyc_D_Fam15: lane 0 failed to train!  Training for receiver 2 on DCT 0 aborted
	TrainDQSReceiverEnCyc: Status 2205
	TrainDQSReceiverEnCyc: TrainErrors 44000
	TrainDQSReceiverEnCyc: ErrStatus 44000
	TrainDQSReceiverEnCyc: ErrCode 0
	TrainDQSReceiverEnCyc: Done

	TrainDQSReceiverEnCyc: Status 2005
	TrainDQSReceiverEnCyc: TrainErrors 4000
	TrainDQSReceiverEnCyc: ErrStatus 4000
	TrainDQSReceiverEnCyc: ErrCode 0
	TrainDQSReceiverEnCyc: Done

	DIMM training FAILED!  Restarting system...soft_reset() called!

This coreboot revision also correct some bugs with SMM, SMBIOS, IPMI and BMC.

Some new values in coreboot configuration make coreboot first build stop to prompt
users and forcing them to choose an option to continue:
	- CONFIG_STM
	- CONFIG_DEBUG_IPMI
	- CONFIG_VENDOR_VIA
	- CONFIG_SOUTHBRIDGE_AMD_CIMX_SB900
	- CONFIG_IPMI_FRU_SINGLE_RW_SZ
	- CONFIG_IPMI_KCS_TIMEOUT_MS

A bug has been opened about CONFIG_STM on our bug tracker [1], and we decided,
for now, to unset this option explicitely.

So in this commit we just regenerated configurations for each fam15h board via
coreboot build prompts and copied the resulting configurations in the configuration
folder and that results in the following:
	- unset CONFIG_STM
	- unset CONFIG_DEBUG_IPMI
	- unset CONFIG_VENDOR_VIA
	- unset CONFIG_SOUTHBRIDGE_AMD_CIMX_SB900
	- set CONFIG_IPMI_FRU_SINGLE_RW_SZ=16
	- set CONFIG_IPMI_KCS_TIMEOUT_MS=5000

[1]https://savannah.gnu.org/bugs/?64535

Signed-off-by: Adrien 'neox' Bourmault <neox@gnu.org>
GNUtoo: split commit into "don't build ada toolchain for generic platforms"
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-08-22 21:15:39 +02:00
Adrien Bourmault de9297fc89
coreboot/fam15h: fix crossgcc acpica build on newer hostcc
With newer hostcc, trying to build IASL will raise an error:
    -  Intermediate obj/aslcompilerlex.c
    - Link obj/iasl
    /usr/bin/ld: obj/aslcompilerparse.o:(.bss+0x8): multiple
    definition of `AslCompilerlval'; obj/aslcompilerlex.o:(.bss+0x0):
    first defined here
    /usr/bin/ld: obj/prparserlex.o:(.bss+0x0): multiple definition of
    `LexBuffer'; obj/dtparserlex.o:(.bss+0x0): first defined here
    collect2: error: ld returned 1 exit status

This commit adds a patch for GCC 8.3.0 that modifies the ASL engine:
    - making LuxBuffer variable static to avoid multiple definitions
      being treated as errors
    - removing a redundant definition of AcpiGbl_DbOpt_NoRegionSupport

Signed-off-by: Adrien 'neox' Bourmault <neox@gnu.org>
GNUtoo: commit: cosmetics changes only
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-08-22 21:15:09 +02:00
Adrien Bourmault c38348dbb5
coreboot/fam15h: fix for gcc/gnat building
With newer hostcc, trying to build GCC 8.3.0 will raise an error from ld:

	undefined reference to `__gnat_begin_handler_v1'

This commit adds a patch for GCC found on coreboot [1] correcting this
error by backporting the GNAT exception handler v1 to GCC 8.3.0 allowing
GNAT to be built with newer hostcc like GCC 10+.

[1]https://review.coreboot.org/c/coreboot/+/42158

Signed-off-by: Adrien 'neox' Bourmault <neox@gnu.org>
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2023-08-22 21:15:00 +02:00
Adrien Bourmault 0d77d99d23
coreboot/fam15h: fixing binutils not building properly
Without that fix, if we build for a fam15h target on PureOS byzantium,
we have a build failure:

	$ ./build boot roms kgpe-d16-udimm_2mb
	  [...]
	  Building MPC v1.1.0 for host ... ok
	  Building BINUTILS v2.32 for target ... failed. Check 'build-i386-elf-BINUTILS/build.log
	  make[2]: *** [Makefile:26: build_gcc] Error 1
	  make[1]: *** [Makefile:51: build-i386] Error 2
	  make: *** [util/crossgcc/Makefile.inc:48: crossgcc-i386] Error 2
	  Error: build/roms: something went wrong

Then the build log (here) in available in
coreboot/fam15h_udimm/util/crossgcc/build-i386-elf-BINUTILS/build.log
has the following:
	In file included from ../../binutils-2.32/gold/debug.h:29,
        	         from ../../binutils-2.32/gold/descriptors.cc:31:
	../../binutils-2.32/gold/errors.h:87:50: error:
	'string' in namespace 'std' does not name a type
	   87 |   undefined_symbol(const Symbol* sym, const std::string& location);
	      |                                                  ^~~~~~
	../../binutils-2.32/gold/errors.h:29:1: note: 'std::string'
	is defined in header '<string>'; did you forget to '#include <string>'?
	   28 | #include "gold-threads.h"
	  +++ |+#include <string>
	   29 |

Signed-off-by: Adrien Bourmault <neox@a-lec.org>
GNUtoo: commit message but not its title
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-08-22 21:14:49 +02:00
Denis 'GNUtoo' Carikli b77307995a
coreboot/default, coreboot/fam15h: use GNU mirror for acpica
Crossgcc needs acpica-unix2-20210331.tar.gz and acpica-unix2-20190703.tar.gz,
but this file is gone from upstream[1], so with guix-time-machine and
guix build --source, we recovered these files and published it at the addresses
in the patches.

[1]https://github.com/acpica/acpica/issues/883

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Co-developed-by: Adrien 'neox' Bourmault <neox@gnu.org>
Signed-off-by: Adrien 'neox' Bourmault <neox@gnu.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
neox: Added fam15h patches and adjusted the commit message accordingly
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-08-22 21:14:24 +02:00
Adrien Bourmault bf1799344f
Continue Libreboot under the GNU project
This commit is based on the 20220710 tag from Libreboot.

To our knowledge, 20220710 is the last really libre Libreboot
release as the next releases from libreboot.org has nonfree
software (like nonfree microcode updates).

Because of that we've stepped forward to stand up for freedom,
and we started maintaining our own version of Libreboot that
didn't include nonfree software.

To make sure that our version remains free and continue to be
maintained over time, we chose to now do this as part of the
GNU project.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
GNUtoo: commit message
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-08-22 21:13:26 +02:00
Leah Rowe fbbb5bc616 Libreboot 20220710 2022-07-10 08:33:31 +01:00
Leah Rowe f8183e187b say the name libreboot, in grub menus 2022-03-20 00:44:45 +00: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 8ca0761fb0 specifically call python3, in scripts
with this change, it's unlikely we'll hit errors again. previously,
some projects used were calling "python" which in context was
python3, but on some setups, the user only has python2 and python3
but no symlink for "python" (which if exists, we assumed linked to
python3)

now it's unambiguous. docs/build/ can probably be updated now, as
a result of this change, to remove the advice about that
2022-03-13 18:17:09 +00:00
Leah Rowe 61e48acf67 Merge branch 'seabios-race' of xloem/lbmk into master 2022-03-12 22:13:23 +00:00
John Doe 676eb110c7 Perform the silentoldconfig step of seabios before full make
I was running into a race condition when rebuilding seabios with a high cpu count,
resulting in failure with this error message:

cc1: fatal error: can't open 'out/src/asm-offsets.s' for writing: No such file or directory

Performing the silentoldconfig step before the full make step seems to resolve the failure.
2022-03-11 19:52:47 -05:00
Leah Rowe 33a43ffc07 update flashrom 2022-03-07 04:58:11 +00:00
Leah Rowe 9557da45df Merge branch 'master' of GNUtoo/lbmk into master 2022-03-06 17:07:45 +00:00
Leah Rowe 89aac5393a Merge branch 'submodule-version' of xloem/lbmk into master 2022-03-06 17:07:33 +00:00
Denis 'GNUtoo' Carikli 3b80a42aa0
scripts: download: coreboot: fix ./download all
When running ./download all, we have the following error:
    resources/scripts/download/coreboot: Line 52: $1 is not set.

The ./download all command was broken by the following commit:
2bb805e2e0 (download: Add --help in the
individual download scripts).

Reported-by: madbehaviorus[m] on #libreboot on liberachat
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2022-03-06 18:02:16 +01:00
John Doe acc57bda6d scripts: process git versions when lbmk is a worktree or submodule
git worktrees have plaintext .git files which contain the gitdir in their content.
2022-03-04 14:14:05 -05:00
Leah Rowe fd41399961 Merge branch 'master' of GNUtoo/lbmk into master 2022-02-19 12:38:48 +00:00
Denis 'GNUtoo' Carikli 8833be159b
scripts: download: u-boot: fix u-boot repository URL
Without that fix we have the following warning during the download:
    Cloning into 'u-boot/u-boot'...
    warning: redirecting to https://source.denx.de/u-boot/u-boot.git/

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2022-02-16 19:33:53 +01:00
Denis 'GNUtoo' Carikli 425162db93
boot-libre: add --gen-blob-script to generate a deblob script
This should enable various distributions and build system to reuse
the generated script to deblob u-boot releases themselves.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2022-02-16 19:11:14 +01:00
Denis 'GNUtoo' Carikli ee2731af44
boot-libre: ship the blob list too
This should enable various distributions and build system to reuse
that blob to deblob u-boot releases themselves.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2022-02-16 19:11:12 +01:00
Denis 'GNUtoo' Carikli 414aa56287
u-boot-libre: Add help and support for multiple versions
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2022-02-16 19:10:30 +01:00
Denis 'GNUtoo' Carikli 1afdbaad1a
u-boot-libre: Add reproducible builds and tests
The tar options come from the tutorial to remove archives metadata at
reproducible-builds.org[1].

[1]https://reproducible-builds.org/docs/archives/

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2022-02-16 19:10:26 +01:00
Denis 'GNUtoo' Carikli 2bb805e2e0
download: Add --help in the individual download scripts
This doesn't change the existing usage of the scripts:
- For the Coreboot script, before this change, all arguments that were
  passed were considered as board to download the Coreboot source code
  for.

  Here we added the '--help' and '--list-boards' arguments, so it
  should not be an issue as it is extremely unlikely that a board
  would be called '--help' or '--list-boards'.

- All the other scripts don't use any arguments so passing --help
  should not conflict with the existing usage.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2022-02-16 18:00:31 +01:00
Denis 'GNUtoo' Carikli 4b2d426a20
scripts: download: u-boot: Add help and support for multiple revisions
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2022-02-16 18:00:30 +01:00
Denis 'GNUtoo' Carikli f955248044
u-boot-stable-src-release: rename to u-boot-libre
If the script is named u-boot-stable-src-release and that users see an
u-boot-libre tarball they will not make the link between both unless
we rename the script.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2022-02-16 17:58:53 +01:00
Denis 'GNUtoo' Carikli 354e9bd187
u-boot-stable-src-release: follow u-boot and linux-libre naming conventions
Many people using FSDG compliant distributions or wanting to use one
are already familiar with linux-libre. This change renames the
resulting tarball to u-boot-libre to make it easier for people to
understand the goal of this tarball.

In addition we also rename the version from v2021.07 (which is the git
tag corresponding to the release) to 2021.07 as u-boot upstream
tarballs use that.

The revision wasn't bumped as we didn't have any releases of
u-boot-libre yet.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2022-02-16 17:58:28 +01:00
Leah Rowe cceffff659 Merge branch 'master' of GNUtoo/lbmk into master 2022-02-10 13:28:45 +00:00
Denis 'GNUtoo' Carikli 7422411b24
Add support for releasing deblobbed u-boot 2020.07 source tarballs
Once the tarball are released, it will enable distributions to use
these tarballs to produce deblobbed u-boot packages.

Note that the produced tarball is not reproducible yet. Because of
that it has to be trusted.

During a release, it's a good idea to sign the uncompressed tarball as
the various compression formats and associated tools make different
tradeoffs.

For instance with xz, xz -9e tends to compress really well with the
the most used xz[1] implementation, and most GNU/Linux users probably
already have it installed, but and the drawbacks is that the format is
very fragile[2].

The lzip format is more suited for long term archiving but its most
packaged implementation[3] is less likely to be already installed by
users than more well known formats like xz, bzip2 or gzip.

Being able to add more compression formats after the release is also
useful, for instance to accommodate different build systems or use
cases (like being able to build u-boot with less dependencies in
distributions like Guix, or building u-boot directly on devices which
don't have enough RAM for xz for instance).

[1]https://tukaani.org/xz/
[2]https://www.nongnu.org/lzip/xz_inadequate.html
[3]https://www.nongnu.org/lzip/

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2022-02-10 10:55:03 +01:00
Denis 'GNUtoo' Carikli ae0be6f8b4
scripts: download: coreboot: Fix check for build error
build_error is supposed to be a file since it's created with touch.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2022-02-10 10:55:03 +01:00
Leah Rowe 37b4500513 memtest86+: fix build error (patch from Félicien Pillot) 2022-02-08 07:45:41 +00:00
Leah Rowe 937590d2b1 optimize grub modules: pre-load ones that will likely be used 2021-12-30 06:50:53 +00:00
Leah Rowe 2701555582 build/boot/roms: fix wrong variable name 2021-12-29 07:37:11 +00:00
Leah Rowe babce03fbd coreboot/*: set grub_scan_disk to ahci on most boards
on ga-g41m-es2l, set it to ata
2021-12-29 07:18:21 +00:00
Leah Rowe 5d65d6c3d3 apple/macbook21: set grub_scan_disk to ahci 2021-12-29 07:14:22 +00:00
Leah Rowe 6b4b49cf8f build/boot/roms: substitute grub_scan_disk according to board.cfg 2021-12-29 07:10:56 +00:00
Leah Rowe 835ff5ec83 grub.cfg: skip ata/ahci according to grub_scan_disk
logic for setting it in grub.cfg will be done in the next commit
2021-12-29 06:55:07 +00:00
Leah Rowe 9b1499fd1e grub.cfg: clean up messages, be less verbose 2021-12-29 06:26:48 +00:00
Leah Rowe 86d4ca9b50 grub.cfg: add isolinux menuentry for ata* (replace broken cd/dvd menuentry) 2021-12-29 06:10:45 +00:00
Leah Rowe 7cebee25ff grub.cfg: delete option to boot from CD/DVD
it's confusing, broken and most people nowadays don't use optical drives

it's not even possible in most setups anyway
2021-12-29 06:05:36 +00:00
Leah Rowe bbdb9512f3 grub.cfg: clean up comments 2021-12-29 06:04:42 +00:00
Leah Rowe c98308c499 grub.cfg: don't use */? wildcards. they slow down the boot
hardcode everything. in practise, the new logic will work just the same in
almost all cases, for most people, but it works around performance issues in
grub. cleanup of grub.cfg will be done in the next commit
2021-12-29 05:58:03 +00:00
Leah Rowe 0ea263129a grub.cfg: optimize search_isolinux
GRUB is slow at device enumeration. This patch works around it in the same way
as vitali64's recent patch.
2021-12-29 02:37:05 +00:00
Leah Rowe 56698000fa remove entry in .gitignore from the last commit 2021-12-29 01:04:18 +00:00