Compare commits

1 Commits
Author SHA1 Message Date
Michal S. a06046eac4 fix x86_64 build 2026-08-06 19:38:34 +01:00
8 changed files with 61 additions and 29 deletions
+2 -1
View File
@@ -147,7 +147,6 @@ RUN MOUSE_SOURCE_DIR=/opt/mouse-sources \
FROM static-base-bootstrap AS static-base-libraries
COPY mouse-src/base/patches/shadow-4.20.0-stdint.patch /work/mouse-src/base/patches/shadow-4.20.0-stdint.patch
COPY mouse-src/scripts/static-base/libraries-and-accounts.sh /work/mouse-src/scripts/static-base/libraries-and-accounts.sh
RUN MOUSE_SOURCE_DIR=/opt/mouse-sources \
@@ -178,6 +177,8 @@ COPY --from=static-base-toolchain /work/mouse-src/build/static/sysroot /work/mou
COPY --from=static-base-toolchain /work/mouse-src/build/static/cross-tools /work/mouse-src/build/static/cross-tools
COPY --from=static-base-toolchain /work/mouse-src/build/static/rust-eh-personality.o /work/mouse-src/build/static/rust-eh-personality.o
COPY --from=autotools-sources /opt/mouse-sources/ /opt/mouse-sources/
COPY mouse-src/base/patches/m4-1.4.21-aarch64.patch /work/mouse-src/base/patches/m4-1.4.21-aarch64.patch
COPY mouse-src/scripts/mouse-arch.sh /usr/libexec/mouse-arch.sh
COPY mouse-src/scripts/build-world-autotools.sh /usr/libexec/mouse-build-world-autotools
RUN MOUSE_BUILD_JOBS="$MOUSE_BUILD_JOBS" \
+7 -1
View File
@@ -11,9 +11,11 @@ CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
CONFIG_ACPI_VIDEO=y
CONFIG_ACPI_WMI=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_MICROCODE=y
@@ -22,6 +24,7 @@ CONFIG_X86_MCE=y
CONFIG_MULTIUSER=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_LEGACY_TIOCSTI=n
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
@@ -101,12 +104,14 @@ CONFIG_PCI_MSI=y
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y
CONFIG_THERMAL=y
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_INPUT=y
CONFIG_VIRTIO_NET=y
CONFIG_ETHTOOL_NETLINK=y
CONFIG_NET_VENDOR_INTEL=y
CONFIG_E1000=y
CONFIG_E1000E=y
@@ -126,7 +131,6 @@ CONFIG_IWLWIFI=m
CONFIG_IWLMVM=m
CONFIG_WLAN_VENDOR_ATH=y
CONFIG_ATH9K=m
CONFIG_ATH9K_PCI=y
CONFIG_ATH10K=m
CONFIG_ATH10K_PCI=m
@@ -140,6 +144,7 @@ CONFIG_VMD=y
CONFIG_USB_SUPPORT=y
CONFIG_USB=y
CONFIG_USB_PCI=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PCI=y
CONFIG_USB_EHCI_HCD=y
@@ -160,6 +165,7 @@ CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_VGA_CONSOLE=y
CONFIG_INPUT=y
CONFIG_HID_SUPPORT=y
CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
+11
View File
@@ -0,0 +1,11 @@
--- a/lib/sigsegv.c
+++ b/lib/sigsegv.c
@@ -80,7 +80,7 @@
# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.sc_regs[30]
-# elif defined __arm64__ /* 64-bit */
+# elif defined __arm64__ || defined __aarch64__ /* 64-bit */
/* See glibc/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h.
Note that the 'mcontext_t' defined in
-18
View File
@@ -1,18 +0,0 @@
--- a/lib/find_new_sub_gids.c
+++ b/lib/find_new_sub_gids.c
@@ -7,6 +7,7 @@
#ifdef ENABLE_SUBIDS
+#include <stdint.h>
#include <stdio.h>
#include <errno.h>
--- a/lib/find_new_sub_uids.c
+++ b/lib/find_new_sub_uids.c
@@ -7,6 +7,7 @@
#ifdef ENABLE_SUBIDS
+#include <stdint.h>
#include <stdio.h>
#include <errno.h>
+3
View File
@@ -64,12 +64,15 @@ rm -f "$disk_image"
truncate -s $((disk_sectors * sector_size)) "$disk_image"
if [ "$MOUSE_ARCH" = x86_64 ]; then
bios_partition="start=34, size=$((boot_start - 34)), type=21686148-6449-6e6f-744e-656564454649, uuid=4d4f5553-4500-4000-8000-000000000003, name=\"MOUSE_BIOS\""
gpt_first_lba=34
else
bios_partition=
gpt_first_lba=$boot_start
fi
sfdisk --quiet "$disk_image" <<EOF
label: gpt
label-id: 4d4f5553-4500-4000-8000-000000000000
first-lba: $gpt_first_lba
unit: sectors
$bios_partition
+16 -3
View File
@@ -32,20 +32,33 @@ make -C "$kernel_source" \
ARCH="$MOUSE_KERNEL_ARCH" \
LLVM=1 \
KCONFIG_ALLCONFIG="$kernel_config" \
allnoconfig
alldefconfig
missing_requested_settings=0
while IFS= read -r requested || [ -n "$requested" ]; do
case "$requested" in
CONFIG_*=*) ;;
*) continue ;;
esac
if ! grep -Fqx "$requested" "$kernel_output/.config"; then
case "$requested" in
CONFIG_*=n)
expected="# ${requested%=n} is not set"
;;
*)
expected=$requested
;;
esac
if ! grep -Fqx "$expected" "$kernel_output/.config"; then
printf '%s\n' \
"kernel did not enable requested setting: $requested" >&2
exit 1
missing_requested_settings=1
fi
done <"$kernel_config"
if [ "$missing_requested_settings" -ne 0 ]; then
exit 1
fi
if grep -Fqx 'CONFIG_LEGACY_TIOCSTI=y' "$kernel_output/.config"; then
printf '%s\n' \
"kernel enables legacy TIOCSTI, which is unsafe across privilege boundaries" >&2
+10 -4
View File
@@ -5,6 +5,7 @@ source_dir=${MOUSE_SOURCE_DIR:-/opt/mouse-sources}
static_dir=${MOUSE_STATIC_DIR:-/work/mouse-src/build/static}
destination=${MOUSE_AUTOTOOLS_ROOT:-/opt/mouse-autotools}
jobs=${MOUSE_BUILD_JOBS:-1}
. /usr/libexec/mouse-arch.sh
case "$destination" in
/opt/mouse-autotools) ;;
@@ -37,9 +38,12 @@ extract perl-5.44.0.tar.xz
extract autoconf-2.72.tar.xz
extract automake-1.16.3.tar.xz
cc=$(find "$static_dir/cross-tools/bin" -name '*-cc' -type l -print | head -1)
ar=$(find "$static_dir/cross-tools/bin" -name '*-ar' -type l -print | head -1)
ranlib=$(find "$static_dir/cross-tools/bin" -name '*-ranlib' -type l -print | head -1)
patch -d "$build_root/m4-1.4.21" -p1 \
<"/work/mouse-src/base/patches/m4-1.4.21-aarch64.patch"
cc="$static_dir/cross-tools/bin/$MOUSE_CROSS_TARGET-cc"
ar="$static_dir/cross-tools/bin/$MOUSE_CROSS_TARGET-ar"
ranlib="$static_dir/cross-tools/bin/$MOUSE_CROSS_TARGET-ranlib"
for tool in "$cc" "$ar" "$ranlib"; do
[ -x "$tool" ] || {
printf '%s\n' "missing MOUSE cross-build tool: $tool" >&2
@@ -53,9 +57,11 @@ export PATH
(
cd "$build_root/m4-1.4.21"
CC="$cc" AR="$ar" RANLIB="$ranlib" \
CFLAGS=-O2 LDFLAGS=-static \
CFLAGS=-O2 LDFLAGS=-static \
./configure \
--prefix=/usr \
--host="$MOUSE_RUST_TARGET" \
--disable-gcc-warnings \
--disable-dependency-tracking \
--disable-nls
make -s -j"$jobs"
+12 -2
View File
@@ -4,8 +4,18 @@ set -eu
component_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
. "$component_dir/common.sh"
patch -d "$source_build_dir/shadow-4.20.0" -p1 \
<"$repo_dir/base/patches/shadow-4.20.0-stdint.patch"
for source_file in \
"$source_build_dir/shadow-4.20.0/lib/find_new_sub_gids.c" \
"$source_build_dir/shadow-4.20.0/lib/find_new_sub_uids.c"
do
if ! grep -q '^#include <stdint.h>$' "$source_file"; then
awk '
/^#include <stdio.h>$/ { print "#include <stdint.h>" }
{ print }
' "$source_file" >"$source_file.new"
mv "$source_file.new" "$source_file"
fi
done
(
cd "$source_build_dir/zlib-1.3.2"