[bug#74849,v2,0/6] Update ARM Trusted Firmware.

Message ID cover.1734645720.git.herman@rimm.ee
Headers
Series Update ARM Trusted Firmware. |

Message

Herman Rimm Dec. 19, 2024, 10:10 p.m. UTC
  Hello,

This revision configures the ARM Trusted Firmware differently when doing
a native build, which should fix the 'aarch64-none-elf-gcc' errors.

I will give the guix-name procedure a more appropriate name in another
patch (series).

Cheers,
Herman

Herman Rimm (6):
  gnu: arm-trusted-firmware-rk3399: Reformat.
  gnu: arm-trusted-firmware: Reformat.
  import: utils: Move guix-name to (guix utils).
  gnu: make-arm-trusted-firmware: Use guix-name.
  gnu: make-arm-trusted-firmware: Update to 2.12.
  gnu: arm-trusted-firmware-imx8mq: Fix build.

 gnu/local.mk                                  |   2 +
 gnu/packages/firmware.scm                     | 160 ++++++++----------
 .../patches/8mq-enable-imx_hab_handler.patch  |  36 ++++
 .../patches/8mq-move-stack-to-ocram_s.patch   |  88 ++++++++++
 guix/import/elpa.scm                          |   1 +
 guix/import/texlive.scm                       |  10 +-
 guix/import/utils.scm                         |  10 --
 guix/utils.scm                                |   9 +
 8 files changed, 206 insertions(+), 110 deletions(-)
 create mode 100644 gnu/packages/patches/8mq-enable-imx_hab_handler.patch
 create mode 100644 gnu/packages/patches/8mq-move-stack-to-ocram_s.patch


base-commit: 07b4b1d055c36c6c61d39273c26974771dbfe805
  

Comments

Vagrant Cascadian Dec. 19, 2024, 11:18 p.m. UTC | #1
On 2024-12-19, Herman Rimm wrote:
> This revision configures the ARM Trusted Firmware differently when doing
> a native build, which should fix the 'aarch64-none-elf-gcc' errors.

That does appear to work, nice!

I had another working patch that added to native inputs:

(cross-gcc "aarch64-none-elf")
(cross-binutils "aarch64-none-elf")

And passed CROSS_COMPILE=aarch64-none-elf- ...

But those extra inputs are silly and your fix is much nicer!


> I will give the guix-name procedure a more appropriate name in another
> patch (series).

Could the guix-name stuff just be submitted as it's own patch series?
It seems more-or-less unrelated to this patch series, only resulting in
a few small line changes...


live well,
  vagrant
  
Vagrant Cascadian Dec. 20, 2024, 12:22 a.m. UTC | #2
On 2024-12-19, Vagrant Cascadian wrote:
> On 2024-12-19, Herman Rimm wrote:
>> This revision configures the ARM Trusted Firmware differently when doing
>> a native build, which should fix the 'aarch64-none-elf-gcc' errors.
>
> That does appear to work, nice!
...
>> I will give the guix-name procedure a more appropriate name in another
>> patch (series).
>
> Could the guix-name stuff just be submitted as it's own patch series?
> It seems more-or-less unrelated to this patch series, only resulting in
> a few small line changes...

I reverted the guix-name stuff and pushed as:

91f50366e5bc54951851e99f5600f9abb628b6ec (origin/master) gnu: arm-trusted-firmware-imx8mq: Fix build.
29ff4a6ca836c0ee8fe052eda3ad9a5d2bb8d2af gnu: make-arm-trusted-firmware: Update to 2.12.
c514002bd79eb49653857bddc14bd342f848cbcf gnu: arm-trusted-firmware: Reformat.
442c218c181734251ab671b29ef6bece998f6f04 gnu: arm-trusted-firmware-rk3399: Reformat.

I pushed, though there are somethings included that should go upstream....

These two patches do not appear to be in upstream:

    * gnu/packages/patches/8mq-enable-imx_hab_handler.patch: Add file.
    * gnu/packages/patches/8mq-move-stack-to-ocram_s.patch: Add file.

This phase should probably be reported and fixed upstream as well:

-          (delete 'configure)         ;no configure script
+          (replace 'configure          ;no configure script
+            ;; Fix ATF commit ffb7742125def3e0acca4c7e4d3215af5ce25a31
+            (lambda _
+              (unless #$(native-build?)
+                (substitute* "plat/rockchip/rk3399/drivers/m0/Makefile"
+                  (("-oc") "-oc-default"))
+                (substitute* "make_helpers/build_macros.mk"
+                  (("-oc") "-oc-default")
+                  (("-od") "-od-default")))))

I do not see any fixes in upstream about this. Works fine without this
for native building but not for cross-building.

And now I catch myself after having pushed it, I meant to switch that
back to deleting the configure phase and renaming it some other phase!
It is not really configure functionality, probably should have been with
(add-after 'unpack ... or something like that ... or just a full patch,
to make it possible to submit upstream.

Thanks for your contribution!

live well,
  vagrant