Min requirements

336 visualitzacions
Ves al primer missatge no llegit

Joseph Chamness

no llegida,
13 de maig 2021, 9:17:0913/5/21
a minix3
The old version used to run on 512k plus floppy right?

The Raspberry Pico with the RP2040 mcu has 512k ram plus 2mb of flash. The code could run from flash? Also a lot of the disk drivers etc should be simpler(take less code) if using some of the flash and/or a SD card reader module.

So I was wondering how hard it would be to get it working on a Raspberry Pico with the RP2040?

PS. why are the minimum Specs so much higher on minix3.org wiki? Shouldn't the micro kernel + a minimum needed to use a terminal over serial and say 'ls' and maybe 'top' be much less?

Peter Shkenev

no llegida,
13 de maig 2021, 12:50:4313/5/21
a minix3
Hello Joseph,

Unfortunately, Minix does not support Raspberry Pico. And I doubt that it will support: 2mb is too scarce even for Linux. AFAIK Raspberry Pico is more like Arduino - it does not run an OS, it runs your program directly.

Today's Minix is very different from Minix which used to run from 512k floppy. Early Minix's target was education, so it had to be simple enough. Moreover, hardware of that time was much simpler than today's. And there are many more reasons why Minix was lighter than today.

As for 3.4.0-rc6, the image and installed system contains around 210Mb of test suites, I think you can remove them safely. Also, there are llvm and clang that you can remove too.

Best regards,
Peter
четверг, 13 мая 2021 г. в 16:17:09 UTC+3, jos...@chamness.org:

veganaiZe

no llegida,
13 de maig 2021, 14:48:5813/5/21
a minix3
Minix 3 seems to be getting very bloated, rather quickly.  Although 512 KB RAM and 2 MB storage may be much too little for the modern operating system, why does a typical install tip the scales toward the gigabyte instead of the megabyte?

The fact that Minix 3.4rc6 forces users to install X seems strange, for example, especially if one wants to use it for something like a stand-alone web server.  I have to imagine it's because it'd otherwise require too much hackery to configure & install?

I think it'd be nice if the (user-land) pieces surrounding the OS reflected the tone of Minix, itself.

Peter Shkenev

no llegida,
13 de maig 2021, 15:35:1413/5/21
a minix3
Hello veganaiZe,

> Minix 3 seems to be getting very bloated, rather quickly
What do you mean by "rather quickly"? There is no changes since 2018. Or, if you compare with Minix 1.x, that's 20-30 years? And, if you are talking about "bloat", what do you mean by "bloat"? Can you show example of "bloat" in Minix?


> The fact that Minix 3.4rc6 forces users to install X seems strange
Minix 3.4rc6 does not force you to install X.

> I think it'd be nice if the (user-land) pieces surrounding the OS reflected the tone of Minix, itself.
AFAIK the primary target of Minix is security and reliability. And Minix is quite lightweight, compared to other systems.
If you want to fit into <= 32 megabyte of memory,  you need to:
1) Strip out all documentation, compilers and drivers for devices that your target machine does not have
2) Port Busybox/Toybox from Linux to Minix. They occupy much less space, but the price is functionality. These package offer only very basic functionality
3) Port Musl libc from Linux to Minix.
4) Enjoy your lightweight system

You can go even further: Install DOS and enjoy your almost-zero-disk-space and almost-zero-functionality system.

Best regards,
Peter
четверг, 13 мая 2021 г. в 21:48:58 UTC+3, veganaiZe:

veganaiZe

no llegida,
13 de maig 2021, 19:54:5313/5/21
a minix3
Peter,

> What do you mean by "rather quickly"?
I probably should've have said "relatively quickly, when compared against the 3.3 distribution".  I wasn't referring to the kernel, per se, but to the (.iso) distribution.  By "bloat" I referring to the packages which are shoveled onto the system during an install -- most specifically the X system.

> Minix 3.4rc6 does not force you to install X.
It actually does, from the distribution ISO image, in both 'automatic' and 'expert' mode.  How can one prevent it?

> If you want to fit into <= 32 megabyte of memory,  you need to:
> 1) Strip out all documentation, compilers and drivers for devices that your target machine does not have
> 2) Port Busybox/Toybox from Linux to Minix. [...]
> 3) Port Musl libc from Linux to Minix.
I think, ideally, the installer should offer an option to avoid installing documentation, compilers, and unnecessary drivers, in the first place.  Having to manually remove them feels like a redundant waste of time / resources.  I'd be happy to look into implementing such a feature, as well as porting Busybox and/or Toybox (and possibly other lightweight libraries & programs; see: https://wiki.musl-libc.org/alternatives.html)

Thank you for the reply.

Peter Shkenev

no llegida,
14 de maig 2021, 4:25:0914/5/21
a minix3
> when compared against the 3.3 distribution
That was release, and 3.4.0-rc6 is release candidate. It has additional software for testing and does not have package manager


> By "bloat" I referring to the packages which are shoveled onto the system during an install -- most specifically the X system.
You can delete this using rm. As I said, package manager is unavailable in 3.4.0-rc6, so now there is no elegant way to do this, and no way to keep additional software on remote server. This would be resolved when 3.4.0 is finally released (maybe).

> It actually does
My installation does not. Maybe, because it was compiled on my pc.

> Having to manually remove them feels like a redundant waste of time / resources
As I said, this is due to lack of package manager.


> I'd be happy to look into implementing such a feature
You are welcome. As for Musl, please note that it might have less features than current libc (for example, there is no locale support in Musl), and I doubt that keeping two copies of each package linked against different libcs is a viable option.

Best regards,
Peter


пятница, 14 мая 2021 г. в 02:54:53 UTC+3, veganaiZe:

Joseph Chamness

no llegida,
14 de maig 2021, 9:52:4014/5/21
a min...@googlegroups.com
On Thu, 13 May 2021 at 17:50, Peter Shkenev <santu...@gmail.com> wrote:
>
> Hello Joseph,
>
> Unfortunately, Minix does not support Raspberry Pico. And I doubt that it will support: 2mb is too scarce even for Linux. AFAIK Raspberry Pico is more like Arduino - it does not run an OS, it runs your program directly.
>
RP2040 is not just used for a flat program, FreeRTOS a real time
operating system works on it. The flash is off chip so you could have
up to 16Mb of code space for utility etc. on some boards. (Not sure if
the minix ARM code has running from flash. minix3.org seems to be down
at the minute.)

Also it should be fairly trivial to use SD cards so the equivalent of
disk space should be no problem. And later versions and similar MCUs
like the ESP32 are only going to have more and more memory for new
chips. And we do have Minix 1 as an example that should run on it if
converted to ARM and had some changes to the fs and memory code? Would
Minix 2 work? Maybe you could even use code from the python that works
of the RP2040 for the fs?

> Today's Minix is very different from Minix which used to run from 512k floppy. Early Minix's target was education, so it had to be simple enough. Moreover, hardware of that time was much simpler than today's. And there are many more reasons why Minix was lighter than today.

Embedded MCUs like the RP2040 should be a lot simpler than using the
BIOS on the 512k IBM PCs right? Are there no compiler directives to
leave out the extra code in the kernel?
As for all the utilities can't most of them just be not used?
Considering you don't need disk drive code shouldn't you be able to
cut down on the Minix 1/2 code?

Would it be possible to cut down Minix 3 to the same utility as Minix
1 or update Minix 1/2 with the Micro kernel and keep a small size, is
it the kernel itself that is way bigger now?

>
I was really asking how small you could cut down the bare minimum to,
say the micro kernel size(and min data, stack, code size) down to if
you cross-compiled for size and striped out anything that you could?
The web page keeps saying 4000 lines of code so seems Quite small.
What about the the minimum of "trusted computing base", what would be
need and it's size.

How much stack/data(sram) and code(flash) memory does the smallest
BeagleBone ARM build use to load/boot without counting the utilitys
sitting on the disk and not used?

As the RP2040 has ROM code to execute code with drag and drop from USB
Just getting the micro kernel running and(?) trusted computing base.
And minimum to be able to run compiled binaries already loaded into
code space(flash) by the USB drag and drop etc. Would it be possible
if cross-compiled to ARM and get a serial terminal working like
telnet? With no extra utility

Peter Shkenev

no llegida,
14 de maig 2021, 13:20:5914/5/21
a minix3
> FreeRTOS a real time operating system works on it
FreeRTOS was designed especially for microcontrollers and does not provide even a half of services that Minix provides. FreeRTOS has different usage model. So here comparison is incorrect.

> Would it be possible to cut down Minix 3 to the same utility as Minix
> 1 or update Minix 1/2 with the Micro kernel and keep a small size, is
> it the kernel itself that is way bigger now?

You are free to try it.

> As for all the utilities can't most of them just be not used?
What are the utilities that are not used? Are you absolutely sure nobody uses them?

> Embedded MCUs like the RP2040 should be a lot simpler than using the
> BIOS on the 512k IBM PCs right? Are there no compiler directives to
> leave out the extra code in the kernel?
> Considering you don't need disk drive code shouldn't you be able to
> cut down on the Minix 1/2 code?
> Would it be possible to cut down Minix 3 to the same utility as Minix
> 1 or update Minix 1/2 with the Micro kernel and keep a small size, is
> it the kernel itself that is way bigger now?
Are you suggesting reverting to Minix 1 or 2... just in order to run it on your Raspberry Pico? This is a microcontroller. What even the point of running Minix or any full-fledged operating system here?

> The web page keeps saying 4000 lines of code so seems Quite small
This is the kernel itself. It is useless without software and drivers

> As the RP2040 has ROM code to execute code with drag and drop from USB
> Just getting the micro kernel running and(?) trusted computing base.
> And minimum to be able to run compiled binaries already loaded into
> code space(flash) by the USB drag and drop etc. Would it be possible
> if cross-compiled to ARM and get a serial terminal working like
> telnet? With no extra utility
Can you elaborate on this?

Best regards,
Peter

пятница, 14 мая 2021 г. в 16:52:40 UTC+3, jos...@chamness.org:

Joseph Chamness

no llegida,
18 de maig 2021, 12:14:2718/5/21
a minix3


On Friday, 14 May 2021 at 18:20:59 UTC+1 Peter Shkenev wrote:

Well I guess I wasn't very clear to start with and am getting sidetracked, I was hoping for something like a table for the boot process one fork/process at a time and how much data and code segment memory that each task used and the total at that point. Why this process/module was needed and what it does.
Maybe the tests output this information?
Is there maybe a wiki page or file in the source code somewhere showing the kernel boot procedure in detail? Thought there might be for teaching. Or someone may know approximately.
Also if any of it was modifiable like maybe process table size etc. so it could be made smaller without rewriting much code.


> FreeRTOS a real time operating system works on it
FreeRTOS was designed especially for microcontrollers and does not provide even a half of services that Minix provides. FreeRTOS has different usage model. So here comparison is incorrect.

Well Minix 2 ran on 512k, 640k, 720k depending on version? and was POSIX compliant.

How come going to a micro kernel the requirements jumped to 32 MiB form 512k, 64 time more memory, or 6400%,
As in where exactly it was used? Do the self healing modules really use all that?

I was hoping for more or less just the Minix 3 kernel without any of the extra operating system tools to be more or less comparable to FreeRTOS. From your replies looking like I am out of luck though.
 

> As for all the utilities can't most of them just be not used?
What are the utilities that are not used? Are you absolutely sure nobody uses them?

> Embedded MCUs like the RP2040 should be a lot simpler than using the
> BIOS on the 512k IBM PCs right? Are there no compiler directives to
> leave out the extra code in the kernel?
> Considering you don't need disk drive code shouldn't you be able to
> cut down on the Minix 1/2 code?
> Would it be possible to cut down Minix 3 to the same utility as Minix
> 1 or update Minix 1/2 with the Micro kernel and keep a small size, is
> it the kernel itself that is way bigger now?
Are you suggesting reverting to Minix 1 or 2... just in order to run it on your Raspberry Pico? This is a microcontroller. What even the point of running Minix or any full-fledged operating system here?

> The web page keeps saying 4000 lines of code so seems Quite small
This is the kernel itself. It is useless without software and drivers

> As the RP2040 has ROM code to execute code with drag and drop from USB
> Just getting the micro kernel running and(?) trusted computing base.
> And minimum to be able to run compiled binaries already loaded into
> code space(flash) by the USB drag and drop etc. Would it be possible
> if cross-compiled to ARM and get a serial terminal working like
> telnet? With no extra utility
Can you elaborate on this?

Well it does say on the wiki that Minix is aimed at embedded systems so.
Say you want to flash a led. (or run a weather station, etc.)
I was hoping it would be possible to:
1: install just the kernel with the minimum self healing part(min code and data space for this?) and as everything is modules then:
2: Be nice if you could install minimal versions of ftp, telnet and/or ssh and a small program to replace apt, so you can say telnet to your weather station and use 'apt install ls' if you need it (but it could just copy any programs over at the same time as the kernel)
3: install the IO pin module.
4: Write a program to use the module to flash the led.

And you should then be able to use more or less any UNIX program with source and that needs smaller amounts of memory. Most anything that worked on lower memory Minix 2 computes for a start?

Shouldn't it be possible to have something like to the Linux kernel Menu config with check boxes for kernel options plus things like ls, ps, sh, shh, ftp, telnet etc. and then it would go and use cmake etc. to download and install everything.


As for the point, mostly just for fun to say got Minix kernel running on the RP2040. But I think it would be very nice for education and embedded systems. It may be nice for schools in 3rd world countries to be able to have $3 IBM PC 512k Unix equivalent, you could even add a $2 lcd display module as a terminal screen. :P Also if you are doing projects with embedded systems being able to use Minix on anything you make instead of swapping to FreeRTOS for projects with MPUs maybe nice?
Wouldn't it be cool if the Minix 3 Micro kernel could run on  RP2040s, ESP32s, Raspberry Pi etc all the way up to PCs by just installing modules and programs with say apt?
 

Best regards,
Peter

Peter Shkenev

no llegida,
18 de maig 2021, 19:29:0518/5/21
a minix3
>  I was hoping for something like a table for the boot process one fork/process at a time and how much data and code segment memory that each task used and the total at that point
GDB and source code are at your service. Nobody would track such things and write it down because of volatility.

> Why this process/module was needed and what it does.
Each program is documented enough to understand its purpose

> Also if any of it was modifiable like maybe process table size etc. so it could be made smaller without rewriting much code.
Figure out the reliable way of changing process table size in runtime and come back.

> Well Minix 2 ran on 512k, 640k, 720k depending on version? and was POSIX compliant
Firstly, I do not understand how does this make comparison with FreeRTOS correct. Secondly, it is not compliant with modern POSIX anymore. Thirdly, why then don't you use Minix 2?

> How come going to a micro kernel the requirements jumped to 32 MiB form 512k, 64 time more memory, or 6400%,
> As in where exactly it was used? Do the self healing modules really use all that?
Minix 2 was released in 1997. Do you really think that in last 20 years Minix devs did nothing but inflated the kernel with absolutely useless code that occupies additional 31.5 MiB of space just because? Did you ever tried to consider a possibility that this code actually does something useful? If you want to really know the difference, you should read changelogs and compare sources. Otherwise, you are demonstrating disrespect to Minix developers and their work.

> I was hoping for more or less just the Minix 3 kernel without any of the extra operating system tools to be more or less comparable to FreeRTOS. > From your replies looking like I am out of luck though.
No, these are completely different OSes.

> Well it does say on the wiki that Minix is aimed at embedded systems so.
> Say you want to flash a led. (or run a weather station, etc.)
> I was hoping it would be possible to:
> 1: install just the kernel with the minimum self healing part(min code and data space for this?) and as everything is modules then:
> 2: Be nice if you could install minimal versions of ftp, telnet and/or ssh and a small program to replace apt, so you can say telnet to your weather > station and use 'apt install ls' if you need it (but it could just copy any programs over at the same time as the kernel)
> 3: install the IO pin module.
> 4: Write a program to use the module to flash the led
Firstly, please refrain from reposting the reposts.
Secondly, Minix is an overkill for led. You have other things designed for that. For a weather station, you want to use something more powerful than Raspberry Zero.

Best regards,
Peter

вторник, 18 мая 2021 г. в 19:14:27 UTC+3, jos...@chamness.org:

hao jiu

no llegida,
20 de maig 2021, 21:17:2020/5/21
a minix3
IMHO,you guy just said exactly what I was thinking.

jos...@chamness.org 在 2021年5月19日 星期三上午12:14:27 [UTC+8] 的信中寫道:
Respon a tots
Respon a l'autor
Reenvia
0 missatges nous