Hangs in swtich_root in stage1

This commit is contained in:
Rodrigo Arias 2024-07-01 10:14:39 +02:00
parent 975a1c0e87
commit 33b227f576
4 changed files with 32 additions and 10 deletions

View File

@ -116,11 +116,11 @@
build = nixosconf.config.system.build;
in syspkgs.mkShell {
pname = "lagarto-ox-shell";
#TOPLEVEL = build.toplevel;
TOPLEVEL = build.toplevel;
OPENSBI = syspkgs.opensbi;
KERNEL = build.kernel;
INITRD = build.initialRamdisk;
#ROOTFS = build.sdImage;
ROOTFS = build.sdImage;
UBOOT_ENV = syspkgs.uboot-env;
shellHook = ''
echo "Here are the current system pieces:"

View File

@ -17,7 +17,7 @@ rsync -a fpga/env.sh "$dst"
rsync "$OPENSBI/share/opensbi/lp64d/fpga/ox_alveo/firmware/fw_payload.bin" "$dst/opensbi.bin"
rsync "$KERNEL/Image" "$dst/kernel.bin"
rsync "$INITRD/initrd" "$dst/initrd.bin"
#rsync "$ROOTFS/sd-image/rootfs.img" "$dst/rootfs.img"
rsync "$ROOTFS/sd-image/rootfs.img" "$dst/rootfs.img"
rsync "$UBOOT_ENV" "$dst/uboot.env"
echo "Now go to $dst and run ./boot.sh"

View File

@ -5,14 +5,13 @@
"${modulesPath}/installer/sd-card/sd-image.nix"
];
# No need, Lagarto OX has support for rv64gc.
#nixpkgs.crossSystem = {
# system = "riscv64-linux";
# gcc.arch = "rv64imafd";
# gcc.tune = "rv64imafd";
# gcc.tune = "generic";
#};
#boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot = {
kernelPatches = [
{
@ -38,6 +37,16 @@
LIBNVDIMM y
BLK_DEV_PMEM y
''
# No vector extensions
+ ''
RISCV_ISA_V n
CONFIG_RISCV_ISA_V_DEFAULT_ENABLE n
''
# Debugging
+ ''
DEBUG_WX y
MAGIC_SYSRQ y
''
;
}
];
@ -86,9 +95,21 @@
};
nixpkgs.overlays = [ (final: prev: {
busybox = prev.busybox.override {
# FIXME: Fails on start
busybox = (prev.busybox.override {
enableStatic = true;
}).overrideAttrs (old: {
#env.NIX_CFLAGS_COMPILE = "-mtune=generic";
#env.NIX_DEBUG = 5;
});
linuxPackages_latest = prev.linuxPackages_latest.extend (lib.const (ksuper: {
kernel = ksuper.kernel.override {
stdenv = prev.gcc8Stdenv;
};
}));
ox-dtb = prev.runCommand "ox.dtb" {
dtsFile = ./ox-plic.dts;
#dtsFile = ./xavi.dts;

View File

@ -33,12 +33,13 @@
*
* [0x0_6000_0000, 0x0_7000_0000) -> DMA pool (256 MiB)
* [0x0_7000_0000, 0x0_8000_0000) -> DMA pool (256 MiB)
* [0x0_8000_0000, 0x1_bff0_0000) -> RAM memory (~5 GiB)
* [0x0_8000_0000, 0x0_7ff0_0000) -> RAM memory (~2 GiB)
* [0x0_7ff0_0000, 0x1_bff0_0000) -> Empty
* [0x1_bff0_0000, 0x2_8000_0000) -> PMEM (3 GiB)
*/
memory@80000000 {
device_type = "memory";
reg = <0x00000000 0x80000000 0x00000001 0x3ff00000>;
reg = <0x00000000 0x80000000 0x00000000 0x7ff00000>;
};
reserved-memory {
#address-cells = <0x00000002>;