Hangs in swtich_root in stage1
This commit is contained in:
parent
975a1c0e87
commit
33b227f576
@ -116,11 +116,11 @@
|
|||||||
build = nixosconf.config.system.build;
|
build = nixosconf.config.system.build;
|
||||||
in syspkgs.mkShell {
|
in syspkgs.mkShell {
|
||||||
pname = "lagarto-ox-shell";
|
pname = "lagarto-ox-shell";
|
||||||
#TOPLEVEL = build.toplevel;
|
TOPLEVEL = build.toplevel;
|
||||||
OPENSBI = syspkgs.opensbi;
|
OPENSBI = syspkgs.opensbi;
|
||||||
KERNEL = build.kernel;
|
KERNEL = build.kernel;
|
||||||
INITRD = build.initialRamdisk;
|
INITRD = build.initialRamdisk;
|
||||||
#ROOTFS = build.sdImage;
|
ROOTFS = build.sdImage;
|
||||||
UBOOT_ENV = syspkgs.uboot-env;
|
UBOOT_ENV = syspkgs.uboot-env;
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
echo "Here are the current system pieces:"
|
echo "Here are the current system pieces:"
|
||||||
|
@ -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 "$OPENSBI/share/opensbi/lp64d/fpga/ox_alveo/firmware/fw_payload.bin" "$dst/opensbi.bin"
|
||||||
rsync "$KERNEL/Image" "$dst/kernel.bin"
|
rsync "$KERNEL/Image" "$dst/kernel.bin"
|
||||||
rsync "$INITRD/initrd" "$dst/initrd.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"
|
rsync "$UBOOT_ENV" "$dst/uboot.env"
|
||||||
|
|
||||||
echo "Now go to $dst and run ./boot.sh"
|
echo "Now go to $dst and run ./boot.sh"
|
||||||
|
@ -5,14 +5,13 @@
|
|||||||
"${modulesPath}/installer/sd-card/sd-image.nix"
|
"${modulesPath}/installer/sd-card/sd-image.nix"
|
||||||
];
|
];
|
||||||
|
|
||||||
# No need, Lagarto OX has support for rv64gc.
|
|
||||||
#nixpkgs.crossSystem = {
|
#nixpkgs.crossSystem = {
|
||||||
# system = "riscv64-linux";
|
# system = "riscv64-linux";
|
||||||
# gcc.arch = "rv64imafd";
|
# gcc.arch = "rv64imafd";
|
||||||
# gcc.tune = "rv64imafd";
|
# gcc.tune = "generic";
|
||||||
#};
|
#};
|
||||||
|
|
||||||
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
boot = {
|
boot = {
|
||||||
kernelPatches = [
|
kernelPatches = [
|
||||||
{
|
{
|
||||||
@ -38,6 +37,16 @@
|
|||||||
LIBNVDIMM y
|
LIBNVDIMM y
|
||||||
BLK_DEV_PMEM 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: {
|
nixpkgs.overlays = [ (final: prev: {
|
||||||
busybox = prev.busybox.override {
|
|
||||||
|
# FIXME: Fails on start
|
||||||
|
busybox = (prev.busybox.override {
|
||||||
enableStatic = true;
|
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" {
|
ox-dtb = prev.runCommand "ox.dtb" {
|
||||||
dtsFile = ./ox-plic.dts;
|
dtsFile = ./ox-plic.dts;
|
||||||
#dtsFile = ./xavi.dts;
|
#dtsFile = ./xavi.dts;
|
||||||
|
@ -33,12 +33,13 @@
|
|||||||
*
|
*
|
||||||
* [0x0_6000_0000, 0x0_7000_0000) -> DMA pool (256 MiB)
|
* [0x0_6000_0000, 0x0_7000_0000) -> DMA pool (256 MiB)
|
||||||
* [0x0_7000_0000, 0x0_8000_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)
|
* [0x1_bff0_0000, 0x2_8000_0000) -> PMEM (3 GiB)
|
||||||
*/
|
*/
|
||||||
memory@80000000 {
|
memory@80000000 {
|
||||||
device_type = "memory";
|
device_type = "memory";
|
||||||
reg = <0x00000000 0x80000000 0x00000001 0x3ff00000>;
|
reg = <0x00000000 0x80000000 0x00000000 0x7ff00000>;
|
||||||
};
|
};
|
||||||
reserved-memory {
|
reserved-memory {
|
||||||
#address-cells = <0x00000002>;
|
#address-cells = <0x00000002>;
|
||||||
|
Loading…
Reference in New Issue
Block a user