From 4bf9b57cca977760a89bda7b419a85ca471ba1ce Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Mon, 3 Mar 2025 23:29:38 +0800 Subject: feat(www): hurd and todos. --- www/content/hurd/_index.md | 182 +++++++++++++++++++++++++++++++++++++++++++++ www/content/hurd/todos.md | 54 ++++++++++++++ 2 files changed, 236 insertions(+) create mode 100644 www/content/hurd/_index.md create mode 100644 www/content/hurd/todos.md (limited to 'www/content/hurd') diff --git a/www/content/hurd/_index.md b/www/content/hurd/_index.md new file mode 100644 index 0000000..b4c727c --- /dev/null +++ b/www/content/hurd/_index.md @@ -0,0 +1,182 @@ +--- +title: "Hurd" +date: 2025-03-03T15:34:41+08:00 +lastmod: 2025-03-03T23:28:46+08:00 +layout: single +--- + +{{< mono >}} + +[TODOS](/hurd/todos) + +{{< /mono >}} + +## links + +{{< mono >}} + +| name | link | +| --- | --- | +| kernel-list-archive | | +| debian-list-archive | | +| irc-archive | | +| kernel-home | | +| debian-home | | + +{{< /mono >}} + +refs: + +{{< mono >}} + +| name | link | +| --- | --- | +| c | | +| posix latest | | +| posix 2013 | | +| posix 2008 | | +| glibc | | + +{{< /mono >}} + +## *_MAX patch + +TODO: Move to separate page. + +```c +#include +#include +#include + +static inline char *xreadlink(const char *restrict path) { + char *buffer; + size_t allocated = 128; + ssize_t len; + + while (1) { + buffer = (char *)malloc(allocated); + if (!buffer) { + return NULL; + } + len = readlink(path, buffer, allocated); + if (len < (ssize_t)allocated) { + return buffer; + } + free(buffer); + if (len >= (ssize_t)allocated) { + allocated *= 2; + continue; + } + return NULL; + } +} + +static inline char *xgethostname() { + long max_host_name; + char *buffer; + + max_host_name = sysconf(_SC_HOST_NAME_MAX); + buffer = malloc(max_host_name + 1); + + if (gethostname(buffer, max_host_name + 1)) { + free(buffer); + return NULL; + } + + buffer[max_host_name] = '\0'; + return buffer; +} + +static inline char *xgetcwd() { + char *buffer; + size_t allocated = 128; + + while (1) { + buffer = (char *)malloc(allocated); + if (!buffer) { + return NULL; + } + getcwd(buffer, allocated); + if (buffer) + return buffer; + free(buffer); + if (errno == ERANGE) { + allocated *= 2; + continue; + } + return NULL; + } +} +``` + +## git repos + +{{< link-group >}} +hurd +cru: +upstream: +debian: +{{< /link-group >}} + +{{< link-group >}} +gnumach +cru: +upstream: +debian: +{{< /link-group >}} + +{{< link-group >}} +mig +cru: +upstream: +debian: +{{< /link-group >}} + +{{< link-group >}} +glibc +cru: +upstream: +debian: +mirror: +{{< /link-group >}} + +{{< link-group >}} +web +cru: +upstream: +{{< /link-group >}} + +## cheatsheet + +Start qemu + +```sh +qemu-system-x86_64 -enable-kvm -m 4G -net nic -net user,hostfwd=tcp::3222-:22 -vga vmware -drive cache=writeback,file=[...] +``` + +Configure/Setup network + +```sh +settrans -fgap /servers/socket/2 /hurd/pfinet -i /dev/eth0 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0 +fsysopts /servers/socket/2 /hurd/pfinet -i /dev/eth0 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0 +fsysopts /server/socket/2 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0 +``` + +Setup apt + +```sh +apt-get --allow-unauthenticated --allow-insecure-repositories update +apt-get --allow-unauthenticated upgrade +``` + +## mailing lists / irc + +{{< mono >}} + +| name | address | +| --- | --- | +| hurd | | +| debian | | +| irc | librechat #hurd | + +{{< /mono >}} diff --git a/www/content/hurd/todos.md b/www/content/hurd/todos.md new file mode 100644 index 0000000..d95bfb9 --- /dev/null +++ b/www/content/hurd/todos.md @@ -0,0 +1,54 @@ +--- +title: "Hurd Todos" +date: 2025-03-03T21:22:35+08:00 +lastmod: 2025-03-03T23:28:46+08:00 +params: + css: + - todos +--- + +## Porting + +### {{< todo name=pam state=working >}} + +{{< link-group >}} +git +cru: +debian: +upstream: +{{< /link-group >}} + +{{< link-group >}} +mail + +{{< /link-group >}} + +### {{< todo name=abseil state=working >}} + +{{< link-group >}} +git +cru: +upstream: +debian: +{{< /link-group >}} + +{{< link-group >}} +mail +\ + +{{< /link-group >}} + +### {{< todo name=libgav1 state=done >}} + +{{< link-group >}} +git +my: +debian: +upstream: +{{< /link-group >}} + +{{< link-group >}} +misc +mail: +gerrit: +{{< /link-group >}} -- cgit v1.2.3