Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
qemu and arm - extracting a kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
dkasak
n00b
n00b


Joined: 10 Feb 2012
Posts: 61

PostPosted: Fri Jul 21, 2017 4:45 am    Post subject: qemu and arm - extracting a kernel Reply with quote

Hi all. I'm thinking of replacing my home server with an ARM SOC, and I'd like to 1st see that everything I want to use at least compiles on ARM. I've downloaded an ARM image, which I assume is supposed to be dd'd to an SD card. I've rebuilt qemu with:

Code:
QEMU_SOFTMMU_TARGETS="x86_64 arm"


virt-manager now shows me architecture options, and I can select ARM. The next screen, however, insists that "A kernel is required for armv7l guests". I've googled around a little ( eg https://fedoraproject.org/wiki/QA:Testcase_Virt_ARM_on_x86?rd=QA:Testcase_Virt_x86_on_ARM ), and seen that some people are using libguestfs-tools to extract kernels from raw images. However this ( libguestfs ) doesn't compile for me:

Code:
checking if we should build the appliance... yes
checking for supermin... no
checking for --with-supermin-packager-config option... not set
checking for --with-supermin-extra-options option... not set
configure: error: supermin >= 5.1 must be installed


I guess I can build it manually. Am I going down the right path here? Has someone extracted a kernel from a raw disk image and successfully booted an ARM distro on x86?
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 648

PostPosted: Fri Jul 21, 2017 5:44 am    Post subject: Reply with quote

I don't know about the Fedora link but the similar thing on this wiki page worked for me to get a Raspberry Pi running gentoo:

https://wiki.gentoo.org/wiki/Raspberry_Pi

Also see this: https://wiki.gentoo.org/wiki/Raspberry_Pi/Cross_building

I try to avoid compiling on the Pi, it's slow. If I want to compile more than a couple packages I try to use crossdev with distcc and/or binpackages. And I just try to avoid it in general :D
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 47139
Location: 56N 3W

PostPosted: Fri Jul 21, 2017 8:28 am    Post subject: Reply with quote

dkasak,

The kernel is one of the easiest packages to cross compile.
Its well supported because its always the first step in porting to a new CPU.

Go for cross compiling your kernel, that will make it trivial to add cross distcc later.

With
Code:
QEMU_SOFTMMU_TARGETS="x86_64 arm"
you can chroot into your arm code on an amd64 host. There is no need for a full KVM.
Thats explained in some detail for arm64.
Change the arm64 bits to arm.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
dkasak
n00b
n00b


Joined: 10 Feb 2012
Posts: 61

PostPosted: Wed Jul 26, 2017 12:45 am    Post subject: Reply with quote

Thanks for the tip re: cross-compiling. That's an interesting approach. I've just ordered my ARM system, so it will be very handy to be able to build on my AMD and push to my ARM :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 47139
Location: 56N 3W

PostPosted: Wed Jul 26, 2017 9:24 am    Post subject: Reply with quote

Moved from Other Things Gentoo to Gentoo on Alternative Architectures.

ARM goes here meanwhile.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum