Compare commits

...

22 Commits

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

Closes #1425

See merge request redox-os/redox!1581
2025-08-24 16:09:54 +00:00
Jeremy Soller
f768df678c Merge branch 'qemu_gpu' into 'master'
Rework qemu gpu configuration

See merge request redox-os/redox!1634
2025-08-24 09:07:42 -06:00
Jeremy Soller
2863ab4deb Merge branch 'master' of https://gitlab.redox-os.org/redox-os/redox 2025-08-24 09:06:13 -06:00
Jeremy Soller
57fe06d1ed Disable gears in demo config 2025-08-24 09:06:07 -06:00
Jeremy Soller
f3a8336ad2
Update relibc 2025-08-24 08:40:48 -06:00
bjorn3
5d7fcad842 Rework qemu gpu configuration
* Make gpu=no work on arm64 and riscv64
* Register gpu's with the firmware as vga card on x86 where possible
* Add a virtio-gl option for virtio-gpu with OpenGL support (no support
  on the driver side yet)
* Support ramfb on x86
2025-08-24 16:31:54 +02:00
Jeremy Soller
86f4f305b1
Update cookbook 2025-08-24 08:29:19 -06: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 66 additions and 31 deletions

View File

@ -39,7 +39,7 @@ acid = {}
orbclient = {}
pixelcannon = {}
rodioplay = {}
gears = {}
# gears = {} # sccache issue
# MIDI
freepats = {}

@ -1 +1 @@
Subproject commit cc58d96c6f3747f7d80c9f393db0df24bc17030d
Subproject commit fc48fb9cf460833a91d0fd76911b39c1ef9d57bf

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

@ -3,10 +3,13 @@
QEMU=SDL_VIDEO_X11_DGAMOUSE=0 qemu-system-$(QEMU_ARCH)
QEMUFLAGS=-d guest_errors -name "Redox OS $(ARCH)"
netboot?=no
VGA_SUPPORTED=no
ifeq ($(ARCH),i686)
audio?=ac97
gpu?=vga
uefi=no
VGA_SUPPORTED=yes
QEMU_ARCH=i386
QEMU_MACHINE?=pc
QEMU_CPU?=pentium2
@ -18,6 +21,8 @@ ifeq ($(ARCH),i686)
kvm?=yes
endif
else ifeq ($(ARCH),x86_64)
gpu?=vga
VGA_SUPPORTED=yes
QEMU_ARCH=x86_64
QEMU_MACHINE?=q35
QEMU_CPU?=core2duo
@ -43,6 +48,7 @@ else ifeq ($(ARCH),aarch64)
# setting up a framebuffer ourself.
uefi?=yes
live?=yes
gpu?=ramfb
QEMU_ARCH=aarch64
QEMU_MACHINE?=virt
QEMU_CPU=max
@ -73,9 +79,6 @@ else ifeq ($(ARCH),aarch64)
else
FIRMWARE=$(BUILD)/qemu_uboot.rom
endif
ifneq ($(gpu),no)
QEMUFLAGS+=-device ramfb
endif
ifneq ($(usb),no)
QEMUFLAGS+=-device qemu-xhci -device usb-kbd -device usb-tablet
endif
@ -89,7 +92,7 @@ else ifeq ($(ARCH),riscv64gc)
live=no
efi=yes
audio=no
vga=no # virtio-gpu-pci
gpu?=ramfb
net=bridge
QEMU_ARCH=riscv64
# QEMU_MACHINE=virt for ACPI mode instead of DTB
@ -111,9 +114,6 @@ else ifeq ($(ARCH),riscv64gc)
$(wildcard /usr/share/qemu/edk2-riscv-vars.fd) \
$(wildcard /opt/homebrew/opt/qemu/share/qemu/edk2-riscv-vars.fd) \
)
ifneq ($(vga),no)
QEMUFLAGS+=-device ramfb
endif
ifneq ($(usb),no)
QEMUFLAGS+=-device qemu-xhci -device usb-kbd -device usb-tablet
endif
@ -212,12 +212,32 @@ endif
ifeq ($(gpu),no)
QEMUFLAGS+=-nographic -vga none
else ifeq ($(gpu),vga)
ifeq ($(VGA_SUPPORTED),yes)
QEMUFLAGS+=-vga std
else
QEMUFLAGS+=-vga none -device secondary-vga
endif
else ifeq ($(gpu),ramfb)
QEMUFLAGS+=-vga none -device ramfb
else ifeq ($(gpu),multi)
QEMUFLAGS+=-display sdl -vga none -device virtio-gpu,max_outputs=2
ifeq ($(VGA_SUPPORTED),yes)
QEMUFLAGS+=-display sdl -vga none -device virtio-vga,max_outputs=2
else
QEMUFLAGS+=-display sdl -vga none -device virtio-gpu,max_outputs=2
endif
else ifeq ($(gpu),virtio)
QEMUFLAGS+=-vga virtio
else ifeq ($(vga),virtio-gpu-pci)
QEMUFLAGS+= -vga virtio-gpu-pci
ifeq ($(VGA_SUPPORTED),yes)
QEMUFLAGS+=-vga none -device virtio-vga
else
QEMUFLAGS+=-vga none -device virtio-gpu
endif
else ifeq ($(gpu),virtio-gl)
ifeq ($(VGA_SUPPORTED),yes)
QEMUFLAGS+=-display gtk,gl=on -vga none -device virtio-vga-gl
else
QEMUFLAGS+=-display gtk,gl=on -vga none -device virtio-gpu-gl
endif
endif
EXTRA_DISK=$(BUILD)/extra.img

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 f170902a29f0b7c10cc2bce087c8b6f0d9478d9d
Subproject commit 92bc01247ad9c9ebae6e47740a1bb9e2f556635b