VirtualBox with routeable block sessions
This commit is contained in:
parent
83c2fde730
commit
064de94287
|
@ -4,7 +4,7 @@
|
|||
|
||||
{ print "all: " tar ".sig" }
|
||||
|
||||
{ print tar": depot/local/pkg/"$6"/current/.ARCHIVES pkg.sed" }
|
||||
{ print tar": depot/local/pkg/"$6"/current/.ARCHIVES" }
|
||||
{ print " @echo tar $@" }
|
||||
{ print " @mkdir -p $(dir $@) "ver }
|
||||
{ print " @sed -f pkg.sed $< > "ver"/archives" }
|
||||
|
|
|
@ -35,12 +35,14 @@
|
|||
<pkg path="_/pkg/fetch-nixos" info="Download a NixOS ISO"/>
|
||||
</index>
|
||||
-->
|
||||
<!-- <pkg path="_/pkg/fetch_alpine_x86_virt" info="Download an Alpine ISO"/> -->
|
||||
<pkg path="_/pkg/dual_nic_vbox" info="Dual nic VirtualBox"/>
|
||||
<index name="Alpine">
|
||||
<pkg path="_/pkg/installer-alpine_seoul_nova" info="Alpine Linux as a Seoul VMM guest installer with 8GiB disk"/>
|
||||
<pkg path="_/pkg/alpine_seoul_nova" info="Alpine Linux as a Seoul VMM guest"/>
|
||||
</index>
|
||||
<pkg path="_/pkg/alpine-virt-x86_64" info="Alpine installer ISO service"/>
|
||||
<pkg path="_/pkg/ReactOS-live" info="ReactOS live ISO service"/>
|
||||
<pkg path="_/pkg/fs_block_4G" info="File-system backed 4GiB block device"/>
|
||||
<pkg path="_/pkg/vbox5-nova" info="Vbox with routable block devices"/>
|
||||
</index>
|
||||
|
||||
<index name="Operating system demos">
|
||||
|
@ -84,5 +86,6 @@
|
|||
</index>
|
||||
|
||||
<pkg path="_/pkg/chroot" info="Automatic file-system session partitioner"/>
|
||||
<pkg path="_/pkg/dummy_block" info="Dummy block device"/>
|
||||
<pkg path="cnuke/pkg/bsd_audio_drv/2019-03-21" info="Cnuke's audio driver"/>
|
||||
</index>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
TARGET_NAME = dummy_block
|
||||
include_rules
|
||||
PKG_DEPENDS += @(PUBLIC_SRC_RAM_BLOCK)
|
||||
: runtime |> !collect_pkg_runtime |>
|
|
@ -0,0 +1,5 @@
|
|||
<runtime ram="4M" caps="96" binary="ram_block">
|
||||
<provides> <block/> </provides>
|
||||
<content> <rom label="ram_block"/> </content>
|
||||
<config size="1440K" block_size="512"/>
|
||||
</runtime>
|
|
@ -0,0 +1,4 @@
|
|||
TARGET_NAME = fs_block_4G
|
||||
include_rules
|
||||
PKG_DEPENDS += _/src/fs_block
|
||||
: runtime |> !collect_pkg_runtime |>
|
|
@ -0,0 +1,8 @@
|
|||
<runtime ram="4M" caps="128" binary="fs_block">
|
||||
<requires> <file_system/> </requires>
|
||||
<provides> <block/> </provides>
|
||||
<content> <rom label="fs_block"/> </content>
|
||||
<config>
|
||||
<default-policy file="/disk" block_size="512" writeable="yes" device_size="4G"/>
|
||||
</config>
|
||||
</runtime>
|
|
@ -0,0 +1,3 @@
|
|||
ALPINE_VERSION_MAJOR = 3.9
|
||||
ALPINE_VERSION_MINOR = 3
|
||||
ALPINE_VERSION = $(ALPINE_VERSION_MAJOR).$(ALPINE_VERSION_MINOR)
|
|
@ -0,0 +1 @@
|
|||
ISO_ROM_RULES = $(TUP_CWD)/iso_rom_rules.tup
|
|
@ -0,0 +1,24 @@
|
|||
include ../version.tup
|
||||
TARGET_NAME = alpine-$(RELEASE_TYPE)-$(RELEASE_ARCH)
|
||||
RAW_VERSION = $(ALPINE_VERSION)
|
||||
PKG_VERSION = $(ALPINE_VERSION)
|
||||
|
||||
include_rules
|
||||
|
||||
ISO_NAME = alpine-$(RELEASE_TYPE)-$(ALPINE_VERSION)-$(RELEASE_ARCH).iso
|
||||
ISO_URL = http://dl-cdn.alpinelinux.org/alpine/v$(ALPINE_VERSION_MAJOR)/releases/$(RELEASE_ARCH)/$(ISO_NAME)
|
||||
|
||||
: |> wget --quiet $(ISO_URL) -O %o |> $(RAW_DIR)/$(ISO_NAME) {iso}
|
||||
|
||||
: {iso} |> \
|
||||
wget --quiet $(ISO_URL).asc -O %o; gpg --verify %o; \
|
||||
|> $(RAW_DIR)/$(ISO_NAME).asc
|
||||
|
||||
: |> !raw |>
|
||||
|
||||
PKG_DEPENDS += \
|
||||
@(PUBLIC_SRC_ROM_BLOCK) \
|
||||
_/raw/$(TARGET_NAME) \
|
||||
|
||||
: $(TUP_CWD)/runtime.in |> sed 's/@ISO_NAME@/$(ISO_NAME)/' %f > %o |> runtime
|
||||
: runtime |> !collect_pkg_runtime |>
|
|
@ -0,0 +1,12 @@
|
|||
<runtime ram="2M" caps="128" binary="rom_block">
|
||||
|
||||
<provides> <block/> </provides>
|
||||
|
||||
<content>
|
||||
<rom label="rom_block"/>
|
||||
<rom label="@ISO_NAME@"/>
|
||||
</content>
|
||||
|
||||
<config file="@ISO_NAME@" block_size="2048"/>
|
||||
|
||||
</runtime>
|
|
@ -0,0 +1,3 @@
|
|||
RELEASE_ARCH = x86_64
|
||||
RELEASE_TYPE = virt
|
||||
include ../iso_rom_rules.tup
|
|
@ -0,0 +1,3 @@
|
|||
ALPINE_VERSION_MAJOR = 3.9
|
||||
ALPINE_VERSION_MINOR = 3
|
||||
ALPINE_VERSION = $(ALPINE_VERSION_MAJOR).$(ALPINE_VERSION_MINOR)
|
|
@ -0,0 +1,20 @@
|
|||
TARGET_NAME = ReactOS-live
|
||||
RAW_VERSION = 0.4.11
|
||||
include_rules
|
||||
|
||||
ZIP_NAME = ReactOS-$(RAW_VERSION)-live.zip
|
||||
ISO_NAME = ReactOS-$(RAW_VERSION)-Live.iso
|
||||
|
||||
: |> \
|
||||
wget --quiet https://downloads.sourceforge.net/project/reactos/ReactOS/$(RAW_VERSION)/$(ZIP_NAME) -O %o.zip; \
|
||||
unzip %o.zip -d $(RAW_DIR); rm %o.zip; \
|
||||
|> $(RAW_DIR)/$(ISO_NAME) {iso}
|
||||
|
||||
: |> !raw |>
|
||||
|
||||
PKG_DEPENDS += \
|
||||
@(PUBLIC_SRC_ROM_BLOCK) \
|
||||
_/raw/$(TARGET_NAME) \
|
||||
|
||||
: runtime.in |> sed 's/@ISO_NAME@/$(ISO_NAME)/' %f > %o |> runtime
|
||||
: runtime |> !collect_pkg_runtime |>
|
|
@ -0,0 +1,12 @@
|
|||
<runtime ram="2M" caps="128" binary="rom_block">
|
||||
|
||||
<provides> <block/> </provides>
|
||||
|
||||
<content>
|
||||
<rom label="rom_block"/>
|
||||
<rom label="@ISO_NAME@"/>
|
||||
</content>
|
||||
|
||||
<config file="@ISO_NAME@" block_size="2048"/>
|
||||
|
||||
</runtime>
|
|
@ -0,0 +1,20 @@
|
|||
TARGET_NAME = vbox5-nova
|
||||
include_rules
|
||||
|
||||
: foreach machine.vbox primary.vmdk secondary.vmdk |> !collect_raw |>
|
||||
: |> !raw |>
|
||||
|
||||
PKG_DEPENDS += \
|
||||
@(PUBLIC_SRC_BASE_NOVA) \
|
||||
@(PUBLIC_SRC_INIT) \
|
||||
@(PUBLIC_SRC_LIBC) \
|
||||
@(PUBLIC_SRC_LIBICONV) \
|
||||
@(PUBLIC_SRC_NIT_FB) \
|
||||
@(PUBLIC_SRC_POSIX) \
|
||||
@(PUBLIC_SRC_STDCXX) \
|
||||
@(PUBLIC_SRC_VBOX_NOVA) \
|
||||
@(PUBLIC_SRC_VFS) \
|
||||
@(PUBLIC_SRC_ZLIB) \
|
||||
_/raw/$(TARGET_NAME) \
|
||||
|
||||
: runtime |> !collect_pkg_runtime |>
|
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0"?>
|
||||
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.14-freebsd">
|
||||
<Machine uuid="{37ab43a5-38d8-4491-93f5-5b0b077f5c32}" name="ubuntu_16_04_64" OSType="Ubuntu_64" snapshotFolder="Snapshots" lastStateChange="2018-01-23T18:40:00Z">
|
||||
<MediaRegistry>
|
||||
<HardDisks>
|
||||
<HardDisk uuid="{42f50c88-42b0-41ed-bc76-28cf026f052c}" location="/primary.vmdk" format="VMDK" type="Normal"/>
|
||||
</HardDisks>
|
||||
<HardDisks>
|
||||
<HardDisk uuid="{8e1b4241-2e6b-417d-8495-3afbaaecac87}" location="/secondary.vmdk" format="VMDK" type="Normal"/>
|
||||
</HardDisks>
|
||||
<!--
|
||||
<DVDImages>
|
||||
<Image uuid="{81763434-9a51-49e8-9444-528a5a28c4bc}" location="installer.iso"/>
|
||||
</DVDImages>
|
||||
-->
|
||||
</MediaRegistry>
|
||||
<Hardware>
|
||||
<CPU count="4">
|
||||
<PAE enabled="true"/>
|
||||
<LongMode enabled="true"/>
|
||||
<HardwareVirtExLargePages enabled="false"/>
|
||||
</CPU>
|
||||
<Memory RAMSize="1024"/>
|
||||
<HID Pointing="USBTablet"/>
|
||||
<Display VRAMSize="20"/>
|
||||
<RemoteDisplay enabled="false"/>
|
||||
<BIOS>
|
||||
<IOAPIC enabled="true"/>
|
||||
</BIOS>
|
||||
<USB>
|
||||
<Controllers>
|
||||
<Controller name="OHCI" type="OHCI"/>
|
||||
</Controllers>
|
||||
</USB>
|
||||
<Network>
|
||||
<Adapter slot="0" enabled="true" MACAddress="0800271D7901" cable="true" type="82540EM">
|
||||
<BridgedInterface/>
|
||||
</Adapter>
|
||||
<Adapter slot="1" enabled="true" MACAddress="0800271D7902" cable="true" type="82540EM">
|
||||
<BridgedInterface/>
|
||||
</Adapter>
|
||||
</Network>
|
||||
<UART>
|
||||
<Port slot="0" enabled="false" IOBase="0x3f8" IRQ="4" hostMode="Disconnected"/>
|
||||
<Port slot="1" enabled="false" IOBase="0x2f8" IRQ="3" hostMode="Disconnected"/>
|
||||
</UART>
|
||||
<LPT>
|
||||
<Port slot="0" enabled="false" IOBase="0x378" IRQ="7"/>
|
||||
<Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/>
|
||||
</LPT>
|
||||
<AudioAdapter controller="HDA" driver="OSS" enabled="false"/>
|
||||
<RTC localOrUTC="UTC"/>
|
||||
<SharedFolders>
|
||||
</SharedFolders>
|
||||
</Hardware>
|
||||
<StorageControllers>
|
||||
<StorageController name="SATA" type="AHCI" PortCount="4" useHostIOCache="true" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
|
||||
<AttachedDevice type="HardDisk" port="0" device="0">
|
||||
<Image uuid="{42f50c88-42b0-41ed-bc76-28cf026f052c}"/>
|
||||
</AttachedDevice>
|
||||
<AttachedDevice type="HardDisk" port="1" device="0">
|
||||
<Image uuid="{8e1b4241-2e6b-417d-8495-3afbaaecac87}"/>
|
||||
</AttachedDevice>
|
||||
<!--
|
||||
<AttachedDevice passthrough="false" type="DVD" port="3" device="0">
|
||||
<Image uuid="{81763434-9a51-49e8-9444-528a5a28c4bc}"/>
|
||||
</AttachedDevice>
|
||||
-->
|
||||
</StorageController>
|
||||
</StorageControllers>
|
||||
</Machine>
|
||||
</VirtualBox>
|
|
@ -0,0 +1,21 @@
|
|||
# Disk DescriptorFile
|
||||
version=1
|
||||
CID=bca55ee1
|
||||
parentCID=ffffffff
|
||||
createType="fullDevice"
|
||||
|
||||
# Extent description
|
||||
RW 2147483648 FLAT "/dev/sda" 0
|
||||
|
||||
# The disk Data Base
|
||||
#DDB
|
||||
|
||||
ddb.virtualHWVersion = "4"
|
||||
ddb.adapterType="ide"
|
||||
ddb.geometry.cylinders="16383"
|
||||
ddb.geometry.heads="16"
|
||||
ddb.geometry.sectors="63"
|
||||
ddb.uuid.image="42f50c88-42b0-41ed-bc76-28cf026f052c"
|
||||
ddb.uuid.parent="00000000-0000-0000-0000-000000000000"
|
||||
ddb.uuid.modification="00000000-0000-0000-0000-000000000000"
|
||||
ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000"
|
|
@ -0,0 +1,128 @@
|
|||
<runtime ram="1600M" caps="1500" binary="init">
|
||||
|
||||
<requires>
|
||||
<block label="primary"/>
|
||||
<block label="secondary"/>
|
||||
<nic label="0"/>
|
||||
<nic label="1"/>
|
||||
<nitpicker/>
|
||||
<report/>
|
||||
<report label="shape"/>
|
||||
<rm/>
|
||||
<rom label="platform_info"/>
|
||||
<rom label="usb_devices"/>
|
||||
<rtc/>
|
||||
<usb/>
|
||||
</requires>
|
||||
|
||||
<provides> <nic/> </provides>
|
||||
|
||||
<content>
|
||||
<rom label="init"/>
|
||||
<rom label="libc.lib.so"/>
|
||||
<rom label="libc_pipe.lib.so"/>
|
||||
<rom label="libc_terminal.lib.so"/>
|
||||
<rom label="libiconv.lib.so"/>
|
||||
<rom label="libm.lib.so"/>
|
||||
<rom label="nit_fb"/>
|
||||
<rom label="qemu-usb.lib.so"/>
|
||||
<rom label="stdcxx.lib.so"/>
|
||||
<rom label="timer"/>
|
||||
<rom label="vfs.lib.so"/>
|
||||
<rom label="virtualbox5-nova"/>
|
||||
<rom label="machine.vbox"/>
|
||||
<rom label="primary.vmdk"/>
|
||||
<rom label="secondary.vmdk"/>
|
||||
</content>
|
||||
|
||||
<config verbose="yes" prio_levels="2">
|
||||
|
||||
<parent-provides>
|
||||
<service name="ROM"/>
|
||||
<service name="PD"/>
|
||||
<service name="RM"/>
|
||||
<service name="CPU"/>
|
||||
<service name="LOG"/>
|
||||
<service name="Block"/>
|
||||
<service name="Nitpicker"/>
|
||||
<service name="Rtc"/>
|
||||
<service name="Report"/>
|
||||
<service name="Usb"/>
|
||||
<service name="Nic"/>
|
||||
</parent-provides>
|
||||
|
||||
<default-route> <any-service> <parent/> <any-child/> </any-service> </default-route>
|
||||
|
||||
<default caps="100"/>
|
||||
|
||||
<start name="timer">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Timer"/></provides>
|
||||
<config/>
|
||||
<route>
|
||||
<service name="ROM" label="platform_info">
|
||||
<parent label="platform_info"/> </service>
|
||||
<any-service> <parent/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
|
||||
<start name="nit_fb" priority="0">
|
||||
<resource name="RAM" quantum="8M" />
|
||||
<provides>
|
||||
<service name="Framebuffer" /> <service name="Input" />
|
||||
</provides>
|
||||
<config initial_width="800" initial_height="600" />
|
||||
<route>
|
||||
<service name="Nitpicker"> <parent label=""/> </service>
|
||||
<any-service> <parent/> </any-service>
|
||||
</route>
|
||||
</start>
|
||||
|
||||
<start name="vbox" priority="-1" caps="1000">
|
||||
<binary name="virtualbox5-nova" />
|
||||
<resource name="RAM" quantum="2G"/>
|
||||
<exit propagate="yes"/>
|
||||
<config vbox_file="machine.vbox" xhci="no" vm_name="linux">
|
||||
<vfs>
|
||||
<rom name="machine.vbox"/>
|
||||
<rom name="primary.vmdk"/>
|
||||
<rom name="secondary.vmdk"/>
|
||||
<dir name="dev">
|
||||
<block name="sda" label="primary"/>
|
||||
<block name="sdb" label="secondary"/>
|
||||
<log/>
|
||||
<rtc/>
|
||||
</dir>
|
||||
</vfs>
|
||||
<libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc"/>
|
||||
</config>
|
||||
<route>
|
||||
<service name="Audio_out">
|
||||
<parent/> </service>
|
||||
<service name="ROM" label="usb_devices">
|
||||
<parent label="usb_devices"/> </service>
|
||||
<service name="ROM" label="platform_info">
|
||||
<parent label="platform_info"/> </service>
|
||||
<service name="Block" label_suffix="primary">
|
||||
<parent label="primary"/> </service>
|
||||
<service name="Block" label_suffix="secondary">
|
||||
<parent label="secondary"/> </service>
|
||||
<service name="Nic" label_suffix="0">
|
||||
<parent label="0"/> </service>
|
||||
<service name="Nic" label_suffix="1">
|
||||
<parent label="1"/> </service>
|
||||
<service name="Report" label="shape">
|
||||
<parent label="shape"/> </service>
|
||||
<service name="ROM" label="clipboard">
|
||||
<parent label="clipboard"/> </service>
|
||||
<service name="Report" label="clipboard">
|
||||
<parent label="clipboard"/> </service>
|
||||
<any-service>
|
||||
<parent/> <any-child/>
|
||||
</any-service>
|
||||
</route>
|
||||
</start>
|
||||
|
||||
</config>
|
||||
|
||||
</runtime>
|
|
@ -0,0 +1,21 @@
|
|||
# Disk DescriptorFile
|
||||
version=1
|
||||
CID=57915c32
|
||||
parentCID=ffffffff
|
||||
createType="fullDevice"
|
||||
|
||||
# Extent description
|
||||
RW 2147483648 FLAT "/dev/sdb" 0
|
||||
|
||||
# The disk Data Base
|
||||
#DDB
|
||||
|
||||
ddb.virtualHWVersion = "4"
|
||||
ddb.adapterType="ide"
|
||||
ddb.geometry.cylinders="16383"
|
||||
ddb.geometry.heads="16"
|
||||
ddb.geometry.sectors="63"
|
||||
ddb.uuid.image="8e1b4241-2e6b-417d-8495-3afbaaecac87"
|
||||
ddb.uuid.parent="00000000-0000-0000-0000-000000000000"
|
||||
ddb.uuid.modification="00000000-0000-0000-0000-000000000000"
|
||||
ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000"
|
Loading…
Reference in New Issue