Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:22.04 as src

RUN useradd --create-home --home-dir /vagrant --user-group vagrant
RUN useradd --create-home --home-dir /home/vagrant --user-group vagrant
RUN echo vagrant:vagrant | chpasswd
RUN echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN apt -y update && apt -y install puppet
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.workspace
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ RUN echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/hom

FROM ubuntu:22.04

RUN yes | unminimize

COPY --from=puppet . .

RUN usermod -d /home/vagrant vagrant
Expand Down
1 change: 1 addition & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ src=/vagrant
if [ -z "$(ls -A $home)" ]; then
sudo cp -R $src/. $home
sudo chown -R vagrant $home
sudo chmod -R 0700 ~/
fi

sudo service ssh start
Expand Down
5 changes: 4 additions & 1 deletion manifests/site.pp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
"fzf",
"openssh-server",
"man",
"file",
"gcc-i686-linux-gnu",
"qemu-user",
]:
ensure => installed;
[
Expand Down Expand Up @@ -126,7 +129,7 @@
}
->
# Set up some project support stuff
class { ["cs162::bochs", "cs162::golang", "cs162::shell", "cs162::rustlang", "cs162::i386_gcc"]:
class { ["cs162::bochs", "cs162::golang", "cs162::shell", "cs162::rustlang"]:
home_directory => $home,
owner => vagrant,
group => vagrant,
Expand Down
2 changes: 1 addition & 1 deletion modules/cs162/files/shell/bin/backtrace
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if (!@binaries) {
}

# Find addr2line.
my ($a2l) = search_path ("i386-elf-addr2line") || search_path ("addr2line");
my ($a2l) = search_path ("i386-elf-addr2line") || search_path ("i686-linux-gnu-addr2line") || search_path ("addr2line");
if (!$a2l) {
die "backtrace: neither `i386-elf-addr2line' nor `addr2line' in PATH\n";
}
Expand Down
4 changes: 4 additions & 0 deletions modules/cs162/files/shell/bin/i386-cgdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/bash

i386-exec -g 16200 "$1" &\
cgdb -d gdb-multiarch -ex "file $1" -ex "target remote localhost:16200"
3 changes: 3 additions & 0 deletions modules/cs162/files/shell/bin/i386-exec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/bash

qemu-i386 -L /usr/i686-linux-gnu "$@"
3 changes: 3 additions & 0 deletions modules/cs162/files/shell/bin/i386-gcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/bash

i686-linux-gnu-gcc -m32 "$@"
4 changes: 4 additions & 0 deletions modules/cs162/files/shell/bin/i386-gdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/bash

i386-exec -g 16200 "$1" &\
gdb-multiarch -ex "file $1" -ex "target remote localhost:16200"
3 changes: 3 additions & 0 deletions modules/cs162/files/shell/bin/i386-objdump
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/bash

i686-linux-gnu-objdump -mi386 "$@"
23 changes: 0 additions & 23 deletions modules/cs162/manifests/i386_gcc.pp

This file was deleted.

32 changes: 0 additions & 32 deletions modules/cs162/templates/i386-gcc/install.sh

This file was deleted.

9 changes: 0 additions & 9 deletions modules/cs162/templates/shell/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,6 @@ if ! shopt -oq posix; then
fi
fi

if [[ $(uname -m) =~ ^arm|^aarch ]]; then
export CC=/bin/gcc
export LD=/bin/gcc
export PREFIX="/usr/local/i386elfgcc"
export TARGET=i386-elf
export PATH="$PREFIX/bin:/home/vagrant/binutils-build/binutils:$PATH"
fi

. ~/.cs162.bashrc

[ -f ~/.fzf.bash ] && source ~/.fzf.bash
cd ~