We only need one GCC toolchain #1

Closed
opened 2023-11-28 18:15:48 +08:00 by sb10q · 6 comments
Owner

Right now:

  • one is created for FSBL (binutils-pkg, gcc-pkg, newlib-pkg)
  • U-Boot uses another one, pkgs.pkgsCross.armv7l-hf-multiplatform
  • There may be a third one for not-os

Clean this up and make sure we use only one to avoid bloating the development environment.

Right now: * one is created for FSBL (binutils-pkg, gcc-pkg, newlib-pkg) * U-Boot uses another one, pkgs.pkgsCross.armv7l-hf-multiplatform * There may be a third one for not-os Clean this up and make sure we use only one to avoid bloating the development environment.
Author
Owner

Is there any reason why FSBL can't be built directly with pkgs.pkgsCross.armv7l-hf-multiplatform?

Is there any reason why FSBL can't be built directly with pkgs.pkgsCross.armv7l-hf-multiplatform?
Collaborator

Trying to build fsbl with pkgs.pkgsCross.armv7l-hf-multiplatform and currently dealing with this error:

  CPPAS    arm/rdpmon-crt0.o
  CPPAS    arm/rdimon-crt0.o
  CPPAS    arm/rdimon-crt0-v2m.o
make[4]: Circular arm/nano.specs <- arm/nano.specs dependency dropped.
  GEN      arm/nano.specs
cp: missing destination file operand after 'arm/nano.specs'
Try 'cp --help' for more information.
make[4]: *** [Makefile:4504: arm/nano.specs] Error 1
make[4]: Leaving directory '/build/newlib-4.3.0.20230120/armv7l-unknown-linux-gnueabihf/libgloss'
make[3]: *** [Makefile:4071: all-recursive] Error 1
make[3]: Leaving directory '/build/newlib-4.3.0.20230120/armv7l-unknown-linux-gnueabihf/libgloss'
make[2]: *** [Makefile:1096: all] Error 2
make[2]: Leaving directory '/build/newlib-4.3.0.20230120/armv7l-unknown-linux-gnueabihf/libgloss'
make[1]: *** [Makefile:9529: all-target-libgloss] Error 2
make[1]: Leaving directory '/build/newlib-4.3.0.20230120'
make: *** [Makefile:880: all] Error 2

Checking for some workaround.

Trying to build fsbl with pkgs.pkgsCross.armv7l-hf-multiplatform and currently dealing with this error: ``` CPPAS arm/rdpmon-crt0.o CPPAS arm/rdimon-crt0.o CPPAS arm/rdimon-crt0-v2m.o make[4]: Circular arm/nano.specs <- arm/nano.specs dependency dropped. GEN arm/nano.specs cp: missing destination file operand after 'arm/nano.specs' Try 'cp --help' for more information. make[4]: *** [Makefile:4504: arm/nano.specs] Error 1 make[4]: Leaving directory '/build/newlib-4.3.0.20230120/armv7l-unknown-linux-gnueabihf/libgloss' make[3]: *** [Makefile:4071: all-recursive] Error 1 make[3]: Leaving directory '/build/newlib-4.3.0.20230120/armv7l-unknown-linux-gnueabihf/libgloss' make[2]: *** [Makefile:1096: all] Error 2 make[2]: Leaving directory '/build/newlib-4.3.0.20230120/armv7l-unknown-linux-gnueabihf/libgloss' make[1]: *** [Makefile:9529: all-target-libgloss] Error 2 make[1]: Leaving directory '/build/newlib-4.3.0.20230120' make: *** [Makefile:880: all] Error 2 ``` Checking for some workaround.
Author
Owner

U-Boot doesn't also need newlib?

U-Boot doesn't also need newlib?
Collaborator

U-Boot doesn't also need newlib?

I tried to build it using the newlib toolchain, but from the error log, it seems it is dependent on linux toolchain:

error: builder for '/nix/store/rmypqpbpy1fy6j86sn94hl0iw86zma3i-uboot-xilinx_zynq_virt_defconfig-arm-none-eabihf-2023.07.02.drv' failed with exit code 2;
       last 10 log lines:
       >   HOSTCC  tools/env/embedded.o
       >   HOSTCC  tools/lib/crc8.o
       >   HOSTLD  tools/mkenvimage
       > tools/mkeficapsule.c:18:10: fatal error: uuid/uuid.h: No such file or directory
       >    18 | #include <uuid/uuid.h>
       >       |          ^~~~~~~~~~~~~
       > compilation terminated.
       > make[1]: *** [scripts/Makefile.host:95: tools/mkeficapsule] Error 1
       > make[1]: *** Waiting for unfinished jobs....
       > make: *** [Makefile:1853: tools] Error 2
       For full logs, run 'nix log /nix/store/rmypqpbpy1fy6j86sn94hl0iw86zma3i-uboot-xilinx_zynq_virt_defconfig-arm-none-eabihf-2023.07.02.drv'.
> U-Boot doesn't also need newlib? I tried to build it using the newlib toolchain, but from the error log, it seems it is dependent on linux toolchain: ``` error: builder for '/nix/store/rmypqpbpy1fy6j86sn94hl0iw86zma3i-uboot-xilinx_zynq_virt_defconfig-arm-none-eabihf-2023.07.02.drv' failed with exit code 2; last 10 log lines: > HOSTCC tools/env/embedded.o > HOSTCC tools/lib/crc8.o > HOSTLD tools/mkenvimage > tools/mkeficapsule.c:18:10: fatal error: uuid/uuid.h: No such file or directory > 18 | #include <uuid/uuid.h> > | ^~~~~~~~~~~~~ > compilation terminated. > make[1]: *** [scripts/Makefile.host:95: tools/mkeficapsule] Error 1 > make[1]: *** Waiting for unfinished jobs.... > make: *** [Makefile:1853: tools] Error 2 For full logs, run 'nix log /nix/store/rmypqpbpy1fy6j86sn94hl0iw86zma3i-uboot-xilinx_zynq_virt_defconfig-arm-none-eabihf-2023.07.02.drv'. ```
Author
Owner

Okay. How many toolchains do we have in total right now?

Okay. How many toolchains do we have in total right now?
Collaborator

Okay. How many toolchains do we have in total right now?

At this point, I think we still have 3:

Will work on unifying the last 2 toolchains in the next PR.

> Okay. How many toolchains do we have in total right now? At this point, I think we still have 3: - baremetal toolchain (newlib) - [pkgs.pkgsCross.armv7l-hf-multiplatform](https://git.m-labs.hk/M-Labs/nix-servo/src/branch/master/flake.nix#L239) (generic armv7l toolchain, with glibc) - Modified [armv7l-hf-multiplatform](https://git.m-labs.hk/M-Labs/nix-servo/src/branch/master/not-os-patches/pr-28.patch#L166-L180) to build the linux kernel. Will work on unifying the last 2 toolchains in the next PR.
sb10q closed this issue 2024-04-03 12:22:18 +08:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nix-servo#1
No description provided.