Subject: Custom ISO image without firmware?

From: Mogens Jensen <[email-masked]>
Date: Tue, 01 Sep 2020 17:24:17 +0000

Hi,

I'm using mkimage to build custom ISO images. I don't need the
firmware, but so far all attempts to avoid it has been unsuccessful
as about 155 MB of firmware files are automatically built into modloop.

Is it possible to not include firmware when building custom ISO images
with mkimage?

Regards,
Mogens Jensen

---

From: "Tyler G. Sherrard" <[email-masked]>
Date: Tue, 01 Sep 2020 17:38:58 +0000

Hi

> as about 155 MB of firmware files are automatically built into modloop.

You can hack around mkimg.base.sh (in aports/scripts) as well as possibly /sbin/update-kernel,
which is what I ended up doing to add/remove my own items from modloop

c705

---

From: Mogens Jensen <[email-masked]>
Date: Tue, 01 Sep 2020 18:00:46 +0000

Hi,

> You can hack aroundmkimg.base.sh (in aports/scripts) as well as possibly /sbin/update-kernel,

Thanks, I will do that. I was hoping for a "clean" solution, but it
seems that such do not exist.

Regards,
Mogens Jensen

---

From: Kevin Daudt <[email-masked]>
Date: Wed, 9 Sep 2020 12:30:54 +0200

> seems that such do not exist.

I think making sure linux-firmware-none is installed should prevent the
actual firmware packages to be pulled in.

---

From: Mogens Jensen <[email-masked]>
Date: Mon, 14 Sep 2020 03:22:37 +0000

> actual firmware packages to be pulled in.

I have linux-firmware-none installed on the build host and added the
package to apks list in mkimg script, but all the firmware is still
added to modloop.

Am I doing something wrong?

Regards,
Mogens Jensen

---

From: Tom Reid <[email-masked]>
Date: Tue, 6 Oct 2020 12:43:39 +0100

> Am I doing something wrong?

I faced a similar problem. You will note in mkimg.base.sh there is a line in section_kernels()

```
_pkgs="linux-$_f linux-firmware wireless-regdb $modloop_addons"
```

This forces the linux-firmware to be available while building the modloop.
Putting the following into my mkimg.customiso.sh did the trick to remove them, leaving the build process untouched for other standard builds:

```
section_kernels() {
	local _f _a _pkgs
	for _f in $kernel_flavors; do
		_pkgs="linux-$_f wireless-regdb $modloop_addons"
		for _a in $kernel_addons; do
			_pkgs="$_pkgs $_a-$_f"
		done
		local id=$( (echo "$initfs_features::$_hostkeys" ; apk fetch --root "$APKROOT" --simulate alpine-base $_pkgs | sort) | checksum)
		build_section kernel $ARCH $_f $id $_pkgs
	done
}
```
Hope this helps.

Best,
Tom Reid