Comment 8 for bug 1337538

Revision history for this message
dann frazier (dannf) wrote :

The relationship between these is as follows.

flash-kernel requires u-boot-tools on certain platforms. This is detected at d-i installtime by flash-kernel-installer like so:

dannf@mustang:~$ export FK_DIR="/usr/share/flash-kernel"
dannf@mustang:~$ . $FK_DIR/functions
dannf@mustang:~$ machine="$(get_cpuinfo_hardware)"
dannf@mustang:~$ echo $machine
APM X-Gene Mustang board
dannf@mustang:~$ get_machine_field "$machine" "Required-Packages"
u-boot-tools
dannf@mustang:~$

Presumably this is because arm platforms have historically been embedded, so it made sense to make this a dynamic decision vs. a hard package dependency to avoid installing unnecessary packages where possible. That's just a guess though.

flash-kernel installs an initramfs-hook that causes flash-kernel to be executed when the initramfs is regenerated. If the platform requires u-boot-tools, it expected u-boot-tools to be there. Now, it could be argued that flash-kernel's initramfs-tools hook shouldn't exit with an error in this situation (due to a missing but undeclared dependency), and perhaps instead print a large warning to the console - that's an easy enough fix. But I don't know of a good way to make a non-d-i-installer know what packages d-i would install on a target platform w/o some higher level redesign.