Thread: DIY - KeK
View Single Post
Old 07-17-2012, 09:05 PM   #91
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by knc1 View Post
I foresee difficulties here, with each developer using what their Linux distribution **thinks** they should have (usually qemu-kvm, not qemu).

Let us see if we can out-smart the distribution planners ...
How I built the current release:
Spoiler:

core2quad BLDS $ wget http://wiki.qemu.org/download/qemu-1.1.1.tar.bz2
core2quad BLDS $ tar --extract --file=qemu-1.1.1.tar.bz2
core2quad BLDS $ cd qemu-1.1.1

(grep DESTDIR Makefile -- yes, it uses it)
(./configure --help -- default is build everything)
(yes -- it supports out-of-tree builds)

core2quad qemu-1.1.1 $ cd ..
core2quad BLDS $ mkdir qemu111 qemubld
core2quad BLDS $ cd qemubld
core2quad qemubld $ ../qemu-1.1.1/configure --prefix=/opt/qemu111 --audio-drv-list="oss alsa" --audio-card-list="ac97 ex1370 sb16 cs4231a adlib gus hda" --target-list="arm-softmmu arm-linux-user armeb-linux-user"
core2quad qemubld $ make
core2quad qemubld $ DESTDIR=/home/mszick/BLDS/qemu111 make install

core2quad qemu111 $ pwd
/home/mszick/BLDS/qemu111
core2quad qemu111 $ sudo chown -R root:root opt
core2quad qemu111 $ cd opt
core2quad opt $ sudo tar --create --gzip --file=../qemu-1.1.1-arm.tar.gz *


Download the attached tar-ball.

Installation:
core2quad ~ $ sudo tar -C /opt --extract --file=qemu-1.1.1-arm.tar.gz
core2quad ~ $ /opt/qemu111/bin/qemu-system-arm --version
QEMU emulator version 1.1.1, Copyright (c) 2003-2008 Fabrice Bellard

To activate:
core2quad ~ $ export PATH=/opt/qemu111/bin:$PATH
core2quad ~ $ qemu-system-arm --help
- - - lots of output snipped away - - -

Test run:
Spoiler:

core2quad ~ $ cd ~/BLDS/system-image-armv6l
core2quad system-image-armv6l $ ./dev-environment.sh
No distccd in $PATH, acceleration disabled.
oss: Could not initialize DAC
oss: Failed to open `/dev/dsp'
oss: Reason: No such file or directory
oss: Could not initialize DAC
oss: Failed to open `/dev/dsp'
oss: Reason: No such file or directory
(Makes note: need to put that into the HOST file system.)
audio: Failed to create voice `lm4549.out'
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
* * * *
Type exit when done.
(armv6l:1) /home # (Enter: ctrl-a c)
(armv6l:1) /home # QEMU 1.1.1 monitor - type 'help' for more information
(qemu) info version
1.1.1
(qemu) info roms
addr=00000000 size=0x00001c mem=ram name="bootloader"
addr=00010000 size=0x15ee58 mem=ram name="zImage"
(qemu) info chardev
parallel0: filename=null
serial0: filename=stdio
serial0-base: filename=stdio
(qemu) info status
VM status: running
(qemu) (Enter ctrl-a c) (Enter 'return key' to get prompt back)
(armv6l:1) /home # exit
Restarting system.
core2quad system-image-armv6l $

NOTE: If your host filesystem does not have a /dev/dsp device:
sudo mknod /dev/dsp c 14 3
But since most /dev file trees are now on tmpfs, this will go away with the next reboot.
It will probably vary from distribution to distribution how best to make this device always present. For now, left as a: "student exercise".

I would like to hear some feedback from others on this build, but it ran well enough for me to create the following static linked applications.
Only: IWFM isn't strong enough to be publicizing it yet.

Hmm not sure what I did wrong:

I followed the instructions to the letter.

/opt/qemu111/bin/qemu-system-arm: error while loading shared libraries: libasound.so.2: wrong ELF class: ELFCLASS64

Have to sort it tomorrow now. guess I foofed something somehow : )

Although: Installation:
core2quad ~ $ sudo tar -C /opt --extract --file=qemu-1.1.1-arm.tar.gz
core2quad ~ $ /opt/qemu111/bin/qemu-system-arm --version
QEMU emulator version 1.1.1, Copyright (c) 2003-2008 Fabrice Bellard


Wasn't enormously hard to follow so perhaps it's in another step.

This simply further resolves me that I should build a virgin system.

I'll have a another pop tomorrow.

: )

EDIT: Perhaps this only works for 32 bit systems?

Either way I'll build from source and share.

Last edited by twobob; 07-17-2012 at 09:06 PM. Reason: added one thought?
twobob is offline   Reply With Quote