bootloader: rebase onto upstream 1.0.0, sync firmware-loader version
Bootloader fork rebase: - Base changed from 0.1.0 pre-patched archive to upstream 1.0.0 tag (c7eeb9f) - Applied 0001-redbear-local-forks.patch (Cargo.toml crate path redirects) - Applied fix-uefi-alloc-panic.patch equivalents (4 panic!() -> graceful error handling in src/main.rs) - Applied P5-live-preload-cap-1gib.patch (1 GiB cap on live image preload) - Skipped: P0 GPT partition scan (requires new module + integration), P1 timeout/default-resolution, P2 live preload guard (subsumed by panic fixes + cap), P3 live image safe read, P4 large ISO boot, redox.patch — to be applied in dedicated rebase session. firmware-loader/Cargo.toml: version 0.1.0 -> 0.3.0 (sync with other Red Bear custom crates which are at 0.3.0). fork-upstream-map.toml: bootloader back from PENDING_REBASE to 1.0.0 since the partial rebase matches upstream 1.0.0 content. fork-upstream-map.toml: base restored to 'main' tracked (was correctly tracked by build-redbear.sh).
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
# stack-direction.m4
|
||||
# serial 12
|
||||
dnl Copyright (C) 2002-2025 Free Software Foundation, Inc.
|
||||
dnl This file is free software, distributed under the terms of the GNU
|
||||
dnl General Public License as published by the Free Software Foundation;
|
||||
dnl either version 2 of the License, or (at your option) any later version.
|
||||
dnl As a special exception to the GNU General Public License, this file
|
||||
dnl may be distributed as part of a program that contains a configuration
|
||||
dnl script generated by Autoconf, under the same distribution terms as
|
||||
dnl the rest of that program.
|
||||
|
||||
dnl Written by Bruno Haible.
|
||||
|
||||
# Determine the stack direction. Define the C macro STACK_DIRECTION.
|
||||
AC_DEFUN([SV_STACK_DIRECTION],
|
||||
[
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_CACHE_CHECK([for stack direction], [sv_cv_stack_direction_msg], [
|
||||
case "$host_cpu" in
|
||||
dnl See the #define STACK_GROWS_DOWNWARD in gcc-3.1/gcc/config/*/*.h.
|
||||
a29k | \
|
||||
aarch64* | \
|
||||
alpha* | \
|
||||
arc | arceb | arc32 | arc64 | \
|
||||
arm* | strongarm* | xscale* | \
|
||||
avr | avr32 | \
|
||||
bfin | \
|
||||
c1 | c2 | c32 | c34 | c38 | \
|
||||
clipper | \
|
||||
cr16 | \
|
||||
cris | \
|
||||
csky | \
|
||||
d30v | \
|
||||
epiphany | \
|
||||
elxsi | \
|
||||
fr30 | \
|
||||
frv | \
|
||||
ft32 | \
|
||||
h8300 | \
|
||||
i?86 | x86_64 | \
|
||||
i860 | \
|
||||
ia64 | \
|
||||
iq2000 | \
|
||||
lm32 | \
|
||||
loongarch* | \
|
||||
m32c | \
|
||||
m32r | \
|
||||
m68* | \
|
||||
m88k | \
|
||||
mcore | \
|
||||
microblaze* | \
|
||||
mips* | \
|
||||
mmix | \
|
||||
mn10200 | \
|
||||
mn10300 | \
|
||||
moxie | \
|
||||
msp430 | \
|
||||
nds32* | \
|
||||
nios2 | nios2eb | nios2el | \
|
||||
ns32k | \
|
||||
nvptx | \
|
||||
or1k | \
|
||||
pdp11 | \
|
||||
pj* | \
|
||||
powerpc* | rs6000 | \
|
||||
pru | \
|
||||
riscv* | \
|
||||
rl78 | \
|
||||
romp | \
|
||||
rx | \
|
||||
s390* | \
|
||||
sh* | \
|
||||
sparc* | \
|
||||
tic6x | \
|
||||
tilegx | \
|
||||
tilepro | \
|
||||
v850 | \
|
||||
vax | \
|
||||
visium | \
|
||||
xtensa)
|
||||
sv_cv_stack_direction=-1 ;;
|
||||
c4x | \
|
||||
dsp16xx | \
|
||||
i960 | \
|
||||
hppa* | parisc* | \
|
||||
stormy16 | \
|
||||
we32k)
|
||||
sv_cv_stack_direction=1 ;;
|
||||
*)
|
||||
if test $cross_compiling = no; then
|
||||
cat > conftest.c <<EOF
|
||||
#include <stdio.h>
|
||||
int
|
||||
find_stack_direction (int *addr, int depth)
|
||||
{
|
||||
int dir, dummy = 0;
|
||||
if (! addr)
|
||||
addr = &dummy;
|
||||
*addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
|
||||
dir = depth ? find_stack_direction (addr, depth - 1) : 0;
|
||||
return dir + dummy;
|
||||
}
|
||||
int
|
||||
main (int argc, char *argv[[]])
|
||||
{
|
||||
printf ("%d\n", find_stack_direction (NULL, argc + 20));
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
AC_TRY_EVAL([ac_link])
|
||||
sv_cv_stack_direction=`./conftest`
|
||||
else
|
||||
sv_cv_stack_direction=0
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case $sv_cv_stack_direction in
|
||||
1) sv_cv_stack_direction_msg="grows up";;
|
||||
-1) sv_cv_stack_direction_msg="grows down";;
|
||||
*) sv_cv_stack_direction_msg="unknown";;
|
||||
esac
|
||||
])
|
||||
AC_DEFINE_UNQUOTED([STACK_DIRECTION], [$sv_cv_stack_direction],
|
||||
[Define as the direction of stack growth for your system.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => spaghetti stack.])
|
||||
])
|
||||
Reference in New Issue
Block a user