Skip to content

Commit 1afc215

Browse files
bootstrap: dwm and dmenu
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent bddd6e2 commit 1afc215

File tree

12 files changed

+417
-55
lines changed

12 files changed

+417
-55
lines changed

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,8 @@ No, Aero runs its own kernel that does *not* originate from Linux and does not s
1919
**Official Discord Server**: <https://discord.gg/8gwhTTZwt8>
2020

2121
# Screenshots
22-
<img src="misc/demo.png">
23-
<p align="center"><i>Aero running TCC in Qemu (the background image is by <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">Rick Astley</a>)</i></p>
24-
25-
<img src="misc/qjs-in-aero.png">
26-
<p align="center"><i>Aero running Quick JS in Qemu (the background image is by <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">Rick Astley</a>)</i></p>
27-
28-
<img src="misc/aero-doom.png">
29-
<p align="center"><i>Aero running DOOM in Qemu (the background image is by <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">Rick Astley</a>)</i></p>
22+
<img src="misc/dwm-xeyes.png">
23+
<p align="center">Running <a href="https://dwm.suckless.org/">DWM</a> and <a href="https://github.com/freedesktop/xorg-xeyes">Xeyes</a> in Aero!</p>
3024

3125
# Features
3226
- 64-bit higher half kernel

bootstrap.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,9 @@ packages:
871871
build:
872872
- args: ['make', '-j@PARALLELISM@']
873873
- args: ['make', 'DESTDIR=@THIS_COLLECT_DIR@', 'install']
874-
- args: ['ln', '-sf', 'bash', '@THIS_COLLECT_DIR@/usr/bin/sh']
874+
- args: ['ln', '-sf', '/usr/bin/bash', '@THIS_COLLECT_DIR@/usr/bin/sh']
875+
- args: ['mkdir', '-p', '@THIS_COLLECT_DIR@/bin']
876+
- args: ['ln', '-sf', '/usr/bin/bash', '@THIS_COLLECT_DIR@/bin/sh']
875877

876878
- name: tcc
877879
source:

bootstrap/xorg.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,90 @@ packages:
11961196
environ:
11971197
DESTDIR: '@THIS_COLLECT_DIR@'
11981198

1199+
- name: dwm
1200+
source:
1201+
subdir: 'bundled'
1202+
git: 'https://git.suckless.org/dwm/'
1203+
branch: master
1204+
tools_required:
1205+
- host-autoconf-v2.69
1206+
- host-automake-v1.16
1207+
- host-pkg-config
1208+
- host-gcc
1209+
pkgs_required:
1210+
- mlibc
1211+
- libx11
1212+
- libxmu
1213+
- libxaw
1214+
- libxrender
1215+
- libxft
1216+
- libxt
1217+
- libxkbfile
1218+
- libiconv
1219+
- libxi
1220+
- dejavu
1221+
configure:
1222+
- args: ['cp', '-r', '@THIS_SOURCE_DIR@/.', '@THIS_BUILD_DIR@']
1223+
build:
1224+
- args: ['make', 'CC=x86_64-aero-gcc', 'CXX=x86_64-aero-g++']
1225+
- args: ['make', 'install']
1226+
environ:
1227+
DESTDIR: '@THIS_COLLECT_DIR@'
1228+
1229+
- name: dmenu
1230+
source:
1231+
subdir: 'bundled'
1232+
git: 'https://git.suckless.org/dmenu/'
1233+
branch: master
1234+
tools_required:
1235+
- host-autoconf-v2.69
1236+
- host-automake-v1.16
1237+
- host-pkg-config
1238+
- host-gcc
1239+
pkgs_required:
1240+
- mlibc
1241+
- libx11
1242+
- libxmu
1243+
- libxaw
1244+
- libxrender
1245+
- libxft
1246+
- libxt
1247+
- libxkbfile
1248+
- libiconv
1249+
- libxi
1250+
- dejavu
1251+
configure:
1252+
- args: ['cp', '-r', '@THIS_SOURCE_DIR@/.', '@THIS_BUILD_DIR@']
1253+
build:
1254+
- args: ['make', 'CC=x86_64-aero-gcc', 'CXX=x86_64-aero-g++']
1255+
- args: ['make', 'install']
1256+
environ:
1257+
PREFIX: '/usr'
1258+
DESTDIR: '@THIS_COLLECT_DIR@'
1259+
1260+
- name: dejavu
1261+
source:
1262+
subdir: bundled
1263+
url: 'https://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.tar.bz2'
1264+
format: 'tar.bz2'
1265+
checksum: blake2b:d8614907887f20967fc7c75cb33b636a0eb5c682a076ccc7aef09f4ac243507afc005ef90d0b2aeee6a4a6a1ff3d5ce4fac0d1722a382525b3883ef53cdec26a
1266+
extract_path: 'dejavu-fonts-ttf-2.37'
1267+
version: '2.37'
1268+
pkgs_required:
1269+
- freetype
1270+
- fontconfig
1271+
revision: 3
1272+
configure:
1273+
- args: ['cp', '-r', '@THIS_SOURCE_DIR@/ttf', '@THIS_SOURCE_DIR@/dejavu']
1274+
- args: ['cp', '-r', '@THIS_SOURCE_DIR@/', '@THIS_BUILD_DIR@']
1275+
build:
1276+
- args: ['mkdir', '-p', '@THIS_COLLECT_DIR@/usr/share/fonts/truetype/']
1277+
- args: ['cp', '-r', '@THIS_BUILD_DIR@/dejavu/dejavu', '@THIS_COLLECT_DIR@/usr/share/fonts/truetype/']
1278+
scripts:
1279+
post_install:
1280+
- args: 'echo "Running fc-cache; this may take a few seconds..."'
1281+
- args: ['fc-cache']
1282+
11991283
- name: libxv
12001284
source:
12011285
subdir: 'bundled'

misc/dwm-xeyes.png

44.6 KB
Loading

patches/dmenu/dmenu.patch

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From 919950798aa0175e18a12e3ab970d133ea0947c5 Mon Sep 17 00:00:00 2001
2+
From: Andy-Python-Programmer <[email protected]>
3+
Date: Sat, 12 Nov 2022 19:41:25 +1100
4+
Subject: [PATCH] <xxx>
5+
6+
---
7+
config.mk | 4 ++--
8+
1 file changed, 2 insertions(+), 2 deletions(-)
9+
10+
diff --git a/config.mk b/config.mk
11+
index 566348b..ae68b54 100644
12+
--- a/config.mk
13+
+++ b/config.mk
14+
@@ -9,8 +9,8 @@ X11INC = /usr/X11R6/include
15+
X11LIB = /usr/X11R6/lib
16+
17+
# Xinerama, comment if you don't want it
18+
-XINERAMALIBS = -lXinerama
19+
-XINERAMAFLAGS = -DXINERAMA
20+
+# XINERAMALIBS = -lXinerama
21+
+# XINERAMAFLAGS = -DXINERAMA
22+
23+
# freetype
24+
FREETYPELIBS = -lfontconfig -lXft
25+
--
26+
2.38.1
27+

patches/dwm/dwm.patch

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
From b037341e78de204069d705b2fcb16f7de53b15b4 Mon Sep 17 00:00:00 2001
2+
From: Andy-Python-Programmer <[email protected]>
3+
Date: Sun, 13 Nov 2022 12:09:35 +1100
4+
Subject: [PATCH] <xxx>
5+
6+
---
7+
config.def.h | 2 +-
8+
config.mk | 4 ++--
9+
2 files changed, 3 insertions(+), 3 deletions(-)
10+
11+
diff --git a/config.def.h b/config.def.h
12+
index 9efa774..cb4f512 100644
13+
--- a/config.def.h
14+
+++ b/config.def.h
15+
@@ -58,7 +58,7 @@ static const Layout layouts[] = {
16+
/* commands */
17+
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
18+
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
19+
-static const char *termcmd[] = { "st", NULL };
20+
+static const char *termcmd[] = { "xeyes", NULL };
21+
22+
static const Key keys[] = {
23+
/* modifier key function argument */
24+
diff --git a/config.mk b/config.mk
25+
index ef8acf7..3d7341e 100644
26+
--- a/config.mk
27+
+++ b/config.mk
28+
@@ -11,8 +11,8 @@ X11INC = /usr/X11R6/include
29+
X11LIB = /usr/X11R6/lib
30+
31+
# Xinerama, comment if you don't want it
32+
-XINERAMALIBS = -lXinerama
33+
-XINERAMAFLAGS = -DXINERAMA
34+
+# XINERAMALIBS = -lXinerama
35+
+# XINERAMAFLAGS = -DXINERAMA
36+
37+
# freetype
38+
FREETYPELIBS = -lfontconfig -lXft
39+
--
40+
2.38.1
41+

patches/mlibc/mlibc.patch

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
From 52be7281e3becafe49603ed6bbc01c0ded64d9e1 Mon Sep 17 00:00:00 2001
1+
From 9ad862a1edb6ce5b86fc4fa49e8ce365af507f47 Mon Sep 17 00:00:00 2001
22
From: Andy-Python-Programmer <[email protected]>
3-
Date: Fri, 8 Jul 2022 12:32:32 +1000
3+
Date: Sat, 12 Nov 2022 18:58:33 +1100
44
Subject: [PATCH] yes
55

66
Signed-off-by: Andy-Python-Programmer <[email protected]>
77
---
8-
.gitignore | 2 +
9-
options/glibc/generic/execinfo.cpp | 5 +-
10-
options/rtdl/generic/linker.cpp | 2 +-
11-
sysdeps/aero/generic/aero.cpp | 38 +++++++-------
12-
sysdeps/aero/generic/filesystem.cpp | 25 ++++++++--
13-
sysdeps/aero/generic/sockets.cpp | 77 ++++++++++++++++++++++++++++-
14-
sysdeps/aero/generic/time.cpp | 24 +++++++++
15-
sysdeps/aero/include/aero/syscall.h | 6 +++
16-
sysdeps/aero/meson.build | 1 +
17-
9 files changed, 152 insertions(+), 28 deletions(-)
8+
.gitignore | 2 +
9+
options/glibc/generic/execinfo.cpp | 5 +-
10+
options/posix/generic/termios-stubs.cpp | 5 +-
11+
options/rtdl/generic/linker.cpp | 2 +-
12+
sysdeps/aero/generic/aero.cpp | 38 ++++++------
13+
sysdeps/aero/generic/filesystem.cpp | 25 ++++++--
14+
sysdeps/aero/generic/sockets.cpp | 77 ++++++++++++++++++++++++-
15+
sysdeps/aero/generic/time.cpp | 24 ++++++++
16+
sysdeps/aero/include/aero/syscall.h | 6 ++
17+
sysdeps/aero/meson.build | 1 +
18+
10 files changed, 155 insertions(+), 30 deletions(-)
1819
create mode 100644 sysdeps/aero/generic/time.cpp
1920

2021
diff --git a/.gitignore b/.gitignore
21-
index fdd60a00..9f811f47 100644
22+
index fdd60a0..9f811f4 100644
2223
--- a/.gitignore
2324
+++ b/.gitignore
2425
@@ -3,3 +3,5 @@ subprojects
@@ -28,7 +29,7 @@ index fdd60a00..9f811f47 100644
2829
+# clangd cache files:
2930
+.cache
3031
diff --git a/options/glibc/generic/execinfo.cpp b/options/glibc/generic/execinfo.cpp
31-
index 3474615e..10a2109e 100644
32+
index 3474615..10a2109 100644
3233
--- a/options/glibc/generic/execinfo.cpp
3334
+++ b/options/glibc/generic/execinfo.cpp
3435
@@ -1,9 +1,10 @@
@@ -44,11 +45,34 @@ index 3474615e..10a2109e 100644
4445
}
4546

4647
char **backtrace_symbols(void *const *, int) {
48+
diff --git a/options/posix/generic/termios-stubs.cpp b/options/posix/generic/termios-stubs.cpp
49+
index 3e621ad..583c1f5 100644
50+
--- a/options/posix/generic/termios-stubs.cpp
51+
+++ b/options/posix/generic/termios-stubs.cpp
52+
@@ -5,6 +5,7 @@
53+
54+
#include <bits/ensure.h>
55+
#include <mlibc/posix-sysdeps.hpp>
56+
+#include <mlibc/debug.hpp>
57+
58+
speed_t cfgetispeed(const struct termios *tios) {
59+
return tios->ibaud;
60+
@@ -50,8 +51,8 @@ int tcflow(int fd, int action) {
61+
}
62+
63+
int tcflush(int, int) {
64+
- __ensure(!"Not implemented");
65+
- __builtin_unreachable();
66+
+ mlibc::infoLogger() << "mlibc::tcflush: is a stub!" << frg::endlog;
67+
+ return 0;
68+
}
69+
70+
int tcgetattr(int fd, struct termios *attr) {
4771
diff --git a/options/rtdl/generic/linker.cpp b/options/rtdl/generic/linker.cpp
48-
index f51a543f..74f4e96a 100644
72+
index 2e2d3f1..3ff5fef 100644
4973
--- a/options/rtdl/generic/linker.cpp
5074
+++ b/options/rtdl/generic/linker.cpp
51-
@@ -16,7 +16,7 @@ uintptr_t libraryBase = 0x41000000;
75+
@@ -18,7 +18,7 @@ uintptr_t libraryBase = 0x41000000;
5276

5377
constexpr bool verbose = false;
5478
constexpr bool stillSlightlyVerbose = false;
@@ -58,7 +82,7 @@ index f51a543f..74f4e96a 100644
5882
constexpr bool eagerBinding = true;
5983

6084
diff --git a/sysdeps/aero/generic/aero.cpp b/sysdeps/aero/generic/aero.cpp
61-
index 29fb9610..a27da559 100644
85+
index 29fb961..a27da55 100644
6286
--- a/sysdeps/aero/generic/aero.cpp
6387
+++ b/sysdeps/aero/generic/aero.cpp
6488
@@ -69,22 +69,22 @@ int sys_futex_tid() {
@@ -135,7 +159,7 @@ index 29fb9610..a27da559 100644
135159
}
136160

137161
diff --git a/sysdeps/aero/generic/filesystem.cpp b/sysdeps/aero/generic/filesystem.cpp
138-
index a3e2aca2..4187059e 100644
162+
index a3e2aca..4187059 100644
139163
--- a/sysdeps/aero/generic/filesystem.cpp
140164
+++ b/sysdeps/aero/generic/filesystem.cpp
141165
@@ -158,11 +158,6 @@ int sys_tcsetattr(int fd, int optional_action, const struct termios *attr) {
@@ -176,7 +200,7 @@ index a3e2aca2..4187059e 100644
176200
+}
177201
} // namespace mlibc
178202
diff --git a/sysdeps/aero/generic/sockets.cpp b/sysdeps/aero/generic/sockets.cpp
179-
index b6b18fe7..e03c634b 100644
203+
index b6b18fe..e03c634 100644
180204
--- a/sysdeps/aero/generic/sockets.cpp
181205
+++ b/sysdeps/aero/generic/sockets.cpp
182206
@@ -1,5 +1,6 @@
@@ -276,7 +300,7 @@ index b6b18fe7..e03c634b 100644
276300
} // namespace mlibc
277301
diff --git a/sysdeps/aero/generic/time.cpp b/sysdeps/aero/generic/time.cpp
278302
new file mode 100644
279-
index 00000000..460412d0
303+
index 0000000..460412d
280304
--- /dev/null
281305
+++ b/sysdeps/aero/generic/time.cpp
282306
@@ -0,0 +1,24 @@
@@ -306,7 +330,7 @@ index 00000000..460412d0
306330
+}
307331
\ No newline at end of file
308332
diff --git a/sysdeps/aero/include/aero/syscall.h b/sysdeps/aero/include/aero/syscall.h
309-
index 12f8dc61..03001c46 100644
333+
index 12f8dc6..03001c4 100644
310334
--- a/sysdeps/aero/include/aero/syscall.h
311335
+++ b/sysdeps/aero/include/aero/syscall.h
312336
@@ -64,6 +64,12 @@
@@ -323,7 +347,7 @@ index 12f8dc61..03001c46 100644
323347
// Invalid syscall used to trigger a log error in the kernel (as a hint)
324348
// so, that we can implement the syscall in the kernel.
325349
diff --git a/sysdeps/aero/meson.build b/sysdeps/aero/meson.build
326-
index 14975990..8e30aa3a 100644
350+
index a807b37..878c216 100644
327351
--- a/sysdeps/aero/meson.build
328352
+++ b/sysdeps/aero/meson.build
329353
@@ -11,6 +11,7 @@ libc_sources += files(
@@ -335,5 +359,5 @@ index 14975990..8e30aa3a 100644
335359

336360
if not no_headers
337361
--
338-
2.25.1
362+
2.38.1
339363

0 commit comments

Comments
 (0)