Shell Building mfslinux on FreeBSD

After looking around the openwrt site it looks like I should be able to come up with something based on the following instructions:-



It will probably take me a while to extract the correct filenames, but I'll just make a note here for myself for some task to do in the future...
Here's a little script which highlights the packages which need to be update:-

Code:
workdir=~/mfslinux/workdir
mkdir -p $workdir
cd $workdir
fetch -o - https://raw.githubusercontent.com/mmatuska/mfslinux/master/config/default/openwrt_packages_add | sort >pkgs.orig.
sed -e 's/_.*$//;/base/!d;s/^.*\///;s/^/Filename:\ /; s/$/_/' pkgs.orig >pkgs.b
sed -e 's/_.*$//;/packages/!d;s/^.*\///;s/^/Filename:\ /; s/$/_/' pkgs.orig >pkgs.p
fetch -o base.Packages https://downloads.openwrt.org/releases/21.02.0/packages/x86_64/base/Packages
fetch -o packages.Packages https://downloads.openwrt.org/releases/21.02.0/packages/x86_64/packages/Packages
grep -f pkgs.b base.Packages | sed -e 's/Filename:\ /base\//'>pkgs.b.files
grep -f pkgs.p packages.Packages | sed -e 's/Filename:\ /packages\//'>pkgs.p.files
cat pkgs.b.files pkgs.p.files > pkgs.all
diff -y --suppress-common-lines pkgs.orig pkgs.all

Just notice that '-y' is not recognised in the version of diff I have on one of my systems which is running FreeBSD 12.1-RELEASE-p2!

This is what the output should look like:

Code:
base/libopenssl1.1_1.1.1n-1_x86_64.ipk                |       base/libopenssl1.1_1.1.1q-1_x86_64.ipk
base/libustream-openssl20201210_2022-01-16-868fd881-1_x86       |       base/libustream-openssl20201210_2022-01-16-868fd881-2_x86
base/zlib_1.2.11-4_x86_64.ipk                    |       base/zlib_1.2.11-6_x86_64.ipk
packages/bind-dig_9.18.1-1_x86_64.ipk                |       packages/bind-dig_9.18.7-1_x86_64.ipk
packages/bind-host_9.18.1-1_x86_64.ipk                |       packages/bind-host_9.18.7-1_x86_64.ipk
packages/bind-libs_9.18.1-1_x86_64.ipk                |       packages/bind-libs_9.18.7-1_x86_64.ipk
packages/cryptsetup_2.4.3-1_x86_64.ipk                |       packages/cryptsetup_2.5.0-1_x86_64.ipk
packages/libdevmapper_2.03.14-1_x86_64.ipk            |       packages/libdevmapper_2.03.16-1_x86_64.ipk
packages/libgpg-error_1.42-2_x86_64.ipk                |       packages/libgpg-error_1.45-1_x86_64.ipk
packages/libpci_3.7.0-2_x86_64.ipk                |       packages/libpci_3.8.0-2_x86_64.ipk
packages/lvm2_2.03.14-1_x86_64.ipk                |       packages/lvm2_2.03.16-1_x86_64.ipk
packages/nano_6.2-2_x86_64.ipk                    |       packages/nano_6.4-1_x86_64.ipk
packages/pciids_0.354-1_x86_64.ipk                |       packages/pciids_0.359-1_x86_64.ipk
packages/pciutils_3.7.0-2_x86_64.ipk                |       packages/pciutils_3.8.0-2_x86_64.ipk
 
Code:
FreeBSD

    git (devel/git), mkisofs (sysutils/cdrtools), opkg-cl (archivers/opkg)
    linux64 module loaded for opkg chroot

archivers/opkg: rename to archivers/opkg-openwrt

This was done seven years ago!
 
Running gmake after adding the required packages results in

Downloading: base/ca-certificates_20240203-r1_all.ipk
fetch: https://downloads.openwrt.org/relea..._64//base/ca-certificates_20240203-r1_all.ipk: Not Found
gmake: *** [Makefile:165: download_packages] Error 1

This is because the required file is in a different location:


I'm reluctant to change the Makefile.

How to resolve this?
 
After making substantial changes to mfslinux/config/default/openwrt_packages_add to use newer versions of files referenced, I was able to build it successfully on FreeBSD.

One thing I'd like to have is a higher resolution, the equivalent of installing the pkg drm-kmod and using i915kms.ko in FreeBSD, but have no idea about how to go about achieving that.
 
Back
Top