{"id":18729044,"url":"https://github.com/lichtso/unikernelexperiments","last_synced_at":"2025-04-12T16:33:29.702Z","repository":{"id":151645431,"uuid":"62720631","full_name":"Lichtso/UnikernelExperiments","owner":"Lichtso","description":"TCP/IPv6-enabled Pine64+ bootloader","archived":false,"fork":false,"pushed_at":"2017-03-10T15:27:40.000Z","size":130,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T11:21:12.459Z","etag":null,"topics":["bootloader","ethernet","pine64","tcp","uart","unikernel"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lichtso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-06T12:51:38.000Z","updated_at":"2024-06-17T08:38:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"c600c8d4-821d-48c0-8779-54ebc0da8d57","html_url":"https://github.com/Lichtso/UnikernelExperiments","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lichtso%2FUnikernelExperiments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lichtso%2FUnikernelExperiments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lichtso%2FUnikernelExperiments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lichtso%2FUnikernelExperiments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lichtso","download_url":"https://codeload.github.com/Lichtso/UnikernelExperiments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248596731,"owners_count":21130754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootloader","ethernet","pine64","tcp","uart","unikernel"],"created_at":"2024-11-07T14:25:29.095Z","updated_at":"2025-04-12T16:33:29.695Z","avatar_url":"https://github.com/Lichtso.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UnikernelExperiments\nTCP/IPv6-enabled [Pine64+](https://www.pine64.org/?product=pine-a64-board-2gb) bootloader\n\nThis project provides you with the toolchain and resources needed to start developing your own unikernel.\nIt is completely written from scratch and is thus still well structured without legacy code.\n\n\n## Getting started\n\nYou will need:\n- Make\n- LLVM 3.9 or higher: [Clang](http://clang.llvm.org/get_started.html), [LLD](http://lld.llvm.org), llvm-objdump (optional)\n- [Rust](https://www.rust-lang.org/en-US/)\n- Pine64+ with 2GB (other versions are untested)\n- Mirco-SD-card to store the bootloader\n- Micro-USB-cable for power supply\n- RJ45-cable for data transfer\n- UART for debugging (optional)\n\n```bash\nmake build/Bootloader.bin\ndd if=build/Bootloader.bin of=/dev/[Mirco-SD-Card]\ntools/screen /dev/[UART-USB]\nping6 FE80::34C9:E3FF:FEF1:B805%[Interface]\nmake build/Kernel.bin\nnc FE80::34C9:E3FF:FEF1:B805%[Interface] 1337 \u003c build/Kernel.bin\n```\n\n\n## Example Use Cases\n\n- (Self)-Education: Learn or teach how low level software works\n- Experimental development: Develop your own unikernel easily\n- Internet of Things: Leave behind all the bloatware\n- Security: Less code -\u003e less breaches\n\n\n## State of Affairs / Features\n\n- Hardware Driver\n    - UART ✓\n    - RSB ✓\n    - AXP803 ✓\n    - DRAM\n        - 2GB ✓\n        - Auto size detection\n    - Ethernet ✓\n    - High Speed Timer ✓\n    - Timer\n    - Real Time Clock\n    - Interrupt Controller\n    - SD-Card\n    - Thermal Sensors\n    - DVFS\n\n- Software Driver\n    - 64 Bit: ARMv8 / ARM64 / AArch64 ✓\n    - Floating point unit ✓\n    - Caches ✓\n    - MMU\n    - Interrupt Handling\n    - Multi threading\n    - IPv4 / ICMPv4\n    - IPv6 / ICMPv6, implemented features:\n        - Echo ✓\n        - Neighbor solicitation and advertisement ✓\n    - UDP ✓\n    - TCP\n        - IPv4\n        - IPv6 ✓\n        - Receiving payload ✓\n        - Sending payload\n        - Connect / Listen / Close ✓\n        - Sequence number overflow\n        - Receive and transmit ring buffer\n        - Timestamps\n        - Selective acknowledgment\n        - Initial sequence numbers\n        - Correct timings\n        - Multiple connections\n\n\n## Communication Interfaces\n\nUART is a nice and easy interface for debugging and as a interactive console.\nBut it is too slow to upload large binaries.\nThe firmware comes with a USB-OTG boot option but:\n- The protocol is complicated and badly documented\n- Ethernet can be faster: Up to 1 GBit/s instead of 0.48 GBits/s of USB2\n- RJ45-cables are more common than USB-OTG-TypeA-cables\n- You probably want to connect the board to a network anyway and thus don't need a extra USB connection only for booting\n\n\n## References\n\n### Wiki\n- http://linux-sunxi.org/Arm64\n- http://linux-sunxi.org/Pine64\n- http://linux-sunxi.org/BROM\n- http://linux-sunxi.org/FEL/USBBoot\n- http://linux-sunxi.org/Reduced_Serial_Bus\n- https://sourceware.org/binutils/docs/ld/Scripts.html\n- https://sourceware.org/binutils/docs/as/ARM-Directives.html\n- http://www.heyrick.co.uk/armwiki/The_Status_register\n- http://downloads.ti.com/docs/esd/SPNU118N/Content/SPNU118N_HTML/assembler_directives.html\n- https://developer.arm.com/docs/den0024/latest/12-the-memory-management-unit/124-translation-tables-in-armv8-a/1243-cache-configuration\n- https://en.wikipedia.org/wiki/Cache\n\n### Tutorials\n- https://balau82.wordpress.com/2010/04/12/booting-linux-with-u-boot-on-qemu-arm/\n- https://balau82.wordpress.com/2010/02/28/hello-world-for-bare-metal-arm-using-qemu/\n- https://singpolyma.net/2012/01/writing-a-simple-os-kernel-part-1/\n\n### Code\n- https://github.com/allwinner-zh/bootloader\n- https://github.com/linux-sunxi/sunxi-tools/blob/master/uart0-helloworld-sdboot.c\n- https://github.com/apritzel/linux/commits/a64-wip\n- https://github.com/longsleep/linux-pine64/tree/pine64-hacks-2.0-experimental\n- https://github.com/torvalds/linux/blob/master/arch/arm64/kernel/setup.c\n- https://github.com/torvalds/linux/blob/master/arch/arm64/mm/cache.S\n- https://github.com/torvalds/linux/blob/master/arch/arm64/mm/proc.S\n\n### Docs\n- http://infocenter.arm.com/help/topic/com.arm.doc.den0024a/index.html\n- http://dl.linux-sunxi.org/A64/A64_Datasheet_V1.1.pdf\n- http://linux-sunxi.org/images/4/4b/Allwinner_H3_Datasheet_V1.2.pdf\n- http://www.cl.cam.ac.uk/research/srg/han/ACS-P35/zynq/arm_gic_architecture_specification.pdf\n- http://infocenter.arm.com/help/topic/com.arm.doc.ddi0471a/DDI0471A_gic400_r0p0_trm.pdf\n- http://files.pine64.org/doc/datasheet/pine64/AXP803_Datasheet_V1.0.pdf\n- http://download3.dvd-driver.cz/realtek/datasheets/pdf/rtl8211e(g)-vb(vl)-cg_datasheet_1.6.pdf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flichtso%2Funikernelexperiments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flichtso%2Funikernelexperiments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flichtso%2Funikernelexperiments/lists"}