tools icon indicating copy to clipboard operation
tools copied to clipboard

FreeBSD 13.1 instructions and fix target

Open blkmajik opened this issue 3 years ago • 3 comments

Add documentation on how to resolve the pkg problem when starting with a new fresh FreeBSD 13.1 install.

blkmajik avatar Aug 04 '22 20:08 blkmajik

OK I've updated this based on the previous feedback. I now add a "fix" target to the Makefile that should do everything from my instructions in a version independent way. With this the instructions have become simpler.

I'm not 100% attached to using /root/pkg-static as a target but it is a hack that works around this situation. There is likely a better place to put the pkg-static version that we need temporarily.

blkmajik avatar Aug 10 '22 22:08 blkmajik

I just tested this but it might be nice to add a warning and a are you sure prompt this will remove all packages to the makefile step.

Also after this I wasn't able to install any FreeBSD package anymore required for compilation:

# pkg install aarch64-binutils

Would adding something like these steps solve this problem?

pkg lock pkg
sed -i '' 's/no/yes/' /usr/local/etc/pkg/repos/FreeBSD.conf

It should leave pkg the way it is and enable you to install from the FreeBSD repo again.

wilmardo avatar Sep 26 '22 19:09 wilmardo

Just tested the fix and it seems to work.

rmundel avatar Oct 13 '22 20:10 rmundel

Additionally, I noticed that it is no longer possible to install dependencies for cross-compiling afterwards (e.g. u-boot-rpi4 or rpi-firmware).

To achieve this, all required packages that are not available in the opnsense repo must be downloaded beforehand. For the example of DEVICE=RPI this would be the following steps:

# pkg fetch u-boot-rpi4 rpi-firmware aarch64-binutils qemu-user-static
...
# make fix
...
# make update
...
# cd /var/cache/pkg/
# pkg add u-boot-rpi4-2022.04_1~5127dabef1.pkg
# pkg add rpi-firmware-1.20210303.g20210303~4612691249.pkg
# pkg add aarch64-binutils-2.37_4,1~c3d50b5d6e.pkg
# pkg add qemu-user-static-3.1.0_13~a1d171ce8d.pkg
...
# cd /usr/tools
# make base kernel DEVICE=BANANAPI
...

jkuettner avatar Oct 29 '22 21:10 jkuettner

I don’t think it helps to over complicate this PR with unrelated things. PROUCT_WANTS still exist. If there is an issue with it it should be addressed separately.

As for this PR we will be switching to pkg 1.18 shortly so it becomes obsolete. Discussed merging this internally, but we don’t want temporary workarounds cluttering the repository that are outside of our control.

fichtner avatar Oct 30 '22 07:10 fichtner

pkg 1.18.4 is now in testing... in hindsight bd63e02c87f was and will still be very effective in the future.

fichtner avatar Dec 08 '22 13:12 fichtner