#UEFI and Unikernel UEFI is the technical name of the BIOS that runs on today's Intel-based PCs and servers. This also covers the virtual machines available in the cloud, for example on Google Compute Engine. UEFI is the layer that starts the PC, that lets a user configure the BIOS through a text or graphical interface, and that then loads the operating system: Windows, Linux, BSD, etc. When the PC starts, UEFI loads a first application, which can be called a “UEFI application”. Such an application accesses, through UEFI, the keyboard, the screen, the disks as well as the network, via the machine-specific drivers that the manufacturer integrated into UEFI. It also accesses the clock, the random number generator, the mouse, etc. The most common UEFI application is the BootLoader, which loads the operating system and then hands over control to it. But a UEFI application can be self-sufficient. This is what we offer with the UEFI version of Minimacy. Such a UEFI application can also be regarded as a “unikernel”. The UEFI version of Minimacy lets you run your Minimacy applications bare-metal on: - a cloud virtual machine, such as Google Compute Engine - a PC, desktop or server. In both cases, the attack surface is greatly reduced: your application ends up alone on the machine. #Getting started - We assume you have already gotten started with Minimacy on a host - Installing the tools - First UEFI application on QEMU - Example http server - Launching on Google Compute Engine - Launching on a bare-metal PC ##Minimacy Minimacy is a strongly multi-platform technology: computers, mobile phones and bare-metal embedded systems. When you work on UEFI applications, you will generally develop the components of your application on your computer, which you will then move onto your UEFI target (cloud or bare-metal PC). This implies that you are already familiar with Minimacy on a computer. In what follows, we assume that you have already installed Minimacy, that you know how to run programs (*.mcy files) and that you have some basics of the Minimacy language. Since the targets are x86 processors, using a Mac is not recommended, because QEMU emulation is particularly slow on it. And you will generally use QEMU to test your application before deploying it to the cloud or to a PC. Likewise, the tools are easier to set up on Linux. This tutorial will therefore assume that you have either a Linux on your Windows (via WSL or VirtualBox), or a 100% Linux computer. Working remotely on a Linux server is also possible, especially if you want to run your application on a cloud virtual machine. ##Tooling We use four tools, which may already be installed on your machine: - gcc-mingw-w64-x86-64: the compiler - mtools: the disk-image management tools - qemu-system-x86: the QEMU virtual machine - dnsmasq-base: the tools to configure a DHCP network for QEMU To install them in a single command: >sudo apt install mtools gcc-mingw-w64-x86-64 qemu-system-x86 dnsmasq-base As indicated above, we assume that you have already installed Minimacy on your machine. We will call [minimacy] the directory that contains the archive. From this directory you must be able to launch the “minimacy” binary: >cd [minimacy] >./bin/minimacy ##First try on QEMU We are going to launch QEMU with a file that contains a disk image. QEMU will consider it to be a real disk. On this disk, we only need an executable whose name and path are imposed: /EFI/BOOT/BOOTX64.EFI This executable will precisely be the Minimacy runtime, into which a “romdisk” has been integrated: it mainly consists of the files of the rom/bios, rom/core, rom/baremetal directories as well as the boot.mcy file, which is copied from the boot_release.mcy file present in the programs/ directory. To begin, you therefore need to: - create a disk image - create the romdisk - compile BOOTX64.EFI The makefile contains the 3 corresponding commands, which you can run in this order: >cd [minimacy]/baremetal/uefi >make img >make romdisk >make efi You can then run this program on QEMU: >make run-img This command copies BOOTX64.EFI into the disk image, then launches QEMU. After a few seconds the console prompt appears. Congratulations! you have created your first UEFI application! QEMU also emulates the presence of a screen and a keyboard. You can run: >make run-img-display This time a graphical window opens and you see the console in text mode as it would appear on a real PC. But there is no way to scroll back up, so it is not very convenient this way; we will prefer the first one without a screen. ##First program Now, create a file [minimacy]/baremetal/uefi/programs/boot.mcy, in which you put: fun main()= echoLn "We need this!"; consoleStart(nil);; Again: >make img >make run-img This time the message “We need this!” appears just before the prompt: - the “make img” command created a disk image and copied the contents of [minimacy]/baremetal/uefi/programs to the root of this disk - the run-img command copies BOOTX64.EFI into this image, into the /EFI/BOOT/ directory, then launches QEMU ##With the network Your application will probably need the network, and generally as a server able to receive TCP/IP connections. This requires a few adjustments: - you must inform QEMU of the tcp port you are using. By default 'run-img' allows ports 8080, 8443 and 2222 (standard port for http, https and ssh development) - your application must configure the network, generally via DHCP, but possibly with a fixed IP. Now, replace the contents of boot.mcy with this example http server, which always returns the time, whatever the request: use core.net.ipOverEth;; use core.net.http.srv;; fun main()= netDhcp(netUp("eth0")); // start the ethernet with DHCP httpSrvStart( nil, // no tls key => we use http nil, // no ip local address => the server is bound to all local addresses 8080, lambda(h, verb, uri) = strFormat("Current time: *", fullDate(time())) ); net();; // display network configuration Then, run: >make img >make run-img This last command launches QEMU and makes the http server reachable from Linux. Look in the console log, you will see the DHCP assignment that was made, for example: >ETH : eth0 >mac : 52:54:00:12:34:56 >ip : 10.0.2.15 >mask : 255.255.255.0 >gateway: 10.0.2.2 >dns : 10.0.2.3 Then launch a local browser (firefox, lynx, w3m) toward the url: http://127.0.0.1:8080 Congratulations, you have a unikernel able to serve the time, with a ridiculously small attack surface! ##Development loop The development loop is therefore the following: - you put your application's files in [minimacy]/baremetal/uefi/programs - you run: >make img >make run-img - the first command rebuilds the UEFI disk image, in the file [minimacy]/bin/hd.img - the second launches qemu with a DHCP network configuration reachable from linux #Deploying on Google Compute Engine ##The workflow We start from the example http server application: use core.net.ipOverEth;; use core.net.http.srv;; fun main()= netDhcp(netUp("eth0")); // start the ethernet with DHCP httpSrvStart( nil, // no tls key => we use http nil, // no ip local address => the server is bound to all local addresses 8080, lambda(h, verb, uri) = strFormat("Current time: *", fullDate(time())) ); net();; // display network configuration On Google Compute Engine and on equivalent platforms, you must: - build a disk image compatible with the platform - upload this image, and register it as an image for a virtual machine - instantiate a VM from this image Then, while running: - access the log - access the console Finally, to stop and pay nothing more: - destroy the VM instance - destroy the image In what follows, we assume that you have a Google Cloud Engine account, with a project named “minimacy”, and that the “gcloud” commands are installed in your terminal. The “gcloud init” command will let you connect to your account: >gcloud init You create a “minimacy-images” bucket with: >gcloud storage buckets create gs://minimacy-images (adapt the “location” parameter to your needs) We define, once and for all, a firewall rule named “allow-minimacy” that opens ports 80 and 8080: >gcloud compute firewall-rules create allow-minimacy \ > --network=default --allow=tcp:80,tcp:8080 \ > --target-tags=minimacy --source-ranges=0.0.0.0/0 ##The commands You can run these 5 commands all at once: >make gce >gcloud storage cp images/minimacy-gce.tar.gz gs://minimacy-images/ >gcloud compute images create minimacy --source-uri=gs://minimacy-images/minimacy-gce.tar.gz --guest-os-features=UEFI_COMPATIBLE >gcloud compute instances create mmy1 \ > --machine-type=e2-small \ > --image=minimacy \ > --no-shielded-secure-boot \ > --metadata=serial-port-enable=true \ > --enable-uefi-networking \ > --tags=minimacy >gcloud compute instances get-serial-port-output mmy1 - make gce: transforms the image created with “make img” into a file compatible with gce (aka google compute engine), here images/minimacy-gce.tar.gz - gcloud storage cp …: copies this image to your bucket - gcloud compute images create …: creates a “minimacy” VM image from this image - gcloud compute instances create …: creates an “mmy1” instance from this VM image - gcloud compute instances get-serial-port-output mmy1: displays the log The third command can take 2 minutes, be patient. The last command displays the console output from startup and then returns. It is not dynamic. To get an interactive console, run: >gcloud compute connect-to-serial-port mmy1 To leave this console, press the three keys “enter ~ .” in sequence From another terminal you can reset the VM with: >gcloud compute instances reset mmy1 To finish, and stop paying anything: >gcloud compute instances delete mmy1 --quiet >gcloud compute images delete minimacy --quiet These commands take about 30 seconds. You can also follow all of this from the web console: https://console.cloud.google.com/compute #Deploying on a PC Deployment on a PC can run into several difficulties: - the UEFI version installed on the PC does not always offer all the features, in particular network access, which considerably limits usage - it is rare for a UART console output to be easily accessible, and the on-screen console scrolls very fast with no way to scroll back up - finally, you must disable Secure Boot In all cases it is recommended to use a recent PC, for example later than 2014. We also assume that this is not your development PC, on which you carried out this tutorial. We will call this second PC the “test PC”. ##Initialization You need a USB key formatted in FAT32. Start your test PC to access the BIOS (Escape, F1, F7, F12, etc. key pressed several times at startup, depending on your model). - disable SecureBoot - if there are options related to UEFI, in particular for enabling the network (PXE, IPV4, etc.), enable them - if there is a UEFI UART output, enable it - if there is a “Fast boot” option, disable it, because it may reduce the number of UEFI drivers that are loaded - in the boot order, place the USB key first (the key may need to be inserted at boot time for the option to appear) The shape of the menus and the wording of the options vary from one PC to another. On some PCs, disabling SecureBoot will prevent you from later restarting under Windows, by showing a BitLocker screen that asks you for a code you probably do not have. Do not panic in that case: go back into the BIOS, re-enable SecureBoot, and everything will return to normal. ##Launching We assume that you have managed to launch the UEFI version of Minimacy on QEMU. Make sure there is no longer a [minimacy]/baremetal/uefi/programs/boot.mcy file. The general launching principle is as follows: - copy the file [minimacy]/bin/BOOTX64.EFI onto the key, at the location: /EFI/BOOT/BOOTX64.EFI - copy to the root of the key the application files that you placed in [minimacy]/baremetal/uefi/programs/ If you are on WSL, the makefile lets you perform these two operations simply, in a single command. >make copy-d This command assumes that the USB key is present as D: on Windows. There is also a “make copy-e” alternative if the key is present as E:. Properly eject the USB key from your development PC, and insert it into the test PC. Start or restart the test PC. After a few moments, you should see the Minimacy console appear. You will likely not have been able to read the beginning of the log, because the on-screen scrolling is too fast, even though we added a 1-second delay after the first initialization block. Use your smartphone to record the sequence on video. You should be able to read the initialization block there, the picture stabilizing during the one-second delay. For example you may find this, on an Up 4000 PC: >> UEFI: display found >> UEFI: serial #0 (COM0) baud=115200 fifo=16 timeout=1000000 control=103 >> UEFI: input device #0 type=usb >> UEFI: mouse #0: relative, res=8,8 >> UEFI: ACPI ready >> UEFI: dynamic memory: 1166 MB at 12151000 >> UEFI: system timeMs(), freq= 3579 kHz >> UEFI: system time(): 1794400908 >> UEFI: available RNG: Rdrand, Rdseed, cycles >> UEFI: storage uefi0: writable, 15118440 sectors (512 bytes per sector) align 0 >> UEFI: storage uefi1: writable, 30670848 sectors (512 bytes per sector) align 1 >> UEFI: connect network controller #13 = 800000000000000e >> UEFI: network snp #0 with exclusive mode >> UEFI: network mac=00:07:32:b9:8e:42 >> UEFI: network ready Among other things, you will find: - a screen - a UART serial interface - a keyboard - a mouse - a little more than 1 GB of usable RAM - a random number generator based on the hardware and on the microprocessor's Rdrand and Rdseed instructions - two disks, including the USB key - a network interface with its MAC address, ready to be used This is the ideal configuration: everything will work normally. What can happen is the absence of a network interface, which strongly limits the possible applications. Look again in the BIOS configuration to see whether you missed the option that would enable it. ##Development loop Now that you know your PC is compatible with the UEFI version of Minimacy, you can develop your application. The development loop is the following, very similar to the one for QEMU: - you edit your application’s files in [minimacy]/baremetal/uefi/programs - after inserting the USB key, you run: >make copy-d - this command copies to the root of the key the application files that you placed in [minimacy]/baremetal/uefi/programs/ - properly eject the key - insert it into your test PC, and restart it Of course, you can run “make img” and “make run-img” at any time to check your application on QEMU, and avoid going through these USB-key manipulations only to find out that there is a syntax error in your code. #Developing an application Because of Minimacy's strongly multi-platform nature, applications developed for UEFI have practically no difference from those developed for the computer version of Minimacy: - Everything that is pure computation is identical - File access is identical - Use of the clock is identical - The console works in the same way One aspect, however, shows differences: - Network configuration ##Network configuration On a computer it is the operating system that is in charge of configuring and managing network connections: when your application starts, the network is already ready. In the UEFI application, the “hardware” boot (file baremetal.uefi.boot.mcy) cannot guess the configuration you need. Indeed, one can imagine 3 types of configuration: - Inactive - With a fixed IP - With a dynamic IP obtained via DHCP You can view the result of this initialization with the net() command: >] net() > Name MAC IP Mask Gateway DNS > ---- --- -- ---- ---- ---- > eth0 52:54:00:12:34:56 ... ... ... ... > lo 127.0.0.1 255.0.0.0 ... ... The ethernet port is named 'eth0'. It does not yet have an IP address. It is therefore in your application, generally in the main() function of the boot.mcy file, that you must define this configuration. Here is how to configure the ethernet port with DHCP: use core.net.ipOverEth;; fun main ()= netDhcp(netUp("eth0")); ... ;; The same thing with a fixed IP (the last two arguments are the gateway and the dns server): use core.net.ipOverEth;; fun main ()= netStatic(netUp("eth0"), "169.254.1.1", "255.255.0.0", nil, nil); ... ;; Note the presence of “use core.net.ipOverEth”, a readable but somewhat complex package that implements, in the Minimacy language, an IP layer with ARP, UDP, DHCP and TCP. From there, you can use the network as on a computer. #Going further In short: - Behind the magic - Understanding how disks work in baremetal - Creating the NATIVE romdisk - The hardware boot ##Behind the magic Remove the program [minimacy]/baremetal/uefi/programs/boot.mcy, and relaunch: >make img >make run-img Let us detail the boot message. >> UEFI: display found >> UEFI: serial #0 (COM1) baud=115200 fifo=16 timeout=173 control=3b0 >> UEFI: input device #1 type=ps2 >> UEFI: no pointer device Here, the screen was found, a UART connection was found for the console, and a ps2 keyboard. No mouse was found. >> UEFI: ACPI ready ACPI is ready: this means that Minimacy will stop when the machine receives the shutdown signal, which speeds up the shutdown of virtual machines in the cloud. >> UEFI: dynamic memory: 402 MB at 1500000 The largest available RAM strip was measured at 402 MB and will be used by Minimacy, knowing that QEMU is launched with 512 MB of RAM and that you can adjust this value, for example with “make run-img QEMU_MEMORY=256M”. >> UEFI: software timeMs(), freq= 2955978 kHz >> UEFI: system time(): 1794244923 There is no millisecond-precise timestamp; the timeMs() function will rely on the processor's cycle counter, which will be divided by the frequency empirically measured at about 2.96GHz. On the other hand, the clock that gives the date to the second was detected; it feeds Minimacy's time() function. >> UEFI: available RNG : UEFI, cycles The UEFI random number generator was detected. >> UEFI: storage uefi0: writable, 73728 sectors (512 bytes per sector) align 8 A single disk was detected; it is the image we created with “make img”. >> UEFI: connect network controller #6 = 800000000000000e >> UEFI: network snp #0 with exclusive mode >> UEFI: network mac=52:54:00:12:34:56 >> UEFI: network ready A network interface was detected, its MAC address read, and it is ready to be used. >> Minimacy - Sylvain Huet - 2020-26 - 2.1.6/Uefi >> ---- >> 64 bits >> Memory strip 0: 422555648 bytes (0x1500000 - 0x1a7fb000) >> Memory length : 422555648 bytes (0x192fb000) Note that the memory strip indeed matches what was detected: 403MB in a single strip. >> Current working directory: [empty] >> Default user directory : [empty] >> BIOS compiled in 122 ms >> current time: Mon, 09 Nov 2026 17:22:04 UTC These four lines are also present in the computer version of Minimacy. In baremetal, the working and user directories are always empty (root directory). The BIOS is compiled in 122 ms. It is exactly the same bios as in the computer version. On a computer, Minimacy finds these files in the rom/bios/ directory. In baremetal, a set of files are already present “hard-coded” in the Minimacy firmware. These are mainly the files of the rom/bios, rom/core, rom/baremetal directories, as well as the boot.mcy file present in the programs/ directory. We will see later how to modify this list and recompile the firmware. Once the BIOS is compiled, the UEFI version of Minimacy first runs the baremetal.uefi.boot.mcy program: >> compiling 'baremetal.uefi.boot' >> compiling 'core.storage.romdisk' >> compiling 'core.storage.fat32' >> compiling 'core.util.cache' >> compiled in 54 ms This “hardware” boot analyzes the disks and prepares the possible use of a keyboard, a mouse or a touch screen for a graphical application that would use uiStart(). >> Storage: check volume uefi0 >> Storage: no mbr >> Storage: found fat32 partition (37.748.736 Bytes, cluster size: 512): MINIMACY >> Building romdisk, depth 2 You can see that it indeed found a partition on the disk. In our case, the disk is 36MB and its partition is called “MINIMACY”. Here it is simply the disk image created by “make img”. Why only 36MB? It is the minimum size for a FAT32 disk, and small files are always easier to handle. If you need more, for example 1GB, you just have to use the command “make img SIZE=1G”. Then the hardware boot initializes all these elements before launching the boot.mcy program, which by default launches the toplevel with the “consoleStart” command. The code of boot.mcy is simply: fun main() = consoleStart(nil);; ##Disks in baremetal To go further, you need to understand the structure of Minimacy's “disks”. There are three levels: - A “volume” corresponds to a physical medium - A “partition” is a subdivision of a volume. It can be formatted in several ways, but Minimacy only recognizes the FAT32 format. A volume can contain several partitions, even though there is often only one - Finally, the “mount” makes it possible to define through which file path in Minimacy a partition is accessed For example, if a partition contains a file /bar/test.txt, and it is mounted with - Mount path: /foo/ - Partition path: /bar/ then Minimacy will be able to access the file via the path /foo/test.txt The fs() command lets you view this structure. With a UEFI disk image without any *.mcy file, you will see this: >] fs() >Volumes: > Volume Access SectorSize NbSectors TotalSize > ------ ------ ---------- --------- --------- > uefi0 writable 512 73.728 36M > romdisk1 readonly 692.386 1 676k > >Partitions: > Volume Access TotalSize Partition > ------ ------ ---------- --------- > uefi0 writable 35M MINIMACY > romdisk1 readonly 676k NATIVE > >Mounts: > Id Volume Partition Access Mount Path Partition Path > -- ------ --------- ------ ---------- -------------- > 0 uefi0 MINIMACY writable [empty] / > 1 romdisk1 NATIVE readonly [empty] [empty] There are two volumes: - romdisk1: a “disk” hard-coded in the firmware, which we discussed in the previous chapter - uefi0: the UEFI disk which, in our case, is 36MB with a partition called “MINIMACY”. Each volume yields one partition: - MINIMACY: the SD card partition - NATIVE: the romdisk partition The last “Mounts” section indicates how these partitions are mounted, and in what order: UEFI disk (index/Id 0) then romdisk (index/Id 1). This means that when Minimacy looks for a file, it looks for it first in the UEFI disk, then in the NATIVE partition (romdisk). You can view the contents of these disks: >] dir(nil) > DIRECTORY | Mon, 09 Nov 2026 17:57:38 UTC | 0: EFI/ > DIRECTORY | Thu, 01 Jan 1970 00:00:00 UTC | 1: baremetal/ > DIRECTORY | Thu, 01 Jan 1970 00:00:00 UTC | 1: bios/ > DIRECTORY | Thu, 01 Jan 1970 00:00:00 UTC | 1: core/ > 66 | Mon, 09 Nov 2026 16:20:52 UTC | 0: README > 35 | Thu, 01 Jan 1970 00:00:00 UTC | 1: boot.mcy > 409 | Mon, 09 Nov 2026 17:51:34 UTC | 0: boot.txt >7 element(s) The visible files are both those of the UEFI disk and those of the romdisk. The latter do not really have a date, since they are integrated into the firmware; their “unix timestamp” is considered to be 0, which dates them to 01/01/1970. You also notice on each line “0:” or “1:” just before the file or directory name, which means that these files are either on mount index 0 (UEFI disk) or on mount index 1 (romdisk). Now, put back a [minimacy]/baremetal/uefi/programs/boot.mcy file, in which you have: fun main()= echoLn "We need this!"; consoleStart(nil);; Again: >make img >make run-img This time the console displays this: >> Storage: check volume uefi0 >> Storage: no mbr >> Storage: found fat32 partition (37.748.736 Bytes, cluster size: 512): MINIMACY >> Building romdisk, depth 2 >> - boot.mcy: 59 bytes What you need to understand is that the Minimacy firmware cannot itself read the files of the uefi disk. The firmware contains only the Minimacy compiler and the runtime written in pure C. The FAT32 library is an application written in the Minimacy language; the compiler cannot call them, it can only compile programs present in RAM. Things are different on a computer, because there Minimacy has access to the disk through the computer's OS and the ANSI functions, such as fopen(), fread(), etc. How, on the baremetal version, can the compiler compile the files present on the UEFI disk? The chosen solution is the following: when a fat32 partition is found, the “hardware” boot program (baremetal.uefi.boot.mcy) loads the *.mcy files present down to level 2 of the tree and turns them into a romdisk, that is, a large character string that will in turn be mounted as a disk in RAM: >> Building romdisk, depth 2 >> - boot.mcy: 59 bytes Then Minimacy launches the boot.mcy program: >> compiling 'boot' >> compiled in 0 ms >We need this! >] █ This time the fs() command returns more lines: >] fs() >Volumes: > Volume Access SectorSize NbSectors TotalSize > ------ ------ ---------- --------- --------- > romdisk2 readonly 80 1 80 > uefi0 writable 512 73.728 36M > romdisk1 readonly 692.386 1 676k > >Partitions: > Volume Access TotalSize Partition > ------ ------ ---------- --------- > romdisk2 readonly 80 MINIMACY:*.mcy > uefi0 writable 35M MINIMACY > romdisk1 readonly 676k NATIVE > >Mounts: > Id Volume Partition Access Mount Path Partition Path > -- ------ --------- ------ ---------- -------------- > 0 romdisk2 MINIMACY:*.mcy readonly [empty] [empty] > 1 uefi0 MINIMACY writable [empty] / > 2 romdisk1 NATIVE readonly [empty] [empty] You notice the new volume romdisk2, and a new partition: - MINIMACY:*.mcy: the partition that contains the *.mcy files found on the UEFI disk When a Minimacy application looks for a file, it goes through, in this order: romdisk2, uefi0, romdisk1 When the compiler looks for a file, it goes through, in this order: romdisk2, romdisk1, since it only knows romdisks. ##NATIVE romdisk As we saw earlier, the Minimacy firmware includes the contents of a number of *.mcy files that allow it to boot up until it is able to read a USB key or a hard disk in FAT32 format in order to find other resources there. These files are gathered in the NATIVE romdisk, defined by the file ./baremetal/uefi/uefi-native-romdisk.h This file is not present in the git archive. To be able to compile the Minimacy firmware you must first generate it. To generate it, you first define the files to integrate into it. They are defined in the following file: ./programs/romdisk/romdisk.native.uefi.txt By default you will find there: the bios, the baremetal file and the libraries of the rom/core directory. You will also find the boot.mcy file that will be used for startup. You can add the files you want there, including your application files. Remember that you indicate one file per line, with no space or tab at the beginning of the line, otherwise the line is ignored. You can use an alias, for example: >boot.mcy boot_release.mcy There is a tab between the two file names. In this case, the romdisk contains a boot.mcy file whose contents are those of boot_release.mcy. Then you call: >make romdisk The program displays the list of files integrated into the romdisk and the path of the resulting file: ../baremetal/uefi/uefi-native-romdisk.h It is now possible to recompile the Minimacy firmware. ##The hardware boot When Minimacy starts, it always compiles the same bios files (present in ./rom/bios) then launches the bios. Once the bios is launched, Minimacy launches the application. By default, on a computer it is the ./programs/boot.mcy program. On UEFI, it is the ./baremetal/baremetal.uefi.boot.mcy program. It is fairly short, you can read it: - It mounts the partitions of the UEFI disks at the root - It looks there for the *.mcy files and possibly creates a romdisk from them - It handles keyboard/mouse/touch-screen events in case the application enables the graphical interface via the uiStart() function Finally: - It launches the “boot.mcy” program.