liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

default.nix (1405B)


      1 # This "device" generates images that can be used with the QEMU
      2 # emulator. The default output is a directory containing separate
      3 # kernel ("Image" format) and root filesystem (squashfs or jffs2)
      4 # images
      5 {
      6   system = {
      7     crossSystem = {
      8       config =  "armv7l-unknown-linux-musleabihf";
      9     };
     10   };
     11 
     12   # this device is described by the "qemu" device
     13   description = ''
     14     QEMU ARM v7
     15     ***********
     16 
     17     This target produces an image for
     18     the `QEMU "virt" platform <https://www.qemu.org/docs/master/system/arm/virt.html>`_ using a 32 bit CPU type.
     19 
     20     ARM targets differ from MIPS in that the kernel format expected
     21     by QEMU is an "Image" (raw binary file) rather than an ELF
     22     file, but this is taken care of by :command:`run.sh`. Check the
     23     documentation for the :ref:`QEMU` (MIPS) target for more information.
     24   '';
     25   installer = "vmroot";
     26 
     27   module = {pkgs, config, lim, ... }: {
     28     imports = [
     29       ../../modules/arch/arm.nix
     30       ../families/qemu.nix
     31     ];
     32     kernel = {
     33       config = {
     34         PCI_HOST_GENERIC = "y";
     35         ARCH_VIRT = "y";
     36 
     37         VFP = "y";
     38         NEON = "y";
     39         AEABI = "y";
     40 
     41         SERIAL_AMBA_PL011 = "y";
     42         SERIAL_AMBA_PL011_CONSOLE = "y";
     43       };
     44     };
     45     boot.commandLine = [
     46       "console=ttyAMA0"
     47     ];
     48     hardware = let addr = lim.parseInt "0x40008000"; in {
     49       loadAddress = addr;
     50       entryPoint = addr;
     51     };
     52   };
     53 }