Subject: Re: [PATCH] gnu: bootloader: Support for chain loading.

From: Mathieu Othacehe <[email-masked]>
Date: Tue, 03 Nov 2020 10:32:16 +0100

Hey,

> Ah so ‘-s’ and ‘--target’ are overridden by the image type?

If a "target" is set in the "image" definition then yes it overrides
"--target", otherwise "--target" is honored.

This is handled by the following snippet:

--8<---------------cut here---------------start------------->8---
(let* ((base-image (os->image os #:type image-type))
       (base-target (image-target base-image)))
  (lower-object
   (system-image
    (image
     (inherit (if label
                  (image-with-label base-image label)
                  base-image))
     (target (or base-target target))
     (size image-size)
     (operating-system os))))))
--8<---------------cut here---------------end--------------->8---

There's no particular heuristic for "--system".

Mathieu