aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-02-08 19:27:55 +0100
committerlonkaars <loek@pipeframe.xyz>2024-02-08 19:27:55 +0100
commit1b3570804184f62ff96ff6f2f6fc43b4c999678d (patch)
tree5feb7f80ff44700a31e81326dd3a09747281ac43
parent70e923cb55dad341f66f7b0586538c93b38cd3fa (diff)
minecraft working :tada:
-rw-r--r--.gitignore8
-rw-r--r--.gitmodules8
-rw-r--r--Containerfile1
-rw-r--r--env4
-rw-r--r--rootfs/etc/profile4
l---------rootfs/lib1
-rw-r--r--software.mk43
m---------software/jdk8u0
m---------software/void-packages0
-rwxr-xr-xutil/mkrootfs2
10 files changed, 54 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index 85ec7f5..5f0279f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,10 +3,6 @@ state/*
mnt
uboot.env
-# BEGIN UPDATE FROM `make __software_files`
rootfs/bin/helloworld
-rootfs/lib/libc.so.6
-rootfs/lib/ld-linux-armhf.so.3
-rootfs/usr/share/udhcpc/default.script
-# END UPDATE FROM `make __software_files`
-
+rootfs/srv/minecraft/server.jar
+rootfs/usr
diff --git a/.gitmodules b/.gitmodules
index 09d00ca..9e922fa 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -8,12 +8,14 @@
url = https://github.com/beagleboard/linux
branch = v6.1.69-ti-r22
shallow = true
+
[submodule "busybox"]
path = busybox
url = https://git.busybox.net/busybox
branch = 1_36_stable
shallow = true
-[submodule "software/jdk8u"]
- path = software/jdk8u
- url = https://github.com/openjdk/jdk8u
+[submodule "software/void-packages"]
+ path = software/void-packages
+ url = https://github.com/void-linux/void-packages
shallow = true
+
diff --git a/Containerfile b/Containerfile
index 2213b19..865bd40 100644
--- a/Containerfile
+++ b/Containerfile
@@ -16,6 +16,7 @@ run xbps-install -Sy bc
run xbps-install -Sy cpio
run xbps-install -Sy xz
run xbps-install -Sy lz4
+run xbps-install -Sy bash
# # temp:
# run xbps-install -Sy ncurses-devel
diff --git a/env b/env
index e1ff350..8370a4f 100644
--- a/env
+++ b/env
@@ -1,5 +1,5 @@
-#!/bin/sh
-# this file should be sourced, not run!
+# NOTE: this file is sourced from both make and sh scripts
ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf-
+XBPS_ALLOW_CHROOT_BREAKOUT=y
diff --git a/rootfs/etc/profile b/rootfs/etc/profile
index 431ef69..f457aee 100644
--- a/rootfs/etc/profile
+++ b/rootfs/etc/profile
@@ -1,5 +1,7 @@
# /etc/profile
umask 022
-export PATH="$PATH:/usr/bin"
export LD_LIBRARY_PATH="/lib"
+
+export PATH="$PATH:/usr/bin"
+export PATH="$PATH:/usr/lib/jvm/openjdk8/jre/bin"
diff --git a/rootfs/lib b/rootfs/lib
new file mode 120000
index 0000000..0d5487b
--- /dev/null
+++ b/rootfs/lib
@@ -0,0 +1 @@
+usr/lib \ No newline at end of file
diff --git a/software.mk b/software.mk
index 2a609c2..5733a1d 100644
--- a/software.mk
+++ b/software.mk
@@ -5,11 +5,14 @@ rootfs/bin/helloworld: software/helloworld/helloworld
cp $^ $@
SOFTWARE_FILES += rootfs/bin/helloworld
-SHARED_LIBS += rootfs/lib/libc.so.6
-SHARED_LIBS += rootfs/lib/ld-linux-armhf.so.3
+SHARED_LIBS += rootfs/usr/lib/libc.so.6
+SHARED_LIBS += rootfs/usr/lib/ld-linux-armhf.so.3
+SHARED_LIBS += rootfs/usr/lib/libm.so.6
+SHARED_LIBS += rootfs/usr/lib/libgcc_s.so.1
+
$(SHARED_LIBS)&: state/container_img
- mkdir -p rootfs/lib
- $(CTRIZE) cp $(SHARED_LIBS:rootfs/lib/%=/usr/arm-linux-gnueabihf/lib/%) rootfs/lib
+ mkdir -p rootfs/usr/lib
+ $(CTRIZE) cp $(SHARED_LIBS:rootfs/usr/lib/%=/usr/arm-linux-gnueabihf/lib/%) rootfs/usr/lib
SOFTWARE_FILES += $(SHARED_LIBS)
rootfs/usr/share/udhcpc/default.script: busybox/examples/udhcp/simple.script state/submodules
@@ -18,4 +21,36 @@ rootfs/usr/share/udhcpc/default.script: busybox/examples/udhcp/simple.script sta
chmod +x $@
SOFTWARE_FILES += rootfs/usr/share/udhcpc/default.script
+# at this point i am fucking tired of compiling shit from scratch so i just
+# steal armv7l binaries from void linux
+JAVA_PKG = software/void-packages/hostdir/binpkgs/openjdk8-jre-8u332b05_2.armv7l.xbps
+$(JAVA_PKG): state/submodules state/container_img
+ $(CTRIZE) software/void-packages/xbps-src binary-bootstrap
+ $(CTRIZE) software/void-packages/xbps-src -a armv7l pkg openjdk8
+XBPS_PKGS += $(JAVA_PKG)
+XBPS_PKGS += software/void-packages/hostdir/repocache-armv7l/zlib-1.3.1_1.armv7l.xbps
+XBPS_PKGS += software/void-packages/hostdir/repocache-armv7l/libX11-1.8.7_1.armv7l.xbps
+XBPS_PKGS += software/void-packages/hostdir/repocache-armv7l/libXext-1.3.5_1.armv7l.xbps
+XBPS_PKGS += software/void-packages/hostdir/repocache-armv7l/libXi-1.8.1_1.armv7l.xbps
+XBPS_PKGS += software/void-packages/hostdir/repocache-armv7l/libXrender-0.9.11_1.armv7l.xbps
+XBPS_PKGS += software/void-packages/hostdir/repocache-armv7l/libXtst-1.2.4_1.armv7l.xbps
+XBPS_PKGS += software/void-packages/hostdir/repocache-armv7l/alsa-lib-1.2.10_2.armv7l.xbps
+XBPS_PKGS += software/void-packages/hostdir/repocache-armv7l/libffi-3.3_2.armv7l.xbps
+XBPS_PKGS += software/void-packages/hostdir/repocache-armv7l/freetype-2.13.2_1.armv7l.xbps
+XBPS_PKGS += software/void-packages/hostdir/repocache-armv7l/giflib-5.2.1_1.armv7l.xbps
+.PHONY: unpack_xbps_pkgs
+unpack_xbps_pkgs: $(XBPS_PKGS)
+ cat $^ | tar -xf - --zstd -i -C rootfs
+ rm rootfs/files.plist rootfs/props.plist
+
+rootfs/usr/lib/jvm: unpack_xbps_pkgs
+SOFTWARE_FILES += rootfs/usr/lib/jvm
+
+software/minecraft/server.jar:
+ $(MAKE) -C software/minecraft
+rootfs/srv/minecraft/server.jar: software/minecraft/server.jar
+ mkdir -p $(dir $@)
+ cp $< $@
+SOFTWARE_FILES += rootfs/srv/minecraft/server.jar
+
FILES_PART_ROOTFS += $(SOFTWARE_FILES)
diff --git a/software/jdk8u b/software/jdk8u
deleted file mode 160000
-Subproject 552c6866d8ad71ef247b5303f78fa7a65506aea
diff --git a/software/void-packages b/software/void-packages
new file mode 160000
+Subproject a98a9d176c2d80e6beb355d80296a6df350392e
diff --git a/util/mkrootfs b/util/mkrootfs
index 80dfe04..f8c4c60 100755
--- a/util/mkrootfs
+++ b/util/mkrootfs
@@ -11,7 +11,7 @@ cd "$1"
# scaffold folders
for dir in \
- bin dev etc home lib proc root sbin srv sys tmp usr var \
+ dev home proc root sys tmp \
var/log var/run \
etc/network/if-down.d etc/network/if-post-down.d \
etc/network/if-pre-up.d etc/network/if-up.d \