English Amiga Board


Go Back   English Amiga Board > Support > support.FS-UAE

 
 
Thread Tools
Old 09 March 2019, 14:21   #1
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 6
Exclamation Segfault in QEMU-UAE SLIRP code (plus Gentoo news!)

Hello. I'm not sure how I got this far in life without registering here but here I am. First off, the good news...

On the Amiga on Linux front, I became a Gentoo Linux developer a few years ago and I'm finally getting around to adding FS-UAE and its related packages to the official repository. Sorry it took so long.

On the Linux on Amiga front, I've cross-compiled a brand new Gentoo Linux system and successfully run it on my A1200. This was primarily to show off for a talk at my company's annual engineering conference but sadly it didn't get enough votes (philistines!). The local Edinburgh office really want to see it though so I may still do that. We write a lot of Rust and I had hoped to run some but that effort simply isn't ready yet. I've tried some other fun things though. Since Xfbdev only gives me a white screen and would be impossibly slow anyway, I have stuck to the AGA framebuffer but pixel formats mean that SDL doesn't work either. It does under a TigerVNC server though! Running DosBox and then WFW 3.11 was... interesting. There hasn't been an m68k Gentoo stage tarball (used for installation) built for years so I'm planning to make one. Cross-compiling those isn't really an option though, which brings me onto a problem.

Obviously I can't build natively on my A1200. I was thrilled to see that FS-UAE can now boot Linux as I recall that previously wasn't possible. I have been booting my Linux system over NFS, primarily for convenience, and that would be handy for building these Gentoo stages. I learnt about QEMU-UAE and I was already familiar with SLIRP, having used QEMU before. I enabled A2065 support in my kernel and it all looks like it's about to work but as soon as it starts booting, the whole thing segfaults on me.

I've tried the 3.8.2qemu2.2.0 binary download and I've also tried building it from source myself but both give the same result. I can provide a stacktrace and/or core dump but is there likely to be any further development here? Obviously QEMU 2.2 is a bit ancient now and I gather 2.4 didn't work too well. I can see that the area where it crashes has been rewritten since then so perhaps 3.1 would work better.

I could probably get away without using NFS but it would be easier and somewhat cooler if this worked. I could also try ARAnyM instead but that old 90s Atari rivalry is deeply ingrained and I'm not sure I could face it. There's QEMU's user mode too and that does work for some basic tasks but I've had problems running Gentoo's package manager.

Anyhow, it's good to be here.
Chewi is offline  
Old 09 March 2019, 21:44   #2
Locutus
Registered User

 
Join Date: Jul 2014
Location: Finland
Posts: 912
Aranym is faster as a GNU/Linux host, its been used for Debian m68k crossbuilds.
Locutus is offline  
Old 09 March 2019, 22:14   #3
k0x
Registered User

 
Join Date: Jan 2018
Location: Ostrava
Posts: 52
Gentoo on A1200?! Impressive!
k0x is offline  
Old 09 March 2019, 22:42   #4
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 6
Quote:
Originally Posted by Locutus View Post
Aranym is faster as a GNU/Linux host, its been used for Debian m68k crossbuilds.
I'm not planning on doing this often but maybe I should indeed use the right tool for the job.

Quote:
Originally Posted by k0x View Post
Gentoo on A1200?! Impressive!
It has a little help from a DKB Cobra with a 33MHz 68030 and 128MB RAM but yeah, it's still quite something. I first did this about 13 years ago, it was my first adventure into cross-compiling and I've been doing it ever since. Gentoo supports cross-compiling better as a result.
Chewi is offline  
Old 10 March 2019, 10:02   #5
k0x
Registered User

 
Join Date: Jan 2018
Location: Ostrava
Posts: 52
Definitely am interested in further info how to get Gentoo on m68k.
k0x is offline  
Old 10 March 2019, 12:18   #6
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 6
Quote:
Originally Posted by k0x View Post
Definitely am interested in further info how to get Gentoo on m68k.
I'll let you know when it's ready.
Chewi is offline  
Old 10 March 2019, 13:56   #7
Locutus
Registered User

 
Join Date: Jul 2014
Location: Finland
Posts: 912
Yeah, please post when you have a release candidate tarball, i want to run this if only so i can poke at my gentoo user colleague (--funroll-all-loops jokes get old after a while after all).
Locutus is offline  
Old 10 March 2019, 15:16   #8
vulture
Registered User
 
Join Date: Oct 2007
Location: Athens , Greece
Posts: 851
very interesting!
vulture is offline  
Old 19 March 2019, 01:18   #9
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 6
Just a quick note to say that I've had a stab at forward porting the plugin to QEMU 3.1.0 and I've got it to successfully build. It doesn't work yet but hey, I might be lucky.
Chewi is offline  
Old 19 March 2019, 15:59   #10
Romanujan
Registered User
 
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 326
Quote:
Originally Posted by Chewi View Post
I became a Gentoo Linux developer a few years ago and I'm finally getting around to adding FS-UAE and its related packages to the official repository.
Just please keep in mind, that there are stability problems with latest FS-UAE releases: http://eab.abime.net/showpost.php?p=...postcount=1167
Romanujan is offline  
Old 20 March 2019, 00:54   #11
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 6
I managed to fix all the implicit declarations, which caused the plugin to load but it now segfaults straight away.

Code:
fs-uae: migration/migration.c:169: migrate_get_current: Assertion `current_migration' failed.
I am out of my depth here so I would appreciate someone (Frode!) picking up what I've got so far. It's the PPC code that's causing all the trouble but i'm only interested in SLIRP. I don't know if it's possible to remove the PPC parts?
Chewi is offline  
Old 20 March 2019, 08:34   #12
Romanujan
Registered User
 
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 326
Missing 'migration_object_init()' call? See 'int main(int argc, char **argv, char **envp)' in 'vl.c' - probably it has changed since the QEMU plugin was developed, the way to initialize the plugin certainly needs to be synchronized.
Romanujan is offline  
Old 21 March 2019, 01:10   #13
Chewi
Registered User

Chewi's Avatar
 
Join Date: Mar 2019
Location: Edinburgh, Scotland
Posts: 6
Quote:
Originally Posted by Romanujan View Post
Missing 'migration_object_init()' call? See 'int main(int argc, char **argv, char **envp)' in 'vl.c' - probably it has changed since the QEMU plugin was developed, the way to initialize the plugin certainly needs to be synchronized.
Thanks for that! I had a feeling it was something like that and I was looking in vl.c but it's a big file and it was getting late. Always pays to keep others posted on progress.

I've jumped a few more hurdles with other things missing from the initialisation and it's getting further than before. Now it's segfaulting in qemu_uae_mutex_lock(), specifically on qemu_cpu_kick_thread(first_cpu). I've run this through gdb but I'm not sure what's up yet.

I also tried skipping all the PPC stuff to just do SLIRP. It crashed out because it needs the main loop setup for the timers. I think I'm much more likely to get this working so I may focus on this direction.
Chewi is offline  
Old 21 March 2019, 09:18   #14
Romanujan
Registered User
 
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 326
Where exactly does it crash? Which QEMU version are you using?
Romanujan 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
E-uae-ppc-jit - Segfault on P96 as of late Threader support.OtherUAE 0 04 February 2018 15:49
FS-UAE Launcher Linux Gentoo problem dylanmc support.FS-UAE 11 25 December 2017 14:02
Issue with fs-uae-launcher on Gentoo Linux philr5150 support.FS-UAE 1 19 September 2017 14:50
Using Dolphin's PPC Code instead of QEmu's? Xeon3D support.FS-UAE 5 14 June 2016 11:30
GLX-related compilation problem with FS-UAE on Gentoo / GCC 4.8 yoshi314 support.FS-UAE 9 17 December 2013 20:49

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 07:22.


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