Compare commits

...

24 Commits

Author SHA1 Message Date
Wildan Mubarok
a4361fce6f Merge branch 'patch-make-macos' into 'master'
Fix macos podman build

Closes #1425

See merge request redox-os/redox!1581
2025-08-25 14:14:07 +00:00
Jeremy Soller
c8c07c711b Update cookbook 2025-08-25 08:10:55 -06:00
Wildan Mubarok
e5ef805f38 Merge branch redox:master into patch-make-macos 2025-08-25 10:56:59 +00:00
Jeremy Soller
12bb45c50c Merge branch 'master' of https://gitlab.redox-os.org/redox-os/redox 2025-08-24 18:30:31 -06:00
Jeremy Soller
db63dae187 Update relibc 2025-08-24 18:30:24 -06:00
Jeremy Soller
6eda4b8aac Merge branch 'qemu_improvements' into 'master'
Couple more qemu improvements

See merge request redox-os/redox!1635
2025-08-24 14:25:37 -06:00
bjorn3
4f2efe1c56 Simplify gdb-userspace
Turns out gdb already handles locating the .text section when you don't
specify the offset.
2025-08-24 19:05:28 +02:00
bjorn3
16e98e3f28 Add a make qemu mode to allow attaching gdb without waiting for it
This way you can unconditionally enable this mode during development
without being forced to attach a debugger every time you start a VM.
2025-08-24 18:56:39 +02:00
bjorn3
716cca1b4e Enable UEFI by default on x86_64
It boots faster and more reliable than SeaBIOS. And in practice you are
unlikely to use BIOS on real hardware if you have an x86_64 capable CPU
anyway.
2025-08-24 18:40:01 +02:00
Wildan M
0373415174 Unlock arch 2025-08-17 21:37:57 +07:00
Wildan M
ef6bf9beff Merge branch 'master' into patch-make-macos 2025-08-17 21:30:18 +07:00
Wildan M
b6cac36159 fix more make 2025-08-13 22:15:59 +07:00
Wildan M
f617c5bc6c Fix rootless podman problem 2025-07-28 18:44:39 +07:00
Wildan M
2498e4bfb3 Fix env 2025-07-28 18:35:25 +07:00
Wildan M
0e232a7909 Revert some changes and remove osxfuse in podman deps 2025-07-28 18:35:25 +07:00
Wildan M
1c93c89f38 Revert some changes 2025-07-28 18:34:08 +07:00
Wildan M
778af4cdcc Force use fuse inside podman 2025-07-28 18:33:39 +07:00
Wildan M
1a0b0f129a Avoid permission error when building libtool
Apparently .git files contains 0400 mode files which fails cp -rp so it fails with rootless podman setting
2025-07-28 18:32:46 +07:00
Wildan M
9114ec3cf1 Remove comments 2025-07-28 18:31:02 +07:00
Wildan M
104d1d6b82 Add arch to force use of prebuilt prefix 2025-07-28 18:31:02 +07:00
Wildan M
91c38535df Merge back run commands 2025-07-28 18:31:02 +07:00
Wildan M
6659fe61a1 Fix deleting lines 2025-07-28 18:31:02 +07:00
Wildan M
c46cbf857b Fix deleting lines 2025-07-28 18:31:02 +07:00
Wildan M
134bc3d507 Fix macos podman build 2025-07-28 18:31:02 +07:00
9 changed files with 39 additions and 21 deletions

View File

@ -101,7 +101,7 @@ gdb: FORCE
# has started or you need to debug the interaction between the application and the kernel.
# tl;dr: DO NOT USE THIS TARGET UNLESS YOU HAVE TO
gdb-userspace: FORCE
rust-gdb $(GDB_APP_FILE) --eval-command="add-symbol-file $(GDB_KERNEL_FILE) 0x$(shell readelf -S $(GDB_KERNEL_FILE) | grep .text | cut -c43-58)" --eval-command="target remote :1234"
rust-gdb $(GDB_APP_FILE) --eval-command="add-symbol-file $(GDB_KERNEL_FILE)" --eval-command="target remote :1234"
# An empty target
FORCE:

@ -1 +1 @@
Subproject commit fc48fb9cf460833a91d0fd76911b39c1ef9d57bf
Subproject commit 6e527b4350a0d02993d04e95e32f040cf5a32c72

View File

@ -1,6 +1,9 @@
# Configuration file with the commands configuration of the Redox image
$(BUILD)/harddrive.img: $(HOST_FSTOOLS) $(REPO_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p $(BUILD)
rm -rf $@ $@.partial
-$(FUMOUNT) /tmp/redox_installer || true
@ -11,8 +14,12 @@ $(BUILD)/harddrive.img: $(HOST_FSTOOLS) $(REPO_TAG)
truncate -s "$$FILESYSTEM_SIZE"m $@.partial
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) $@.partial
mv $@.partial $@
endif
$(BUILD)/redox-live.iso: $(HOST_FSTOOLS) $(REPO_TAG) redox.ipxe
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p $(BUILD)
rm -rf $@ $@.partial
-$(FUMOUNT) /tmp/redox_installer || true
@ -24,8 +31,12 @@ $(BUILD)/redox-live.iso: $(HOST_FSTOOLS) $(REPO_TAG) redox.ipxe
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) --write-bootloader="$(BUILD)/bootloader-live.efi" --live $@.partial
mv $@.partial $@
cp redox.ipxe $(BUILD)/redox.ipxe
endif
$(BUILD)/filesystem.img: $(HOST_FSTOOLS) $(REPO_TAG)
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
mkdir -p $(BUILD)
-$(FUMOUNT) $(BUILD)/filesystem/ || true
rm -rf $@ $@.partial $(BUILD)/filesystem/
@ -45,6 +56,7 @@ $(BUILD)/filesystem.img: $(HOST_FSTOOLS) $(REPO_TAG)
-$(FUMOUNT) $(BUILD)/filesystem/ || true
rm -rf $(BUILD)/filesystem/
mv $@.partial $@
endif
mount: $(HOST_FSTOOLS) FORCE
mkdir -p $(BUILD)/filesystem/

View File

@ -16,12 +16,16 @@ endif
## The installer and redoxfs run on the host, even when using Podman build
$(HOST_FSTOOLS): installer redoxfs
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf $@ $@.partial
mkdir -p $@.partial
$(HOST_CARGO) install --root $@.partial --path installer --bin redox_installer
$(HOST_CARGO) install --root $@.partial --path redoxfs --bin redoxfs --bin redoxfs-mkfs
mv $@.partial $@
touch $@
endif
fstools_clean: FORCE $(CONTAINER_TAG)
ifeq ($(PODMAN_BUILD),1)

View File

@ -17,15 +17,15 @@ endif
## Podman Home Directory
PODMAN_HOME?=$(ROOT)/build/podman
## Podman command with its many arguments
PODMAN_VOLUMES?=--volume $(ROOT):$(CONTAINER_WORKDIR)$(PODMAN_VOLUME_FLAG) --volume $(PODMAN_HOME):/home$(PODMAN_VOLUME_FLAG)
PODMAN_ENV?=--env PATH=/home/poduser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env PODMAN_BUILD=0
PODMAN_VOLUMES?=--volume $(ROOT):$(CONTAINER_WORKDIR)$(PODMAN_VOLUME_FLAG) --volume $(PODMAN_HOME):/root$(PODMAN_VOLUME_FLAG)
PODMAN_ENV?=--env PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin --env PODMAN_BUILD=0
PODMAN_CONFIG?=--env ARCH=$(ARCH) --env BOARD=$(BOARD) --env CONFIG_NAME=$(CONFIG_NAME) --env FILESYSTEM_CONFIG=$(FILESYSTEM_CONFIG)
PODMAN_OPTIONS?=--rm --workdir $(CONTAINER_WORKDIR) --userns keep-id --user `id -u` --interactive --tty --env TERM=$(TERM)
PODMAN_OPTIONS?=--rm --workdir $(CONTAINER_WORKDIR) --interactive --tty --cap-add SYS_ADMIN --device /dev/fuse --env TERM=$(TERM)
PODMAN_RUN?=podman run $(PODMAN_OPTIONS) $(PODMAN_VOLUMES) $(PODMAN_ENV) $(PODMAN_CONFIG) $(IMAGE_TAG)
container_shell: build/container.tag
ifeq ($(PODMAN_BUILD),1)
podman run $(PODMAN_VOLUMES) $(PODMAN_OPTIONS) $(PODMAN_ENV) --tty $(IMAGE_TAG) bash
podman run $(PODMAN_VOLUMES) $(PODMAN_OPTIONS) $(PODMAN_ENV) $(IMAGE_TAG) bash
else
@echo PODMAN_BUILD=$(PODMAN_BUILD), please set it to 1 in mk/config.mk
endif
@ -56,12 +56,12 @@ container_kill: FORCE
build/container.tag: $(CONTAINERFILE)
ifeq ($(PODMAN_BUILD),1)
rm -f build/container.tag
@echo "If podman_home dir cannot be removed, remove with \"sudo rm\"."
-chmod -R 0700 $(PODMAN_HOME) || true
-rm -rf $(PODMAN_HOME) || true
-podman image rm --force $(IMAGE_TAG) || true
mkdir -p $(PODMAN_HOME)
@echo "Building Podman image. This may take some time."
sed s/_UID_/`id -u`/ $(CONTAINERFILE) | podman build --file - $(PODMAN_VOLUMES) --tag $(IMAGE_TAG)
cat $(CONTAINERFILE) | podman build --file - $(PODMAN_VOLUMES) --tag $(IMAGE_TAG)
@echo "Mapping Podman user space. Please wait."
$(PODMAN_RUN) bash -e podman/rustinstall.sh
mkdir -p build

View File

@ -71,6 +71,9 @@ $(PREFIX)/relibc-install.tar.gz: $(PREFIX)/relibc-install
.
$(PREFIX)/libtool:
ifeq ($(PODMAN_BUILD),1)
$(PODMAN_RUN) make $@
else
rm -rf "$@.partial" "$@"
mkdir -p "$@.partial"
@ -85,6 +88,7 @@ $(PREFIX)/libtool:
touch "$@.partial"
echo $(LIBTOOL_VERSION) > $@.partial/.tarball-version
mv "$@.partial" "$@"
endif
$(PREFIX)/libtool-build: $(PREFIX)/libtool $(PREFIX)/rust-install
ifeq ($(PODMAN_BUILD),1)
@ -100,7 +104,7 @@ else
--gnulib-srcdir=./gnulib
PATH="$(ROOT)/$(PREFIX)/rust-install/bin:$$PATH" && \
cd "$@.partial" && \
cp -rp $(abspath $<)/. ./ && \
cp -r $(abspath $<)/. ./ && \
"$(ROOT)/$</configure" \
--target="$(TARGET)" \
--prefix=$(abspath $(PREFIX)/sysroot) && \

View File

@ -22,6 +22,7 @@ ifeq ($(ARCH),i686)
endif
else ifeq ($(ARCH),x86_64)
gpu?=vga
uefi?=yes
VGA_SUPPORTED=yes
QEMU_ARCH=x86_64
QEMU_MACHINE?=q35
@ -90,7 +91,6 @@ else ifeq ($(ARCH),aarch64)
endif
else ifeq ($(ARCH),riscv64gc)
live=no
efi=yes
audio=no
gpu?=ramfb
net=bridge
@ -272,6 +272,9 @@ endif
ifeq ($(gdb),yes)
QEMUFLAGS+=-d cpu_reset -s -S
else ifeq ($(gdb),nonblock)
# Allow attaching gdb, but don't block for it
QEMUFLAGS+=-d cpu_reset -s
endif
ifeq ($(UNAME),Linux)

View File

@ -2,13 +2,8 @@
FROM debian:trixie
# _UID_ must be replaced with the user's uid on host
# podman root is mapped to your user id on host during build,
# poduser is mapped to your user id during podman run
RUN useradd --create-home --no-log-init --uid _UID_ poduser \
&& chown -R root:root /home \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ant \
appstream \
appstream-compose \
@ -36,7 +31,6 @@ RUN useradd --create-home --no-log-init --uid _UID_ poduser \
gtk-doc-tools \
help2man \
intltool \
libc6-dev-i386 \
libexpat-dev \
libfontconfig1-dev \
libfuse3-dev \
@ -72,7 +66,6 @@ RUN useradd --create-home --no-log-init --uid _UID_ poduser \
ruby \
scons \
ssh \
syslinux-utils \
texinfo \
unifdef \
unzip \
@ -84,4 +77,6 @@ RUN useradd --create-home --no-log-init --uid _UID_ poduser \
xxd \
zip \
zlib1g-dev \
zstd
zstd; \
if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
apt-get install -y --no-install-recommends libc6-dev-i386 syslinux-utils; fi

2
relibc

@ -1 +1 @@
Subproject commit 92bc01247ad9c9ebae6e47740a1bb9e2f556635b
Subproject commit fd9a1c9668c10d122eab9839d0f0f7f4d88703ab