I’m trying to build fsbl
with pkgs.pkgsCross.armv7l-hf-multiplatform
but I’m getting the following error about arm/nano.specs
. Anyone with idea why is this happening or how to fix it?
Error log:
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
Here’s the snippet of the related part of the flake with the unstable
branch. Also there’s a different error in nixos-23.05
branch. I guess there’s a problem in my dependencies here.
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
outputs = { self, nixpkgs }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
pkgs-armv7l = pkgs.pkgsCross.armv7l-hf-multiplatform;
...
fsbl = { board ? "zc706" }: pkgs-armv7l.stdenv.mkDerivation {
name = "${board}-fsbl";
src = pkgs-armv7l.fetchFromGitHub {
owner = "Xilinx";
repo = "embeddedsw";
rev = "65c849ed46c88c67457e1fc742744f96db968ff1";
sha256 = "1rvl06ha40dzd6s9aa4sylmksh4xb9dqaxq462lffv1fdk342pda";
};
patches = [ ./fsbl.patch ];
nativeBuildInputs = with pkgs-armv7l; [
gnumake
binutils
gcc
];
patchPhase = ''
patch -p1 -i ${./fsbl.patch}
patchShebangs lib/sw_apps/zynq_fsbl/misc/copy_bsp.sh
echo 'SEARCH_DIR("${pkgs-armv7l.newlib-nanoCross}/arm-none-eabi/lib");' >> lib/sw_apps/zynq_fsbl/src/lscript.ld
'';
buildPhase = ''
cd lib/sw_apps/zynq_fsbl/src
make BOARD=${board} "CFLAGS=-DFSBL_DEBUG_INFO -g"
'';
installPhase = ''
mkdir $out
cp fsbl.elf $out
'';
doCheck = false;
dontFixup = true;
};
...
in {
packages.armv7l-linux = {
zc706-fsbl = fsbl { board = "zc706"; };
};
};