Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
30 user(s) are online (12 user(s) are browsing Forums)

Members: 0
Guests: 30

more...

Headlines

Forum Index


Board index » All Posts (Hans)




Re: Trouble building GCC 11 cross-compiler on Ubuntu
Home away from home
Home away from home


@all

I've managed to get gcc 6 built too by using the SDK's clib2. The adtools project is suffering from a bit of bitrot, with things that used to work breaking.

Ideally we'd just use the latest GCC. Unfortunately, support for the SPE was deprecated in GCC 8, and removed in GCC 9. So, we need version GCC 7 or older.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: Trouble building GCC 11 cross-compiler on Ubuntu
Home away from home
Home away from home


I got past the ISL problem by using the patch in the link I shared above. Now it's failing while building clib2 with:
native-build/gcc-cross-build-6.4.0/gcc/as: 106exec: -mppcnot found


This is when assembling crt0.S

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: Trouble building GCC 11 cross-compiler on Ubuntu
Home away from home
Home away from home


... and GCC 6 is failing in a similar manner:
code]graphite-isl-ast-to-gimple.c:2903:16: error: ‘isl_id_alloc’ was not declared in this scope; did you mean ‘isl_vec_alloc’?
2903 | isl_id *id = isl_id_alloc (isl_ast_build_get_ctx (build), "", for_info);
| ^~~~~~~~~~~~
| isl_vec_alloc
[/code]

Any idea on what broke? What do I have to do to make this work?

EDIT: This seems to be caused by an external dependency:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248674

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: Trouble building GCC 11 cross-compiler on Ubuntu
Home away from home
Home away from home


@all

I have now successfully built the GCC 11 cross-compiler. Thanks for your help.

Building GCC 5 failed, though, with compiler error such as:
adtools/gcc/repo/gcc/graphite-interchange.c:443:19error‘isl_space_add_dims’ was not declared in this scopedid you mean ‘isl_set_add_dims’?
  
443 |   isl_space *d2 isl_space_add_dims (d1isl_dim_inn);


I tried building it because I need a compiler that still supports the P1022's SPE. Trying GCC 6 now...

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: NVMe device driver
Home away from home
Home away from home


@Rolar

Quote:
I noticed the nvme driver has disappeared from the OS4Depot. I hope this does not mean that you have abandoned the project...?! I have been waiting for an update as I had to disable the old version because the WB boot hangups were far too frequent.

Yes, they'll be back. Geennaam said so here.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: NVMe device driver
Home away from home
Home away from home


@LiveForIt

Quote:
But I’m thinking more about benchmarks on Hans webpage,
we are bombarded with 16bit benchmarks from emulation, while most of real hardware uses 32bit modes in the benchmarks. I feel it needs to be split into different categories.

With GfxBench2D, I intended to add some statistical analysis and filtering to the website. So, you'd be able to see the spread of results for similar hardware and software combinations. However, I've never had the time to implement it, nor the money to hire someone else to add it.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: PCI device memory from BAR under qemu alwys zero
Home away from home
Home away from home


@MigthyMax

Great that you got it working.

Quote:
Another topic which comes to my mind. do I have take care of the cpu caches? Maybe I just writing/reading into/from the cache and the real memory isn't updated?

No. Cache behaviour isn't emulated. You can assume that the caches are always coherent, and flushing/invalidating isn't necessary.

At least, I've never seen physical virtio hardware (which could theoretically be done).

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: Trouble building GCC 11 cross-compiler on Ubuntu
Home away from home
Home away from home


@rjd324

Quote:
lhasa _does not work_ for later version of the SDK. It will not report an error either, it will just not correctly extract.

Good to know, albeit annoying.

Quote:
You should notice that the ReadMe.md has updated since last night too.


It hasn't been merged back into the main adtools repository yet. That still says:

"The building should succeed, if all dependencies are met (e.g., libgmp-dev, libmpc-dev, libmpfr-dev, lha | lhasa)."

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: Trouble building GCC 11 cross-compiler on Ubuntu
Home away from home
Home away from home


@rjd324

Quote:
Fine. I think Coreutils is a red-herring anyway. Your initial error is complaining during the build of clib2 due to the use of a subpar version of LHA.

I doubt that's the problem. I installed lhasa, as per the instructions in the adtools readme. I can also literally see it unarchiving the SDK's archives in the output printed to the terminal. The files were there.

However, the above doesn't matter, because that error went away after I executed: bin/gild checkout gnulib for-coreutils-8.27

After that, "make -C native-build gcc-cross" completed without error, but ppc-amigaos-gcc and ppc-amigaos-g++ were missing. At least, I didn't see an error at the time.

Quote:
- or, use adtools_testing with ./adt -b
- and know that coreutils 8 should not be used for now

I'll try the last one first. Might need to delete everything and start from scratch.

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: Trouble building GCC 11 cross-compiler on Ubuntu
Home away from home
Home away from home


@rjd324

Quote:
You probably did not specify the "gcc-cross" target when invoking make.

Nope. I did specify the gcc-cross target. And, there's no way to build the OS4 native compiler without ppc-amigaos-gcc and ppc-amigaos-g++...

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: Trouble building GCC 11 cross-compiler on Ubuntu
Home away from home
Home away from home


@rjd324

Docker is a backup option, but I'd rather have the cross-compiler run directly instead of in a container.

Quote:
Otherwise, you can clone https://github.com/3246251196/adtools_testing and, tldr:

Thanks. I wasn't aware of that.

Quote:
You also do not need to checkout coreutils unless you are actually interested in building them, or, you are trying to create a native version of the compiler package to transfer to an AmigaOne machine. Further, coreutils 8 needs to be fixed in ADTOOLS since it will not successfully build right now.

It would be nice if such things could be in the readme...

So, I need to switch back to coreutils 5? If coreutils isn't needed, then why would it interfere with building the cross-compiler? First, I had the missing SDK headers error (despite the SDK being unarc'd), then gcc and g++ don't get built after I executed: bin/gild checkout gnulib for-coreutils-8.27

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: have you seen this?
Home away from home
Home away from home


@kas1e

Quote:
Can anybody explain what going on wrong there, and why is such a low fps with such a simple game we do have now ?

Is it because we compiled it now with not pure gl4es, but glew+egl_wrap going some other than casual gl4es route ?

That is bizarre. I have to enable frame-rate limiting with the old WipeOut 2097 port to make it playable. Otherwise the game is too fast. This is via the old Warp3D API and all its limitations...

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: PCI device memory from BAR under qemu alwys zero
Home away from home
Home away from home


@MigthyMax

Is the value of BaseAddress 0? Or are you talking about the memory dump being 0?

If it's the latter, then check whether the master and memory enable bits are set in the PCI_COMMAND register (enable I/O accesses too if you have an I/O BAR). You need to enable those bits in order to access the memory.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: Trouble building GCC 11 cross-compiler on Ubuntu
Home away from home
Home away from home


@Hans

Ugh! The build finished, but only some of the tools are there (e.g., ppc-amigaos-addr2line, ppc-amigaos-ld). The actual compiles (ppc-amigaos-gcc & ppc-amigaos-g++) are missing.

That's enough for today...

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: Trouble building GCC 11 cross-compiler on Ubuntu
Home away from home
Home away from home


@Hans

Looks like I missed:
bin/gild checkout gnulib for-coreutils-8.27

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Trouble building GCC 11 cross-compiler on Ubuntu
Home away from home
Home away from home


I'm trying to build the GCC 11 cross-compiler from adtools, and am stuck. AFAIK, I've installed all the dependencies. However, it's failing with the following error:
crtbegin.c:59:15note: while referencing ‘__DTOR_LIST__’
   59 
| static void (*__DTOR_LIST__[1]) (void__attribute__(( usedsection(".dtors"), aligned(sizeof(void (*)(void))) ));
      |               ^~~~~~~~~~~~~
Compiling crtend.[lib.threadsafe]
Compiling crtend.[lib.threadsafe/soft-float]
Compiling crtend.[lib.threadsafe/small-data]
Compiling crtend.[lib.threadsafe/baserel]
Compiling c.lib_rev.[obj/libc]
Compiling ctype_isalnum.[obj/libc]
In file included from ctype_headers.h:40,
                 
from ctype_isalnum.c:35:
locale_headers.h:44:10fatal errorlibraries/locale.hNo such file or directory
   44 
#include <libraries/locale.h>
      
|          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.


Yes, the AmigaOS SDK has been successfully downloaded, and I saw the SDK being unarchived.

I'm building with:
- binutils 2.23.2
- coreutils 8.27
- gcc 11

Has anyone encountered this? If so, how do I fix it?

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: PCI device memory from BAR under qemu alwys zero
Home away from home
Home away from home


@MigthyMax

The instructions are buried somewhere deep in this thread. You need to tailor it to your hardware. I'll see if I can dig up the script I used.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: PCI device memory from BAR under qemu alwys zero
Home away from home
Home away from home


@geennaam

Quote:
Unfortunately the autodocs don't contain information about the difference between Physical and BaseAddress.

I guess it's assumed that, if you're writing driver code, then you know what virtual and physical memory are. The BaseAddress is the virtual address (i.e., the address you use in code running on the CPU). The physical address is where the PCI card is located in physical address space.

It may be a little confusing that the physical address is 32-bit, when the actual physical address space is 64-bit. This is for legacy reasons, and is also rather limiting.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: PCI device memory from BAR under qemu alwys zero
Home away from home
Home away from home


@MigthyMax

Are you emulating a Pegasos II? If so, be aware that the Pegasos II kernel couldn't handle 64-bit BARs. So, the memory BAR would be missing for virtio devices. I say "couldn't" because I have fixed the kernel PCI scanning code.

In the meantime, there are workarounds to get it to work which basically involves changing the OpenFirmware device properties to make the 64-bit BAR look like a 32-bit one. I have a boot script that does this (which I don't need any more). No idea if BBoot does the patching automatically.

Quote:
I hope that the virtio-xx-pci devices are correctly emulated

Yes, they are.

Hans


Edited by Hans on 2023/9/13 3:14:41
Edited by Hans on 2023/9/13 3:15:02
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top


Re: What the fastest possible x64 emulation way of OS4 today ?
Home away from home
Home away from home


@all

Has anyone written updated instructions for installing on AmigaOS 4.1 on Qemu that uses BBoot? AFAIK, that's the currently best way to get OS4 up and running on Qemu.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top



TopTop
(1) 2 3 4 ... 123 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project