[bug#77148,1/9] gnu: Add u-boot-qemu-ppce550.

Message ID 8adc52de4128c73f365590349ccca41ec29b48fd.1742546953.git.efraim@flashner.co.il
State New
Headers
Series New firmware and updates |

Commit Message

Efraim Flashner March 21, 2025, 8:53 a.m. UTC
  * gnu/packages/bootloaders.scm (u-boot-qemu-ppce550): New variable.

Change-Id: I92ec83741a90dc9e0c3bdcbeeab0ff5eb47024bf
---
 gnu/packages/bootloaders.scm | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
  

Comments

Maxim Cournoyer March 21, 2025, 2:12 p.m. UTC | #1
Hi,

Efraim Flashner <efraim@flashner.co.il> writes:

> * gnu/packages/bootloaders.scm (u-boot-qemu-ppce550): New variable.
>
> Change-Id: I92ec83741a90dc9e0c3bdcbeeab0ff5eb47024bf
> ---
>  gnu/packages/bootloaders.scm | 22 +++++++++++++++++++++-
>  1 file changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
> index fcdd3abbba1..8678e1c480a 100644
> --- a/gnu/packages/bootloaders.scm
> +++ b/gnu/packages/bootloaders.scm
> @@ -6,7 +6,7 @@
>  ;;; Copyright © 2016-2018, 2021-2023 Marius Bakke <marius@gnu.org>
>  ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym@scratchpost.org>
>  ;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
> -;;; Copyright © 2017, 2018, 2020-2024 Efraim Flashner <efraim@flashner.co.il>
> +;;; Copyright © 2017, 2018, 2020-2025 Efraim Flashner <efraim@flashner.co.il>
>  ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr>
>  ;;; Copyright © 2019 nee <nee@cock.li>
>  ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
> @@ -1330,6 +1330,26 @@ (define-public u-boot-qemu-arm64
>                         ;; details.
>                         #:configs '("# CONFIG_FIT_SIGNATURE is not set")))
>  
> +(define-public u-boot-qemu-ppce550
> +  (let ((base
> +          (make-u-boot-package "qemu-ppce500" "powerpc-linux-gnu"
> +                               ;; Disable features that require OpenSSL due
> +                               ;; to GPL/Openssl license incompatibilities.
> +                               ;; See https://bugs.gnu.org/34717 for
> +                               ;; details.
> +                               #:configs '("# CONFIG_FIT_SIGNATURE is not set"))))

I thought the GPL incompatibility had been resolved in recent years (see
https://openssl-library.org/post/2017-03-20-license/) ?

> +    (package
> +      (inherit base)
> +      (arguments
> +       (substitute-keyword-arguments (package-arguments base)
> +         ((#:phases phases #~'%standard-phases)
> +          #~(modify-phases #$phases
> +              (replace 'install
> +                (lambda _
> +                  (mkdir-p (string-append #$output "/share/qemu"))
> +                  (copy-file "u-boot" (string-append
> +                                        #$output "/share/qemu/u-boot.e500")))))))))))

I'm not sure why we need a qemu variant; just having u-boot-ppce550 with
a libvirt/QEMU firmware descriptor should be enough, unless I'm missing
something.
  
Efraim Flashner March 23, 2025, 3:13 p.m. UTC | #2
On Fri, Mar 21, 2025 at 11:12:07PM +0900, Maxim Cournoyer wrote:
> Hi,
> 
> Efraim Flashner <efraim@flashner.co.il> writes:
> 
> > * gnu/packages/bootloaders.scm (u-boot-qemu-ppce550): New variable.
> >
> > Change-Id: I92ec83741a90dc9e0c3bdcbeeab0ff5eb47024bf
> > ---
> >  gnu/packages/bootloaders.scm | 22 +++++++++++++++++++++-
> >  1 file changed, 21 insertions(+), 1 deletion(-)
> >
> > diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
> > index fcdd3abbba1..8678e1c480a 100644
> > --- a/gnu/packages/bootloaders.scm
> > +++ b/gnu/packages/bootloaders.scm
> > @@ -6,7 +6,7 @@
> >  ;;; Copyright © 2016-2018, 2021-2023 Marius Bakke <marius@gnu.org>
> >  ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym@scratchpost.org>
> >  ;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
> > -;;; Copyright © 2017, 2018, 2020-2024 Efraim Flashner <efraim@flashner.co.il>
> > +;;; Copyright © 2017, 2018, 2020-2025 Efraim Flashner <efraim@flashner.co.il>
> >  ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr>
> >  ;;; Copyright © 2019 nee <nee@cock.li>
> >  ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
> > @@ -1330,6 +1330,26 @@ (define-public u-boot-qemu-arm64
> >                         ;; details.
> >                         #:configs '("# CONFIG_FIT_SIGNATURE is not set")))
> >  
> > +(define-public u-boot-qemu-ppce550
> > +  (let ((base
> > +          (make-u-boot-package "qemu-ppce500" "powerpc-linux-gnu"
> > +                               ;; Disable features that require OpenSSL due
> > +                               ;; to GPL/Openssl license incompatibilities.
> > +                               ;; See https://bugs.gnu.org/34717 for
> > +                               ;; details.
> > +                               #:configs '("# CONFIG_FIT_SIGNATURE is not set"))))
> 
> I thought the GPL incompatibility had been resolved in recent years (see
> https://openssl-library.org/post/2017-03-20-license/) ?

I just copied it from the config above it, but I think we can drop it.

> > +    (package
> > +      (inherit base)
> > +      (arguments
> > +       (substitute-keyword-arguments (package-arguments base)
> > +         ((#:phases phases #~'%standard-phases)
> > +          #~(modify-phases #$phases
> > +              (replace 'install
> > +                (lambda _
> > +                  (mkdir-p (string-append #$output "/share/qemu"))
> > +                  (copy-file "u-boot" (string-append
> > +                                        #$output "/share/qemu/u-boot.e500")))))))))))
> 
> I'm not sure why we need a qemu variant; just having u-boot-ppce550 with
> a libvirt/QEMU firmware descriptor should be enough, unless I'm missing
> something.

qemu_ppce550 is the name of the config and I figured for qemu it would
be better to have the name of the file match the bundled firmware file.

(ins)efraim@3900XT ~/workspace/u-boot$ ls configs/qemu*
configs/qemu_arm64_defconfig
configs/qemu-arm-sbsa_defconfig
configs/qemu-riscv32_smode_defconfig
configs/qemu-riscv64_smode_defconfig
configs/qemu-x86_defconfig
configs/qemu_arm64_lwip_defconfig
configs/qemu-ppce500_defconfig
configs/qemu-riscv32_spl_defconfig
configs/qemu-riscv64_spl_defconfig
configs/qemu-xtensa-dc233c_defconfig
configs/qemu_arm_defconfig
configs/qemu-riscv32_defconfig
configs/qemu-riscv64_defconfig
configs/qemu-x86_64_defconfig
(ins)efraim@3900XT ~/workspace/u-boot$ ls configs/*ppc*
configs/qemu-ppce500_defconfig
  
Maxim Cournoyer March 24, 2025, 12:24 a.m. UTC | #3
Hi Efraim!

Efraim Flashner <efraim@flashner.co.il> writes:

[...]

>> > +(define-public u-boot-qemu-ppce550
>> > +  (let ((base
>> > +          (make-u-boot-package "qemu-ppce500" "powerpc-linux-gnu"
>> > +                               ;; Disable features that require OpenSSL due
>> > +                               ;; to GPL/Openssl license incompatibilities.
>> > +                               ;; See https://bugs.gnu.org/34717 for
>> > +                               ;; details.
>> > +                               #:configs '("# CONFIG_FIT_SIGNATURE is not set"))))
>> 
>> I thought the GPL incompatibility had been resolved in recent years (see
>> https://openssl-library.org/post/2017-03-20-license/) ?
>
> I just copied it from the config above it, but I think we can drop it.

Yes!

>> > +    (package
>> > +      (inherit base)
>> > +      (arguments
>> > +       (substitute-keyword-arguments (package-arguments base)
>> > +         ((#:phases phases #~'%standard-phases)
>> > +          #~(modify-phases #$phases
>> > +              (replace 'install
>> > +                (lambda _
>> > +                  (mkdir-p (string-append #$output "/share/qemu"))
>> > +                  (copy-file "u-boot" (string-append
>> > +                                        #$output "/share/qemu/u-boot.e500")))))))))))
>> 
>> I'm not sure why we need a qemu variant; just having u-boot-ppce550 with
>> a libvirt/QEMU firmware descriptor should be enough, unless I'm missing
>> something.
>
> qemu_ppce550 is the name of the config and I figured for qemu it would
> be better to have the name of the file match the bundled firmware file.

Makes sense.  Thanks for the clarification.
  

Patch

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index fcdd3abbba1..8678e1c480a 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -6,7 +6,7 @@ 
 ;;; Copyright © 2016-2018, 2021-2023 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym@scratchpost.org>
 ;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
-;;; Copyright © 2017, 2018, 2020-2024 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2018, 2020-2025 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 nee <nee@cock.li>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
@@ -1330,6 +1330,26 @@  (define-public u-boot-qemu-arm64
                        ;; details.
                        #:configs '("# CONFIG_FIT_SIGNATURE is not set")))
 
+(define-public u-boot-qemu-ppce550
+  (let ((base
+          (make-u-boot-package "qemu-ppce500" "powerpc-linux-gnu"
+                               ;; Disable features that require OpenSSL due
+                               ;; to GPL/Openssl license incompatibilities.
+                               ;; See https://bugs.gnu.org/34717 for
+                               ;; details.
+                               #:configs '("# CONFIG_FIT_SIGNATURE is not set"))))
+    (package
+      (inherit base)
+      (arguments
+       (substitute-keyword-arguments (package-arguments base)
+         ((#:phases phases #~'%standard-phases)
+          #~(modify-phases #$phases
+              (replace 'install
+                (lambda _
+                  (mkdir-p (string-append #$output "/share/qemu"))
+                  (copy-file "u-boot" (string-append
+                                        #$output "/share/qemu/u-boot.e500")))))))))))
+
 (define-public u-boot-qemu-riscv64
   (make-u-boot-package "qemu-riscv64" "riscv64-linux-gnu"))