FreeDOS support

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: FreeDOS support

Post by pfalcon » Sat Nov 28, 2015 5:15 pm

If you can polish that into clean patches, we'd be glad to merge them into mainline.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

josie87
Posts: 24
Joined: Tue Jun 30, 2015 2:46 pm

Re: FreeDOS support

Post by josie87 » Mon Nov 30, 2015 2:09 pm

Great! You made it. Will test asap. :-)

pohmelie
Posts: 55
Joined: Mon Nov 23, 2015 6:31 pm

Re: FreeDOS support

Post by pohmelie » Mon Nov 30, 2015 4:02 pm

pfalcon wrote:If you can polish that into clean patches, we'd be glad to merge them into mainline.
Do you mean pull request? How to be with binaries? Also, makefile copied from unix build, but, I think, it's dirty for FreeDos with unused parts and can be stripped. But I have no experience with makefiles at all :? And some *.c files (maybe another ones too) are not used, I think.
josie87 wrote:Will test asap
Awesome, feedback is what we need here, since it tested only with one board and dosbox.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: FreeDOS support

Post by pfalcon » Mon Nov 30, 2015 4:11 pm

pohmelie wrote:
pfalcon wrote:If you can polish that into clean patches, we'd be glad to merge them into mainline.
Do you mean pull request?
Yes.
How to be with binaries?
The simplest answer - in no way. Users who need it, can build it themselves. There's also ticket to provide binaries in "official" way: https://github.com/micropython/micropython/issues/1295 , but it likely will take a lot of time to get that done. You of course can provide binaries yourself, at your, and your users risk.
Also, makefile copied from unix build, but, I think, it's dirty for FreeDos with unused parts and can be stripped. But I have no experience with makefiles at all :? And some *.c files (maybe another ones too) are not used, I think.
So, ideal solution would be to just use existing unix makefile and port directory (and just apply as few as possible #ifdef's to support DJGPP). If that's not possible, then having a top-level directory with minimal set of files, like for Windows, would work too.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: FreeDOS support

Post by dhylands » Mon Nov 30, 2015 5:01 pm

I'd be more than happy to help you with any makefile stuff that's needed.

pohmelie
Posts: 55
Joined: Mon Nov 23, 2015 6:31 pm

Re: FreeDOS support

Post by pohmelie » Mon Nov 30, 2015 10:15 pm

pfalcon wrote:ideal solution would be to just use existing unix makefile and port directory
Are you sure this is the best solution? Cause I think, that FreeDos have very little with unix build, not about Makefile difference, but… this is very different operating systems. I think more, than win and unix are. Also, FreeDos build requires proper environment variables, so there should be readme/guide, something like in my repo right now. So it's not just easy as "make freedos".
dhylands wrote:I'd be more than happy to help you with any makefile stuff that's needed.
Awesome, I will try to minimize port and will post progress here, so you can review it. ;)

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: FreeDOS support

Post by dhylands » Mon Nov 30, 2015 10:26 pm

pohmelie wrote:
dhylands wrote:I'd be more than happy to help you with any makefile stuff that's needed.
Awesome, I will try to minimize port and will post progress here, so you can review it. ;)
In terms of reviewing things, the best (for me) would be to put the changes on a github branch and post a link to your branch.

pohmelie
Posts: 55
Joined: Mon Nov 23, 2015 6:31 pm

Re: FreeDOS support

Post by pohmelie » Mon Nov 30, 2015 10:53 pm

dhylands
Of course, I need time to try minimize repo.

pohmelie
Posts: 55
Joined: Mon Nov 23, 2015 6:31 pm

Re: FreeDOS support

Post by pohmelie » Tue Dec 01, 2015 8:10 am

dhylands
I'm done with minimizing as I can. I think you can review it now ;) https://github.com/pohmelie/micropython ... er/freedos
There is some «trick» to avoid alloca.h, for example. I use -D__FreeBSD__=5 cause -DMICROPY_NO_ALLOCA=1 does not work. Hm, but probably we can just remove those #if #else #end and just #include <stdlib.h> at the end of mpconfigport.h.

josie87
Posts: 24
Joined: Tue Jun 30, 2015 2:46 pm

Re: FreeDOS support

Post by josie87 » Tue Dec 01, 2015 11:32 am

Followed the instructions so far. DJGPP builds without errors.

Getting an error while building the Freedos port:
/home/johannes/djgpp/lib/gcc/i586-pc-msdosdjgpp/4.9.3/include/stddef.h:56:24: fatal error: sys/_types.h: No such file or directory
#include <sys/_types.h>
^
compilation terminated.
Used this env setting:

Code: Select all

export CROSS_COMPILE=/home/johannes/djgpp/i586-pc-msdosdjgpp/bin/
export DJGPP_GCC=/home/johannes/djgpp/bin/i586-pc-msdosdjgpp-gcc
make
screenshot:
Bildschirmfoto von »2015-12-01 12-29-13«.png
Bildschirmfoto von »2015-12-01 12-29-13«.png (70.05 KiB) Viewed 7028 times

Post Reply