forked from M-Labs/artiq
Upgrade to LLD 14
Previous linker versions had inserted some zero padding bytes between the ELF headers and the first section, but LLD 14 does not anymore. Hard-coding the offset of the first section in ksupport.elf manually isn't ideal; we should probably parse the ELF program headers instead when first setting up the kernel CPU.
This commit is contained in:
parent
3ed7e0ed06
commit
4d636ea593
|
@ -17,7 +17,7 @@ void send_to_rtio_log(struct slice data);
|
||||||
#define KERNELCPU_EXEC_ADDRESS 0x45000000
|
#define KERNELCPU_EXEC_ADDRESS 0x45000000
|
||||||
#define KERNELCPU_PAYLOAD_ADDRESS 0x45060000
|
#define KERNELCPU_PAYLOAD_ADDRESS 0x45060000
|
||||||
#define KERNELCPU_LAST_ADDRESS 0x4fffffff
|
#define KERNELCPU_LAST_ADDRESS 0x4fffffff
|
||||||
#define KSUPPORT_HEADER_SIZE 0x80
|
#define KSUPPORT_HEADER_SIZE 0x74
|
||||||
|
|
||||||
FILE *stderr;
|
FILE *stderr;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,10 @@ use dyld;
|
||||||
pub const KERNELCPU_EXEC_ADDRESS: usize = 0x45000000;
|
pub const KERNELCPU_EXEC_ADDRESS: usize = 0x45000000;
|
||||||
pub const KERNELCPU_PAYLOAD_ADDRESS: usize = 0x45060000;
|
pub const KERNELCPU_PAYLOAD_ADDRESS: usize = 0x45060000;
|
||||||
pub const KERNELCPU_LAST_ADDRESS: usize = 0x4fffffff;
|
pub const KERNELCPU_LAST_ADDRESS: usize = 0x4fffffff;
|
||||||
pub const KSUPPORT_HEADER_SIZE: usize = 0x80;
|
|
||||||
|
// Must match the offset of the first (starting at KERNELCPU_EXEC_ADDRESS)
|
||||||
|
// section in ksupport.elf.
|
||||||
|
pub const KSUPPORT_HEADER_SIZE: usize = 0x74;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum Message<'a> {
|
pub enum Message<'a> {
|
||||||
|
|
14
flake.nix
14
flake.nix
|
@ -124,7 +124,7 @@
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.qt5.wrapQtAppsHook ];
|
nativeBuildInputs = [ pkgs.qt5.wrapQtAppsHook ];
|
||||||
# keep llvm_x and lld_x in sync with llvmlite
|
# keep llvm_x and lld_x in sync with llvmlite
|
||||||
propagatedBuildInputs = [ pkgs.llvm_11 pkgs.lld_11 sipyco.packages.x86_64-linux.sipyco pythonparser pkgs.qt5.qtsvg artiq-comtools.packages.x86_64-linux.artiq-comtools ]
|
propagatedBuildInputs = [ pkgs.llvm_11 pkgs.lld_14 sipyco.packages.x86_64-linux.sipyco pythonparser pkgs.qt5.qtsvg artiq-comtools.packages.x86_64-linux.artiq-comtools ]
|
||||||
++ (with pkgs.python3Packages; [ llvmlite pyqtgraph pygit2 numpy dateutil scipy prettytable pyserial levenshtein h5py pyqt5 qasync tqdm lmdb jsonschema ]);
|
++ (with pkgs.python3Packages; [ llvmlite pyqtgraph pygit2 numpy dateutil scipy prettytable pyserial levenshtein h5py pyqt5 qasync tqdm lmdb jsonschema ]);
|
||||||
|
|
||||||
dontWrapQtApps = true;
|
dontWrapQtApps = true;
|
||||||
|
@ -147,10 +147,10 @@
|
||||||
"--set FONTCONFIG_FILE ${pkgs.fontconfig.out}/etc/fonts/fonts.conf"
|
"--set FONTCONFIG_FILE ${pkgs.fontconfig.out}/etc/fonts/fonts.conf"
|
||||||
];
|
];
|
||||||
|
|
||||||
# FIXME: automatically propagate lld_11 llvm_11 dependencies
|
# FIXME: automatically propagate lld_14 llvm_11 dependencies
|
||||||
# cacert is required in the check stage only, as certificates are to be
|
# cacert is required in the check stage only, as certificates are to be
|
||||||
# obtained from system elsewhere
|
# obtained from system elsewhere
|
||||||
nativeCheckInputs = [ pkgs.lld_11 pkgs.llvm_11 libartiq-support pkgs.lit outputcheck pkgs.cacert ];
|
nativeCheckInputs = [ pkgs.lld_14 pkgs.llvm_11 libartiq-support pkgs.lit outputcheck pkgs.cacert ];
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
python -m unittest discover -v artiq.test
|
python -m unittest discover -v artiq.test
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@
|
||||||
pkgs.cargo-xbuild
|
pkgs.cargo-xbuild
|
||||||
pkgs.llvmPackages_11.clang-unwrapped
|
pkgs.llvmPackages_11.clang-unwrapped
|
||||||
pkgs.llvm_11
|
pkgs.llvm_11
|
||||||
pkgs.lld_11
|
pkgs.lld_14
|
||||||
vivado
|
vivado
|
||||||
rustPlatform.cargoSetupHook
|
rustPlatform.cargoSetupHook
|
||||||
];
|
];
|
||||||
|
@ -392,7 +392,7 @@
|
||||||
pkgs.cargo-xbuild
|
pkgs.cargo-xbuild
|
||||||
pkgs.llvmPackages_11.clang-unwrapped
|
pkgs.llvmPackages_11.clang-unwrapped
|
||||||
pkgs.llvm_11
|
pkgs.llvm_11
|
||||||
pkgs.lld_11
|
pkgs.lld_14
|
||||||
# To manually run compiler tests:
|
# To manually run compiler tests:
|
||||||
pkgs.lit
|
pkgs.lit
|
||||||
outputcheck
|
outputcheck
|
||||||
|
@ -420,7 +420,7 @@
|
||||||
pkgs.cargo-xbuild
|
pkgs.cargo-xbuild
|
||||||
pkgs.llvmPackages_11.clang-unwrapped
|
pkgs.llvmPackages_11.clang-unwrapped
|
||||||
pkgs.llvm_11
|
pkgs.llvm_11
|
||||||
pkgs.lld_11
|
pkgs.lld_14
|
||||||
packages.x86_64-linux.vivado
|
packages.x86_64-linux.vivado
|
||||||
packages.x86_64-linux.openocd-bscanspi
|
packages.x86_64-linux.openocd-bscanspi
|
||||||
];
|
];
|
||||||
|
@ -454,7 +454,7 @@
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
(pkgs.python3.withPackages(ps: with packages.x86_64-linux; [ artiq ps.paramiko ]))
|
(pkgs.python3.withPackages(ps: with packages.x86_64-linux; [ artiq ps.paramiko ]))
|
||||||
pkgs.llvm_11
|
pkgs.llvm_11
|
||||||
pkgs.lld_11
|
pkgs.lld_14
|
||||||
pkgs.openssh
|
pkgs.openssh
|
||||||
packages.x86_64-linux.openocd-bscanspi # for the bscanspi bitstreams
|
packages.x86_64-linux.openocd-bscanspi # for the bscanspi bitstreams
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue