add output for u-boot
This commit is contained in:
parent
dc42969ef6
commit
0bf98c5243
6 changed files with 14 additions and 8 deletions
|
@ -13,5 +13,6 @@
|
||||||
# USE_OF = "y";
|
# USE_OF = "y";
|
||||||
};
|
};
|
||||||
hardware.ram.startAddress = lim.parseInt "0x40000000";
|
hardware.ram.startAddress = lim.parseInt "0x40000000";
|
||||||
|
system.outputs.u-boot = pkgs.ubootQemuAarch64;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,5 +5,6 @@
|
||||||
OF = "y";
|
OF = "y";
|
||||||
};
|
};
|
||||||
hardware.ram.startAddress = lim.parseInt "0x40000000";
|
hardware.ram.startAddress = lim.parseInt "0x40000000";
|
||||||
|
system.outputs.u-boot = pkgs.ubootQemuArm;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,5 +5,6 @@
|
||||||
kernel.config = {
|
kernel.config = {
|
||||||
CPU_BIG_ENDIAN = "y";
|
CPU_BIG_ENDIAN = "y";
|
||||||
};
|
};
|
||||||
|
system.outputs.u-boot = pkgs.ubootQemuMips;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,9 @@ in
|
||||||
Combined kernel and FDT in uImage (U-Boot compatible) format
|
Combined kernel and FDT in uImage (U-Boot compatible) format
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
u-boot = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
};
|
||||||
manifest = mkOption {
|
manifest = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
internal = true;
|
internal = true;
|
||||||
|
|
|
@ -42,7 +42,7 @@ in {
|
||||||
ln -s ${o.mbrimage} ./mbrimage
|
ln -s ${o.mbrimage} ./mbrimage
|
||||||
cat > run.sh <<EOF
|
cat > run.sh <<EOF
|
||||||
#!${pkgs.runtimeShell}
|
#!${pkgs.runtimeShell}
|
||||||
${pkgs.pkgsBuildBuild.run-liminix-vm}/bin/run-liminix-vm --arch ${pkgs.stdenv.hostPlatform.qemuArch} --u-boot ${pkgs.ubootQemuArm}/u-boot.bin --phram-address 0x${phram_address} --disk-image ${o.mbrimage} /dev/null /dev/null
|
${pkgs.pkgsBuildBuild.run-liminix-vm}/bin/run-liminix-vm --arch ${pkgs.stdenv.hostPlatform.qemuArch} --u-boot ${o.u-boot}/u-boot.bin --phram-address 0x${phram_address} --disk-image ${o.mbrimage} /dev/null /dev/null
|
||||||
EOF
|
EOF
|
||||||
chmod +x run.sh
|
chmod +x run.sh
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
liminix
|
liminix
|
||||||
}:
|
}:
|
||||||
let check = deviceName : ubootName : config :
|
let check = deviceName : config :
|
||||||
let derivation = (import liminix {
|
let derivation = (import liminix {
|
||||||
device = import "${liminix}/devices/${deviceName}/";
|
device = import "${liminix}/devices/${deviceName}/";
|
||||||
liminix-config = { pkgs, ... } : {
|
liminix-config = { pkgs, ... } : {
|
||||||
|
@ -10,7 +10,7 @@ let derivation = (import liminix {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
img = derivation.outputs.tftpboot;
|
img = derivation.outputs.tftpboot;
|
||||||
uboot = derivation.pkgs.${ubootName};
|
uboot = derivation.outputs.u-boot;
|
||||||
pkgsBuild = derivation.pkgs.pkgsBuildBuild;
|
pkgsBuild = derivation.pkgs.pkgsBuildBuild;
|
||||||
in pkgsBuild.runCommand "check" {
|
in pkgsBuild.runCommand "check" {
|
||||||
nativeBuildInputs = with pkgsBuild; [
|
nativeBuildInputs = with pkgsBuild; [
|
||||||
|
@ -35,13 +35,13 @@ run-liminix-vm \
|
||||||
expect ${./script.expect} 2>&1 |tee $out
|
expect ${./script.expect} 2>&1 |tee $out
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
aarch64 = check "qemu-aarch64" "ubootQemuAarch64" {};
|
aarch64 = check "qemu-aarch64" {};
|
||||||
arm = check "qemu-armv7l" "ubootQemuArm" {};
|
arm = check "qemu-armv7l" {};
|
||||||
armZimage = check "qemu-armv7l" "ubootQemuArm" {
|
armZimage = check "qemu-armv7l" {
|
||||||
boot.tftp.kernelFormat = "zimage";
|
boot.tftp.kernelFormat = "zimage";
|
||||||
};
|
};
|
||||||
mips = check "qemu" "ubootQemuMips" {};
|
mips = check "qemu" {};
|
||||||
mipsLz = check "qemu" "ubootQemuMips" {
|
mipsLz = check "qemu" {
|
||||||
boot.tftp.compressRoot = true;
|
boot.tftp.compressRoot = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue