Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
misc:acpi_patch [2025/04/27 01:28] 92.40.46.249misc:acpi_patch [2025/04/29 00:10] (current) rqm
Line 104: Line 104:
  
 After you reboot, the new kernel should be the one in use. It will be easy to tell whether the patch worked, because if your system boots "normally", it worked, if you are back at waiting for 2+ hours at "sd0", it failed and you need to check over whether you did everything correctly. After you reboot, the new kernel should be the one in use. It will be easy to tell whether the patch worked, because if your system boots "normally", it worked, if you are back at waiting for 2+ hours at "sd0", it failed and you need to check over whether you did everything correctly.
 +
 +
  
 ---- ----
 +FIXME FIXME FIXME
 +PLEASE DISREGARD BELOW FOR THE TIME BEING, IT IS A WIP AND KNOWN TO BE INCORRECT.
 +FIXME FIXME FIXME
 +----
 +
 === II. The Custom Installer Way === === II. The Custom Installer Way ===
  
Line 138: Line 145:
 When updating it will skip "acpi.c" because you have manually changed the file locally. Overwrite the local changes by running: When updating it will skip "acpi.c" because you have manually changed the file locally. Overwrite the local changes by running:
 <code> <code>
-# cd /usr/src/dev/acpi/+# cd /usr/src/sys/dev/acpi/
 # cvs update -C acpi.c # cvs update -C acpi.c
 </code> </code>
Line 149: Line 156:
 If the only two lines that differ are the ones you commented out with the above patch, just ''mv'' back ''.#acpi.c*'' to ''acpi.c'' because there were no changes. If the output of ''diff'' is more substantial, you might need to edit out the two lines by hand again; if they  still exist, and give us a shout so we can also update this tutorial. If the only two lines that differ are the ones you commented out with the above patch, just ''mv'' back ''.#acpi.c*'' to ''acpi.c'' because there were no changes. If the output of ''diff'' is more substantial, you might need to edit out the two lines by hand again; if they  still exist, and give us a shout so we can also update this tutorial.
  
-You now need to build the kernel as above, but **without** running ''make install''. +=== Download the upgrade === 
- +Fetch the release you are upgrading to, but without rebooting and installing automatically
-You then need to fetch the release you are upgrading to, but without rebooting. +
  
 On ''-current'' this will be: On ''-current'' this will be:
Line 163: Line 169:
 </code> </code>
  
-Then sysupgrade will download the new files for the download, you will find then under ''/home/_sysupgrade''.+Sysupgrade will download the new files for the download, you will find then under ''/home/_sysupgrade''. 
 + 
 +=== Make and install the Ramdisk === 
 +To build ''bsd.rd'', follow the instructions for building as above, but instead of ''GENERIC.MP'' you need to build build ''RAMDISK''
 +<code> 
 +$ doas -s 
 +# cd /sys/arch/amd64/compile/RAMDISK 
 +# make obj 
 +# make config 
 +# make 
 +[...eventually...] 
 +ctfstrip -S -o bsd bsd.gdb 
 +# install -bp /sys/arch/amd64/compile/RAMDISK/obj/bsd /bsd.hax 
 +</code> 
 + 
 +This will give you a "bsd.hax" ramdisk that you can boot to on next reboot. But don't just reboot yet. 
 + 
 +=== Make and install the patched kernel again === 
 + 
 +Before rebooting, you need to re-compile ''bsd.mp'' and put it ''/home/_sysupgrade'':
  
-You will then need to swap out the ''bsd.mp'' file in ''/home/_sysupgrade'' with what you just compiled.  
 <code> <code>
-# install -bp /usr/obj/sys/arch/amd64/compile/GENERIC.MP/bsd /home/_sysupgrade/bsd.mp+$ doas -s 
 +# cd /sys/arch/amd64/compile/GENERIC.MP 
 +# make obj 
 +# make config 
 +# make 
 +[...eventually...] 
 +ctfstrip -S -o bsd bsd.gdb 
 +# install -bp /sys/arch/amd64/compile/GENERIC.MP/obj/bsd /home/_sysupgrade/bsd.mp
 </code> </code>
  
 Reboot... Done! Reboot... Done!