f31522130f
Build system (5 gaps hardened): - COOKBOOK_OFFLINE defaults to true (fork-mode) - normalize_patch handles diff -ruN format - New 'repo validate-patches' command (25/25 relibc patches) - 14 patched Qt/Wayland/display recipes added to protected list - relibc archive regenerated with current patch chain Boot fixes (fixable): - Full ISO EFI partition: 16 MiB → 1 MiB (matches mini, BIOS hardcoded 2 MiB offset) - D-Bus system bus: absolute /usr/bin/dbus-daemon path (was skipped) - redbear-sessiond: absolute /usr/bin/redbear-sessiond path (was skipped) - daemon framework: silenced spurious INIT_NOTIFY warnings for oneshot_async services (P0-daemon-silence-init-notify.patch) - udev-shim: demoted INIT_NOTIFY warning to INFO (expected for oneshot_async) - relibc: comprehensive named semaphores (sem_open/close/unlink) replacing upstream todo!() stubs - greeterd: Wayland socket timeout 15s → 30s (compositor DRM wait) - greeter-ui: built and linked (header guard unification, sem_compat stubs removed) - mc: un-ignored in both configs, fixed glib/libiconv/pcre2 transitive deps - greeter config: removed stale keymapd dependency from display/greeter services - prefix toolchain: relibc headers synced, _RELIBC_STDLIB_H guard unified Unfixable (diagnosed, upstream): - i2c-hidd: abort on no-I2C-hardware (QEMU) — process::exit → relibc abort - kded6/greeter-ui: page fault 0x8 — Qt library null deref - Thread panics fd != -1 — Rust std library on Redox - DHCP timeout / eth0 MAC — QEMU user-mode networking - hwrngd/thermald — no hardware RNG/thermal in VM - live preload allocation — BIOS memory fragmentation, continues on demand
113 lines
3.7 KiB
Makefile
113 lines
3.7 KiB
Makefile
|
|
# We don't want xcodebuild to run in parallel
|
|
.NOTPARALLEL:
|
|
|
|
# Functions
|
|
targets = $(foreach target, $(EXPORT_SUBTARGETS), $(target)-$(strip $(1)))
|
|
toupper = $(shell echo $1 | tr '[:lower:]' '[:upper:]')
|
|
tolower = $(shell echo $1 | tr '[:upper:]' '[:lower:]')
|
|
basesdk = $(shell echo $1 | sed 's/[0-9.]*$$//')
|
|
|
|
# Explicit comma variable
|
|
, := ,
|
|
|
|
# Default targets
|
|
first: build
|
|
all: build_all
|
|
|
|
.DEFAULT_GOAL = first
|
|
|
|
# Top level targets
|
|
build: build_first
|
|
clean: clean_first
|
|
install: install_first
|
|
check: check_first
|
|
distclean: clean_all
|
|
|
|
$(EXPORT_SUBTARGETS): % : %-build
|
|
|
|
# Generic targets
|
|
%_first: $(EXPORT_PRE_TARGETDEPS) $(firstword $(call targets, %)) ;
|
|
%_all: $(EXPORT_PRE_TARGETDEPS) $(call targets, %) ;
|
|
|
|
# Actions
|
|
%-build: ACTION = build
|
|
%-build: xcodebuild-% ;
|
|
|
|
%-clean: ACTION = clean
|
|
%-clean: xcodebuild-% ;
|
|
|
|
%-install: ACTION = install
|
|
%-install: xcodebuild-% ;
|
|
|
|
# Simulator doesn't support archiving
|
|
%-simulator-install: ACTION = build
|
|
simulator-install: ACTION = build
|
|
|
|
# Limit check to a single configuration
|
|
%-device-check: check-device ;
|
|
%-simulator-check: check-simulator ;
|
|
|
|
# SDK
|
|
%-device: SDK = $(DEVICE_SDK)
|
|
%-simulator: SDK = $(SIMULATOR_SDK)
|
|
|
|
# Configuration
|
|
release-%: CONFIGURATION = Release
|
|
debug-%: CONFIGURATION = Debug
|
|
|
|
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
|
|
|
# Test device destinations
|
|
ifneq ($(filter check%,$(MAKECMDGOALS)),)
|
|
ifeq ($(DEVICES),)
|
|
$(info Enumerating test destinations (you may override this by setting DEVICES explicitly), please wait...)
|
|
DESTINATIONS_INCLUDE = /tmp/device_destinations.mk
|
|
$(shell $(MAKEFILE_DIR)device_destinations.sh $(TARGET) $(EXPORT_DEVICE_FILTER) > $(DESTINATIONS_INCLUDE))
|
|
include $(DESTINATIONS_INCLUDE)
|
|
endif
|
|
endif
|
|
|
|
%-simulator: DEVICES = $(firstword $(SIMULATOR_DEVICES))
|
|
%-device: DEVICES = $(HARDWARE_DEVICES)
|
|
|
|
GENERIC_DEVICE_DESTINATION := $(EXPORT_GENERIC_DEVICE_DESTINATION)
|
|
GENERIC_SIMULATOR_DESTINATION := $(EXPORT_GENERIC_SIMULATOR_DESTINATION)
|
|
|
|
%-simulator: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)","$(GENERIC_SIMULATOR_DESTINATION)")
|
|
%-device: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)","$(GENERIC_DEVICE_DESTINATION)")
|
|
|
|
XCODE_VERSION_MAJOR := $(shell xcodebuild -version | grep Xcode | sed -e 's/Xcode //' | sed -e 's/\..*//')
|
|
|
|
ifeq ($(shell test $(XCODE_VERSION_MAJOR) -gt 7; echo $$?),0)
|
|
XCODEBUILD_FLAGS += $(shell echo "$(MAKEFLAGS)" | sed -e 's/\([^ ]*\).*/\1/' | grep -qv 's' || echo -quiet)
|
|
endif
|
|
|
|
ifeq ($(shell test $(XCODE_VERSION_MAJOR) -ge 9; echo $$?),0)
|
|
XCODEBUILD_FLAGS += -allowProvisioningUpdates
|
|
endif
|
|
|
|
# Xcodebuild
|
|
|
|
DESTINATION_MESSAGE = "Running $(call tolower,$(CONFIGURATION)) $(ACTION) \
|
|
on '$(DESTINATION_NAME)' ($(DESTINATION_ID))$(if $(DESTINATION_OS),$(,) $(DESTINATION_PLATFORM) $(DESTINATION_OS),)"
|
|
|
|
xcodebuild-%:
|
|
@$(if $(DESTINATION_NAME), echo $(DESTINATION_MESSAGE),)
|
|
xcodebuild $(ACTION) $(XCODEBUILD_FLAGS) -project $(TARGET).xcodeproj -scheme $(TARGET) $(if $(SDK), -sdk $(SDK),) $(if $(CONFIGURATION), -configuration $(CONFIGURATION),) $(if $(DESTINATION), -destination $(DESTINATION) -destination-timeout 1,) $(if $(DESTINATION_ID),, ENABLE_ONLY_ACTIVE_RESOURCES=NO) $(if $(INSTALL_ROOT), DSTROOT=$(INSTALL_ROOT),)
|
|
|
|
xcodebuild-check-device_%: DESTINATION_ID=$(lastword $(subst _, ,$@))
|
|
|
|
# Special check target (requires SECONDEXPANSION due to devices)
|
|
.SECONDEXPANSION:
|
|
check-%: ACTION = test
|
|
check-%: $$(foreach device, $$(DEVICES), xcodebuild-check-device_$$(device)) ;
|
|
@echo $(if $^, Ran $(call tolower,$(CONFIGURATION)) tests on $(words $^) $(SDK) destination\(s\): $(DEVICES), No compatible test devices found for \'$(SDK)\' SDK && false)
|
|
|
|
# Determined by device
|
|
check-%: SDK =
|
|
|
|
# Default to debug for testing
|
|
check-%: CONFIGURATION = Debug
|
|
|