After a fair amount of dicking about I have managed to build a cross-toolchain for arm64/aarch64 which installs on Ubuntu Quantal. It even builds packages, although it has at least one notable limitation, and I have no idea if it produces working code yet :-)
The main limitation is that the default library search paths have come out as the old dpkg-cross ones, not the new multiarch ones. If someone can tell me where to fix that it would be very helpful and I'll try and put an updated one in the repo.
In the meantime you can work round it effectively using /etc/dpkg/buildflags. (see wiki page below for details)
The cross-toolchain only supports C, C++ and fortran with no extras like libssp, libmudflap etc, because there is no architecture support for them yet.
I started a port page to keep track of things here: http://wiki.debian.org/Arm64Port
And if you want to set up a quantal chroot and see if you can build things, details are here: https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/arm64bootstrap
The bottom line is that you can debootstrap (or sbuild-createchroot) a quantal chroot, add the bootstrap repo and do 'apt-get install crossbuild-essential-arm64' and get a working cross-build environment.
The repo is here: http://people.debian.org/~wookey/bootstrap.html
That should be useable for both dpkg-cross style bulding or multiarch-style bulding.
The repo also contains updated dpkg-cross, multiarch python, multiarch perl, updated dpkg with buildprofile/staging support, sbuild (although in fact I think stock sbuild should work OK), and dose-builddebcheck which can tell you what things are currently cross-buildable from available binaries and sources. Most of that is pretty new and not very well tested but 'it works for me'.
More arm64 packages will be along soon (dose3 currently indicates 40 more buildabale packages), but there is plenty still to fix for a full debootstrap-able arm64 package set.
Anyone keen to help with bootstrapping the port is very welcome. There will be a session about it at UDS next week, and a more general one on distro bootrapping at the Armv8 minisummit a the co-located linaro connect. And I'll be giving a talk about this stuff at Linxconf-Europe in Barcelona the week after.
I think that's all for now. Enjoy, and tell me what breaks :-)
Wookey
Dear Wookey,
After a fair amount of dicking about I have managed to build a cross-toolchain for arm64/aarch64 which installs on Ubuntu Quantal. It even builds packages, although it has at least one notable limitation, and I have no idea if it produces working code yet :-)
The main limitation is that the default library search paths have come out as the old dpkg-cross ones, not the new multiarch ones. If someone can tell me where to fix that it would be very helpful and I'll try and put an updated one in the repo.
In the meantime you can work round it effectively using /etc/dpkg/buildflags. (see wiki page below for details)
The cross-toolchain only supports C, C++ and fortran with no extras like libssp, libmudflap etc, because there is no architecture support for them yet.
I started a port page to keep track of things here: http://wiki.debian.org/Arm64Port
And if you want to set up a quantal chroot and see if you can build things, details are here: https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/arm64bootstrap
The bottom line is that you can debootstrap (or sbuild-createchroot) a quantal chroot, add the bootstrap repo and do 'apt-get install crossbuild-essential-arm64' and get a working cross-build environment.
The repo is here: http://people.debian.org/~wookey/bootstrap.html
That should be useable for both dpkg-cross style bulding or multiarch-style bulding.
The repo also contains updated dpkg-cross, multiarch python, multiarch perl, updated dpkg with buildprofile/staging support, sbuild (although in fact I think stock sbuild should work OK), and dose-builddebcheck which can tell you what things are currently cross-buildable from available binaries and sources. Most of that is pretty new and not very well tested but 'it works for me'.
More arm64 packages will be along soon (dose3 currently indicates 40 more buildabale packages), but there is plenty still to fix for a full debootstrap-able arm64 package set.
Anyone keen to help with bootstrapping the port is very welcome. There will be a session about it at UDS next week, and a more general one on distro bootrapping at the Armv8 minisummit a the co-located linaro connect. And I'll be giving a talk about this stuff at Linxconf-Europe in Barcelona the week after.
I think that's all for now. Enjoy, and tell me what breaks :-)
I need to catch up with you in there ;-) What do you use for a bootloader on these armv8 devices?
Wookey
Best regards, Marek Vasut
On Sat, Nov 03, 2012, Marek Vasut wrote:
I need to catch up with you in there ;-) What do you use for a bootloader on these armv8 devices?
No bootloader at the moment, but a boot wrapper! ;-)
At the moment, ARMv8 work is mostly on virtual platforms (I guess there might be some people with expensive FGPAs too); the two virtual platforms Linaro is using are: * the free (as in beer) ARMv8 Foundation model ("Foundation") * the pre-built ARMv8 Versatile Express model ("VE RTSM")
ARM recently published some information on the various models at: http://www.arm.com/fvp
The two virtual platforms are relatively similar; the main differences are: * VE model has a MMC while the Foundation model has an AMBA virtio block device * VE has a RTC while Foundation model hasn't * VE has an AMBA LCD (clcd) while Foundation model hasn't
At least the first difference prevents us from sharing a single Device Tree with all devices between the two platforms (kernel oops when starting the Foundation model with the MMC listed or vice-versa).
To boot the platform, a small boot wrapper is combined with the kernel, device tree, and kernel cmdline into an ELF .axf file for the model to run.
This page explains how to rebuild kernel + device tree + boot wrapper: https://wiki.linaro.org/HowTo/BuildArm64Kernel (the boot wrapper is maintained by Catalin Marinas on git.kernel.org)
The plan is to switch to a full bootloader -- likely Tianocore (UEFI) -- when available as it's painful to have to rebuild the .axf whenever the kernel or kernel cmdline change, and real hardware wouldn't use a boot wrapper anyway.
I guess you're asking because you consider an U-Boot port? :-)
Cheers,
Dear Loïc Minier,
On Sat, Nov 03, 2012, Marek Vasut wrote:
I need to catch up with you in there ;-) What do you use for a bootloader on these armv8 devices?
No bootloader at the moment, but a boot wrapper! ;-)
At the moment, ARMv8 work is mostly on virtual platforms (I guess there might be some people with expensive FGPAs too); the two virtual platforms Linaro is using are:
- the free (as in beer) ARMv8 Foundation model ("Foundation")
- the pre-built ARMv8 Versatile Express model ("VE RTSM")
ARM recently published some information on the various models at: http://www.arm.com/fvp
The two virtual platforms are relatively similar; the main differences are:
- VE model has a MMC while the Foundation model has an AMBA virtio block device
- VE has a RTC while Foundation model hasn't
- VE has an AMBA LCD (clcd) while Foundation model hasn't
At least the first difference prevents us from sharing a single Device Tree with all devices between the two platforms (kernel oops when starting the Foundation model with the MMC listed or vice-versa).
To boot the platform, a small boot wrapper is combined with the kernel, device tree, and kernel cmdline into an ELF .axf file for the model to run.
This page explains how to rebuild kernel + device tree + boot wrapper: https://wiki.linaro.org/HowTo/BuildArm64Kernel (the boot wrapper is maintained by Catalin Marinas on git.kernel.org)
The plan is to switch to a full bootloader -- likely Tianocore (UEFI) -- when available as it's painful to have to rebuild the .axf whenever the kernel or kernel cmdline change, and real hardware wouldn't use a boot wrapper anyway.
I guess you're asking because you consider an U-Boot port? :-)
Mostly, yes. I was pondering if armv8 is the terminus station for u-boot.
btw guys ... (Wookey, Loic) ... do you have any plans for tomorrow evening?
Best regards, Marek Vasut