This commit is contained in:
Daniel Barlow 2023-11-10 21:17:20 +00:00
parent 22882dabee
commit 7cfb92e3ce
14 changed files with 102 additions and 58 deletions

View file

@ -1,4 +1,4 @@
{
rec {
description = ''
Belkin RT-3200 / Linksys E8450
******************************
@ -17,6 +17,7 @@
- b/g/n wireless using MediaTek MT7622BV (MT7615E driver)
- a/n/ac/ax wireless using MediaTek MT7915E
'';
installer = "ubimage";
system = {
crossSystem = {
@ -160,7 +161,7 @@
maxLEBcount = "1024"; # guessing
};
defaultOutput = "ubimage";
defaultOutput = installer;
# the kernel expects this to be on a 2MB boundary. U-Boot
# (I don't know why) has a default of 0x41080000, which isn't.
# We put it at the 32MB mark so that tftpboot can put its rootfs

View file

@ -1,6 +1,6 @@
# GL.iNet GL-MT300A
{
rec {
system = {
crossSystem = {
config = "mipsel-unknown-linux-musl";
@ -54,6 +54,7 @@
OpenWrt web page: https://openwrt.org/toh/gl.inet/gl-mt300a
'';
installer = "flashimage";
module = { pkgs, config, lib, ...}:
let
@ -66,7 +67,7 @@
in {
imports = [ ../../modules/arch/mipsel.nix ];
hardware = {
defaultOutput = "flashimage";
defaultOutput = installer;
loadAddress = "0x80000000";
entryPoint = "0x80000000";

View file

@ -1,4 +1,4 @@
{
rec {
system = {
crossSystem = {
config = "mipsel-unknown-linux-musl";
@ -23,6 +23,7 @@
OpenWrt web page: https://openwrt.org/toh/gl.inet/gl-mt300n_v2
'';
installer = "flashimage";
module = { pkgs, config, lib, ...}:
let
@ -49,7 +50,7 @@
};
};
hardware = {
defaultOutput = "flashimage";
defaultOutput = installer;
loadAddress = "0x80000000";
entryPoint = "0x80000000";

View file

@ -2,16 +2,29 @@
# emulator. The default output is a directory containing separate
# kernel ("Image" format) and root filesystem (squashfs or jffs2)
# images
{
rec {
system = {
crossSystem = {
config = "aarch64-unknown-linux-musl";
};
};
# this device is described by the "qemu" device
description = "";
description = ''
QEMU Aarch64
************
This target produces an image for
the `QEMU "virt" platform <https://www.qemu.org/docs/master/system/arm/virt.html>`_ using a 64 bit CPU type.
ARM targets differ from MIPS in that the kernel format expected
by QEMU is an "Image" (raw binary file) rather than an ELF
file, but this is taken care of by :command:`run.sh`. Check the
documentation for the :ref:`QEMU` (MIPS) target for more information.
'';
# this device is described by the "qemu" device
installer = "vmroot";
module = {pkgs, config, ... }: {
imports = [ ../../modules/arch/aarch64.nix ];
@ -51,7 +64,7 @@
klibBuild = config.system.outputs.kernel.modulesupport;
};
in {
defaultOutput = "vmroot";
defaultOutput = installer;
loadAddress = "0x0";
entryPoint = "0x0";
rootDevice = "/dev/mtdblock0";

View file

@ -2,7 +2,7 @@
# emulator. The default output is a directory containing separate
# kernel ("Image" format) and root filesystem (squashfs or jffs2)
# images
{
rec {
system = {
crossSystem = {
config = "armv7l-unknown-linux-musleabihf";
@ -10,7 +10,19 @@
};
# this device is described by the "qemu" device
description = "";
description = ''
QEMU ARM v7
***********
This target produces an image for
the `QEMU "virt" platform <https://www.qemu.org/docs/master/system/arm/virt.html>`_ using a 32 bit CPU type.
ARM targets differ from MIPS in that the kernel format expected
by QEMU is an "Image" (raw binary file) rather than an ELF
file, but this is taken care of by :command:`run.sh`. Check the
documentation for the :ref:`QEMU` (MIPS) target for more information.
'';
installer = "vmroot";
module = {pkgs, config, ... }: {
imports = [ ../../modules/arch/arm.nix ];
@ -54,7 +66,7 @@
klibBuild = config.system.outputs.kernel.modulesupport;
};
in {
defaultOutput = "vmroot";
defaultOutput = installer;
loadAddress = "0x00010000";
entryPoint = "0x00010000";
rootDevice = "/dev/mtdblock0";

View file

@ -1,7 +1,4 @@
# This "device" generates images that can be used with the QEMU
# emulator. The default output is a directory containing separate
# kernel (uncompressed vmlinux) and initrd (squashfs) images
{
rec {
system = {
crossSystem = {
config = "mips-unknown-linux-musl";
@ -13,24 +10,21 @@
};
description = ''
QEMU
****
QEMU MIPS
*********
This is not a hardware device. This target produces an image for
This target produces an image for
QEMU, the "generic and open source machine emulator and
virtualizer".
Liminix can build QEMU for both MIPS (:code:`qemu` device) and Aarch64 (:code:`qemu-aarch64` device)
MIPS QEMU emulates a "Malta" board, which was an ATX form factor
evaluation board made by MIPS Technologies, but mostly in Liminix
we use paravirtualized devices (Virtio) instead of emulating
hardware. For Aarch64 we use the QEMU "virt" board.
hardware.
Building an image for QEMU results in a :file:`result/` directory
containing ``run.sh`` ``vmlinux``, ``rootfs`` and possibly
(architecture-dependent) ``Image``. To invoke the emulator,
run ``run.sh``.
containing ``run.sh`` ``vmlinux``, and ``rootfs`` files. To invoke
the emulator, run ``run.sh``.
The configuration includes two emulated "hardware" ethernet
devices and the kernel :code:`mac80211_hwsim` module to
@ -39,6 +33,8 @@
in the Development manual.
'';
installer = "vmroot";
module = {pkgs, config, ... }: {
imports = [ ../../modules/arch/mipseb.nix ];
kernel = {
@ -74,7 +70,7 @@
klibBuild = config.system.outputs.kernel.modulesupport;
};
in {
defaultOutput = "vmroot";
defaultOutput = installer;
rootDevice = "/dev/mtdblock0";
flash.eraseBlockSize = "65536"; # c.f. pkgs/run-liminix-vm/run-liminix-vm.sh
networkInterfaces =