Hi Ludovic, Ludovic Courtès <l...@gnu.org> writes:
> Hi, > > Maxim Cournoyer <maxim.courno...@gmail.com> skribis: > >> -(define (bootable-kernel-arguments system root-device) >> - "Return a list of kernel arguments (gexps) to boot SYSTEM from >> ROOT-DEVICE." >> - (list (string-append "--root=" >> +(define* (bootable-kernel-arguments system root-device version) >> + "Return a list of kernel arguments (gexps) to boot SYSTEM from >> ROOT-DEVICE. >> +VERSION is the target version of the boot-parameters record." >> + ;; If the version is newer than 0, we use the new style initrd parameter >> + ;; names, otherwise we use the legacy ones. This is to maintain backward >> + ;; compatibility when producing bootloader configurations for older >> + ;; generations. >> + (define version>0? (> version 0)) >> + (list (string-append (if version>0? "root=" "--root=") >> ;; Note: Always use the DCE format because that's >> what >> - ;; (gnu build linux-boot) expects for the '--root' >> + ;; (gnu build linux-boot) expects for the 'root' >> ;; kernel command-line option. >> (file-system-device->string root-device >> #:uuid-type 'dce)) >> - #~(string-append "--system=" #$system) >> - #~(string-append "--load=" #$system "/boot"))) >> + #~(string-append (if #$version>0? "gnu.system=" "--system=") >> #$system) >> + #~(string-append (if #$version>0? "gnu.load=" "--load=") >> + #$system "/boot"))) > > This is the logic I was suggesting to move to ‘read-boot-parameters’. > > To do that, ‘read-boot-parameters’ would have to fill the > ‘kernel-arguments’ field of <boot-parameters> such that it already > contains --system/gnu.system and --load/gnu.load. As mentioned in my previous reply, that'd only be possible if we no longer cared about having the produced system directory content-addressable, if I understood that comment in the docstring referred earlier correctly. Thanks, Maxim