Skip to content

Commit 37fdd4e

Browse files
cleanup(base-files): reorganize
Signed-off-by: Anhad Singh <[email protected]>
1 parent a1e09a5 commit 37fdd4e

File tree

9 files changed

+33
-43
lines changed

9 files changed

+33
-43
lines changed

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,16 @@ QEMU_PATH ?= $(shell dirname $(shell which qemu-system-x86_64))
5151

5252
.PHONY: qemu
5353
qemu: $(KERNEL_TARGET) $(USERLAND_TARGET)
54-
${QEMU_PATH}/qemu-system-x86_64 -cdrom target/aero.iso -m 8G -serial stdio --boot d -s -enable-kvm -cpu host,+vmx -drive file=target/disk.img,if=none,id=NVME1,format=raw -device nvme,drive=NVME1,serial=nvme
54+
${QEMU_PATH}/qemu-system-x86_64 \
55+
-cdrom target/aero.iso \
56+
-m 8G \
57+
-serial stdio \
58+
--boot d -s \
59+
-enable-kvm \
60+
-cpu host,+vmx \
61+
-drive file=target/disk.img,if=none,id=NVME1,format=raw \
62+
-device nvme,drive=NVME1,serial=nvme \
63+
${QEMU_FLAGS}
5564

5665
# "qemu_perf" options:
5766
# delay (default: 30) - the amount of microseconds between each sample.

base-files/etc/bash.bashrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# If not running interactively, don't do anything
2+
[[ $- != *i* ]] && return
3+
4+
alias ls='ls --color=auto'
5+
alias grep='grep --color=auto'
6+
7+
PS1='\[\033[01;32m\]root@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
8+
9+
HISTCONTROL=ignoredups
10+
HISTSIZE=-1
11+
HISTFILESIZE=-1
12+
13+
export DISPLAY=:0

base-files/etc/bash/bash.bashrc

Lines changed: 0 additions & 15 deletions
This file was deleted.

base-files/etc/hostname

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
aero

base-files/hello.asm

Lines changed: 0 additions & 20 deletions
This file was deleted.
File renamed without changes.

base-files/home/aero/test.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <stdio.h>
2+
3+
int main() {
4+
printf("Hello World, from Aero!\n");
5+
return 0;
6+
}

base-files/test.c

Lines changed: 0 additions & 6 deletions
This file was deleted.

userland/init/init.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ int main() {
1515
setenv("TERM", "linux", 1);
1616
setenv("USER", "root", 1);
1717
setenv("PATH", "/usr/local/bin:/usr/bin", 1);
18+
setenv("HOME", "/home/aero", 1);
1819

1920
int pid = fork();
2021

2122
if (!pid) {
22-
char *args[] = {"/usr/bin/bash", "-l", NULL};
23+
char *args[] = {"/usr/bin/bash", "--login", NULL};
24+
chdir(getenv("HOME"));
2325
execvp("/usr/bin/bash", args);
2426
} else {
2527
int status;

0 commit comments

Comments
 (0)