aboutsummaryrefslogtreecommitdiff
path: root/2
diff options
context:
space:
mode:
Diffstat (limited to '2')
-rw-r--r--2/.gitignore3
-rw-r--r--2/Containerfile13
-rw-r--r--2/makefile36
-rw-r--r--2/module/Makefile12
l---------2/module/config.h1
l---------2/module/fopdrv.c1
l---------2/module/fopdrv.h1
l---------2/module/main.c1
-rw-r--r--2/readme.md18
-rwxr-xr-x2/rice.sh132
-rw-r--r--2/test/.gitignore1
-rw-r--r--2/test/main.c6
-rw-r--r--2/test/makefile1
13 files changed, 0 insertions, 226 deletions
diff --git a/2/.gitignore b/2/.gitignore
deleted file mode 100644
index 5b74d26..0000000
--- a/2/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.deb
-*.tar.xz
-headers
diff --git a/2/Containerfile b/2/Containerfile
deleted file mode 100644
index cc368d8..0000000
--- a/2/Containerfile
+++ /dev/null
@@ -1,13 +0,0 @@
-from docker.io/library/debian:sid
-
-run apt-get update
-
-# packages (in separate steps to optimize caching)
-run apt-get install -y gcc-arm-linux-gnueabi
-run apt-get install -y gcc
-run apt-get install -y make
-run apt-get install -y git
-
-# container directory on which the working directory on host is mounted
-workdir /workdir
-
diff --git a/2/makefile b/2/makefile
deleted file mode 100644
index 06c2552..0000000
--- a/2/makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-# see ./rice.sh
-RELEASE = 6.6.15-ti-rt-arm32-r1
-DEB_URL = https://repos.rcn-ee.com/debian/pool/main/l/linux-upstream/linux-headers-$(RELEASE)_1sid_armhf.deb
-
-.PHONY: FORCE
-
-kernel-headers.deb:
- curl -sLo- $(DEB_URL) > $@
-
-data.tar.xz: kernel-headers.deb
- ar x $< $@
-
-headers: data.tar.xz
- mkdir -p $@
- tar xf $< -C $@ --strip-components 4 ./usr/src/linux-headers-$(RELEASE)
-
-CTR := podman
-# CTR := sudo podman # rootless not set up or unsupported
-CTR_IMG_TAG := avans-drvo
-
-CTRIZE := $(CTR) run
-CTRIZE += --rm
-CTRIZE += --tty
-CTRIZE += --volume /tmp:/tmp:rw
-CTRIZE += --volume .:/workdir:rw
-# CTRIZE += --env-file ./env
-CTRIZE += --env MAKE*
-CTRIZE += $(CTR_IMG_TAG)
-export
-
-container: FORCE
- $(CTR) build --tag $(CTR_IMG_TAG) .
-
-build_test: FORCE
- $(CTRIZE) $(MAKE) -C module
-
diff --git a/2/module/Makefile b/2/module/Makefile
deleted file mode 100644
index 01b2177..0000000
--- a/2/module/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-RELEASE = 6.6.15-ti-rt-arm32-r1
-KERNEL := ../headers/
-ARCH := arm
-CROSS_COMPILE := arm-linux-gnueabi-
-
-obj-m += lork.o
-lork-y += main.o
-lork-y += fopdrv.o
-
-all:
- $(MAKE) -C $(KERNEL) M=$(PWD) modules
-
diff --git a/2/module/config.h b/2/module/config.h
deleted file mode 120000
index bad07c3..0000000
--- a/2/module/config.h
+++ /dev/null
@@ -1 +0,0 @@
-../../1/config.h \ No newline at end of file
diff --git a/2/module/fopdrv.c b/2/module/fopdrv.c
deleted file mode 120000
index cbe1e0f..0000000
--- a/2/module/fopdrv.c
+++ /dev/null
@@ -1 +0,0 @@
-../../1/fopdrv.c \ No newline at end of file
diff --git a/2/module/fopdrv.h b/2/module/fopdrv.h
deleted file mode 120000
index f9b9e9f..0000000
--- a/2/module/fopdrv.h
+++ /dev/null
@@ -1 +0,0 @@
-../../1/fopdrv.h \ No newline at end of file
diff --git a/2/module/main.c b/2/module/main.c
deleted file mode 120000
index 6180bb4..0000000
--- a/2/module/main.c
+++ /dev/null
@@ -1 +0,0 @@
-../../1/main.c \ No newline at end of file
diff --git a/2/readme.md b/2/readme.md
deleted file mode 100644
index 5231d8f..0000000
--- a/2/readme.md
+++ /dev/null
@@ -1,18 +0,0 @@
-I used [this][img] image as a base, and riced the shit out of it using the
-steps recorded in [rice.sh](./rice.sh). This script can be run from the above
-image by doing the following:
-
-```
- (login as `debian` with password `temppwd`)
-
-$ curl -sLo- https://git.pipeframe.xyz/school/drvo/plain/2/rice.sh | sudo sh -s
-```
-
-This will upgrade the kernel to version `6.6.15-ti-rt-arm32-r1`, which supports
-some fancy new features like the new `class_create` method introduced in 6.4. I
-actually recommend you *do not do this*, and instead just start writing a
-kernel module targeting version 5.10 from week 1, as this kernel version is way
-more common.
-
-[img]: https://www.beagleboard.org/distros/am335x-11-7-2023-09-02-4gb-emmc-xfce-flasher
-
diff --git a/2/rice.sh b/2/rice.sh
deleted file mode 100755
index ea1e7d2..0000000
--- a/2/rice.sh
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/bin/sh
-if [ $(id -u) -ne 0 ] ; then
- echo 'this script should be run as root instead!'
- exit 1
-fi
-
-USER_NAME='loek'
-HOST_NAME='drvo'
-KERNEL_VERSION='6.6.15-ti-rt-arm32-r1' # latest i could find for ti
-
-# fail ok
-fok() { "$@" 1> /dev/null 2> /dev/null ; }
-
-echo "setting hostname to $HOST_NAME..."
-hostname $HOST_NAME
-hostname > /etc/hostname
-sed -i 's/\<BeagleBone\>/'"$HOST_NAME"'/g' /etc/hosts
-
-echo "creating user $USER_NAME..."
-fok userdel debian
-rm -rf /home/debian
-fok id -u $USER_NAME || fok adduser $USER_NAME
-
-echo "removing all security..."
-rm -f /etc/sudoers.d/admin
-cat << "EOF" > /etc/sudoers.d/nopasswd
-%sudo ALL=(ALL:ALL) NOPASSWD: ALL
-EOF
-usermod -aG sudo $USER_NAME
-cat << "EOF" > /etc/ssh/sshd_config.d/rice.conf
-PasswordAuthentication yes
-PermitEmptyPasswords yes
-PermitRootLogin yes
-PrintLastLog no
-EOF
-systemctl restart ssh
-fok passwd -d root
-fok passwd -d $USER_NAME
-
-echo "fixing terminal colors & default editor..."
-cat << "EOF" > /etc/profile.d/rice.sh
-export TERM="xterm-256color"
-export EDITOR="nvim"
-EOF
-
-echo "removing bloatware..."
-fok apt remove -y --allow-change-held-packages \
- libruby2.7 libgl1-mesa-dri python3-numpy mesa-vulkan-drivers \
- bb-beagle-config libflite1 firmware-libertas python3-mypy libgtk-3-common \
- adwaita-icon-theme firmware-atheros firmware-misc-nonfree \
- pocketsphinx-en-us scratch libwebkit2gtk-4.0-37 firmware-iwlwifi \
- bb-node-red-installer firefox-esr bb-code-server plymouth xserver-xorg-core \
- xserver-xorg xserver-xorg-legacy x11-common x11-server-utils x11-utils \
- lightdm-gtk-greeter lightdm xfce4-session xfce4-panel xfce4-settings \
- xfce4-helpers fonts-dejavu-core nodejs nodejs-doc nginx-core nginx-common \
- nginx mesa-va-drivers bluetooth bluez pipewire-bin pipewire pulseaudio-utils \
- pulseaudio gtk-update-icon-cache wpasupplicant fontconfig-config fontconfig \
- hostapd adwaita-icon-theme hicolor-icon-theme polkitd whiptail
-echo "removing more bloatware..."
-fok apt autoremove -y
-echo "cleaning up trash..."
-fok apt clean -y
-
-echo "updating system..."
-fok apt-get update
-fok apt-get upgrade -y
-
-echo "preparing for debian sid update..."
-export DEBIAN_FRONTEND=noninteractive
-echo "usrmerge usrmerge/autoconvert boolean true" | debconf-set-selections
-fok apt-get install usrmerge -y
-cat << "EOF" > /etc/apt/sources.list
-deb http://deb.debian.org/debian sid main contrib non-free
-deb [arch=armhf signed-by=/usr/share/keyrings/rcn-ee-archive-keyring.gpg] http://repos.rcn-ee.com/debian/ sid main
-EOF
-fok apt-get update
-echo "updating to debian sid..."
-apt-get dist-upgrade -y
-
-echo "removing noisy banners..."
-rm -f /etc/motd /etc/issue /etc/issue.net /etc/dogtag
-
-echo "install newer linux kernel..."
-fok apt-get install -y linux-image-$KERNEL_VERSION linux-headers-$KERNEL_VERSION
-
-echo "install based software..."
-fok apt-get install -y neovim zsh git systemd-resolved
-fok chsh -s /bin/zsh $USER_NAME
-fok chsh -s /bin/zsh root
-
-cp /etc/zsh/newuser.zshrc.recommended "/home/$USER_NAME/.zshrc"
-chown "$USER_NAME:$USER_NAME" "/home/$USER_NAME/.zshrc"
-cat << "EOF" > /root/.zshrc
-# Set up the prompt
-autoload -Uz promptinit
-promptinit
-prompt redhat
-
-setopt histignorealldups sharehistory
-
-# Use emacs keybindings even if our EDITOR is set to vi
-bindkey -e
-
-# Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
-HISTSIZE=1000
-SAVEHIST=1000
-HISTFILE=~/.zsh_history
-
-# Use modern completion system
-autoload -Uz compinit
-compinit
-
-zstyle ':completion:*' auto-description 'specify: %d'
-zstyle ':completion:*' completer _expand _complete _correct _approximate
-zstyle ':completion:*' format 'Completing %d'
-zstyle ':completion:*' group-name ''
-zstyle ':completion:*' menu select=2
-zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
-zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*'
-zstyle ':completion:*' menu select=long
-zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
-zstyle ':completion:*' use-compctl false
-zstyle ':completion:*' verbose true
-
-zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
-EOF
-echo "emulate sh -c 'source /etc/profile'" >> /etc/zsh/zprofile
-
-echo "cleaning up trash..."
-fok apt clean -y
-
-echo "all done!"
diff --git a/2/test/.gitignore b/2/test/.gitignore
deleted file mode 100644
index ba2906d..0000000
--- a/2/test/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-main
diff --git a/2/test/main.c b/2/test/main.c
deleted file mode 100644
index 04ce434..0000000
--- a/2/test/main.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h>
-
-int main() {
- printf("Hello world!\n");
- return 0;
-}
diff --git a/2/test/makefile b/2/test/makefile
deleted file mode 100644
index cd6a8c6..0000000
--- a/2/test/makefile
+++ /dev/null
@@ -1 +0,0 @@
-main: main.c