Skip to content

Conversation

@nirs
Copy link
Contributor

@nirs nirs commented Jun 28, 2025

Previously making the iso-menuconfig-{aarch64,x86_64} or linux-menuconfig-{aarch64,x86_64} targets you had to build the entire iso, since the out/buildroot tree was created by the minikube-iso-{aarch64,x86_64} target.

This change fix the Makefile so you can run the iso-menuconfig-{aarch64,x86_64} or linux-menuconfig-{aarch64,x86_64} directly after checking the source. This makes it much easier to work on the iso configuration.

Previously the linux-menuconfig-{aarch64,x86_64} targets were not using the buildroot facilities, copying files manually using hard coded paths and kernel version. Fixing the target to use the buildroot way removed the unneeded KERNEL_VERSION variable from the Makefile, that made updating kernel version hard.

Running the iso-menuconfig-{aarch64,x86_64} and linux-menuconfig-{aarch64,x86_64} without any change revealed that we had manual changes in the configuration that were not created by config. I run all the targets to update the configuration to the output of kconfig, so future changes do not include unrelated changes.

For aarch64 the image is much larger (410 MiB vs 362 MiB). Turns out that removing unnecessary support for various Arm boards reduces the image to 392 MiB.

Status

Beofre we can build the iso, we need to clone and configure buildroot.
This is required to run iso-menuconfig-{arch}.
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 28, 2025
@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 28, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @nirs. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 28, 2025
@nirs nirs mentioned this pull request Jun 28, 2025
@nirs nirs marked this pull request as ready for review June 29, 2025 10:17
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 29, 2025
@k8s-ci-robot k8s-ci-robot requested a review from medyagh June 29, 2025 10:17
@nirs
Copy link
Contributor Author

nirs commented Jun 29, 2025

ok-to-build-iso

@minikube-bot
Copy link
Collaborator

Hi @nirs, we have updated your PR with the reference to newly built ISO. Pull the changes locally if you want to test with them or update your PR further.

@nirs
Copy link
Contributor Author

nirs commented Jun 29, 2025

@afbjorklund can you add ok-to-test? the .PHONY change does not affect the build and fixed now.

nirs added 7 commits June 29, 2025 17:12
This target prepare for building an iso or running menuconfig. With this
change we can run the {iso,linux}-menuconfig-{x86_64,aarch64} targets
without buidling the entire iso.
Previouly it worked only after building the entire iso. Now we make this
target without building the iso or running iso-menuconfig.

On the first run this downloads and builds lot for packages required to
run the linux-menuconfig target, but it is much shorter than buidling
the entire iso.
Preveviously we copied the defconfig manauly to the beoard config file.
This can be done using the special linux-update-defconfig target.

With this change we don't need to keep KERNEL_VERSION in the Makefile,
making future upgrade easier.
Run `make iso-menuconfig-aarch64` without making any changes updates the
buildroot config. It seems that there were manual changes in the config
which are overwritten when running iso-menuconfig. Removing the manual
changes to make it easier to edit the configuration with kconfig.
Same as the aarch64 change to make it easier to configure using kconfig.
Same as iso-menuconfig-aarch64, run `make linux-menuconfig-aarch64` and
exit without any change to update the config. This seems to change the
order, removing manual changes from the config. This will make it easier
to configure using kconfig in the future.
Same as the aarch64 changes to make it easier to configure using kconfig
in the future.
We run on qemu virt machine or apple virtualization so we don't need
support for all kinds of embeded Arm boards. This reduces the arm64 iso
size from 410 MiB to 392 MiB.
@nirs
Copy link
Contributor Author

nirs commented Jun 29, 2025

I added another commit removing unnecessary support for various Arm boards. This should not be needed since we run on in a vm.

@nirs
Copy link
Contributor Author

nirs commented Jun 29, 2025

ok-to-build-iso

@nirs nirs changed the title Iso: Improve build and clean up configuration iso: Improve build and clean up configuration Jun 29, 2025
@minikube-bot
Copy link
Collaborator

Hi @nirs, we have updated your PR with the reference to newly built ISO. Pull the changes locally if you want to test with them or update your PR further.

@ComradeProgrammer
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 30, 2025
@minikube-pr-bot

This comment has been minimized.

@nirs
Copy link
Contributor Author

nirs commented Jun 30, 2025

I checked KVM errors:

  • KVM_Linux_containerd
    • volcano (known issue)
    • toomanyrequests: You have reached your unauthenticated pull rate limit (93 instances)
  • KVM_Linux_crio
    • toomanyrequests: You have reached your unauthenticated pull rate limit (98 instances)

@medyagh
Copy link
Member

medyagh commented Jun 30, 2025

/ok-to-test

@medyagh
Copy link
Member

medyagh commented Jun 30, 2025

@nirs thank you for making it faster to iterate on the ISO build, do you mind sharing an example iteration of ISO build using this new target ? do you manually call make prepare-... ? or do you build the iso the way it was before and let it do the work underneath ?

if this new make target could help other developers, we could add it to the minikube website

@nirs
Copy link
Contributor Author

nirs commented Jun 30, 2025

@nirs thank you for making it faster to iterate on the ISO build, do you mind sharing an example iteration of ISO build using this new target ?

Without this change this will fail:

git clone https://github.com/kubernetes/minikube.git
cd minikube
make iso-menuconfig-{arch}

Because the out/buildroot is created by make minikube-iso-{arch}, which an take 2 hours to build.

Same for make linux-menuconfig-{arch}.

With this change we can do this to update kernel version:

git clone https://github.com/kubernetes/minikube.git
cd minikube

Update kernel version and headers version via kconfig and exit:

make iso-menuconfig-{arch}

Run to update linux config for the new kernel:

make linux-menuconfig-{arch}

do you manually call make prepare-... ?

No

or do you build the iso the way it was before and let it do the work underneath ?

Exactly, it is it internal target, this is also why it is not documented.

if this new make target could help other developers, we could add it to the minikube website

It is better not to complicate the docs, this target is relevant only if you wan to modify the makefile.

I think that the current docs need update for multiple architectures. Maybe they worked when minikube had only single iso.

I will post another PR to describing updating kernel flow.

@minikube-pr-bot

This comment has been minimized.

@minikube-bot
Copy link
Collaborator

Hi @nirs, we have updated your PR with the reference to newly built ISO. Pull the changes locally if you want to test with them or update your PR further.

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 20991) |
+----------------+----------+---------------------+
| minikube start | 52.5s    | 52.4s               |
| enable ingress | 16.4s    | 15.6s               |
+----------------+----------+---------------------+

Times for minikube (PR 20991) start: 53.4s 52.9s 52.1s 53.5s 50.0s
Times for minikube start: 53.6s 51.1s 53.7s 51.5s 52.8s

Times for minikube ingress: 15.1s 14.6s 15.1s 18.7s 18.6s
Times for minikube (PR 20991) ingress: 16.1s 15.1s 15.6s 16.1s 15.1s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 20991) |
+----------------+----------+---------------------+
| minikube start | 23.8s    | 25.0s               |
| enable ingress | 12.8s    | 13.0s               |
+----------------+----------+---------------------+

Times for minikube start: 23.5s 23.6s 24.4s 24.2s 23.5s
Times for minikube (PR 20991) start: 27.0s 23.5s 23.3s 23.6s 27.6s

Times for minikube ingress: 12.8s 12.8s 12.8s 13.3s 12.3s
Times for minikube (PR 20991) ingress: 12.3s 13.3s 13.9s 12.4s 13.3s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 20991) |
+----------------+----------+---------------------+
| minikube start | 23.0s    | 23.0s               |
| enable ingress | 26.4s    | 29.3s               |
+----------------+----------+---------------------+

Times for minikube start: 24.4s 22.1s 21.7s 21.6s 25.2s
Times for minikube (PR 20991) start: 22.1s 22.5s 21.6s 22.1s 26.6s

Times for minikube ingress: 22.8s 23.8s 22.8s 39.8s 22.8s
Times for minikube (PR 20991) ingress: 22.8s 22.8s 23.3s 38.8s 38.9s

@medyagh
Copy link
Member

medyagh commented Jul 1, 2025

/lgtm

@medyagh medyagh merged commit 77b44f9 into kubernetes:master Jul 1, 2025
15 of 26 checks passed
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 1, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, nirs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 1, 2025
@nirs nirs deleted the iso-build branch July 2, 2025 16:52
pavansaikrishna78 pushed a commit to pavansaikrishna78/minikube that referenced this pull request Aug 18, 2025
* iso: Extract buildroot target

Beofre we can build the iso, we need to clone and configure buildroot.
This is required to run iso-menuconfig-{arch}.

* iso: Extract iso-prepare-% target

This target prepare for building an iso or running menuconfig. With this
change we can run the {iso,linux}-menuconfig-{x86_64,aarch64} targets
without buidling the entire iso.

* iso: Fix linux-menuconfig-% target

Previouly it worked only after building the entire iso. Now we make this
target without building the iso or running iso-menuconfig.

On the first run this downloads and builds lot for packages required to
run the linux-menuconfig target, but it is much shorter than buidling
the entire iso.

* iso: Simplify linux-menuconfig-%

Preveviously we copied the defconfig manauly to the beoard config file.
This can be done using the special linux-update-defconfig target.

With this change we don't need to keep KERNEL_VERSION in the Makefile,
making future upgrade easier.

* iso: Update buildroot configuration for aarch64

Run `make iso-menuconfig-aarch64` without making any changes updates the
buildroot config. It seems that there were manual changes in the config
which are overwritten when running iso-menuconfig. Removing the manual
changes to make it easier to edit the configuration with kconfig.

* iso: Update buildroot configuration for x86_64

Same as the aarch64 change to make it easier to configure using kconfig.

* iso: Update linux configuration for aarch64

Same as iso-menuconfig-aarch64, run `make linux-menuconfig-aarch64` and
exit without any change to update the config. This seems to change the
order, removing manual changes from the config. This will make it easier
to configure using kconfig in the future.

* iso: Update linux configuration for x86_64

Same as the aarch64 changes to make it easier to configure using kconfig
in the future.

* iso: Disable all platform for aarch64

We run on qemu virt machine or apple virtualization so we don't need
support for all kinds of embeded Arm boards. This reduces the arm64 iso
size from 410 MiB to 392 MiB.

* Updating ISO to v1.36.0-1751221996-20991

* Updating ISO to v1.36.0-1751315722-20991

---------

Co-authored-by: minikube-bot <[email protected]>
pavansaikrishna78 pushed a commit to pavansaikrishna78/minikube that referenced this pull request Sep 9, 2025
* iso: Extract buildroot target

Beofre we can build the iso, we need to clone and configure buildroot.
This is required to run iso-menuconfig-{arch}.

* iso: Extract iso-prepare-% target

This target prepare for building an iso or running menuconfig. With this
change we can run the {iso,linux}-menuconfig-{x86_64,aarch64} targets
without buidling the entire iso.

* iso: Fix linux-menuconfig-% target

Previouly it worked only after building the entire iso. Now we make this
target without building the iso or running iso-menuconfig.

On the first run this downloads and builds lot for packages required to
run the linux-menuconfig target, but it is much shorter than buidling
the entire iso.

* iso: Simplify linux-menuconfig-%

Preveviously we copied the defconfig manauly to the beoard config file.
This can be done using the special linux-update-defconfig target.

With this change we don't need to keep KERNEL_VERSION in the Makefile,
making future upgrade easier.

* iso: Update buildroot configuration for aarch64

Run `make iso-menuconfig-aarch64` without making any changes updates the
buildroot config. It seems that there were manual changes in the config
which are overwritten when running iso-menuconfig. Removing the manual
changes to make it easier to edit the configuration with kconfig.

* iso: Update buildroot configuration for x86_64

Same as the aarch64 change to make it easier to configure using kconfig.

* iso: Update linux configuration for aarch64

Same as iso-menuconfig-aarch64, run `make linux-menuconfig-aarch64` and
exit without any change to update the config. This seems to change the
order, removing manual changes from the config. This will make it easier
to configure using kconfig in the future.

* iso: Update linux configuration for x86_64

Same as the aarch64 changes to make it easier to configure using kconfig
in the future.

* iso: Disable all platform for aarch64

We run on qemu virt machine or apple virtualization so we don't need
support for all kinds of embeded Arm boards. This reduces the arm64 iso
size from 410 MiB to 392 MiB.

* Updating ISO to v1.36.0-1751221996-20991

* Updating ISO to v1.36.0-1751315722-20991

---------

Co-authored-by: minikube-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants