{"id":43051410,"url":"https://github.com/chettrick/discobsd","last_synced_at":"2026-01-31T10:37:03.934Z","repository":{"id":64999209,"uuid":"340184008","full_name":"chettrick/discobsd","owner":"chettrick","description":"2.11BSD-based Unix-like OS for STM32 and PIC32 Microcontrollers","archived":false,"fork":false,"pushed_at":"2026-01-16T09:27:34.000Z","size":71312,"stargazers_count":231,"open_issues_count":6,"forks_count":22,"subscribers_count":11,"default_branch":"master","last_synced_at":"2026-01-16T23:37:51.592Z","etag":null,"topics":["211bsd","arm","bsd","c","cortex-m","discobsd","embedded","microcontroller","operating-system","pic32","stm32","unix"],"latest_commit_sha":null,"homepage":"http://www.DiscoBSD.org","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chettrick.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-18T21:37:22.000Z","updated_at":"2026-01-16T09:27:38.000Z","dependencies_parsed_at":"2023-02-19T04:31:14.759Z","dependency_job_id":"c87724e1-3dbe-4225-b030-34440e1c7e3c","html_url":"https://github.com/chettrick/discobsd","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/chettrick/discobsd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chettrick%2Fdiscobsd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chettrick%2Fdiscobsd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chettrick%2Fdiscobsd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chettrick%2Fdiscobsd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chettrick","download_url":"https://codeload.github.com/chettrick/discobsd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chettrick%2Fdiscobsd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28938788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["211bsd","arm","bsd","c","cortex-m","discobsd","embedded","microcontroller","operating-system","pic32","stm32","unix"],"created_at":"2026-01-31T10:37:03.521Z","updated_at":"2026-01-31T10:37:03.922Z","avatar_url":"https://github.com/chettrick.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"DiscoBSD\n========\n\n2.11BSD-based UNIX-like Operating System for STM32 and PIC32 Microcontrollers\n-----------------------------------------------------------------------------\n\nDiscoBSD is a 2.11BSD-based UNIX-like operating system for microcontrollers,\nwith a focus on high portability to memory constrained devices without a\nmemory management unit.\n\nThe current and sixth official release of DiscoBSD is [DiscoBSD 2.5][1],\nreleased on August 11, 2025.\n\nThis microcontroller-focused operating system is an independent continuation\nof RetroBSD, a 2.11BSD-based OS targeting the MIPS-based PIC32MX7.\nDiscoBSD is multi-platform, as it also supports Arm Cortex-M4 STM32F4 devices.\n\nSource code to the system is freely available under a BSD-like license.\n\nHistory\n-------\n\n[DiscoBSD][2] began as an undergraduate [Directed Study][3] in the winter of\n2020 at the University of Victoria, Canada, as a case study of [RetroBSD][4]\nto port the operating system to the Arm Cortex-M4 architecture, and to enable\nportability in the hosting environment and target architectures and platforms.\nThe paper [*Porting the Unix Kernel*][5] details this initial porting effort.\n\nWork on DiscoBSD has progressed in earnest since the completion of the\nDirected Study, with the DiscoBSD/stm32 port booting multi-user in\nAugust 2022. The system is quite usable on supported development boards.\n\nAnd work continues...\n\n[1]: https://github.com/chettrick/discobsd/releases/tag/DISCOBSD_2_5\n[2]: http://DiscoBSD.org\n[3]: https://github.com/chettrick/CSC490\n[4]: https://RetroBSD.org\n[5]: https://github.com/chettrick/CSC490/raw/master/project_outputs/Porting_the_Unix_Kernel-CSC490-Christopher_Hettrick.pdf\n\nDiscoBSD Resource Requirements\n------------------------------\n\nA basic, minimal system uses 128 Kbytes of flash and 128 Kbytes of RAM.\n\nThe kernel is loaded into the flash and only uses 32 Kbytes of RAM.\nUser programs each use the remaining 96 Kbytes of RAM, via swapping.\nDevices with more RAM can be used to run larger user programs.\n\nAn SD card, at least 512 Mbytes in size, is required for the root file system.\n\nInstalling and Running\n----------------------\n\nInstallation consists of loading the kernel into the microcontroller's flash\nmemory, and imaging the SD card with the file `sdcard.img`.\n\nOn Windows host systems use a disk imaging utility such as [Rufus][6].\n\nOn Unix-like host systems with `dd` run:\n\n    $ dd bs=1M if=sdcard.img of=/path/to/SD/card\n\nThe board-specific kernel `unix` must be loaded into the MCU's flash memory.\nFormats are ELF `unix.elf`, binary `unix.bin`, and Intel HEX `unix.hex`.\n\nFlashing a DiscoBSD/stm32 kernel firmware into target board's flash memory:\n\nOn Windows host systems use [STM32CubeProgrammer][7] for flash programming.\n\nOn Unix-like host systems use `st-flash` from the [stlink-org project][8] to\nload the binary-formatted kernel `unix.bin` into flash memory at 0x08000000.\n\n    $ st-flash --reset write unix.bin 0x08000000\n\nFlashing a DiscoBSD/pic32 kernel firmware into target board's flash memory:\n\nOn all supported host systems use [pic32prog][9] for flash programming.\n\n    $ pic32prog unix.hex\n\nCommunication with the DiscoBSD console requires a serial port. A USB to TTL\ndevice or the built-in VCP USB serial port on development boards can be used.\n\n    $ cu -l /dev/cuaU0 -s 115200\n\nDepending on the host system, other serial port utilities such as `screen`,\n`minicom`, `putty`, or `teraterm` may be used.\n\nLog in to DiscoBSD with user `root` and a blank password.\nShutdown DiscoBSD with the `halt`, `shutdown`, or `reboot` commands.\n\nManual pages on DiscoBSD are available through the `man` command.\n\n[6]: https://github.com/pbatard/rufus\n[7]: https://www.st.com/en/development-tools/stm32cubeprog.html\n[8]: https://github.com/stlink-org/stlink\n[9]: https://github.com/majenkotech/pic32prog-autotools\n\nBuilding\n--------\n\nDiscoBSD is cross-built on UNIX-like host operating systems.\n\nCurrently supported host operating systems: OpenBSD, Linux, FreeBSD.\n\nInstructions to configure an OpenBSD host development environment for\nArm and MIPS targets is [available here][10].\n\nThe build system fully supports both BSD make and GNU make.\n\nFrom the source tree root, run:\n\n    $ make build\n\nor just:\n\n    $ make\n\nwhich builds `sys/arch/stm32/compile/${BOARD}/unix` ELF-formatted kernels\nand builds and populates a whole file system userland in `DESTDIR`.\n\nRunning:\n\n    $ make distribution\n\nwill build everything from a `make build`, plus generate a file system\nimage in the file `distrib/stm32/sdcard.img` for imaging to an SD card.\n\nDiscoBSD/stm32 is the default port, but DiscoBSD/pic32 may be built via:\n\n    $ make clean\n    $ make MACHINE=pic32 MACHINE_ARCH=mips distribution\n\nto generate a file system image in the file `distrib/pic32/sdcard.img`\nfor imaging to an SD card, `sys/arch/pic32/compile/${BOARD}/unix`\nELF-formatted kernels, and `sys/arch/pic32/compile/${BOARD}/unix.hex`\nIntel HEX-formatted kernels.\n\nPut the generated file system image `sdcard.img` onto an SD card.\n\nThe `make` target `installfs` uses the `dd` utility to image the SD card\nattached to the host operating system at `SDCARD`, such as `/dev/rsdXc` or\n`/dev/sdX` or `/dev/rdiskX`, replacing `X` with the actual drive number or\nletter, as the case may be.\n\nFor example, imaging an SD card attached at `sd2` on an OpenBSD host\noperating system through the raw i/o device:\n\n    $ make SDCARD=/dev/rsd2c installfs\n\nNote that using BSD make on a FreeBSD host requires the system makefile\ninclude directory to be specified on the command line or via the\n`MAKESYSPATH` environment variable. For example:\n\n    $ make -m /usr/share/mk\n\nor\n\n    $ MAKESYSPATH=/usr/share/mk\n    $ export MAKESYSPATH\n\n    $ make\n\n[10]: tools/openbsd/README.md\n\nBuilding a DiscoBSD Release\n---------------------------\n\nA DiscoBSD release consists of, for each supported architecture:\n\n* a file system image that contains the full base system\n* kernels, in various file formats, for each supported development board\n* the README.md file for the architecture\n* this README.md file\n\nBefore making a release, first create a distribution in `DESTDIR`\nwith kernels in `sys/arch/${MACHINE}/compile/${BOARD}` by following\nthe steps in [Building](#building):\n\n    $ make distribution\n\nOnce all the distribution source objects exist then a release can\nbe created; one release for each architecture.\n\nA DiscoBSD/stm32 release, as the default architecture, is created by:\n\n    $ make release\n\nA DiscoBSD/pic32 release is created by:\n\n    $ make MACHINE=pic32 MACHINE_ARCH=mips release\n\nA DiscoBSD release is created from an already-populated `DESTDIR`,\nand it is placed in `RELEASEDIR`, `distrib/obj/releasedir` by default.\n\n[Releases are available][11], for each architecture, as a `.tar.gz`\ngzip-compressed tar archive and as a `.zip` zip-compressed archive.\n\n[11]: https://github.com/chettrick/discobsd/releases\n\nDebugging\n---------\n\nDiscoBSD/stm32 is debugged through OpenOCD and GDB. The `make` targets for\ndebugging are `ocd` and `gdb-ocd`.\n\nDebug a particular development board via:\n\n    $ make BOARD=F412GDISCO ocd\n\nin one terminal, and:\n\n    $ make BOARD=F412GDISCO gdb-ocd\n\nin another terminal.\n\nAdditional Information\n----------------------\n\nPort-specific information can be found in `distrib/${MACHINE}/README.md`\nfor [DiscoBSD/stm32][12] and [DiscoBSD/pic32][13].\n\n[12]: distrib/stm32/README.md\n[13]: distrib/pic32/README.md\n\nReferences and Resources\n------------------------\n\n* The [RetroBSD wiki][14] has a wealth of PIC32 architecture information.\n* [The Design and Implementation of the 4.3BSD UNIX Operating System][15].\n* [Lions' Commentary on UNIX 6th Edition][16] and [recreations of it][17].\n* [Advanced Programming in the UNIX Environment][18] 1st Edition.\n* [The Design of the UNIX Operating System][19].\n* [OpenBSD's curated list of books][20] relevant to BSD Operating Systems.\n* The paper [*Porting the Unix Kernel*][5] details DiscoBSD's inception.\n* The Unix Heritage Society's [Unix Archive][21] and [Source Tree][22].\n* STMicroelectronics [Reference Manual][23] and [Programming Manual][24].\n* [The Definitive Guide to ARM Cortex-M3 and Cortex-M4 Processors][25].\n* [ARMv7-M Architecture Reference Manual][26].\n\n[14]: https://github.com/RetroBSD/retrobsd/wiki\n[15]: https://archive.org/details/designimplementa0000unse\n[16]: https://www.peerllc.com/peer-to-peer-books/lions-commentary-on-unix/\n[17]: http://www.lemis.com/grog/Documentation/Lions/\n[18]: http://www.kohala.com/start/apue.html\n[19]: https://archive.org/details/DesignUNIXOperatingSystem\n[20]: https://www.openbsd.org/books.html\n[21]: https://www.tuhs.org/Archive/Distributions/UCB/\n[22]: https://www.tuhs.org/cgi-bin/utree.pl\n[23]: https://www.st.com/resource/en/reference_manual/dm00031020-stm32f405-415-stm32f407-417-stm32f427-437-and-stm32f429-439-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf\n[24]: https://www.st.com/resource/en/programming_manual/pm0214-stm32-cortexm4-mcus-and-mpus-programming-manual-stmicroelectronics.pdf\n[25]: https://booksite.elsevier.com/9780124080829/\n[26]: https://developer.arm.com/documentation/ddi0403\n\nSource Tree Roadmap\n-------------------\n\n    bin         User utilities in both single and multi-user environments.\n    distrib     System distributions and releases.\n    etc         Templates for system configuration files and scripts in /etc.\n    games       Useful and semi-frivolous programs. The important stuff.\n    include     Standard C include files.\n    lib         System libraries.\n    libexec     System daemons and utilities (executed by other programs).\n    sbin        System administration utilities in both single and\n                multi-user environments.\n    share       Architecture-independent shared resource data files.\n    sys         Kernel sources.\n    tools       Build tools and simulators.\n    usr.bin     User utilities in multi-user environments.\n    usr.sbin    System administration utilities in multi-user environments.\n\nDiscoBSD/stm32 dmesg\n--------------------\n\n```\nDiscoBSD 2.5 (F412GDISCO) #1 651: Mon Aug 11 11:11:11 MDT 2025\n     chris@stm32.discobsd.org:/sys/arch/stm32/compile/F412GDISCO\ncpu: STM32F412xE/G rev 1/C, 100 MHz, bus 50 MHz\noscillator: phase-locked loop, clock source: high speed external\nuart2: pins tx=PA2/rx=PA3, af=7, console\nsd0: port sdio0\nsd0: type SDHC, size 31178752 kbytes\nsd0a: partition type b7, sector 2, size 204800 kbytes\nsd0b: partition type b8, sector 409602, size 2048 kbytes\nsd0c: partition type b7, sector 413698, size 204800 kbytes\nphys mem  = 256 kbytes\nuser mem  = 96 kbytes\nroot dev  = (0,1)\nswap dev  = (0,2)\nroot size = 204800 kbytes\nswap size = 2048 kbytes\nAutomatic boot in progress: starting file system checks.\n/dev/sd0a: 1474 files, 12214 used, 191785 free\n/dev/sd0c: 3 files, 3 used, 203996 free\nUpdating motd... done\nStarting daemons: update cron \nMon Aug 11 11:11:11 MDT 2025\n\n\n2.11 BSD UNIX (name.my.domain) (console)\n\nlogin: root\nPassword:\nDiscoBSD 2.5 (F412GDISCO) #1 651: Mon Aug 11 11:11:11 MDT 2025\n\nWelcome to DiscoBSD.\n\nerase ^?, kill ^U, intr ^C\n# \n```\n\nDiscoBSD/pic32 dmesg\n--------------------\n\n```\nDiscoBSD 2.5 (MAX32) #1 651: Mon Aug 11 11:11:11 MDT 2025\n     chris@pic32.discobsd.org:/sys/arch/pic32/compile/MAX32\ncpu: 795F512L 80 MHz, bus 80 MHz\noscillator: HS crystal, PLL div 1:2 mult x20\nspi2: pins sdi=RG7/sdo=RG8/sck=RG6\nuart1: pins rx=RF2/tx=RF8, interrupts 26/27/28, console\nuart2: pins rx=RF4/tx=RF5, interrupts 40/41/42\nuart4: pins rx=RD14/tx=RD15, interrupts 67/68/69\nsd0: port spi2, pin cs=RC14\ngpio0: portA, pins ii---ii-iiiioiii\ngpio1: portB, pins iiiiiiiiiiiiiiii\ngpio2: portC, pins i-ii-------iiii-\ngpio3: portD, pins --iiiiiiiiiiiiii\ngpio4: portE, pins ------iiiiiiiiii\ngpio5: portF, pins --ii--------i-ii\ngpio6: portG, pins iiii--i-----iiii\nadc: 15 channels\npwm: 5 channels\nsd0: type I, size 524288 kbytes, speed 10 Mbit/sec\nsd0a: partition type b7, sector 2, size 204800 kbytes\nsd0b: partition type b8, sector 409602, size 2048 kbytes\nsd0c: partition type b7, sector 413698, size 204800 kbytes\nphys mem  = 128 kbytes\nuser mem  = 96 kbytes\nroot dev  = (0,1)\nswap dev  = (0,2)\nroot size = 204800 kbytes\nswap size = 2048 kbytes\nAutomatic boot in progress: starting file system checks.\n/dev/sd0a: 1468 files, 13586 used, 190413 free\n/dev/sd0c: 3 files, 3 used, 203996 free\nUpdating motd... done\nStarting daemons: update cron \nMon Aug 11 11:11:11 MDT 2025\n\n\n2.11 BSD UNIX (name.my.domain) (console)\n\nlogin: root\nPassword:\nDiscoBSD 2.5 (MAX32) #1 651: Mon Aug 11 11:11:11 MDT 2025\n\nWelcome to DiscoBSD.\n\nerase ^?, kill ^U, intr ^C\n# \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchettrick%2Fdiscobsd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchettrick%2Fdiscobsd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchettrick%2Fdiscobsd/lists"}