Shop OBEX P1 Docs P2 Docs Learn Events
Linux port for the Propeller - Page 3 — Parallax Forums

Linux port for the Propeller

13»

Comments

  • jazzedjazzed Posts: 11,803
    edited 2013-07-03 12:10
    Heater. wrote: »
    I have no idea about newlib. It's kind of new to me:)

    Still the kernel itself does not depend on any libraries so we should be able to get that started up. Then worry about what happens next.

    What Linux features would be available without a library?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-07-03 12:51
    I don't really understand the point of this exercise. Is it just to prove that it is possible to run Linux on the Propeller or do you expect to produce a useable system? I would say it is impossible to do that on the P1 and unlikely on the P2.
  • jazzedjazzed Posts: 11,803
    edited 2013-07-03 12:59
    Oops, the magic phrase has been posted. More of a cliche' than magic these days though.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-07-03 13:00
    jazzed wrote: »
    Oops, the magic phrase has been posted. More of a cliche' than magic these days though.
    I think the magic phrase only guarantees that someone will be successful at doing it not that the result will be usable. :-)
  • Heater.Heater. Posts: 21,230
    edited 2013-07-03 13:19
    Sorry, phone messed with me whilst trying to make that last post.

    I was just wondering what kind of MIPS propgcc code running on a P2 with data in SDRAM might acheive. That is the most favourable configuration for Linux on a Prop.

    If we are in the ballpark of the 68000 setup then we are onto an almost usable system.

    Who needs libraries? Just write your app as a kernel driver:)

    Why do this? Why is there a Linux system running under a CPU emulation written in JavaScript for your browser?

    Thing is with the speed of the P ll, the prospect of a P II module from Parallax with SDRAM and the arrival of propgccc we see that the planets are lining up and Linux on the Prop is becoming an enevitability.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-07-03 13:21
    Heater. wrote: »
    Thing is with the speed of the P ll, the prospect of a P II module from Parallax with SDRAM and the arrival of propgccc we see that the planets are lining up and Linux on the Prop is becoming an enevitability.
    Yes but I'm worried that Mercury might be in retrograde.
  • Dave HeinDave Hein Posts: 6,347
    edited 2013-07-03 13:22
    Would it be Linux if it printed the stuff Linux prints at bootup and runs a shell that looks like Linux? That would be pretty easy to do. Many of the Linux apps could be ported, such as cat, echo, ls, and more. The "kernel" could just be a program that runs in a cog that loads programs from an SD card and runs them. You could only run one program at a time, and it would be a single user system, but it would look and feel like Linux. So would that be Linux?
  • Heater.Heater. Posts: 21,230
    edited 2013-07-03 13:34
    No it would not be Linux. Linux is a trademark for a product put out by Linus Torvalds. Calling whatever other code you write "Linux" could actually get you into trouble.

    However, what you describe sounds like "One Man Unix" (google it). OMU ran on 6809 or 68000 if I remember correctly and was pretty much what you describe. Sounds quite doable.
  • Martin_HMartin_H Posts: 4,051
    edited 2013-07-03 13:36
    Personally I don't see the point in Linux on a microcontroller. Abstracting the hardware away from the user complicates interaction with physical devices like motors and servos that need real time signal generation. I've avoided buying a Raspberry Pi for the same reason. If I want to use Linux I'll use a laptop or desktop. If I want to control a robot arm I'll use a microcontroller.
  • Heater.Heater. Posts: 21,230
    edited 2013-07-03 13:56
    Martin,
    I'm inclined to agree. However just because a couple of COGs are running Linux does not mean the others are not available for whatever real-time interfacing you need.

    We could make a COG device driver. Just open the COG device like any other file and write a binary blob to it which it then runs until you close it.
  • ersmithersmith Posts: 6,054
    edited 2013-07-03 17:05
    Rather than Linux, why not port the original Unix? For example, RetroBSD (http://retrobsd.org/wiki/doku.php), which is based on BSD 2.x, and targets a machine with 128K of RAM, would be a much better match for Prop2 than Linux, which these days takes megabytes of RAM.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-07-03 17:27
    ersmith wrote: »
    Rather than Linux, why not port the original Unix? For example, RetroBSD (http://retrobsd.org/wiki/doku.php), which is based on BSD 2.x, and targets a machine with 128K of RAM, would be a much better match for Prop2 than Linux, which these days takes megabytes of RAM.
    Yes, that would probably be a much better fit. Even a very early Linux kernel might fit although I think the earliest Linux kernels were x86 only.
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-07-03 18:24
    I at least have some names for you... Pinux(tm), Prunix(tm). Pronix(tm), Propnix(tm). I thought better of suggesting Punix ;)
  • sven98desven98de Posts: 8
    edited 2013-07-04 03:28
    What about Minix with its microkernel : http://en.wikipedia.org/wiki/MINIX
  • Heater.Heater. Posts: 21,230
    edited 2013-07-04 07:38
    Dam'it Eric now you have done it. Now I have to get hold of a little PIC32 board to check out RetroBSD.

    They come on nice DIP modules like this http://eflightworks.net/PIC32_DIP.htm this http://www.seeedstudio.com/depot/fubarino-sd-p-1265.html and this: https://www.sparkfun.com/products/9713
    That's just the format I'd like to see a Prop II come in.
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-07-04 09:13
    David Betz wrote: »
    I think the magic phrase only guarantees that someone will be successful at doing it not that the result will be usable. :-)

    Usablity is in the eye of the beholder

    Edit - Usability is defined in the requirements statement of the end user. :)
  • David BetzDavid Betz Posts: 14,516
    edited 2013-07-04 10:40
    ersmith wrote: »
    Rather than Linux, why not port the original Unix? For example, RetroBSD (http://retrobsd.org/wiki/doku.php), which is based on BSD 2.x, and targets a machine with 128K of RAM, would be a much better match for Prop2 than Linux, which these days takes megabytes of RAM.
    It looks like this port to the PIC32 makes use not only of the 128K of SRAM on the PIC32 but also the 512K of flash. We wouldn't be able to do this on the P2 without using some sort of external memory, probably an SDRAM. Then we would end up using at least a little of the 128K of hub memory as a cache for the external memory. If this port really requires 128K of RAM we may still be in trouble.
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-07-04 10:53
    Interesting thread guys!

    Re/ Flash

    While I have not seen the definitive word on it, from what I've seen so far I suspect that the P2 flash will probably load a "boot image" from the first 2k, then use the rest of the initial 128k as a boot image.

    If that is the case, then $20000-$7FFFF would be available in a 512KB flash chip, and $20000-$FFFFF in a 1MB flash chip. Flash chips up to 64Mb are readily available.

    Mind you, the SDRAM could be used as the proposed "swap ram" (and instead of flash) ...
    David Betz wrote: »
    It looks like this port to the PIC32 makes use not only of the 128K of SRAM on the PIC32 but also the 512K of flash. We wouldn't be able to do this on the P2 without using some sort of external memory, probably an SDRAM. Then we would end up using at least a little of the 128K of hub memory as a cache for the external memory. If this port really requires 128K of RAM we may still be in trouble.
  • Heater.Heater. Posts: 21,230
    edited 2013-07-04 15:00
    Some of the hardware listed on the RetroBSD page comes with as little as 32K of RAM so it looks like we could be in luck for a P2 port.
Sign In or Register to comment.