X-Gen
Posts: 157
Joined: Fri Dec 06, 2019 12:08 pm

Raspbian for Pico?

Tue Oct 12, 2021 4:08 am

You know what would be interesting?
If there was an OS image that would install on the Pico.
Like Like raspberry super lite edition, so the Pico could be accessed via ssh.
The Pico would make an excellent device for my server farm, recording and logging several temperature sensors measuring active and downtime, as well as temperatures of each server.
Most of the programs I currently use, use Linux terminal commands. Though, I probably could survive on a python os, but it would require more effort from my end to make it work.

W. H. Heydt
Posts: 15148
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Raspbian for Pico?

Tue Oct 12, 2021 4:20 am

RPiOS *kernel* is bigger that the RAM size of a Pico. You'd have to find a very, very, minimal image to even think about it.

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

Re: Raspbian for Pico?

Tue Oct 12, 2021 5:50 am

X-Gen wrote:
Tue Oct 12, 2021 4:08 am
You know what would be interesting?
If there was an OS image that would install on the Pico.
Like Like raspberry super lite edition, so the Pico could be accessed via ssh.
The Pico would make an excellent device for my server farm, recording and logging several temperature sensors measuring active and downtime, as well as temperatures of each server.
Most of the programs I currently use, use Linux terminal commands. Though, I probably could survive on a python os, but it would require more effort from my end to make it work.
Using a Pico to monitor temperature from several sensors seems like a reasonable thing to do. Recording information in a log on the Pico would have the advantage of being secure from loss or modification in case a server was invaded by bandits.

It would appear all the data needs to be sent through a serial or USB port since the Pico has no built-in networking. As there is little point in encrypting data passing through a USB port, there is little need for any type of public key encryption such as implemented with ssh.

User avatar
B.Goode
Posts: 13013
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Raspbian for Pico?

Tue Oct 12, 2021 7:20 am

X-Gen wrote:
Tue Oct 12, 2021 4:08 am
You know what would be interesting?
If there was an OS image that would install on the Pico.
Like Like raspberry super lite edition, so the Pico could be accessed via ssh.

Like FUZIX, maybe...

https://www.raspberrypi.com/news/how-to ... y-pi-pico/

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 29665
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspbian for Pico?

Tue Oct 12, 2021 8:45 am

I doubt Linux would work, not enough resource and no MMU, but I am sure there have been some small OS's ported to it already.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Working in the Applications Team.

User avatar
buja
Posts: 614
Joined: Wed Dec 31, 2014 8:21 am
Location: Netherlands

Re: Raspbian for Pico?

Tue Oct 12, 2021 11:18 am

A Pico with an OS? Possible, but what is the point?
I mean the Fuzix example is certainly interesting, but the $4 Pico needs a SD card + $7.50 MicroSD card breakout board, so the price is already going up significantly.

Better and cheaper alternative: Pi Zero with RaspiOS Lite. Proven concept, works very well.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 29665
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspbian for Pico?

Tue Oct 12, 2021 12:21 pm

buja wrote:
Tue Oct 12, 2021 11:18 am
A Pico with an OS? Possible, but what is the point?
I mean the Fuzix example is certainly interesting, but the $4 Pico needs a SD card + $7.50 MicroSD card breakout board, so the price is already going up significantly.

Better and cheaper alternative: Pi Zero with RaspiOS Lite. Proven concept, works very well.
Not deterministic though, which is perfectly possible with the Pico. And in quantity the Zero is over $13 time IIRC, whilst an RP2040 is $1 or less but you would need you own PCB.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Working in the Applications Team.

User avatar
buja
Posts: 614
Joined: Wed Dec 31, 2014 8:21 am
Location: Netherlands

Re: Raspbian for Pico?

Tue Oct 12, 2021 1:24 pm

jamesh wrote:
Tue Oct 12, 2021 12:21 pm
buja wrote:
Tue Oct 12, 2021 11:18 am
A Pico with an OS? Possible, but what is the point?
I mean the Fuzix example is certainly interesting, but the $4 Pico needs a SD card + $7.50 MicroSD card breakout board, so the price is already going up significantly.

Better and cheaper alternative: Pi Zero with RaspiOS Lite. Proven concept, works very well.
Not deterministic though, which is perfectly possible with the Pico. And in quantity the Zero is over $13 time IIRC, whilst an RP2040 is $1 or less but you would need you own PCB.
Is a Pico still deterministic if you add a Unix-like OS?

hippy
Posts: 10758
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Raspbian for Pico?

Tue Oct 12, 2021 1:41 pm

buja wrote:
Tue Oct 12, 2021 11:18 am
I mean the Fuzix example is certainly interesting, but the $4 Pico needs a SD card + $7.50 MicroSD card breakout board, so the price is already going up significantly.
An unused Micro-SD Card adaptor can often be had for zero cost, frequently comes with the SD Card. So a bit of flying wire soldering and that's saved $7.50. I thought there was a Flash-only version of Fuzix but maybe I am mistaken.

To me, running an OS is little different to running MicroPython or anything else with a REPL, though "OS" does imply to me there's more to it than a 'command line interface', able to run background tasks and software stacks etc. If one could use an RP2040 or Pico as if it were a Pi or PC I wouldn't have an aversion to that, though it is so constrained it may not be a practical proposition except for specific applications.

The challenge for any OS developer for an RP2040 or Pico is balancing what it needs to do against what one has to do it with. Something full-fat like Raspbian is likely too much for an RP2040 but there's plenty which could be done.

Whether it would have general appeal I don't know. RP2040 is seen as a microcontroller. Developing a monolithic app and running that app is how microcontrollers are usually used but they don't have to be and the RP2040 isn't a bottom-rung micro. There are already Home Computer implementations for the RP2040, an OS is just a step beyond that.

W. H. Heydt
Posts: 15148
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Raspbian for Pico?

Tue Oct 12, 2021 8:35 pm

It occurs to me to point out that, back in the day when I was employed using it, IBM DOS ran on a 32K byte S/360-30. So an OS small enough to run on a Pico is certainly possible. I suspect that bsd unix as it was run on PDP 11-70s (ver. 2.9) was probably small enough, as well. Don't even need to back to the IBM 1620s Monitor IID, which only used about 1200 characters in memory for the "system", such as it was.

stevend
Posts: 430
Joined: Fri Oct 11, 2013 12:28 pm

Re: Raspbian for Pico?

Tue Oct 12, 2021 9:08 pm

CP/M 2 used to run on a Z-80 with 64KB of RAM (possibly even 32KB); then IIRC CP/M 3 came along where you could page blocks of RAM into the Z-80's 64K memory space. And that was sufficient to run floppy discs and hard drives (at something like £300 for a floppy drive, £600 for a 10MB hard drive and £300 for the controller). But that was a command line interface.

cleverca22
Posts: 4741
Joined: Sat Aug 18, 2012 2:33 pm

Re: Raspbian for Pico?

Tue Oct 12, 2021 9:53 pm

both little-kernel and fuzix have command line interfaces and can run on the rp2040

User avatar
MikeDB
Posts: 588
Joined: Sun Oct 12, 2014 8:27 am
Contact: Website

Re: Raspbian for Pico?

Wed Oct 13, 2021 12:35 am

W. H. Heydt wrote:
Tue Oct 12, 2021 8:35 pm
It occurs to me to point out that, back in the day when I was employed using it, IBM DOS ran on a 32K byte S/360-30. So an OS small enough to run on a Pico is certainly possible.
We used to run MS-DOS and Turbo Pascal or Turbo C in 192k. Plenty of room on a Pico if someone's feeling adventurous.
Always interested in innovative audio startups needing help and investment. Find me on our website.

X-Gen
Posts: 157
Joined: Fri Dec 06, 2019 12:08 pm

Re: Raspbian for Pico?

Wed Oct 13, 2021 1:36 am

My sincere apologies,
I mistaken the 2040 for the Pico.
Is it possible to do the following on a 2040?
I realize the Pico is too small for what I want.

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

Re: Raspbian for Pico?

Wed Oct 13, 2021 1:59 am

X-Gen wrote:
Wed Oct 13, 2021 1:36 am
My sincere apologies,
I mistaken the 2040 for the Pico.
Is it possible to do the following on a 2040?
I realize the Pico is too small for what I want.
If not the RP2040 could you mean this 2040?

Image
https://en.wikipedia.org/wiki/IBM_System/360_Model_40

Maybe one could port the CP-40 operating system developed at the other Cambridge in Massachusetts to the RP2040 .
Last edited by ejolson on Wed Oct 13, 2021 2:05 am, edited 1 time in total.

cleverca22
Posts: 4741
Joined: Sat Aug 18, 2012 2:33 pm

Re: Raspbian for Pico?

Wed Oct 13, 2021 2:02 am

ejolson wrote:
Wed Oct 13, 2021 1:59 am
If not the RP2040 could you mean this 2040?
The D40, E40, F40, G40 and H40 were configured with 16K, 32K, 64K, 128K and 256K of core memory
you could probably emulate that on an rp2040!
possibly even faster then the original hw, lol

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

Re: Raspbian for Pico?

Wed Oct 13, 2021 2:08 am

cleverca22 wrote:
Wed Oct 13, 2021 2:02 am
ejolson wrote:
Wed Oct 13, 2021 1:59 am
If not the RP2040 could you mean this 2040?
The D40, E40, F40, G40 and H40 were configured with 16K, 32K, 64K, 128K and 256K of core memory
you could probably emulate that on an rp2040!
possibly even faster then the original hw, lol
Though Fido might object, maybe it would also it be possible to emulate the CAT box virtual memory system to get proper support for virtual machines on the Pico.

https://en.wikipedia.org/wiki/IBM_CP-40 ... e_platform

lurk101
Posts: 974
Joined: Mon Jan 27, 2020 2:35 pm
Location: Cumming, GA (US)

Re: Raspbian for Pico?

Wed Oct 13, 2021 5:51 am

ejolson wrote:
Wed Oct 13, 2021 1:59 am
X-Gen wrote:
Wed Oct 13, 2021 1:36 am
My sincere apologies,
I mistaken the 2040 for the Pico.
Is it possible to do the following on a 2040?
I realize the Pico is too small for what I want.
If not the RP2040 could you mean this 2040?

Image
https://en.wikipedia.org/wiki/IBM_System/360_Model_40

Maybe one could port the CP-40 operating system developed at the other Cambridge in Massachusetts to the RP2040 .
Yikes! Hackers in suits!

ronter
Posts: 56
Joined: Thu Nov 12, 2015 3:11 am
Location: Ottawa, Canada

Re: Raspbian for Pico?

Wed Oct 13, 2021 5:59 pm

All this nostalgia! I'm starting to regret throwing away those 8" floppies with the CP/M bios/bdos sources. But then I realize that playing a text based adventure game would probably get boring very quickly.

> look
> i see a rock.
> pick up rock.
> i have a rock.
> hit self in head with rock for wasting so much time on this.

I did get my programming start with IBM 360/50 though - doing assembly language programming on punch cards. Those were truly exciting times.
Then there was JCL! Who remembers things like this...
//SYSUT1 DD DSN=VOL0001 DISP=(NEW,KEEP) or some such babblegarb if memory serves me!

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

Re: Raspbian for Pico?

Wed Oct 13, 2021 7:03 pm

ronter wrote:
Wed Oct 13, 2021 5:59 pm
Then there was JCL! Who remembers things like this...
//SYSUT1 DD DSN=VOL0001 DISP=(NEW,KEEP) or some such babblegarb if memory serves me!
Is that the precursor of the "dd" command we know and love (commonly used for copying Rasperry Pi OS images onto an SD card) ?

ronter
Posts: 56
Joined: Thu Nov 12, 2015 3:11 am
Location: Ottawa, Canada

Re: Raspbian for Pico?

Wed Oct 13, 2021 8:21 pm

jahboater wrote:
Wed Oct 13, 2021 7:03 pm
ronter wrote:
Wed Oct 13, 2021 5:59 pm
Then there was JCL! Who remembers things like this...
//SYSUT1 DD DSN=VOL0001 DISP=(NEW,KEEP) or some such babblegarb if memory serves me!
Is that the precursor of the "dd" command we know and love (commonly used for copying Rasperry Pi OS images onto an SD card) ?
Probably not. I think it stood for "Data Definition". It might have been the precursor for assigning physical devices to logical channels like stdin, stdout, stderr though. ???

lurk101
Posts: 974
Joined: Mon Jan 27, 2020 2:35 pm
Location: Cumming, GA (US)

Re: Raspbian for Pico?

Wed Oct 13, 2021 8:35 pm

jahboater wrote:
Wed Oct 13, 2021 7:03 pm
ronter wrote:
Wed Oct 13, 2021 5:59 pm
Then there was JCL! Who remembers things like this...
//SYSUT1 DD DSN=VOL0001 DISP=(NEW,KEEP) or some such babblegarb if memory serves me!
Is that the precursor of the "dd" command we know and love (commonly used for copying Rasperry Pi OS images onto an SD card) ?
Stands for Data Definition. It's a IBM OS JCL (Job Control Language) statement for System 360 and 370 used to define a disk entity to a file for batch executed jobs.

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

Re: Raspbian for Pico?

Thu Oct 14, 2021 1:19 pm

cleverca22 wrote:
Tue Oct 12, 2021 9:53 pm
both little-kernel and fuzix have command line interfaces and can run on the rp2040
This is first time I head on little-kernel, found it on github:
https://github.com/littlekernel/lk

I did flash pico hello-world usb as well as serial examples first, to make sure that minicom sees output over /dev/ttyACM0 and /dev/serial0.

I did build lk with "make pico-test", and flashed "build-pico-test/lk.uf2" on the Pico.
But I cannot see anything with minicom, neither via USB nor via serial.

Should a shell be seen?
Which baudrate?

From Wiki, having such a shell on Pico would be cool:
On embedded ARM platforms the core of LK is typically 15-20 KB
https://github.com/Hermann-SW/memrun
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://stamm-wilbrandt.de/en/Raspberry_camera.html

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

Re: Raspbian for Pico?

Thu Oct 14, 2021 6:53 pm

lurk101 wrote:
Wed Oct 13, 2021 8:35 pm
Stands for Data Definition. It's a IBM OS JCL (Job Control Language) statement for System 360 and 370 used to define a disk entity to a file for batch executed jobs.
Ah! Not Dasd Dump then.
My only experience with IBM mainframes was VM/SP (with CMS guest OS's) and so I was spared all the ghastly OS/360 JCL.
I used "exec2" and then REXX (which was wonderful). Also later ran a UNIX guest OS which was even better.

cleverca22
Posts: 4741
Joined: Sat Aug 18, 2012 2:33 pm

Re: Raspbian for Pico?

Thu Oct 14, 2021 9:11 pm

HermannSW wrote:
Thu Oct 14, 2021 1:19 pm
Which baudrate?
https://github.com/littlekernel/lk/blob ... init.c#L31

Code: Select all

#define DEBUG_UART_GPIOA 0
#define DEBUG_UART_GPIOB 1

    // target defines drive how we configure the debug uart
    uart_init(DEBUG_UART, 115200);
    gpio_set_function(DEBUG_UART_GPIOA, GPIO_FUNC_UART);
    gpio_set_function(DEBUG_UART_GPIOB, GPIO_FUNC_UART);
odd, i remember the baud rate being 1,000,000, but when i check the source now, its a regular old 115200

it should be on gpio 0/1 i believe

Return to “General”