summaryrefslogtreecommitdiff
path: root/website-src/index.html
blob: b2eefd01bfaeee40c63ecaee5823e475ad47c775 (plain)
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
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Website</title>
  <link rel="stylesheet" href="style.css" />
  <script type="module" src="../website-emu/src/dev.js"></script>
  <script type="module" defer>
    import init, { boot } from './website_emu.js';
    async function run() {
      await init();
      const response = await fetch('/vmwebkrnl.bin');
      if (!response.ok) {
        console.log("OS image not present, not booting.");
        return;
      }

      const image = new Uint8Array(await response.arrayBuffer());
      const vmwebkrnl = new Uint8Array(2 * 1024 * 1024);
      vmwebkrnl.set(image);
      const initrd = new Uint8Array(8);
      const dram = new Uint8Array(1024 * 1024);

      boot(vmwebkrnl, initrd, dram);
    }
    run();
  </script>
</head>
<body>

</body>
</html>