WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: QEMU for 64bit?  (Read 16166 times)

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
QEMU for 64bit?
« on: January 28, 2016, 10:50:14 PM »
Hi,
Looks like there was an extension request for this about 2 years ago, but the thread didn't answer whether there is one or not. The only other question about this was more about making our own extensions, and personally I don't think I have the skills for this.
Since there's a 64-bit KVM extension and they most often work together, I'm wondering if there is also a QEMU.
I got VMs working in the 32-bit version of TC, but I'd love to be able to address more RAM and install 64-bit guests in my TC64 install.
Thanks!

R
« Last Edit: January 28, 2016, 10:54:32 PM by flyingfishfinger »

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: QEMU for 64bit?
« Reply #1 on: January 30, 2016, 01:40:48 AM »
I managed to build it from source (not as an extension) and it works, but I don't know how to persist it through reboots. I tried adding the whole /usr directory to the backup, but apparently that's not enough. In particular, it complains about libbz2.so.1.0 not being available anymore post-boot.
Other than creating an extension, how can I persist builds of things across boots?
Thanks,

R

Also, backing up /usr seems to break Xorg. If I do that, startx is no longer available..
« Last Edit: January 30, 2016, 01:52:52 AM by flyingfishfinger »

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: QEMU for 64bit?
« Reply #2 on: January 30, 2016, 02:15:07 AM »
Never mind the X thing, it works.
Sorry for replying again, the edit icon seems to have disappeared.

R

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: QEMU for 64bit?
« Reply #3 on: January 30, 2016, 02:18:25 AM »
Really the only sensible way to do this is to create an extension, but the good news is that it's not difficult  :)

You could try this:
Code: [Select]
$ make
$ touch mymarker
$ sudo make install
$ sudo find / -not -type 'd' -cnewer mymarker | grep -v "\/proc\/" | grep -v "^\/sys\/" | tee files
[edit files with a text editor - it will be obvious which ones to delete]
$ sudo tar -T files --numeric-owner -zcvf myextension.tar.gz
$ mkdir /tmp/pkg
$ cp myextension.tar.gz /tmp/pkg
$ cd /tmp/pkg
$ sudo tar xf myextension.tar.gz
$ rm myextension.tar.gz
[edit out dev files from /tmp/pkg/usr/local]
$ cd /tmp
$ sudo mksquashfs pkg/ myextension.tcz
$ sudo chown tc:staff myextension.tcz

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: QEMU for 64bit?
« Reply #4 on: January 30, 2016, 08:30:38 AM »
Hi flyingfishfinger
As a general rule of thumb, the only files under  /usr  that should be backed up are configuration files that you have
modified. Every time Tinycore boots it creates the  /usr  directory from scratch to allow you to recover if you messed
something up. Say a library file got altered accidentally. By backing up  /usr , every time you boot the altered library
file would replace the original. Wbar may also be affected. It has files that are dynamically updated and might not like
being changed to a previous state. The point here is, don't back up the  /usr  directory.

Quote
Sorry for replying again, the edit icon seems to have disappeared.
You have about 30 minutes to go back and modify a post.

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: QEMU for 64bit?
« Reply #5 on: January 30, 2016, 05:14:16 PM »

Quote
Sorry for replying again, the edit icon seems to have disappeared.
You have about 30 minutes to go back and modify a post.


Ah, makes sense. Thanks!

Also, I successfully made an extension of qemu in 64bit (Thanks Juanito!), seems to work and persist. Since I wasn't able to find one otherwise, should / can I contribute it someplace?

R

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: QEMU for 64bit?
« Reply #6 on: January 30, 2016, 05:24:12 PM »
Hi flyingfishfinger
Extensions are always welcome. Instructions for submitting an extension are at the bottom of this page:
http://wiki.tinycorelinux.net/wiki:creating_extensions

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: QEMU for 64bit?
« Reply #7 on: January 30, 2016, 05:59:58 PM »
Well, I spoke too soon. Looks like I compiled it without SDL support, so I'll have to do it again. But once it works I'd be happy to submit it.

R

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: QEMU for 64bit?
« Reply #8 on: January 31, 2016, 12:40:24 AM »
So I'm having a bit of trouble with SDL. I've installed SDL (as well as X11, libs...) before I start compiling, but so far I haven't been able to resolve the following errors:

"in .../ui/sdl.c: undefined reference to 'XkbGetKeyboard'
in .../ui/sdl.c: undefined reference to 'XkbGetAtomName'
in .../ui/sdl.c: undefined reference to 'XkbFreeKeyboard'
in .../ui/sdl.c: undefined reference to 'XFree'
in .../ui/sdl.c: undefined reference to 'XkbFreeKeyboard'
collect2:error: ld returned exit 1 status.

What packages am I missing?

R

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: QEMU for 64bit?
« Reply #9 on: January 31, 2016, 12:57:53 AM »
libxkbcommon-dev, libxkbfile-dev?

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: QEMU for 64bit?
« Reply #10 on: February 07, 2016, 01:16:07 AM »
Hi, I've got it almost working. Two issues remaining:
- If I add my extension to onboot.lst, I never get a desktop. It hangs with a blinking cursor just after the ASCII art logo and before I would get a text prompt. I can drop to a prompt with CTRL-C, but startx doesn't work in this case. Everything works just fine if I load it manually post-boot. Any ideas for this one?
- Sound issues: I built qemu with the -alsa flag and have set my VM to use hda (Win7 didn't find a driver for ac97 or something, I didn't try very hard because OSS works ootb on Ubuntu with hda). When I boot, I get sound from the VM but it's terribly choppy and torn up. Do I have to use ac97 here? Also, is there a GUI alsamixer for corepure64?
Thanks!

R

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: QEMU for 64bit?
« Reply #11 on: February 07, 2016, 02:45:46 AM »
Do you have a circular dependency in the dep file maybe?

When you load onboot, does open-vm get loaded before something it needs?

No, there is no alsamixer gui in corepure64

No idea about ac97 and windows...

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: QEMU for 64bit?
« Reply #12 on: February 07, 2016, 03:19:28 AM »
Add the bootcode "showapps" to see what's loaded.
The only barriers that can stop you are the ones you create yourself.

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: QEMU for 64bit?
« Reply #13 on: February 07, 2016, 04:09:09 PM »
Solved the sound, AC97 did it for ALSA.
What's open-vm? Haven't seen it anywhere...
I don't have a dep file yet, I just added everything it wanted to run to onboot to see if I could get it to work. Everything else loads fine (in particular, once built it only asks for  SDL and bzip2 for some reason). Showapps seems to finish loading, but I can't tell if it does. It gets to the last app in the onboot file, then switches screens and hangs.

R

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: QEMU for 64bit?
« Reply #14 on: February 07, 2016, 09:34:07 PM »
I also tried putting it in bootlocal.sh (making sure it loads after every other extension?) but it still hangs before X starts.