fnuecke / oc2

RISC-V VMs in Minecraft.
https://www.curseforge.com/minecraft/mc-mods/oc2
Other
613 stars 72 forks source link

Newer buildroot #236

Open Un1q32 opened 1 year ago

Un1q32 commented 1 year ago

5.9 is kinda old. I think we should use the latest LTS kernel (currently 5.15). I'm not too familiar with buildroot or sedna so if theres some weird reason why only 5.9.0 works then let me know.

Un1q32 commented 1 year ago

closing this bc its due to being built with an older version of buildroot. currently testing newer buildroot

Un1q32 commented 1 year ago

reopening as a newer buildroot issue cuz why not. technically this would be for https://github.com/fnuecke/buildroot but idc

Un1q32 commented 1 year ago

ive got a repo where i just merged everything from the latest stable release of upstream buildroot into fnuecke's repo https://github.com/OldWorldOrdr/buildroot.

Un1q32 commented 1 year ago

i tried to build it and i get this idk what to do

>>> linux-headers 5.17.15 Patching
for p in board/sedna-riscv64/patches/linux ; do if test -d $p ; then PATH=/home/joey/buildroot/output/host/bin:$PATH support/scripts/apply-patches.sh  /home/joey/buildroot/output/build/linux-headers-5.17.15 $p \*.patch || exit 1 ; else PATH=/home/joey/buildroot/output/host/bin:$PATH support/scripts/apply-patches.sh  /home/joey/buildroot/output/build/linux-headers-5.17.15 `dirname $p` `basename $p` || exit 1; fi done

Applying 0001-riscv-initialize-pm_power_off-to-null-for-drivers.patch using patch:
Error: duplicate filename '0001-riscv-initialize-pm_power_off-to-null-for-drivers.patch'
Conflicting files are:
  already applied: /home/joey/buildroot/board/sedna-riscv64/patches/linux/0001-riscv-initialize-pm_power_off-to-null-for-drivers.patch
  to be applied  : /home/joey/buildroot/board/sedna-riscv64/patches/linux/0001-riscv-initialize-pm_power_off-to-null-for-drivers.patch
make: *** [package/pkg-generic.mk:252: /home/joey/buildroot/output/build/linux-headers-5.17.15/.stamp_patched] Error 1
Un1q32 commented 1 year ago

i think its a patch made for an older version of the kernel so it would need to be adapted for 5.17 (version in latest stable buildroot). I'm gonna compile without the patch and see how far it gets me.

Un1q32 commented 1 year ago

it seems to work fine at first glance. ill remove the breaking patch real quick so it builds without any tweaks

Un1q32 commented 1 year ago

OK https://github.com/OldWorldOrdr/buildroot/ is finished.

Un1q32 commented 1 year ago

After building just open the sedna jar (not the oc2 jar) and go to the generated folder and replace the files with their counterparts from output/images in the buildroot directory

Un1q32 commented 1 year ago

the kernel appears to just not work, so dont replace the Image file in the sedna jar or your system wont boot

Un1q32 commented 1 year ago

Kernel 5.15 works, I've modified the build config to use it.

Un1q32 commented 1 year ago

https://github.com/fnuecke/buildroot/pull/4

Un1q32 commented 1 year ago

Kernel 5.15 works, I've modified the build config to use it.

running poweroff doesn't fully turn off the system, which I think is what that kernel patch did, you can still just press the on button on the side of the screen to turn it off. Fixing this would probably require the patch to be ported to 5.15 which is not something I know how to do.