Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3e9584f
.gitignore: Add zig-pkg to ignore list
der-teufel-programming Jul 8, 2026
58e7386
Add missing fingerprints and fix names
der-teufel-programming Jul 8, 2026
4f8b849
Update most of abi-mapper to 0.17 dev
der-teufel-programming Jul 8, 2026
4e2cf5c
Disable depz until it works with build system changes
der-teufel-programming Jul 9, 2026
fda0389
Add fingerprint to vendor/microzig-rp2350-hal
der-teufel-programming Jul 9, 2026
9677cac
Update tools/emulator to 0.17-dev
der-teufel-programming Aug 8, 2026
b392bb2
Update tools/exe-tool to 0.17-dev
der-teufel-programming Aug 8, 2026
28a02fc
Update tools/mkexp and userland/libs/expcard to 0.17-dev
der-teufel-programming Aug 8, 2026
0d31176
Update tools/exe-tool to new std.elf changes
der-teufel-programming Aug 8, 2026
99c2c1f
tools/abi-mapper: Update deps
der-teufel-programming Aug 8, 2026
f5daed5
Update src/abi to 0.17-dev
der-teufel-programming Aug 8, 2026
2a0aecc
Update libs/agp, libs/agp-swrast, lib/agp-tiled-rast to 0.17-dev
der-teufel-programming Aug 8, 2026
787475f
Update libs/libgui to 0.17-dev
der-teufel-programming Aug 8, 2026
c697d51
Update tools/mkicon to 0.17-dev
der-teufel-programming Aug 8, 2026
7876f78
Update tools/mkfont to 0.17-dev
der-teufel-programming Aug 8, 2026
7a8da83
Update tools/debug-filter to 0.17-dev
der-teufel-programming Aug 9, 2026
7281cc5
Fix posix PROT in debug-filter
der-teufel-programming Aug 9, 2026
056f07d
xq: Updates the build script enough to make it roughly compile.
Sep 9, 2026
cb31d16
Codex: Updates build.zig files for 0.17-dev
Sep 9, 2026
8ef57e2
Codex: Updates a lot of the OS project to 0.17-dev. Change does not i…
Sep 9, 2026
d58bef0
Codex: Implements more fixes on the codebase
Sep 10, 2026
88f01b7
Codex: Further continues working on the 0.17-dev port.
Sep 10, 2026
7f3ce44
Codex: Upgrades Ashet OS further
Sep 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build

env:
ZIG_VERSION: "0.15.2"
ZIG_VERSION: "0.17.0-dev.2085+5e36170b5"
ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-global-cache
ZIG_LOCAL_CACHE_DIR: ${{ github.workspace }}/.zig-cache

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Deploy os.ashet.computer

env:
ZIG_VERSION: "0.15.2"
ZIG_VERSION: "0.17.0-dev.2085+5e36170b5"
ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-global-cache

on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoketest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Smoke Test

env:
ZIG_VERSION: "0.15.2"
ZIG_VERSION: "0.17.0-dev.2085+5e36170b5"
ZIG_GLOBAL_CACHE_DIR: ${{ github.workspace }}/.zig-global-cache

on:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.zig-cache/
zig-cache/
zig-out/
zig-pkg/
*.pcap
.vscode/
rootfs-pxe/ashet-os
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ The following list contains devices for which there is a planned port of Ashet O

## Contributing

This project uses [Zig 0.15.2](https://ziglang.org/download/#release-0.15.2) to compile most of the sources.
This project uses `zig-0.17.0-dev.2085+5e36170b5` to compile most of the sources.

### Compiling The Project

Expand Down Expand Up @@ -123,8 +123,8 @@ The results of the compilation are usually disk images, except for a machine bas
- [GCC Documentation](https://gcc.gnu.org/onlinedocs/gcc/index.html)
- [How to Use Inline Assembly Language in C Code](https://gcc.gnu.org/onlinedocs/gcc/Using-Assembly-Language-with-C.html)
- [Zig](https://ziglang.org/)
- [Zig 0.15.2 Language Reference](https://ziglang.org/documentation/0.15.2/)
- [Zig 0.15.2 Standard Library Documentation](https://ziglang.org/documentation/0.15.2/std/)
- [Zig Language Reference](https://ziglang.org/documentation/master/)
- [Zig Standard Library Documentation](https://ziglang.org/documentation/master/std/)
- [QEMU Documentation](https://www.qemu.org/docs/master/system/introduction.html)
- [RP2350](https://www.raspberrypi.com/products/rp2350/)
- [RP2350 Datasheet](https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf)
Expand Down
70 changes: 38 additions & 32 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const installed_tools: []const ToolDep = &.{
pub fn build(b: *std.Build) void {
// Options:
const optimize_kernel = b.option(bool, "optimize-kernel", "Should the kernel be optimized?") orelse false;
const optimize_apps = b.option(std.builtin.OptimizeMode, "optimize-apps", "Optimization mode for the applications") orelse .Debug;
const optimize_apps = b.option(std.builtin.OptimizeMode, "optimize-apps", "Optimization mode for the applications") orelse .debug;

const install_rootfs = b.option(bool, "rootfs", "Installs the rootfs contents as well for hosted targets (default: off)") orelse false;

Expand Down Expand Up @@ -162,18 +162,21 @@ pub fn build(b: *std.Build) void {
});
step.dependOn(&install_rootfs_dir.step);

// `b.getInstallPath` is copied from the InstallStep itself to figure out the final output directory:
const install_path = b.getInstallPath(install_rootfs_dir.options.install_dir, install_rootfs_dir.options.install_subdir);
std.debug.assert(std.fs.path.isAbsolute(install_path));
os_rootfs.set(machine, .{ .cwd_relative = install_path });
os_rootfs.set(machine, .{ .relative = .{
.base = .install_prefix,
.sub_path = b.pathJoin(&.{ @tagName(machine), "rootfs" }),
} });
}

if (list_apps) {
std.debug.print("available files for '{s}':\n", .{
@tagName(machine),
});
for (os_files.files.items) |file| {
std.debug.print("- {s}\n", .{file.sub_path});
inline for (.{ os_files.embeds.items, os_files.copies.items }) |files| {
for (files) |file| {
const file_path = b.graph.wip_configuration.stringSlice(file.sub_path);
std.debug.print("- {s}\n", .{file_path});
}
}
}
}
Expand All @@ -195,7 +198,7 @@ pub fn build(b: *std.Build) void {
// const kernel_tests = b.addTest(.{
// .root_source_file = b.path("src/kernel/main.zig"),
// .target = b.resolveTargetQuery(.{ .cpu_arch = .x86 }),
// .optimize = .Debug,
// .optimize = .debug,
// });
// kernel_tests.root_module.addImport("machine-info", machine_info_mod);
// kernel_tests.root_module.addImport("args", machine_info_mod);
Expand Down Expand Up @@ -314,9 +317,7 @@ pub fn build(b: *std.Build) void {
}
}

if (b.args) |args| {
vm_runner.addArgs(args);
}
vm_runner.addPassthruArgs();

vm_runner.stdio = .inherit;
vm_runner.has_side_effects = true;
Expand Down Expand Up @@ -344,11 +345,11 @@ pub fn build(b: *std.Build) void {
run_step.dependOn(&b.addFail(fail_msg.toOwnedSlice() catch @panic("out of memory")).step);
}

{
const depz_step = b.step("depz", "Run depz build runner to get dependency graph.dot");
const run_depz = @import("depz").runDepz(b);
depz_step.dependOn(&run_depz.step);
}
// {
// const depz_step = b.step("depz", "Run depz build runner to get dependency graph.dot");
// const run_depz = @import("depz").runDepz(b);
// depz_step.dependOn(&run_depz.step);
// }
}

const PlatformStartupConfig = struct {
Expand All @@ -368,20 +369,20 @@ const Variables = struct {
@"${OVMF_VARS_X64}": ?std.Build.LazyPath,

pub fn addArg(variables: Variables, runner: *std.Build.Step.Run, arg: []const u8) void {
inline for (@typeInfo(Variables).@"struct".fields) |fld| {
const path: ?std.Build.LazyPath = @field(variables, fld.name);
inline for (comptime std.meta.fieldNames(Variables)) |fld| {
const path: ?std.Build.LazyPath = @field(variables, fld);

if (std.mem.eql(u8, arg, fld.name)) {
runner.addFileArg(path orelse @panic("missing variable " ++ fld.name));
if (std.mem.eql(u8, arg, fld)) {
runner.addFileArg(path orelse @panic("missing variable " ++ fld));
return;
}

if (std.mem.endsWith(u8, arg, fld.name)) {
runner.addPrefixedFileArg(arg[0 .. arg.len - fld.name.len], path orelse @panic("missing variable " ++ fld.name));
if (std.mem.endsWith(u8, arg, fld)) {
runner.addPrefixedFileArg(arg[0 .. arg.len - fld.len], path orelse @panic("missing variable " ++ fld));
return;
}

if (std.mem.indexOf(u8, arg, fld.name)) |_| {
if (std.mem.indexOf(u8, arg, fld)) |_| {
@panic("invalid path!");
}
}
Expand Down Expand Up @@ -502,8 +503,7 @@ const machine_info_map = std.EnumArray(RunTarget, MachineStartupConfig).init(.{
"-device", "virtio-blk-device,drive=disk",

// we use the second serial for dumping binary data out of the system /o\
"-serial",
"file:zig-out/init-linked.bin",
"-serial", "file:zig-out/init-linked.bin",

// "-serial", "vc",
},
Expand Down Expand Up @@ -589,15 +589,18 @@ const qemu_display_flags: std.EnumArray(QemuDisplayMode, []const []const u8) = .
});

fn get_optional_named_file(write_files: *std.Build.Step.WriteFile, sub_path: []const u8) ?std.Build.LazyPath {
for (write_files.files.items) |file| {
if (path_eql(file.sub_path, sub_path))
inline for (.{ write_files.embeds.items, write_files.copies.items }) |files| {
for (files) |file| {
const file_path = write_files.step.owner.graph.wip_configuration.stringSlice(file.sub_path);
if (path_eql(file_path, sub_path))
return .{
.generated = .{
.file = &write_files.generated_directory,
.sub_path = file.sub_path,
.index = write_files.generated_directory,
.sub_path = file_path,
},
};
}
}
return null;
}

Expand All @@ -607,11 +610,14 @@ fn get_named_file(write_files: *std.Build.Step.WriteFile, sub_path: []const u8)

std.debug.print("missing file '{s}' in dependency '{s}:{s}'. available files are:\n", .{
sub_path,
std.mem.trimRight(u8, write_files.step.owner.dep_prefix, "."),
std.mem.trimEnd(u8, write_files.step.owner.dep_prefix, "."),
write_files.step.name,
});
for (write_files.files.items) |file| {
std.debug.print("- '{s}'\n", .{file.sub_path});
inline for (.{ write_files.embeds.items, write_files.copies.items }) |files| {
for (files) |file| {
const file_path = write_files.step.owner.graph.wip_configuration.stringSlice(file.sub_path);
std.debug.print("- '{s}'\n", .{file_path});
}
}
std.process.exit(1);
}
Expand Down
10 changes: 5 additions & 5 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.name = .ashet_os,
.version = "0.1.0",
.fingerprint = 0xb942c958e6b84c9b,
.minimum_zig_version = "0.15.2",
.minimum_zig_version = "0.17.0-dev.2085+5e36170b5",
.dependencies = .{
.os = .{
.path = "src/os",
Expand Down Expand Up @@ -50,10 +50,10 @@
.path = "src/tools/emulator",
},

.depz = .{
.url = "git+https://codeberg.org/Der_Teufel/depz.git#b7041a9f0b535c70d70439aa15bc8cfbf359d2c2",
.hash = "depz-0.1.0-AAAAADMWAADGaaICqczZivLrwNCUK6hPvTuKUYzcwnhT",
},
// .depz = .{
// .url = "git+https://codeberg.org/Der_Teufel/depz.git#b7041a9f0b535c70d70439aa15bc8cfbf359d2c2",
// .hash = "depz-0.1.0-AAAAADMWAADGaaICqczZivLrwNCUK6hPvTuKUYzcwnhT",
// },

// UEFI firmware for running x86 QEMU systems with UEFI
.ovmf = .{
Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

zig := "zig-0.15.2"
zig := "zig-0.17.0-dev.2085+5e36170b5"

optimize_kernel := "false"
optimize_apps := "Debug"
optimize_apps := "debug"

default_params := "--prominent-compile-errors -freference-trace=10"

Expand Down
8 changes: 4 additions & 4 deletions src/abi/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ pub fn build(b: *std.Build) void {

// Re-export the "abi-schema" module:
const abi_parser_mod = abi_mapper_dep.module("abi-parser");
b.modules.putNoClobber("abi-parser", abi_parser_mod) catch @panic("out of memory");
b.modules.putNoClobber(b.graph.arena, "abi-parser", abi_parser_mod) catch @panic("out of memory");

const render_zig_exe = b.addExecutable(.{
.name = "render-abi-file",
.root_module = b.createModule(.{
.target = b.graph.host,
.optimize = .Debug,
.optimize = .debug,
.root_source_file = b.path("utility/render_zig_code.zig"),
.imports = &.{.{ .name = "abi-parser", .module = abi_parser_mod }},
}),
Expand Down Expand Up @@ -76,7 +76,7 @@ pub fn build(b: *std.Build) void {
const abi_tests_mod = b.createModule(.{
.root_source_file = b.path("src/ports/tests.zig"),
.target = b.graph.host,
.optimize = .Debug,
.optimize = .debug,
.imports = &.{
.{ .name = "abi", .module = abi_mod },
},
Expand All @@ -98,7 +98,7 @@ pub fn build(b: *std.Build) void {
.root_module = b.createModule(.{
.root_source_file = escaping_tests_zig,
.target = b.graph.host,
.optimize = .Debug,
.optimize = .debug,
}),
});
const escaping_tests_run = b.addRunArtifact(escaping_tests_exe);
Expand Down
2 changes: 1 addition & 1 deletion src/abi/src/platforms.zig
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const build = struct {
fn constructTargetQuery(spec: std.Target.Query) std.Target.Query {
var base: std.Target.Query = spec;

std.debug.assert(base.dynamic_linker.len == 0);
std.debug.assert(base.dynamic_linker == null);
std.debug.assert(base.os_tag == null);
std.debug.assert(base.ofmt == null);

Expand Down
24 changes: 12 additions & 12 deletions src/abi/src/ports/tests.zig
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ test "color from_rgb, to_rgb bijection" {
}
}

test "fuzz Color.from_rgb" {
const Test = struct {
fn fuzz(_: void, input: []const u8) !void {
if (input.len != 3)
return;

_ = Color.from_rgb(input[0], input[1], input[2]);
}
};

try std.testing.fuzz({}, Test.fuzz, .{});
}
// test "fuzz Color.from_rgb" {
// const Test = struct {
// fn fuzz(_: void, input: []const u8) !void {
// if (input.len != 3)
// return;

// _ = Color.from_rgb(input[0], input[1], input[2]);
// }
// };

// try std.testing.fuzz({}, Test.fuzz, .{});
// }
38 changes: 19 additions & 19 deletions src/abi/src/ports/zig.abi.zpatch
Original file line number Diff line number Diff line change
Expand Up @@ -730,43 +730,43 @@
const max_length = comptime "ok,cancel,yes,no,abort,retry,continue,ignore".len;

var buffer: [max_length]u8 = undefined;
var stream = std.io.fixedBufferStream(&buffer);
var stream: std.Io.Writer = .fixed(&buffer);

if (buttons.has_ok) {
if (stream.pos > 0) _ = stream.write(",") catch unreachable;
stream.writer().writeAll("ok") catch unreachable;
if (stream.end > 0) stream.writeAll(",") catch unreachable;
stream.writeAll("ok") catch unreachable;
}
if (buttons.has_cancel) {
if (stream.pos > 0) _ = stream.write(",") catch unreachable;
stream.writer().writeAll("cancel") catch unreachable;
if (stream.end > 0) stream.writeAll(",") catch unreachable;
stream.writeAll("cancel") catch unreachable;
}
if (buttons.has_yes) {
if (stream.pos > 0) _ = stream.write(",") catch unreachable;
stream.writer().writeAll("yes") catch unreachable;
if (stream.end > 0) stream.writeAll(",") catch unreachable;
stream.writeAll("yes") catch unreachable;
}
if (buttons.has_no) {
if (stream.pos > 0) _ = stream.write(",") catch unreachable;
stream.writer().writeAll("no") catch unreachable;
if (stream.end > 0) stream.writeAll(",") catch unreachable;
stream.writeAll("no") catch unreachable;
}
if (buttons.has_abort) {
if (stream.pos > 0) _ = stream.write(",") catch unreachable;
stream.writer().writeAll("abort") catch unreachable;
if (stream.end > 0) stream.writeAll(",") catch unreachable;
stream.writeAll("abort") catch unreachable;
}
if (buttons.has_retry) {
if (stream.pos > 0) _ = stream.write(",") catch unreachable;
stream.writer().writeAll("retry") catch unreachable;
if (stream.end > 0) stream.writeAll(",") catch unreachable;
stream.writeAll("retry") catch unreachable;
}
if (buttons.has_continue) {
if (stream.pos > 0) _ = stream.write(",") catch unreachable;
stream.writer().writeAll("continue") catch unreachable;
if (stream.end > 0) stream.writeAll(",") catch unreachable;
stream.writeAll("continue") catch unreachable;
}
if (buttons.has_ignore) {
if (stream.pos > 0) _ = stream.write(",") catch unreachable;
stream.writer().writeAll("ignore") catch unreachable;
if (stream.end > 0) stream.writeAll(",") catch unreachable;
stream.writeAll("ignore") catch unreachable;
}

if (stream.pos > 0) {
try writer.writeAll(stream.getWritten());
if (stream.end > 0) {
try writer.writeAll(stream.buffered());
} else {
try writer.writeAll("none");
}
Expand Down
Loading
Loading