-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathREADME.html
More file actions
493 lines (493 loc) · 29 KB
/
README.html
File metadata and controls
493 lines (493 loc) · 29 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
<h1><b>MuntsOS</b> Embedded Linux</h1>
<p><b>MuntsOS</b> is a <i>ferociously</i> reduced Linux distribution for
<b>embedded systems</b>. It runs on several microcomputer boards, including all
64-bit <a href="https://www.raspberrypi.com">Raspberry Pi</a> models, providing
a turnkey RAM resident Linux operating system. With <b>MuntsOS</b> installed, a
small and low cost Linux microcomputer becomes a <i>Linux microcontroller</i>,
and can be integrated into an embedded system just like a single chip
microcontroller but coming with a much, much richer development ecosystem.</p>
<p>Other embedded system Linux distributions such as <a href=
"https://buildroot.org">Buildroot</a> or <a href=
"https://www.yoctoproject.org">Yocto Linux</a> are <i>very</i> cumbersome and
have <i>very</i> steep learning curves. If you are building a test fixture or
process controller or almost any other embedded system that contains a
Raspberry Pi board, <b>MuntsOS</b> offers a very high productivity development
environment and a very easy to deploy target operating system.</p>
<p><b>MuntsOS</b> always includes the shared library
<b><tt>libsimpleio.so</tt></b> from the <a href=
"https://github.com/pmunts/libsimpleio">Linux Simple I/O Library</a>, which
facilitates building embedded system programs for <b>MuntsOS</b> target
computers using Ada, C, C++, Fortran, Go, Free Pascal, Java, Modula-2, .Net,
and Python3 programming languages.</p>
<p>Shared libraries for <a href="https://libgpiod.readthedocs.io">libgpiod</a>
are available for <b>MuntsOS</b> target computers by installing the
<b><tt>libgpiod1</tt></b> or <b><tt>libgpiod2</tt></b> extension packages.</p>
<h2>News</h2>
<ul>
<li>
<p>31 December 2025 -- As promised, I have ended my Debian 12 (Bookworm)
package repository. Added <a href=
"https://repo.munts.com/muntsos/doc/AppNote25-RabbitMQ-Client-Programs.pdf">Application
Note #25</a>, about running <a href="https://www.rabbitmq.com">RabbitMQ
Enterprise Message Broker</a> client programs on <b>MuntsOS</b> target
computers.</p>
</li>
<li>
<p>6 January 2026 -- Upgraded the Raspberry Pi kernel to 6.12.63. Added
extension package <b><tt>libpaho-mqtt3</tt></b>. Added an Ada binding to Paho
MQTT C to the Linux Simple I/O Library.</p>
</li>
<li>
<p>14 January 2026 -- Upgraded the .Net Runtime to 10.0.2.</p>
</li>
<li>
<p>24 January 2026 -- I abandoned support for Java on <b>MuntsOS</b> in 2020
after Oracle ended support for <a href=
"https://www.oracle.com/java/technologies/javase-embedded/javase-embedded.html">
Java SE Embedded</a> in 2019. I have now added a new <i>experimental</i> Java
Runtime extension package for <b>MuntsOS</b> AArch64 targets, which is built
with <b><tt>jlink</tt></b> from the OpenJDK 25.0.2 AArch64 release. The Java
bindings in the Linux Simple I/O Library are incomplete and remain in the
<a href="https://github.com/pmunts/libsimpleio/tree/master/attic">attic</a>. I
will be working on those bindings for awhile to see if supporting Java will be
worthwhile.</p>
</li>
<li>
<p>25 January 2026 -- Upgraded the Raspberry Pi kernel to 6.12.67. Resurrected
<b><tt>mdev-helper-gpio</tt></b> to fixup permissions for the deprecated GPIO
<b><tt>sysfs</tt></b> API. Some of the servers in the
<b><tt>gpio-server</tt></b> extension package still use the GPIO
<b><tt>sysfs</tt></b> API.</p>
</li>
<li>
<p>28 January 2026 -- Reinstatement of <a href="https://www.java.com">Java</a>
runtime support (built from <a href="https://openjdk.org">OpenJDK</a> 25.0.2)
for <b>MuntsOS</b> AArch64 targets is now complete, namely the
<b><tt>java</tt></b> extension package, some client program program examples
for the <b><tt>gpio-server</tt></b> extension package, and <a href=
"https://repo.munts.com/muntsos/doc/AppNote26-Flash-LED-Java.pdf">Application
Note #26</a> (formerly Application Note #8). While the <b>MuntsOS</b> effort is
done, much work remains to finish the Java binding to the Linux Simple I/O
Library.</p>
</li>
<li>
<p>25 March 2026 -- Upgraded the Raspberry Pi kernel to 6.12.77. Added some
code to <b><tt>/etc/rc</tt></b> to tweak permissions to
<b><tt>/sys/class/pwm/pwmchip0</tt></b> at system startup time. Reworked how
the network startup scripts <b><tt>netstart.script</tt></b> and
<b><tt>udhcpc.script</tt></b> call optional network hook scripts
(<b><tt>/usr/local/etc/nethook.ifname</tt></b>). Each network hook script is
now specific to a network interface, now called by either
<b><tt>netstart.script</tt></b> or <b><tt>udhcpc.script</tt></b> (depending on
whether the interface is configured with a static or dynamic IP address), and
now run in the background. The network hook changes follow from an
investigation into cheaper <a href=
"https://en.wikipedia.org/wiki/Dynamic_DNS">Dynamic Domain Name Service</a>
provider alternatives. I noticed that some providers allow IP address update
via <b><tt>wget</tt></b> or <b><tt>curl</tt></b> web page fetches, which can be
easily done from a network hook script.</p>
</li>
</ul>
<h2>Quick Setup Instructions for the Impatient</h2>
<p>Instructions for installing the <b>MuntsOS</b> cross-toolchain development
environment onto a development <b>host computer</b> are found in <a href=
"https://repo.munts.com/muntsos/doc/AppNote1-Setup-Debian.pdf">Application Note
#1</a>, <a href=
"https://repo.munts.com/muntsos/doc/AppNote2-Setup-RPM.pdf">Application Note
#2</a>, or <a href=
"https://repo.munts.com/muntsos/doc/AppNote24-Setup-Win64.pdf">Application Note
#24</a>. Or just download and run one of the following quick setup scripts:</p>
<a href=
"https://repo.munts.com/muntsos/scripts/setup-debian">setup-debian</a><br>
<a href=
"https://repo.munts.com/muntsos/scripts/setup-fedora">setup-fedora</a><br>
<a href="https://repo.munts.com/muntsos/scripts/setup-rhel">setup-rhel<br></a>
<a href=
"https://repo.munts.com/muntsos/scripts/setup-win64.bat">setup-win64.bat</a>
<p>Instructions for installing <b>MuntsOS</b> to a <b>target computer</b> are
found in <a href=
"https://repo.munts.com/muntsos/doc/AppNote3-Installation-from-Linux.pdf">Application
Note #3</a> and <a href=
"https://repo.munts.com/muntsos/doc/AppNote15-Installation-from-Windows.pdf">Application
Note #15</a>.</p>
<h2>Documentation</h2>
<p>The documentation for <b>MuntsOS</b> (mostly application notes) is available
online at:</p>
<p><a href=
"https://repo.munts.com/muntsos/doc">https://repo.munts.com/muntsos/doc</a></p>
<h2>Embedded Linux Distribution in a Kernel</h2>
<p><b>MuntsOS</b> is a stripped down Linux distribution that includes a small
compressed root file system within the kernel image binary itself. At boot time
the root file system is unpacked into RAM and thereafter the system runs
entirely in RAM. After <b>MuntsOS</b> has finished booting, it unmounts the
boot media, so you don't have to worry about an orderly shutdown. Just power
off the microcomputer board whenever you want to.</p>
<p>Each kernel release tarball contains a kernel image file
(<b><tt>.img</tt></b>), which may be common to several different microcomputer
boards, and one or more <a href=
"https://elinux.org/Device_Tree_Reference">device tree</a> files
(<b><tt>.dtb</tt></b>) that are specific to particular microcomputer boards.
Some kernel release tarballs also contain one or more device tree overlay files
(<b><tt>.dtbo</tt></b>) that can make small changes to the device tree at boot
time.</p>
<p>Prebuilt <b>MuntsOS</b> kernel release tarballs are available at:</p>
<p><a href=
"https://repo.munts.com/muntsos/kernels">https://repo.munts.com/muntsos/kernels</a></p>
<h2>Extensions</h2>
<p>The <b>MuntsOS</b> root file system can be <i>extended</i> at boot time
using any of three mechanisms:</p>
<p>First, if <b><tt>/boot/tarballs</tt></b> exists, any <b><tt>gzip</tt></b>'ed
tarball files (<b><tt>.tgz</tt></b>) in it will be extracted on top of the root
file system. Typically you would use this mechanism for customized
<b><tt>/etc/passwd</tt></b>, <b><tt>.ssh/authorized_keys</tt></b>, and similiar
system configuration files.</p>
<p>Secondly, if <b><tt>/boot/extensions</tt></b> exists, any Debian package
files (<b><tt>.deb</tt></b>) in it will be installed into the root file system.
Note that packages from the <a href="https://www.debian.org">Debian</a> project
will probably not work; they must be built specifically for <b>MuntsOS</b>. The
startup script that installs <b><tt>.deb</tt></b> packages from
<b><tt>/boot/extensions</tt></b> also installs <b><tt>.nupkg</tt></b> and
<b><tt>.rpm</tt></b> packages as well as self-contained executable extension
programs (<i>e.g.</i> <b><tt>remoteio_server-aarch64</tt></b>).</p>
<p>Thirdly, the system startup script <b><tt>/etc/rc</tt></b> can be configured
via a kernel command line option to search for a subdirectory called
<b><tt>autoexec.d</tt></b> in various places, such as SD card, USB flash drive,
USB CD-ROM or NFS mount. If an <b><tt>autoexec.d</tt></b> subdirectory is
found, each executable program or script in it will be executed when the system
boots.</p>
<p>The idea is to build a <b>MuntsOS</b> kernel (which takes a long time) once
and install it to the target platform. Then application specific software can
be built after the fact and installed as tarball files in
<b><tt>/boot/tarballs</tt></b>; Debian, RPM, and NuGet package files or
executable extension programs in <b><tt>/boot/extensions</tt></b>; or
executable programs and scripts in <b><tt>/boot/autoexec.d</tt></b>.</p>
<p>Prebuilt <b>MuntsOS</b> extension packages are available at:</p>
<p><a href=
"https://repo.munts.com/muntsos/extensions">https://repo.munts.com/muntsos/extensions</a></p>
<h2>Thin Servers</h2>
<h3>Boot Files + Kernel Files + Extensions = Thin Server</h3>
<p>The <i>Thin Server</i> is a system design pattern that is little more than a
network interface for a single I/O device. Ideally, a Thin Server will be built
from a cheap and ubiquitous network microcomputer like the Raspberry Pi. The
software must be easy to install from a user's PC or Mac without requiring any
special programming tools. It must be able to run headless, administered via
the network. It must be able to survive without orderly shutdowns, and must not
write much to flash media. It must provide a network based API (Application
Programming Interface) using HTTP as a lowest common denominator.</p>
<p><b>MuntsOS</b>, with its operating system running entirely from RAM, serves
well for the Thin Server, and the two concepts have evolved together over the
past few years. The simplest way to use <b>MuntsOS</b> is to download one of
the prebuilt Thin Server <b><tt>.zip</tt></b> files and extract it to a freshly
formatted FAT32 SD card. You can then modify
<b><tt>autoexec.d/00-wlan-init</tt></b> on the SD card to pre-configure it for
your wireless network environment, if desired, before inserting it in the
target board. After booting <b>MuntsOS</b>, log in from the console or via SSH
(user "<b><tt>root</tt></b>", password "<b><tt>default</tt></b>") and run
<b><tt>sysconfig</tt></b> to perform more system configuration.</p>
<p><i>Note: Some platforms require the <a href=
"https://en.wikipedia.org/wiki/Boot_flag">boot flag</a> to be set on the FAT32
boot partition on the SD card or on-board eMMC. The ROM boot loader in the CPU
will ignore any partitions that are not marked as bootable.</i></p>
<b>MuntsOS</b> Application Notes <a href=
"https://repo.munts.com/muntsos/doc/AppNote3-Installation-from-Linux.pdf">3</a>
and <a href=
"https://repo.munts.com/muntsos/doc/AppNote15-Installation-from-Windows.pdf">15</a>
contain more detailed instructions about how to install a <b>MuntsOS</b> Thin
Server.
<p>Prebuilt <b>MuntsOS</b> Thin Servers are at available at:</p>
<p><a href=
"https://repo.munts.com/muntsos/thinservers">https://repo.munts.com/muntsos/thinservers</a></p>
<h2>Boards</h2>
<h3>BeaglePlay</h3>
<p>The <a href="https://www.beagleboard.org/boards/beagleplay">BeaglePlay</a>
is a small Linux microcomputer board with industry standard interfaces for
add-on I/O modules (a <a href="https://www.mikroe.com/mikrobus">mikroBUS</a>
socket, a <a href="https://www.sparkfun.com/qwiic">QWIIC</a> socket, and a
<a href="https://wiki.seeedstudio.com/Grove_System">Grove</a> socket) instead
of a general purpose expansion header. It has a Texas Instruments AM6254 ARMv8
Cortex-A53 quad core CPU and comes with 2 GB of RAM. The BeaglePlay has one
USB-A receptacle for peripheral devices and one USB-C receptacle for power and
tethering. It has a 10/100/1000BASE-T wired Ethernet interface, a <a href=
"https://www.analog.com/en/resources/technical-articles/the-new-10base-t1l-standard.html">
10BASE-T1L</a> single pair Ethernet interface (intended for a factory
automation network and worthless for any other purpose), and a <a href=
"https://www.ti.com/product/CC1352P">CC1352P7</a> wireless microcontroller
capable of supporting a wide variety of radio networks. For more information
read the target platform notes in <a href=
"https://repo.munts.com/muntsos/doc/AppNote19-BeaglePlay.pdf">Application Note
#19</a>.</p>
<p>The BeaglePlay has a couple of serious design defects: The AM6254 CPU
hardware watchdog timers are unusable and the <a href=
"https://www.ti.com/product/ADC102S051">ADC102S051</a> A/D converter has only
10 bit resolution and lacks a Linux kernel driver. Furthermore, the
manufacturer <a href="https://github.com/beagleboard/linux">kernel source
repository</a> does not often pull changes from the corresponding stable or
longterm kernel trees and therefore lacks many upstream changes.</p>
<h5>USB Gadgets</h5>
<p>You will need to edit <b><tt>/boot/config.txt</tt></b> to enable USB Gadget
mode. Change the <b><tt>OPTIONS</tt></b> word to <b><tt>0x172C</tt></b> for a
USB HID gadget, <b><tt>0x072E</tt></b> for a USB Ethernet gadget, or
<b><tt>0x03AC</tt></b> for a USB serial port gadget. See <a href=
"https://repo.munts.com/muntsos/doc/AppNote10-OPTIONS.pdf">Application Note
#10</a> for more information about the <b><tt>OPTIONS</tt></b> word.</p>
<h3>Orange Pi Zero 2W</h3>
<p>The <a href=
"http://www.orangepi.org/orangepiwiki/index.php/Orange_Pi_Zero_2W">Orange Pi
Zero 2W</a> is a small Linux microcomputer with a form factor very similiar to
the <a href=
"https://www.raspberrypi.com/products/raspberry-pi-zero-2-w">Raspberry Pi Zero
2 W</a>, making it ideal for embedded system projects. It has a 1500 MHz
Allwinner H618 ARMv8 Cortex-A53 quad-core CPU and comes with 1 to 4 GB of RAM
and on-board Bluetooth and WiFi radios. It is available for sale on Amazon for
$21.99 (1 GB RAM) to $33.99 (4 GB RAM). See <a href=
"https://repo.munts.com/muntsos/doc/AppNote20-OrangePiZero2W.pdf">Application
Note #20</a> for more information.</p>
<p>The much larger RAM is a big advantage and I have been able to purchase as
many as I want without limits when the Raspberry Pi Zero 2 W has been
unavailable. Unfortunately, the manufacturer <a href=
"https://github.com/orangepi-xunlong/linux-orangepi/tree/orange-pi-6.1-sun50iw9">
kernel source repository</a> has not been maintained and is currently frozen at
6.1.31.</p>
<h5>USB Gadgets</h5>
<p>You will need to edit <b><tt>/boot/config.txt</tt></b> to enable USB Gadget
mode. Change the <b><tt>OPTIONS</tt></b> word to <b><tt>0x172C</tt></b> for a
USB HID gadget, <b><tt>0x072E</tt></b> for a USB Ethernet gadget, or
<b><tt>0x03AC</tt></b> for a USB serial port gadget. See <a href=
"https://repo.munts.com/muntsos/doc/AppNote10-OPTIONS.pdf">Application Note
#10</a> for more information about the <b><tt>OPTIONS</tt></b> word.</p>
<h3>Raspberry Pi</h3>
<p>The <a href="https://www.raspberrypi.com">Raspberry Pi</a> is a family of
low cost Linux microcomputers selling for USD $15 to $80, depending on model.
There have been five generations of Raspberry Pi microcomputers, each using a
successively more sophisticated Broadcom ARM core CPU. The first two
generations (32-bit ARMv6 Raspberry Pi 1 and 32-bit ARMv7 Raspberry Pi 2) are
now obsolete.</p>
<p>Some Raspberry Pi models have an on-board Bluetooth radio that uses the
serial port signals that are also brought out to the expansion header. By
default, <b>MuntsOS</b> disables the on-board Bluetooth radio, in favor of the
serial port on the expansion header.</p>
<p>All of the following 64-bit Raspberry Pi models use the same AArch64
cross-toolchain.</p>
<h4>Raspberry Pi 3</h4>
<p>The <a href=
"https://www.raspberrypi.com/products/raspberry-pi-2-model-b">Raspberry Pi 2
Model B</a> Revision 1.2 with the 900 MHz BCM2710 ARMv8 Cortex-A53 quad-core
CPU can be treated as a power conserving Raspberry Pi 3 Model B− and is useful
for industrial applications where wired Ethernet is preferred.</p>
<p>The <a href=
"https://www.raspberrypi.com/products/raspberry-pi-3-model-b">Rasbperry Pi 3
Model B</a> has a 1200 MHz BCM2710 ARMv8 Cortex-A53 quad-core CPU and has 1 GB
of RAM along with on-board Bluetooth and WiFi radios.</p>
<p>The <a href=
"https://www.raspberrypi.com/products/raspberry-pi-3-model-a-plus">Raspberry Pi
3 Model A+</a> has the same form factor as the Raspberry Pi 1 Model A+, with
only one USB host receptacle and no wired Ethernet. It has a 1400 MHz BCM2710
ARMv8 Cortex-A53 quad-core CPU and has 512 MB of RAM along with on-board
Bluetooth and WiFi radios.</p>
<p>The <a href=
"https://www.raspberrypi.com/products/raspberry-pi-3-model-b-plus">Raspberry Pi
3 Model B+</a> has a 1400 MHz BCM2710 ARMv8 Cortex-A53 quad-core CPU and has
improved power management and networking components.</p>
<p>The <a href=
"https://www.raspberrypi.com/products/raspberry-pi-zero-2-w">Raspberry Pi Zero
2 W</a> has the same form factor as the Raspberry Pi Zero W, with a 1000 MHz
BCM2710 ARMv8 Cortex-A53 quad core CPU and 512 MB of RAM along with on-board
Bluetooth and WiFi radios. This small, light, and inexpensive board is probably
one of the best Linux microcomputers available for implementing embedded
systems.</p>
<p>All Raspberry Pi 3 models use the same ARMv8 kernel, with different device
trees.</p>
<h5>USB Gadgets</h5>
<p><b>MuntsOS</b> also offers a second, different Raspberry Pi 3 kernel with
USB host support disabled and <a href="http://www.linux-usb.org/gadget">USB
Gadget</a> peripheral support enabled. This kernel only runs on 3 A+, Zero 2 W,
and certain CM3 carrier boards which lack the USB hub present on Raspberry Pi 3
Model B and B+ boards. The single USB controller that is part of the BCM2710
CPU is wired directly to the USB-A receptacle on the 3 A+ or the USB Micro-A
receptacle on the CM3 I/O board or the Raspberry Pi Zero 2 W.</p>
<p>The Raspberry Pi 3 USB Gadget kernel supports USB Ethernet, Raw HID, and
Serial Port gadgets, selected by bits in the <b><tt>OPTIONS</tt></b> word
passed on the kernel command line (as configured in
<b><tt>/boot/cmdline.txt</tt></b>). See <a href=
"https://repo.munts.com/muntsos/doc/AppNote10-OPTIONS.pdf">Application Note
#10</a> for more information about the <b><tt>OPTIONS</tt></b> word. Raspberry
Pi 3 USB Gadget Thin Servers have USB Network Gadget selected by default.</p>
<p>You can supply power to and communicate with a compatible Raspberry Pi 3
(A+, CM3, or Zero 2W) running the USB Gadget kernel through the USB receptacle.
The absolute minimum possible usable Raspberry Pi kit consists of a Raspberry
Pi Zero 2 W, a micro-USB cable, and a micro-SD card with one of the
<b>MuntsOS</b> Raspberry Pi 3 USB Gadget Thin Servers installed.</p>
<h4>Raspberry Pi 4</h4>
<p>The <a href=
"https://www.raspberrypi.com/products/raspberry-pi-4-model-b">Raspberry Pi 4
Model B</a> has a 1500 MHz BCM2711 ARMv8 Cortex-A72 quad-core CPU and is
available with 1 to 8 GB of RAM. It diverged significantly from the Raspberry
Pi 1 B+ form factor, with the USB and Ethernet receptacles reversed, two
micro-HDMI receptacles instead of a single full size HDMI receptacle, and a
USB-C power receptacle instead of micro-USB. Two of the USB receptacles are 3.0
and two are 2.0. A major improvement is a Gigabit Ethernet controller connected
via PCI Express instead of the USB connected Ethernet used for all earlier
models. The Raspberry Pi 4 Model B uses the same wireless chip set as the
3+.</p>
<p>There are also a myriad of <a href=
"https://www.raspberrypi.com/products/compute-module-4">Raspberry Pi 4 Compute
Modules</a>, with varying combinations of wireless Ethernet, RAM and eMMC.</p>
<p>All Raspberry Pi 4 models use the same ARMv8 kernel, with different device
trees.</p>
<h5>USB Gadgets</h5>
<p>You will need to edit some boot configuration files to enable USB Gadget
mode on a Raspberry Pi 4. First, change
<b><tt>dtoverlay=dwc2,dr_mode=host</tt></b> to
<b><tt>dtoverlay=dwc2,dr_mode=peripheral</tt></b> in
<b><tt>/boot/config.txt</tt></b> to change the USB-C receptacle from USB host
to USB peripheral. Then change the <b><tt>OPTIONS</tt></b> word in
<b><tt>/boot/cmdline.txt</tt></b> to <b><tt>0x172C</tt></b> for a USB HID
gadget, <b><tt>0x072E</tt></b> for a USB Ethernet gadget, or
<b><tt>0x03AC</tt></b> for a USB serial port gadget. See <a href=
"https://repo.munts.com/muntsos/doc/AppNote10-OPTIONS.pdf">Application Note
#10</a> for more information about the <b><tt>OPTIONS</tt></b> word.</p>
<p>The Raspberry Pi 4 family consumes significantly more power than the
Raspberry Pi 3 and not all host computers will be able to supply enough current
to a single USB receptacle to support a Raspberry Pi 4 in USB Gadget mode.</p>
<h4>Raspberry Pi 5</h4>
<p>The <a href="https://www.raspberrypi.com/products/raspberry-pi-5">Raspberry
Pi 5</a> yields another 2-3x increase in performance over the Raspberry Pi 4,
at the expense of greater power consumption. It has a 2400 MHz BCM2712 ARMv8
Cortex-A76 quad-core CPU and is available with 2 to 16 GB of RAM. The Ethernet
receptacle and USB receptacles have swapped sides, so it has a form factor that
is sort of a cross between the Raspberry Pi 1 B+ (same grouping of Ethernet and
USB receptacles) and the Raspberry Pi 4 (same dual micro-HDMI receptacles and
USB-C power receptacle).</p>
<p>There are also a myriad of <a href=
"https://www.raspberrypi.com/products/compute-module-5">Raspberry Pi 5 Compute
Modules</a>, with varying combinations of wireless Ethernet, RAM and eMMC.</p>
<p>All Raspberry Pi 5 models use the same ARMv8 kernel, with different device
trees.</p>
<p>The Raspberry Pi 5 introduced a breaking PWM (Pulse Width Modulated) output
API change: It has four hardware PWM outputs on <b><tt>pwmchip2</tt></b> (all
previous Raspberry Pi models had two PWM outputs on <b><tt>pwmchip0</tt></b>)
with different pin mapping. Notably, PWM chip 2 channel 2 is mapped to GPIO18
instead of PWM chip 0 channel 0 on previous Raspberry Pi boards. See <a href=
"https://datasheets.raspberrypi.com/rp1/rp1-peripherals.pdf">RP1
Peripherals</a> page 15 for more information.</p>
<h5>USB Gadgets</h5>
<p>You will need to edit some boot configuration files to enable USB Gadget
mode on a Raspberry Pi 5. First, change
<b><tt>dtoverlay=dwc2,dr_mode=host</tt></b> to
<b><tt>dtoverlay=dwc2,dr_mode=peripheral</tt></b> in
<b><tt>/boot/config.txt</tt></b> to change the USB-C receptacle from USB host
to USB peripheral. Then change the <b><tt>OPTIONS</tt></b> word in
<b><tt>/boot/cmdline.txt</tt></b> to <b><tt>0x172C</tt></b> for a USB HID
gadget, <b><tt>0x072E</tt></b> for a USB Ethernet gadget, or
<b><tt>0x03AC</tt></b> for a USB serial port gadget. See <a href=
"https://repo.munts.com/muntsos/doc/AppNote10-OPTIONS.pdf">Application Note
#10</a> for more information about the <b><tt>OPTIONS</tt></b> word.</p>
<p>The Raspberry Pi 5 family consumes even more power than the Raspberry Pi 4
and not all host computers will be able to supply enough current to a single
USB receptacle to support a Raspberry Pi 5 in USB Gadget mode.</p>
<h2>Cross-Toolchains</h2>
<p>I build a custom Ada/C/C++/Fortran/Go/Modula-2 GCC cross-toolchain for each
<b>MuntsOS</b> platform family. Each GCC cross-toolchain requires a number of
additional software component libraries, which are packaged and distributed
separately but installed into the same directory tree as the parent
cross-toolchain. I also build <a href="https://www.freepascal.org">Free
Pascal</a> cross-compilers. Each of these rely on the libraries contained in
the corresponding GCC cross-toolchain package.</p>
<p>Cross-toolchain packages containing GCC 15.2.0, including support for
<a href="https://www.adaic.org/ada-resources/standards/ada22">Ada 2022</a>, and
built for <a href="https://www.debian.org">Debian</a> Linux (x86-64 <i>and</i>
ARM64) development host computers are available at:</p>
<a href="https://repo.munts.com/debian13">https://repo.munts.com/debian13</a>
(Debian package repository)<br>
<a href=
"https://repo.munts.com/muntsos/toolchain-debs">https://repo.munts.com/muntsos/toolchain-debs</a>
(just the package files).
<p>x86-64 RPM packages containing the exact same binaries, and known to work on
Fedora 42 and RHEL 9 and its derivatives, are available at:</p>
<a href=
"https://repo.munts.com/muntsos/toolchain-rpms">https://repo.munts.com/muntsos/toolchain-rpms</a>
<h2><a href="https://alire.ada.dev">Alire</a> Crates</h2>
<p><a href="https://alire.ada.dev/crates/muntsos_aarch64.html"><img alt=
"muntsos_aarch64" src=
"https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/muntsos_aarch64.json"></a>
<a href="https://alire.ada.dev/crates/muntsos_raspberrypi1.html"><img alt=
"muntsos_raspberrypi1" src=
"https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/muntsos_raspberrypi1.json">
</a></p>
<p>Adding the <b><tt>muntsos_aarch64</tt></b> crate to an Alire Ada program
project transforms said project into one that produces a cross-compiled AArch64
program for <b>MuntsOS</b>. The <b><tt>muntsos_aarch64</tt></b> crate depends
upon the Linux distribution meta-package <b><tt>muntsos-dev-aarch64</tt></b>
that pulls in the rest of the <b>MuntsOS</b> AArch64 cross-toolchain packages.
See <a href=
"https://repo.munts.com/muntsos/doc/AppNote7-Flash-LED-Ada-Alire.pdf">Application
Note #7</a> for a complete example using the <b><tt>alr</tt></b> command line
tool.</p>
<p>The <b><tt>muntsos_raspberrypi1</tt></b> crate functions in an identical
manner for 32-bit ARMv6 Raspberry Pi 1 target computers.</p>
<p id="alire_orphans">Please note that the other <b>MuntsOS</b> library crates
in Alire (<i>e.g.</i> <b>muntsos_beaglebone</b>) are unusable due to breaking
changes in <b><tt>alr</tt></b> 2.0. Unfortunately, Alire project policies
prohibit removing obsolete crates, so <b>muntsos_beaglebone</b> <i>et al</i>
remain in the repository as broken and abandoned orphans.</p>
<h2><a href="https://dotnet.microsoft.com">Microsoft .Net</a></h2>
<p><a href="https://www.nuget.org/packages/libsimpleio"><img alt="libsimpleio"
src=
"https://img.shields.io/nuget/v/libsimpleio?style=flat&logo=nuget&label=libsimpleio"></a>
<a href="https://www.nuget.org/packages/libsimpleio-templates"><img alt=
"libsimpleio-templates" src=
"https://img.shields.io/nuget/v/libsimpleio-templates?style=flat&logo=nuget&label=libsimpleio-templates">
</a></p>
<p>With the <b><tt>dotnet</tt></b> runtime extension installed, <b>MuntsOS</b>
can run architecture independent .Net programs produced by <b><tt>dotnet
build</tt></b>, <b><tt>dotnet publish</tt></b>, <b><tt>dotnet pack</tt></b> or
the equivalent actions in <a href=
"https://visualstudio.microsoft.com">Microsoft Visual Studio</a>. Many if not
most of the library packages published on <a href=
"https://www.nuget.org">NuGet</a> can be used in such programs.</p>
<p>The NuGet library package <a href=
"https://www.nuget.org/packages/libsimpleio">libsimpleio</a> provides
<b><tt>libsimpleio.dll</tt></b>, a .Net Standard 2.0 library assembly that
binds to the Linux shared library <b><tt>libsimpleio.so</tt></b> that is an
integral part of <b>MuntsOS</b>. The NuGet library package <a href=
"https://www.nuget.org/packages/libsimpleio">libsimpleio-templates</a> provides
a .Net Core console application project template
<b><tt>csharp_console_libsimpleio</tt></b> that, while not strictly necessary,
greatly simplifies creating an .Net Core console embedded system application
project for <b>MuntsOS</b>.</p>
<pre><b>
dotnet new install libsimpleio-templates
mkdir myprogram
cd myprogram
dotnet new csharp_console_libsimpleio
dotnet new sln
dotnet sln add myprogram.csproj
</b></pre>
<p>See <a href=
"https://repo.munts.com/muntsos/doc/AppNote8-Flash-LED-C%23.pdf">Application
Note #8</a> for a complete example using C# to flash an LED. See also the
<a href="https://repo.munts.com/libsimpleio/doc/libsimpleio.dll">API
specification</a> for <b><tt>libsimpleio.dll</tt></b>.</p>
<p>The combination of Visual Studio + NuGet + <b><tt>libsimpleio.dll</tt></b>
delivers a very high productivity development environment for creating embedded
systems software to run on <b>MuntsOS</b>. With <a href=
"https://www.remobjects.com/elements">RemObjects Elements</a>, a commercial
Visual Studio addon product, you can even compile Object Pascal, Java, Go, and
Swift programs, all using <b><tt>libsimpleio.dll</tt></b>, to .Net program
assemblies that run on <b>MuntsOS</b>.</p>
<h2>Git Repository</h2>
<p>The source code for <b>MuntsOS</b> is available at:</p>
<p><a href=
"https://github.com/pmunts/muntsos">https://github.com/pmunts/muntsos</a></p>
<p>Use the following command to clone it:</p>
<pre>
git clone https://github.com/pmunts/muntsos.git
</pre>
<h2>File Repository</h2>
<p>Prebuilt binaries for <b>MuntsOS</b> (extensions, kernels, thin servers, and
cross-toolchain packages) are available at:</p>
<p><a href=
"https://repo.munts.com/muntsos">https://repo.munts.com/muntsos</a></p>
<hr>
Questions or comments to Philip Munts <a href=
"mailto:phil@munts.net">phil@munts.net</a>