Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on ARM
  • Search

qemu-system-aarch64

Gentoo on all things ARM. Both 32 bit and 64 bit.
Tell about your hardware and CHOST.
Problems with crossdev targeting ARM hardware go here too.
Post Reply
  • Print view
Advanced search
10 posts • Page 1 of 1
Author
Message
honeymak
l33t
l33t
User avatar
Posts: 680
Joined: Mon Dec 30, 2002 5:15 pm

qemu-system-aarch64

  • Quote

Post by honeymak » Tue Jun 13, 2017 6:29 am

Hi Guys,
I have installed qemu-system-aarch64 in my workstation.
I want to setup a guest of aarch64.
But virt-manager requires an install media. What can I specify there?

Thanks.
:oops:
hackers - make sth real
academics - read sth said to be real
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56077
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Jun 13, 2017 8:42 am

honeymak,

Don't do it quite like that.

There is a wealth of information in the Embedded Handbook
In particular, Compiling with qemu user chroot

In summary, build app-emulation/qemu statically on your amd64 or whatever.
Make a chroot directory for your aarch64 install.
Unpack the aarch64 stage3 there.
Install the static qemu into the aarch64 install.
Now chroot into the aarch64 install.

If all is well, it works because the static qeum in the chroot is emulating an arm64 CPU which is running the arm64 code in the chroot.
Its very slow because software emulation of a CPU is slow. Slower than a real Raspberry Pi.
I discovered that at least one essemtial ioctrl was missing, so

Code: Select all

emerge -K ... 
to install an existing arm64 binary locked up with an error message.
That might have been fixed by now.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
fanthom
n00b
n00b
Posts: 60
Joined: Thu May 31, 2007 1:39 pm

  • Quote

Post by fanthom » Thu Jan 25, 2018 1:36 pm

Hi Team,

I have a cheap Amlogic 905W box and wanted to speedup compilation somehow.

I have setup qemu chroot as per Embedded Handbook wiki and I can chroot into it without problems using qemu-system-aarch64.
However - 'emerge -v ccache' takes about 20 minutes on AMD 8320 octa core, 3.5GHz (getting syscalls errors but thats another thing).

1) Is such long time normal for qemu chroot or i'm doing something wrong?

2) I guess the cross-compiled method is much faster but also creates more troubles related to setup/configuration (separate portage, etc)?

3) Is native compiling the best method to achieve reasonably good speed and to avoid syscalls/configuration issues?
How long would it take to compile e.g. firefox on 905W box (A53 quad core, 2GB RAM)?

Thank you for any help provided.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56077
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu Jan 25, 2018 4:08 pm

fanthom,

You will have a

Code: Select all

/usr/aarch64-unknown-linux-gnu/etc/portage/
that applies inside the chroot.
It is almost but not quite right for cross compiling with emerge-wrapper too.

I did some benchmarking with a Raspberry Pi and glibc and various build methods.
1) Is such long time normal for qemu chroot or i'm doing something wrong?
ccache causes all sorts of build issues. I avoid it.
2) I guess the cross-compiled method is much faster but also creates more troubles related to setup/configuration (separate portage, etc)?
Its much faster when it works. The setup is almost free.
3) Is native compiling the best method to achieve reasonably good speed and to avoid syscalls/configuration issues?
How long would it take to compile e.g. firefox on 905W box (A53 quad core, 2GB RAM)?
If native compiling includes cross distcc with pump mode, its the fastest' again when it works.
Firefox needs you to build rust and caro. Rust has its own llvm and it want to build every target. Also, the rust build system does not respect your MAKEOPTS, it just counts cores.
That broken when you have less than 1GB RAM per core. There are several fixed ebuilds for rust on the net
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
fanthom
n00b
n00b
Posts: 60
Joined: Thu May 31, 2007 1:39 pm

  • Quote

Post by fanthom » Thu Jan 25, 2018 7:18 pm

Great stuff - thank you for sharing.

I see compiling glibc took 50 minutes on your qemu chroot while on my one ccache (very small package) took nearly 20 minutes!
I guess there is something wrong with my setup. Must find out whats causing this ....

Thanks
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56077
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Thu Jan 25, 2018 7:34 pm

fanthom,

Here's my QEMU chroot make.conf

The

Code: Select all

PYTHON_SINGLE_TARGET="python3_4" 
PYTHON_TARGETS="python2_7 python3_4"
entries need to be removed.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
fanthom
n00b
n00b
Posts: 60
Joined: Thu May 31, 2007 1:39 pm

  • Quote

Post by fanthom » Fri Jan 26, 2018 6:56 pm

I have given up with qemu chroot (due to slowness and syscall errors) and using cross compilation now. Works like a charm except for few errors and keywording :)

Thank you for all the help provided Neddy. I'm sure i'll come back with other questions.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56077
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Fri Jan 26, 2018 8:18 pm

fanthom,

Keywording ???

File pull requests or bugs. Join #gentoo-arm on irc.freenode.net
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
fanthom
n00b
n00b
Posts: 60
Joined: Thu May 31, 2007 1:39 pm

  • Quote

Post by fanthom » Sat Jan 27, 2018 10:20 pm

Initially i was hoping to use stable packages but this is not possible on arm64. After fighting with keywords i given up and used default[/code]:

Code: Select all

ACCEPT_KEYWORDS="arm64 ~arm64"
Thanks
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56077
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Jan 27, 2018 10:46 pm

fanthom,

arm64 is considered an experimental arch on Gentoo.

Code: Select all

ACCEPT_KEYWORDS="arm64 ~arm64"
is a good start.
Only the packages in the stage3 are marked stable, or the stage3 build process won't work.

Don't be afraid to use your package.accept_keywords/ directory. Lots of things work, just nobody knows yet.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Post Reply
  • Print view

10 posts • Page 1 of 1

Return to “Gentoo on ARM”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic