david.given
Posts: 46
Joined: Sat Dec 05, 2015 8:10 pm

Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 12:39 am

If you've ever felt disappointed that you can't run a V7 Unix clone on your Pico, your time has come!

http://cowlark.com/2021-02-16-fuzix-pi-pico

Fuzix is a proper Unix, with multiple processes, devices, all the standard Unix tools, Bourne shell, vi clone, etc. Given the RP2040's limited RAM and no MMU, this port keeps just one process in memory at a time, swapping in and out to an SD card to do context switches; this works surprisingly well. Each process gets up to 64kB of code and data.

Performance is pretty decent. Running any binary from the shell takes about a second, most of which time is spent swapping sh out (which is quite big). It runs relocatable potentially-portable ELF Cortex-M0 binaries which can be generated with gcc, but you do need the Fuzix libc.

There's still a bunch of bugs, missing features etc, but it's quite usable. There's no C compiler, but you can write shell scripts, and there's a Forth interpreter bundled, as well as a few other languages which I haven't made build yet; plus I have a compiler of my own which will generate Thumb code that ought to be portable.

Binaries are provided, which might work!

```
FUZIX version 0.4pre1
Copyright (c) 1988-2002 by H.F.Bower, D.Braun, S.Nitschke, H.Peraza
Copyright (c) 1997-2001 by Arcady Schekochikhin, Adriano C. R. da Cunha
Copyright (c) 2013-2015 Will Sowerbutts <will@sowerbutts.com>
Copyright (c) 2014-2020 Alan Cox <alan@etchedpixels.co.uk>
Devboot
64kB total RAM, 64kB available to processes (15 processes max)
Enabling interrupts ... ok.
SD drive 0: hda: hda1 hda2
Mounting root fs (root_dev=2, ro): warning: mounting dirty file system, forcing r/o.
OK
Starting /init
init version 0.9.0ac#1
Cannot open file
Current date is Mon 2021-02-15
Enter new date:
Current time is 22:20:37
Enter new time:
/etc/rc: /var/run/utmp: cannot create

^ ^
n n Fuzix 0.3.1
>@<
Welcome to Fuzix
m m

login: root

Welcome to FUZIX.
# stty erase '^?'
# cd /
# ls
bin
dev
etc
init
mnt
root
tmp
usr
var
# prtroot
/dev/hda2 / fuzix rw 0 0
# df
Filesystem Blocks Used Free %Used Mounted on
/dev/hda2 65279 3752 61527 5% /
# cd /usr/games
# ls fortune*
fortune
fortune-gen
fortune.dat
# ls -l fortune*
-rwxr-xr-x 1 root 0 3720 Feb 15 22:20 fortune
-rwxr-xr-x 1 root 0 4876 Feb 15 22:20 fortune-gen
-rw-r--r-- 1 root 0 241378 Feb 15 22:20 fortune.dat
# ./fortune
The sendmail configuration file is one of those files that looks like someone
beat their head on the keyboard. After working with it... I can see why!
-- Harry Skelton
# ./fortune
The only thing worse than X Windows: (X Windows) - X
# ./fortune
A certain monk had a habit of pestering the Grand Tortue (the only one who
had ever reached the Enlightenment 'Yond Enlightenment), by asking whether
various objects had Buddha-nature or not. To such a question Tortue
invariably sat silent. The monk had already asked about a bean, a lake,
and a moonlit night. One day he brought to Tortue a piece of string, and
asked the same question. In reply, the Grand Tortue grasped the loop
between his feet and, with a few simple manipulations, created a complex
string which he proferred wordlessly to the monk. At that moment, the monk
was enlightened.

From then on, the monk did not bother Tortue. Instead, he made string after
string by Tortue's method; and he passed the method on to his own disciples,
who passed it on to theirs.
# ./startrek

*************************************
* *
* *
* * * Super Star Trek * * *
* *
* *
*************************************



Do you need instructions (y/N):
```

User avatar
scruss
Posts: 4085
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 1:02 am

I'm somewhere between "Oh Dear" and "Aw Yiss" on this one. Well done. I think.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

kilograham
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 611
Joined: Fri Apr 12, 2019 11:00 am
Location: austin tx

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 3:05 am

awesomeness!

ejolson
Posts: 7234
Joined: Tue Mar 18, 2014 11:47 am

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 6:08 am

david.given wrote:
Tue Feb 16, 2021 12:39 am
If you've ever felt disappointed that you can't run a V7 Unix clone on your Pico, your time has come!

http://cowlark.com/2021-02-16-fuzix-pi-pico

Fuzix is a proper Unix, with multiple processes, devices, all the standard Unix tools, Bourne shell, vi clone, etc.
Thanks for posting and all your work to get this up and running. I think it's probably better to say

Fuzix is a proper Unix-like operating system.

Note that Fuzix shares no code with the AT&T original and there is that trademark thing about calling it Unix.

At any rate, again thanks for the work. Do you think this could be of any use for a practical class on operating systems?

david.given
Posts: 46
Joined: Sat Dec 05, 2015 8:10 pm

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 10:39 am

ejolson wrote:
Tue Feb 16, 2021 6:08 am
At any rate, again thanks for the work. Do you think this could be of any use for a practical class on operating systems?
Yes --- Fuzix is a fairly elegant design, with only three core machine code routines when running in preemptive multitasking mode (context switch, start new process, switch to existing process). This port has one additional routine for the SWI handler, which is annoyingly complex because the Cortex M0's exception handling is a bit special.

The whole kernel runs out of RAM because I wanted to avoid clashes with the NAND flash driver, but as that turns out not to be in use it'd be possible to move it all into flash and use XIP. That will leave 100+kB of RAM free, so there's loads of space for things like a network stack or bitbanged video driver.

Another option is to switch Fuzix to its flat memory model. This would allow multiple processes to be in memory simultaneously, but in this mode you don't get swap (as without an MMU each process has to get reloaded at the same address where it was originally loaded in). This would allow full preemption, but you'd need to do a lot of tuning with the binary heap sizes to make anything useful fit in the limited RAM. (Bearing in mind that you always have init and sh loaded.) This would allow the entire system to run from NAND flash, with no SD card required, which might be interesting. But of course without an MMU you can't do `fork()`, and I believe there's still some core work needed to make `vfork()` work.

fanoush
Posts: 765
Joined: Mon Feb 27, 2012 2:37 pm

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 12:01 pm

david.given wrote:
Tue Feb 16, 2021 10:39 am
Another option is to switch Fuzix to its flat memory model. This would allow multiple processes to be in memory simultaneously, but in this mode you don't get swap (as without an MMU each process has to get reloaded at the same address where it was originally loaded in).
Would swapping main 64k to the rest of the memory (instead of sd card) make sense to keep at least 4 processes in ram?

kilograham
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 611
Joined: Fri Apr 12, 2019 11:00 am
Location: austin tx

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 2:50 pm

yup; you can also readily generate a text mode (even hi-res) without need for a graphical framebuffer

DarkElvenAngel
Posts: 1684
Joined: Tue Mar 20, 2018 9:53 pm

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 3:09 pm

This is really cool reminds me of something we had on the Propeller it was more like DOS than UNIX but once we had a display out and keyboard input. You had a cool little computer. I'm going to follow this with great interest.

I really need some Pico's so I can play along.

User avatar
HermannSW
Posts: 4120
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 3:54 pm

@david.given
I successfully built rpipico kernel (-j0 did not work, Pico required positive integer, I used -j4).

Then I changed target in toplevel Makefile:

Code: Select all

pi@raspberrypi400:~/pico/FUZIX $ git diff Makefile
diff --git a/Makefile b/Makefile
index f2e11724..51ec2148 100644
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@
 # v68:         Virtual platform for 68000 development
 # v85:         Virtual platform for 8085 development
 
-TARGET=z80pack
+TARGET=rpipico
 
 # Get the CPU type
 include Kernel/platform-$(TARGET)/target.mk
pi@raspberrypi400:~/pico/FUZIX $ 

Running "make" compiles some time, but then errors out in compiling "cave".
I removed "cave" target and tried again, same error in compiling "cpm".
So I switched back, here you see the error message:

Code: Select all

...
(cd games; make -f Makefile.armm0)
make[2]: Entering directory '/home/pi/pico/FUZIX/Applications/games'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/pi/pico/FUZIX/Applications/games'
(cd cave; make -f Makefile.armm0)
make[2]: Entering directory '/home/pi/pico/FUZIX/Applications/cave'
make[2]: Makefile.armm0: No such file or directory
make[2]: *** No rule to make target 'Makefile.armm0'.  Stop.
make[2]: Leaving directory '/home/pi/pico/FUZIX/Applications/cave'
make[1]: *** [Makefile:22: cave] Error 2
make[1]: Leaving directory '/home/pi/pico/FUZIX/Applications'
make: *** [Makefile:86: apps] Error 2
pi@raspberrypi400:~/pico/FUZIX $

Anything I can do to make 'Makefile.armm0' present?
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4120
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 5:22 pm

Besides the compile error issue:
"Configuration" section only states minimal size of swap partition (2MB):
https://github.com/davidgiven/FUZIX/tre ... figuration
Would a 2GB SD card suffice for both partitions?

I just found a big SD card reader with a 2GB card inside:
20210216_181635.15%.jpg
20210216_181635.15%.jpg
20210216_181635.15%.jpg (43.42 KiB) Viewed 1870 times
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

david.given
Posts: 46
Joined: Sat Dec 05, 2015 8:10 pm

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 5:49 pm

Ah, I did document the build, but only in the platform README which may not have been obvious. See `Kernel/platform-rpipico/README.md`. There's a single 'make world' in there which should build both the kernel and all the supported binaries (i.e. the ones which I've gotten round to adding to the makefiles).

Re the partitioning: the maximum size for a Fuzix FS filesystem is 32MB so anything bigger than that will do.

BTW, somewhere on my hard drive there's a port of Fuzix to the Raspberry Pi itself (complete with preemption and MMU). I should clean that up and upstream it. Even a model A has more memory than Fuzix is capable of counting!

User avatar
HermannSW
Posts: 4120
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 7:47 pm

david.given wrote:
Tue Feb 16, 2021 5:49 pm
Ah, I did document the build, but only in the platform README which may not have been obvious. See `Kernel/platform-rpipico/README.md`. There's a single 'make world' in there which should build both the kernel and all the supported binaries (i.e. the ones which I've gotten round to adding to the makefiles).
I did that, but ended up with missing binaries that were needed by "update-flash.sh".

I did remove pico/FUZIX recursivly, followed by:

Code: Select all

$ cd ~/pico
$ git clone -b rpipico https://github.com/davidgiven/FUZIX.git
$ cd FUZIX/Kernel/platform-rpipico/

Edited Makefile:

Code: Select all

pi@raspberrypi400:~/pico/FUZIX/Kernel/platform-rpipico $ git diff
diff --git a/Kernel/platform-rpipico/Makefile b/Kernel/platform-rpipico/Makefile
index 29ffc7fa..44234f2c 100644
--- a/Kernel/platform-rpipico/Makefile
+++ b/Kernel/platform-rpipico/Makefile
@@ -1,4 +1,4 @@
-export PICO_SDK_PATH = /home/dg/src/pico/pico-sdk
+export PICO_SDK_PATH = /home/pi/pico/pico-sdk
 
 build/fuzix.elf: ../version.c build/Makefile
        $(MAKE) -C build
pi@raspberrypi400:~/pico/FUZIX/Kernel/platform-rpipico $ 

"$ make world -j0" results in "make: the '-j' option requires a positive integer argument".
(32bit Raspberry Pi OS on Pi400)

Code: Select all

$ make world -j4

Finally "update-flash.sh" errors out:

Code: Select all

pi@raspberrypi400:~/pico/FUZIX/Kernel/platform-rpipico $ ./update-flash.sh 
./update-flash.sh: 9: ./update-flash.sh: ../../Standalone/mkfs: not found
pi@raspberrypi400:~/pico/FUZIX/Kernel/platform-rpipico $ 
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

david.given
Posts: 46
Joined: Sat Dec 05, 2015 8:10 pm

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 9:14 pm

Bah, forgot about the Standalone directory. This is host binaries for doing things like creating filesystems. Just do:

Code: Select all

$ make -C Standalone
The `-j0` is a typo and should be just `-j` (or a number if you want to specify the number of cores... I hate make, it doesn't autodetect this stuff). Will fix.

User avatar
HermannSW
Posts: 4120
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 9:22 pm

Did that, next error:

Code: Select all

pi@raspberrypi400:~/pico/FUZIX/Kernel/platform-rpipico $ make -C ../../Standalone/
make: Entering directory '/home/pi/pico/FUZIX/Standalone'
make: Nothing to be done for 'all'.
make: Leaving directory '/home/pi/pico/FUZIX/Standalone'
pi@raspberrypi400:~/pico/FUZIX/Kernel/platform-rpipico $ ./update-flash.sh 
Making 512 byte/block filesystem with normal byte order on device filesystem.img with fsize = 65535 and isize = 256.
Source file '../../Applications/cave/advent' not found
chmod: can't stat file 'advent': 2
Source file '../../Applications/cave/advent.db' not found
chmod: can't stat file 'advent.db': 2
pi@raspberrypi400:~/pico/FUZIX/Kernel/platform-rpipico $ 

Can you please checkout freshly and try yourself?

Or until repo is clean to build, put working "filesystem.img" onto some accessible space on the web?
I was able to build the Pico kernel, only need "filesystem.img" for a first try with SD card connected to Pico ...
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

david.given
Posts: 46
Joined: Sat Dec 05, 2015 8:10 pm

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 10:40 pm

There's a binary download link at the bottom of my blog post in the top message.

Edit: ...and the Colossal Cave build should now be fixed too. Sorry about that.

DarkElvenAngel
Posts: 1684
Joined: Tue Mar 20, 2018 9:53 pm

Re: Fuzix on the Raspberry Pi Pico

Tue Feb 16, 2021 11:56 pm

Adafruit has these SD card on a chip https://blog.adafruit.com/2020/12/26/sd-card-on-a-chip/

Seems like a it might be useful since SD cards of that size are hard to come by

User avatar
HermannSW
Posts: 4120
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Fuzix on the Raspberry Pi Pico

Wed Feb 17, 2021 12:50 am

david.given wrote:
Tue Feb 16, 2021 10:40 pm
There's a binary download link at the bottom of my blog post in the top message.

Edit: ...and the Colossal Cave build should now be fixed too. Sorry about that.
Thank you, with your latest repo

Code: Select all

git clone -b rpipico https://github.com/davidgiven/FUZIX.git

I can now build kernel as well as firmware.img without issues:

Code: Select all

...
make[1]: Leaving directory '/home/pi/pico/FUZIX/Standalone'
pi@raspberrypi400:~/pico/FUZIX/Kernel/platform-rpipico $ ./update-flash.sh 
Making 512 byte/block filesystem with normal byte order on device filesystem.img with fsize = 65535 and isize = 256.
pi@raspberrypi400:~/pico/FUZIX/Kernel/platform-rpipico $ ls -l filesystem.img 
-rw------- 1 pi pi 33553920 Feb 17 01:47 filesystem.img
pi@raspberrypi400:~/pico/FUZIX/Kernel/platform-rpipico $ 

But nearly 2am is to dangerous for trying to add the big SD card reader to the Pico, will try at daytime ...
Image
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
jahboater
Posts: 7035
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: Fuzix on the Raspberry Pi Pico

Wed Feb 17, 2021 2:07 am

david.given,
david.given wrote:
Tue Feb 16, 2021 9:14 pm
The `-j0` is a typo and should be just `-j` (or a number if you want to specify the number of cores... I hate make, it doesn't autodetect this stuff). Will fix.
You want .....

Code: Select all

make -j `nproc`

User avatar
Gavinmc42
Posts: 5636
Joined: Wed Aug 28, 2013 3:31 am

Re: Fuzix on the Raspberry Pi Pico

Wed Feb 17, 2021 2:41 am

I'm somewhere between "Oh Dear" and "Aw Yiss" on this one. Well done. I think.
You can say that again.
Not just a little microcontroller or Arduino replacement.

It is looking like 250MHz might be a reliable clock speed.
Going to be interesting to see if the RP2040 gets qualified at higher speeds.
Depends on temperature range, 200MHz might be an easy step?

Hmm, looks like getting another Pico for debugging might be handy too.
Pi to Pico JTAG debugging a baremetal Pi?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ConfuSomu
Posts: 72
Joined: Tue Dec 04, 2018 8:47 am
Location: Canada

Re: Fuzix on the Raspberry Pi Pico

Wed Feb 17, 2021 5:01 am

Great job david.given! No need to have Linux on a Pi when you have Unix on the Pico. ;)
david.given wrote: Performance is pretty decent. Running any binary from the shell takes about a second, most of which time is spent swapping sh out (which is quite big).
Would it be possible to swap to the unused RAM space?

Having video out and keyboard input implemented could make for a fully contained Unix computer.
If you are low on RAM, make sure to use zram! ;)
I found & use this zram setup script: https://github.com/novaspirit/rpi_zram
A post about zram: t=207304
Make sure to disable dphys-swapfile and mount the tmp folders in RAM. Also learn about SysRq!

david.given
Posts: 46
Joined: Sat Dec 05, 2015 8:10 pm

Re: Fuzix on the Raspberry Pi Pico

Wed Feb 17, 2021 10:44 am

ConfuSomu wrote:
Wed Feb 17, 2021 5:01 am
Would it be possible to swap to the unused RAM space?
There's only about 64kB available, which I don't think is enough --- that's only enough space for a single process. The swapper could be made more efficient by only copying in and out the used parts of the process, rather than the whole thing, but not enough to make a difference. (But it would improve performance.)

One problem is that the swapper isn't allowed to fail, so there must be enough space guaranteed up front for all possible processes. This rules out things like compressed swap where you don't know how big the compressed data's going to be.

Incidentally, I forgot to recalculate the size of the swap partition when porting from the ESP8266. 15 * (65.5kB) = 982.5kB, so you only need a 1MB swap partition! (The ESP8266 has bigger processes due to its odd memory architecture.)

User avatar
aallan
Raspberry Pi Trading Employee & Forum Moderator
Raspberry Pi Trading Employee & Forum Moderator
Posts: 174
Joined: Mon Feb 09, 2015 11:30 am
Location: Exeter, UK
Contact: Website Twitter

Re: Fuzix on the Raspberry Pi Pico

Wed Feb 17, 2021 12:04 pm

After a misunderstanding how the FUZIX partition table went together due to unfamiliarity with FUZIX, I now have the port building from source and working on Pico. I thought I'd write a quick how to for anyone else that was stuggling.

Wiring should look like this…
FUZIX_bb_small.jpg
FUZIX Wiring diagram
FUZIX_bb_small.jpg (47.16 KiB) Viewed 1562 times

Where I'm using,

Adafruit MicroSD Card Breakout, https://www.adafruit.com/product/254
SparkFun FTDI Basic Breakout, https://www.sparkfun.com/products/9873

NB: If you're connecting to a Raspberry Pi you can connect directly to the GPIO header block and you don't need an FTDI breakout, see the Getting Started guide for details.

Then go ahead and,

Code: Select all

$ git clone https://github.com/davidgiven/FUZIX.git
$ cd FUZIX
$ git checkout rpipico
$ cd Kernel/platform-rpipico/

edit PICO_SDK_PATH in the Makefile to point to your checkout of the Raspberry Pi Pico C/C+ SDK. Then,

Code: Select all

$ make world -j
$ ./update-flash.sh
If everything goes well you should have a UF2 file in build/fuzix.uf2 and a filesystem.img in the current directory.

Now grab an micro SD Card and format it as follows,

Code: Select all

$ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    1  3.7G  0 disk 
mmcblk0     179:0    0 14.9G  0 disk 
├─mmcblk0p1 179:1    0  256M  0 part /boot
└─mmcblk0p2 179:2    0 14.6G  0 part /

$ sudo parted /dev/sda --script -- mklabel msdos
and run fdisk to create two primary partitions, a 2MB swap partition, and a 32MB root partition.

Code: Select all

$ sudo fdisk /dev/sda
Create the first partition by entering the following at the fdisk prompt,

Code: Select all

n
p
1
2048
2M
and then change its type as follows,

Code: Select all

t
7F
the create the second partition,

Code: Select all

n
p
2
2097153
+32M
Afterwards if you type "p" at the fdisk prompt you should see this,

Code: Select all

Disk /dev/sda: 3.7 GiB, 3965190144 bytes, 7744512 sectors
Disk model: STORAGE DEVICE  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x52a7e77b

Device     Boot   Start     End Sectors  Size Id Type
/dev/sda1          2048 2097152 2095105 1023M 7f unknown
/dev/sda2       2097153 2162687   65535   32M 83 Linux
Now write the partition table to the card by typing "w" at the prompt which will save and exit from fdisk.

You can now go ahead and copy your filesystem to the SD Card,

Code: Select all

$ sudo dd if=filesystem.img of=/dev/sda2
Pop the SD Card out, it's ready. Insert it into your SD Card breakout.

Put your Pico into BOOTSEL mode, and drag-and-drop the UF2 to your Pico.

Open a terminal to the Serial UART, you should see something like this,
IMG_1552_small.jpg
FUZIX running on Pico
IMG_1552_small.jpg (98.56 KiB) Viewed 1562 times
Technical Documentation Manager
Raspberry Pi (Trading) Limited
About me, http://alasdairallan.com

david.given
Posts: 46
Joined: Sat Dec 05, 2015 8:10 pm

Re: Fuzix on the Raspberry Pi Pico

Wed Feb 17, 2021 2:56 pm

That's an awesome write-up --- thanks! Can I steal it (and the images) to add to the README.md?

User avatar
aallan
Raspberry Pi Trading Employee & Forum Moderator
Raspberry Pi Trading Employee & Forum Moderator
Posts: 174
Joined: Mon Feb 09, 2015 11:30 am
Location: Exeter, UK
Contact: Website Twitter

Re: Fuzix on the Raspberry Pi Pico

Wed Feb 17, 2021 3:15 pm

david.given wrote:
Wed Feb 17, 2021 2:56 pm
That's an awesome write-up --- thanks! Can I steal it (and the images) to add to the README.md?

Yup. Absolutely. Might do a bit more detailed version (more words!) and post it to the Raspberry Pi blog as well if you don't mind?
Technical Documentation Manager
Raspberry Pi (Trading) Limited
About me, http://alasdairallan.com

david.given
Posts: 46
Joined: Sat Dec 05, 2015 8:10 pm

Re: Fuzix on the Raspberry Pi Pico

Wed Feb 17, 2021 3:55 pm

aallan wrote:
Wed Feb 17, 2021 3:15 pm

Yup. Absolutely. Might do a bit more detailed version (more words!) and post it to the Raspberry Pi blog as well if you don't mind?
Yes, of course, but please give me until tomorrow to apply the changes to the repository?

Incidentally:

Code: Select all

$ sudo parted /dev/sda --script -- mklabel msdos
The 'o' command in fdisk will do this.

Return to “General”