patches and low-level development discussion
 help / color / mirror / code / Atom feed
b8d200075218a66d598f6bdb47e6a10f21ead66e blob 1279 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
with import ./. {};

let
  makeSquashfs = (callPackage nixos/lib/make-squashfs.nix {}).override;

  kernel' = linux_cros;

  kernel = with import lib/kernel.nix { inherit lib; inherit (kernel') version; };
    kernel'.override { structuredExtraConfig = {
                         VIRTIO_PCI = yes;
                         VIRTIO_BLK = yes;
                         VIRTIO_WL = yes;
                         SQUASHFS = yes;
                         DEVTMPFS_MOUNT = yes;
                       }; };

  init = writeShellScript "init" ''
    set -xe
    ${coreutils}/bin/mkdir /dev/pts /dev/shm
    ${utillinux}/bin/mount -t tmpfs none /tmp
    ${utillinux}/bin/mount -t devpts -o gid=4,mode=620 none /dev/pts
    ${utillinux}/bin/mount -t tmpfs none /dev/shm
    export XDG_RUNTIME_DIR=/tmp
    ${sommelier}/bin/sommelier ${hello-wayland}/bin/hello-wayland
  '';

  rootfs = runCommand "rootfs" {} ''
    mkdir dev bin tmp
    ln -s ${dash}/bin/sh bin
    (cat ${writeReferencesToFile init}; printf "%s\n" bin dev tmp) | xargs tar -cP --hard-dereference | ${squashfs-tools-ng}/bin/tar2sqfs $out
  '';

in

writeShellScript "crosvm" ''
  set -x
  exec ${crosvm}/bin/crosvm run --wayland-sock=$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY -p init=${init} --root=${rootfs} ${kernel}/bzImage
''
debug log:

solving b8d20007521 ...
found b8d20007521 in https://spectrum-os.org/git/nixpkgs

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).