~sjg1/curtin:master

Last commit made on 2025-04-04
Get this branch:
git clone -b master https://git.launchpad.net/~sjg1/curtin
Only Simon Glass can upload to this branch. If you are Simon Glass please log in for upload directions.

Branch merges

Branch information

Name:
master
Repository:
lp:~sjg1/curtin

Recent commits

dc00a34... by Simon Glass

wip

50d0c9c... by Simon Glass

extlinux: Get the correct root device

The root device must be provided to the kernel using the 'append'
command in the extlinux.conf file. Add support for this.

Obtain the root device from block_meta, creating a new function for this
purpose.

Signed-off-by: Simon Glass <email address hidden>

6fe6a6f... by Simon Glass

extlinux: Figure out when to use an empty fw_boot_dir

When a separate boot partition is used, fw_boot_dir should be empty. Add
the logic for this into setup_extlinux()

Signed-off-by: Simon Glass <email address hidden>

97b0590... by Simon Glass

extlinux: Support a firmware-visible boot directory

When a separate boot partition is used, firmware such as U-Boot sees
this as a separate filesystem on a different device, since there is no
concept of a mount point in firmware.

This means that files must be loaded from the root directory of the boot
partition, rather than from '/boot'.

However a common case, which we need to support, is using a unified
filesystem. In this case the firmware must load files from the /boot
directory.

Provide a configuration option for extlinux which sets this boot
directory. This allows the correct path to be used in extlinux.conf when
loading the kernel and related files.

This feature mirrors the _BOOT_DIRECTORY and _BOOT_PATH logic used by
the u-boot-menu package (in /usr/share/u-boot-menu/read-config).

For now, curthooks itself does not support providing this config.

Signed-off-by: Simon Glass <email address hidden>

bc4b457... by Simon Glass

extlinux: Split out processing into setup_extlinux()

The grub implementation uses a setup_grub() function which takes just
the boot configuration. Do the same for extlinux so we can add more
logic there, with access to the full config.

The test_install_extlinux() test actually calls install_extlinux() with
the wrong config. Fix that and tidy up some comments while we are here.

Signed-off-by: Simon Glass <email address hidden>

98ddf70... by Simon Glass

curthook: Implement rescue mode in extlinux

Add a schema item for which alternatives to add to the extlinux file.
Update the implementation to respect this setting.

Use the 'rescue' terminology for this, since we may want to use
'recovery' for automatic recovery. It also matches the name used by
Ubuntu.

Signed-off-by: Simon Glass <email address hidden>

19125a4... by Simon Glass

curthooks: Fix warning about LOG.warn()

When running tests with tox this warning appears:
  curtin/commands/curthooks.py:417: DeprecationWarning:
      The 'warn' method is deprecated, use 'warning' instead
    LOG.warn("Couldn't detect kernel package to install for %s."

Fix it by using LOG.warning() instead.

Signed-off-by: Simon Glass <email address hidden>

ed9b848... by Simon Glass

curtin: Mention the need for libapt-pkg-dev

When running tox on a vanilla Ubuntu 24.04 I get this error:

   In file included from python/acquire-item.cc:24:
   python/apt_pkgmodule.h:14:10: fatal error: apt-pkg/hashes.h:
     No such file or directory
         14 | #include <apt-pkg/hashes.h>
            | ^~~~~~~~~~~~~~~~~~

Add a note in the hacking instructions to help with this.

Signed-off-by: Simon Glass <email address hidden>

3a12321... by Dan Bungert

several: fix flake re unassigned globals

ade5432... by Dan Bungert

apt_config: attempt to clean cloud-init-base