English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 06 November 2014, 10:59   #61
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,515
Perhaps I missed something but aros-m68k of course uses same ABI and everything, it is supposed to run normal AOS binaries after all. (and vice versa if binary is not linked with aros startup)

Most executables should be in elf-format (unless something was changed and they all are now converted to hunk before distribution files are created).

At least arosbootstrap loadable rom image (aros.elf.gz) is elf formatted. (arosbootstrap = softkick for aros.elf, only works with elf executables). Note that arosbootstrap is also a special case, it is designed to run on AOS to allow aros m68k softkick.

afaik only point of having elf excutables (vs hunk) is better debugging and compatibility with other "alien" tools (standard nm can be used to list all symbols etc..)

Quote:
Are you sure this is AROS?
No but perhaps it is only some assembly startup code. (I don't really remember)
Toni Wilen is online now  
Old 06 November 2014, 13:00   #62
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by Heiroglyph View Post
I'm the guy wawa mentioned earlier that had done some vbcc builds of certain parts of Aros.
welcome! thx for interest!

Quote:
I think Aros is taking so long because the development path taken is completely backwards, working from x86 with foreign tools and kinda sorta wanting 68k to eventually work.

BS, that's untestable and unsustainable.

Use Amiga tools to write C replacements of individual libraries, test them individually with an otherwise stock AOS system to isolate the bugs and move to the next library.
that is what i used to think first when aros68k kicksart replacement started. i thought, coming from afa-os, exactly that: compile file for file, library for library and replace the genuine parts with it one by one. it might be one way, but now i understand that experienced professinal developers like jason and toni have chosen the most convenient way. anyway it came a long way down this way and it would be foolish to abandon this and start over from the beginning. however whil testing one might adopt the one by one strategy.

Quote:
Writing the entire OS and supporting libraries (CybergraphX, etc) in one shot while also porting to another platform is just insane. Get a working replacement in a stable environment, then port to a completely different platform after you feel confident that the code is reasonably stable. You need an anchor to rely on or you'll never get anywhere.
but thinking like that we will not come anywhere, because aros is in steady development, a moving target if you will anyway. waiting till it would be ready is waiting forever. and as it is now, it is already working pretty well, wee just need to improve it.
Quote:
What I did was pull the C directory of Aros and start building and testing the resulting binaries on 3.1. No Aros specific calls, no additions, just binary compatible Amiga executables of similar size to the originals.

That was a test to get the development process down before starting on libraries and I think it worked out pretty well.
what have you compiled it against? amiga or aros headers?

Quote:
What kills me on the libraries is the massive wad of macros required to force gcc into submission and how far Aros strayed from using Amiga library interfaces, instead falling back to Aros specific calls, making it essentially monolithic, you can't just mix and match with AOS as it stands. Aros becomes more of a reference material than source.
i think thiese macros is one of the main problems that have to be taken care about, as we all acknowledge. however its not true, that you cannot mix aros and amiga library calls under aros68k. on the contrary, you can use genuine amiga libs and classes under aros allright along the aros ones and substitute them by each other.

Quote:
I'm all for helping work on 68k Aros, but there's no way I'm going to go down the current path of development.
please understand that the current patch of development, it is just what makes aros sensible as aos replacement. you get aros improvements on 68k practically for free. one of the big issues is not to get something ready, but to have it maintained and automate as much of the maintenance as possible, especially with the limited human ressources. we need to cooperate, not split. and so building own aros fork would cut us away from all advantages aros might provide. im completely with toni on that. project of this size is impossible to be worked on by hand, especially it needs to provide the structure for contributors to fit in.
wawa is offline  
Old 06 November 2014, 13:16   #63
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Quote:
Originally Posted by Toni Wilen View Post
Perhaps I missed something but aros-m68k of course uses same ABI and everything, it is supposed to run normal AOS binaries after all.
Ok. So there is not much to change for the executables and libraries.

Quote:
Most executables should be in elf-format (unless something was changed
Not in the last nightly ISO, which I just downloaded.


Quote:
At least arosbootstrap loadable rom image (aros.elf.gz) is elf formatted.
No. It's called aros.hunk.gz now.
phx is offline  
Old 06 November 2014, 13:49   #64
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by Toni Wilen View Post
afaik only point of having elf excutables (vs hunk) is better debugging and compatibility with other "alien" tools (standard nm can be used to list all symbols etc..)
are these debugging options available for amiga-m68k at all?

i thought the exec loaders for elf and hunk were different and deadwood improved aomething the elf one few months ago while the other was left as is.

if nothing of this matters and it seems that elf format has no advantages for amiga-m68k platform, we can stay with hunk as well.
wawa is offline  
Old 06 November 2014, 14:00   #65
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
@toni

just trying to compile some small pieces of aros outside the build mechanism (single file sources like c commands) and i notice how powerfull mechanism it is to configure to a target platform. headers need to be created, a lot of constants have to be defined, while doing this by hand is crazy.

what and where are acually these annoying macros? asmcall.h? can we narrow down a possibly small region of source that would be beneficial to make changes to in order to have it compiled with vbcc? i think it would be best to mess with the build system only where absolutely necessary.
wawa is offline  
Old 06 November 2014, 14:08   #66
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,515
Quote:
Originally Posted by wawa View Post
are these debugging options available for amiga-m68k at all?

i thought the exec loaders for elf and hunk were different and deadwood improved aomething the elf one few months ago while the other was left as is.

if nothing of this matters and it seems that elf format has no advantages for amiga-m68k platform, we can stay with hunk as well.
My debugging is mainly via UAE debugger (and adding special case tests in CPU/memory access code) but I am quite sure everyone else uses native debuggers.

Quote:
Originally Posted by wawa View Post
@toni

just trying to compile some small pieces of aros outside the build mechanism (single file sources like c commands) and i notice how powerfull mechanism it is to configure to a target platform. headers need to be created, a lot of constants have to be defined, while doing this by hand is crazy.

what and where are acually these annoying macros? asmcall.h? can we narrow down a possibly small region of source that would be beneficial to make changes to in order to have it compiled with vbcc? i think it would be best to mess with the build system only where absolutely necessary.
I don't know (and it is something I'd prefer not to know in future either )

Jason did 99% of the macro stuff. (The most difficult to part that had to be done before anything m68k was possible)

Quote:
Originally Posted by phx View Post
No. It's called aros.hunk.gz now.
Strange. It has always been elf and arosbootstrap has not changed for long time.. I guess some build option has changed and now all files are converted to hunk. (Note that I practically have never used binaries, I always compile everything myself)
Toni Wilen is online now  
Old 06 November 2014, 15:21   #67
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by Toni Wilen View Post
I don't know (and it is something I'd prefer not to know in future either )
i cant spare you, looks like here is that evils tail sticking off:
/AROS-source/arch/m68k-all/include/gencall.c

Quote:
Jason did 99% of the macro stuff. (The most difficult to part that had to be done before anything m68k was possible)
he hasnt been seen around, and has only made few commits lately. he wants to be left alone i take it, or have you any contact to him, toni? otherwise i will probably need to ping him again with anunforseeable effect..
wawa is offline  
Old 06 November 2014, 19:13   #68
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
i have a message from jason whom i will directly quote here, not to miss something:
Quote:
gencall.c would need to be modified to emit the correct library call macros for vbcc - whatever they would happen to be.

asm.c is is the trickier issue, see:


http://en.wikibooks.org/wiki/Aros/Pl.../Compiler#VBCC



And i know of no good resolution for that one, without extending vbcc.
wawa is offline  
Old 07 November 2014, 01:51   #69
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
Quote:
Originally Posted by wawa View Post
i have a message from jason whom i will directly quote here, not to miss something:
Jason did a good job of documenting. So the problems are here:

asm.c
https://gitorious.org/aros/aros/sour.../include/asm.c

gencall.c
https://gitorious.org/aros/aros/sour...lude/gencall.c

The whole AROS build system does look overly complex and full of GCCisms. Maybe Heiroglyph's idea of creating a new 68k build (like AFA OS but with real Amiga executables and libraries) isn't that bad of an idea.
matthey is offline  
Old 07 November 2014, 02:16   #70
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
@matthey

you would have to put together another build system instead. okay, it might be easier, because you would have a fixed target and you wouldnt have to automate building a toolchain if you would update it by hand. but the question, whatever solution, is about the same: who is going to do that?

another question remains: how will we keep synchronized with aros upstream? also by hand? you have to keep track of changes, test, and update accordingly to maintain. also we lose influence on the main aros branch, on which we though still depend in that case. our reports may not be taken into account if there is a problem.

also, we would have either to heavily modify the sources or does heiroglyph already forund out what set of definitions is needed to compile the executables vith vbcc?

@phx:

what you you think about jasons mail, do you know what he is reffering to exactly (im just reading on struct offsets, but its way ahead before i understand what particular problem is crosscompiling from x86 to 68k any why it is so special). if so do you think there is a solution we can think of, i mean aros/vbcc?

Last edited by wawa; 07 November 2014 at 02:23.
wawa is offline  
Old 07 November 2014, 10:56   #71
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Quote:
Originally Posted by wawa View Post
what you you think about jasons mail, do you know what he is reffering to exactly
Without any AROS background not really. He wants to define structure offsets with the preprocessor for an assembler source, by using the C headers. But for what purpose is that needed?
He mentions it might be for generating assembler include files or generating a cpu.i (whatever this is needed for) ... ?


Quote:
(im just reading on struct offsets, but its way ahead before i understand what particular problem is crosscompiling from x86 to 68k any why it is so special).
Running a cross compiler on x86 (not matter if 32- or 64-bit) which emits 68k code is not a problem at all. I'm doing that frequently with vbccm68k. There are neither alignment nor endian issues, as the cross compiler should be aware of that. I can only see minor problems with floating point constants in the source, which might differ in the least significant bit, because the x86 FPU has a different (lower) precision than the M68k FPU.

But probably Jason is refering to something else.

Quote:
if so do you think there is a solution we can think of, i mean aros/vbcc?
I can ask Volker to extend vbcc's inline assembly, to treat it as format strings allowing arguments to be passed.

Better would be to understand why all these macros and inline assembly are needed and think about a better solution. For example, all other Amiga-like operating systems use FD or SFD files to define their library functions and arguments, so fd2pragma can generate stubs for any compiler.
phx is offline  
Old 07 November 2014, 12:58   #72
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,515
Quote:
Originally Posted by phx View Post
Without any AROS background not really. He wants to define structure offsets with the preprocessor for an assembler source, by using the C headers. But for what purpose is that needed?
He mentions it might be for generating assembler include files or generating a cpu.i (whatever this is needed for) ... ?
Yes. It appears to be automatically generating assembler header file with offsets to structures from C header files. (used by assembly/inline assembly files). Manually duplicating it would be really painful.

Perhaps there is less ugly method to automatically generate structure offsets from C headers? (We don't need extra care because our compiler already knows m68k structure alignment)

We can't use official AOS headers because AOS headers have private fields (that are documented or reused in AROS) and AROS also have extensions.

Quote:
Better would be to understand why all these macros and inline assembly are needed and think about a better solution. For example, all other Amiga-like operating systems use FD or SFD files to define their library functions and arguments, so fd2pragma can generate stubs for any compiler.
In AROS fd (and friends), even library base structure header file is created automatically from library.conf file, not the other way around. Which is nice, there is single file that defines everything about the library, for example if you want to add new function to library, just add it to .conf file (+implementation in separate source), the rest is automatic.
Toni Wilen is online now  
Old 07 November 2014, 13:18   #73
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by Toni Wilen View Post
In AROS fd (and friends), even library base structure header file is created automatically from library.conf file, not the other way around. Which is nice, there is single file that defines everything about the library, for example if you want to add new function to library, just add it to .conf file (+implementation in separate source), the rest is automatic.
just found about it too
wawa is offline  
Old 10 November 2014, 13:13   #74
Hewitson
Registered User
 
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,773
Quote:
Originally Posted by phx View Post
Additionally installed applications, not belonging to the base system, usually go under /usr/local on a Unix system. I chose /usr/local/vbcc.

The typical structure is:
Code:
frank@jaana ll /usr/local/vbcc/
total 20
drwxr-xr-x   2 frank  users  512 May 16  2013 bin
drwxr-xr-x   2 frank  users  512 Aug 23 17:37 config
drwxr-xr-x  12 frank  users  512 Apr 20  2013 targets
This is a very strange configuration. If you did not want to follow the normal /usr/local/bin, /usr/local/share, etc structure, you should have used /opt/vbcc, IMHO.
Hewitson is offline  
Old 11 November 2014, 09:54   #75
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Making new directories for software under /usr/local is not that unusual. /opt, on the other hand, is used by Linux only (for optionally installed software packages?) while I'm using NetBSD.
phx is offline  
Old 13 November 2014, 18:04   #76
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
just to document the progress and save a reference for further apporoach.

aros dependency packages:

binutils-source
libcloog-ppl-dev (adds lots of other dependencies)
g++
libelf-dev
bison
flex
gcc-4.5-source
libmpfr-dev
libmpc-dev
libecm-dev
netpbm
automake
libpng-dev (on ubuntu i have libpng12-dev, lets see if this will cause problems)
libc6-dev-i386


currently building aros68k crosstools on ubuntu:

directory structure:

<some dir>
- aros (clean aros sources here, no binaries!)
- build-m68k-tools (cross compiler will be built here)
- yet another directory where aros-m68k will be build (I just use "build")

<some dir>
cd build-m68k-tools
./../aros/configure --target=amiga-m68k --with-aros-toolchain-install=/opt/aros-m68k
sudo make -s crosstools
wawa is offline  
Old 16 November 2014, 19:20   #77
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
../aros/configure --target=amiga-m68k --with-aros-toolchain-install=/opt /aros-m68k --with-aros-toolchain=yes --with-serial-debug=yes
make -s

am proud to report that with an extensive help of toni i was able to build aros68k on my machine. many thanks, toni!

now i will be looking into the details.
wawa is offline  
Old 29 November 2014, 12:48   #78
ZyBeR
 
Posts: n/a
How is it going guys,
Are we making any progress?
 
Old 29 November 2014, 15:19   #79
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by ZyBeR View Post
How is it going guys,
Are we making any progress?
i dont know. i am learning and documenting how to cross build aros and trying to get around the source and build system. thats what i can do myself atm. but it seems deadwood is up to something:
http://eab.abime.net/showthread.php?t=75973
looks like he tries to compile some example part of aros with gcc.
wawa is offline  
Old 29 November 2014, 16:30   #80
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
@wawa
You mean VBCC don't you?
Samurai_Crow is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
AMOS for Windows installer using AROS-68K and WinUAE Mequa News 32 04 May 2017 09:08
New Video of my Aros 68k distribution "Aros Vision" OlafSch Amiga scene 26 16 February 2016 11:16
How do I create an AROS 68k boot disk? Leandro Jardim Amiga scene 3 18 October 2014 03:37
News about Aros Vision OlafSch Amiga scene 3 09 June 2014 15:04
Version 1.3. of Aros Vision 68k online now OlafSch Amiga scene 1 19 June 2012 13:43

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:21.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14200 seconds with 13 queries