Commit Graph

7 Commits

Author SHA1 Message Date
Adrien Bourmault c18e78555d
ressources/coreboot/fam15h*: fix building crossgcc 8.3.0 (fixes #64870)
This commit fixes an error encountered on Trisquel 11 while trying to
build the fam15h coreboot crossgcc 8.3.0:

In file included from /usr/include/signal.h:328,
                 from /usr/include/x86_64-linux-gnu/sys/param.h:28,
                 from ../../gcc-8.3.0/gcc/system.h:298,
                 from ../../gcc-8.3.0/gcc/ada/init.c:65:
../../gcc-8.3.0/gcc/ada/init.c:575:18: error: missing binary operator before token "("
  575 | # if 16 * 1024 < MINSIGSTKSZ
      |                  ^~~~~~~~~~~
make[1]: *** [Makefile:1110 : ada/init.o] Erreur 1

The changes of the GLIBC that removed the MINSKTSZ constant was
introduced only for systems using the Linux kernel, and while the
changelog is recommanding using sysconf to get the value of
`_SC_MINSTKSZ`. The problem is that it does not allow to get the value
in the preprocessor context.

This error has been corrected on upstream GCC by Eric Botcazou <ebotcazou@adacore.com>
but this was not applied on upstream coreboot (even 4.11 branch).
It has been accepted by GCC and the bug report has been set as RESOLVED
FIXED, meaning it solved the bug.

The MINSTKSZ patch is needed for all GCC versions from 8 to 9, since this
commit solved the bug for 9, 10 and later versions. It has been adopted
by OpenSUSE for its GCC 8 package:
https://build.opensuse.org/projects/devel:gcc/packages/gcc8/files/gcc8-ada-MINSTKSZ.patch

Here's the corresponding patch header (in debian's format:
https://dep-team.pages.debian.net/deps/dep3/):
    Origin: upstream, https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=a5a7cdcaa0c29ee547c41d24f495e9694a6fe7f1
    Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99264
    Bug-GNU Boot: https://savannah.gnu.org/bugs/?64870

The MINSTKSZ patch added by this commit is unmodified from the
OpenSUSE one mentioned above, and the OpenSUSE patch is probably a
backport of the upstream GCC patch as there is not difference in what
it does.

Signed-off-by: Adrien 'neox' Bourmault <neox@gnu.org>
GNUtoo: small formatting of the commit message + last paragraph.
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
2024-09-09 16:05:14 +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
Leah Rowe cfd47cc0a5 build/roms: re-do KCMA-D8 and KGPE-D16 configs
2MiB and 16MiB were the only flash sizes supported. 4 and 8MiB have been
added.

Now there are only libgfxinit_txtmode configs.

Use seabios_withgrub or seabios_grubfirst ROMs if you wish to use an add-on
GPU.
2021-05-22 18:39:51 +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