[FFE] enable flat device tree support

Bug #1030594 reported by dann frazier
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu-linaro (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Medium
Unassigned
Quantal
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
No known way to use the highbank model at the moment.

[Fix]
Add a build-dep on libfdt-dev.

[Test Case]
On an amd64 system w/ > 4G of RAM:
$ sudo qemu-system-arm -nographic -M highbank -m 4089 -kernel ~/vmlinuz-3.2.0-2000-highbank -append console=ttyAMA0 -dtb ~/highbank.dtb

You can use the vmlinuz and highbank.dtb files from the latest linux-image-XXX-highbank package.

[Regression Potential]
CONFIG_FDT, in most cases, is compiling in code to execute when -dtb is specified, instead of the current behavior of printing an error. In these cases, the risk of regression is low because if you weren't specifying -dtb before, nothing will be different. There are models, however, that have different behavior if CONFIG_FDT is undefined. These are petalogix_s3adsp1800_mmu, petalogix_ml605_mmu, and virtex_ml507. In these cases, it simply passes the device tree blob directly to the kernel. So, it is a risk on these models that the kernel was able to successfully handle the dtb processing, but the QEMU code we are now enabling does not. Finally, there's simply the risk that comes along with adding a new library dependency - it could introduce a FTBFS on some architectures, for example.

[Original Report]
Please add a build-dep on libfdt-dev, which will add flat device tree support to qemu. This will let users pass the '-dtb' command line option, allowing us to specify a device tree file. Though it is supposedly possible to pass a dtb file to the instance by appending it to the zImage, I've been unable to get this to work (even with CONFIG_ARM_APPENDED_DTB=y). The -dtb method is more straightforward and I've been able to boot a highbank target with it (and the patch referenced in #1030588):

ubuntu@server-1343577662-az-3-region-a-geo-1:~$ sudo qemu-system-arm -nographic -M highbank -m 4089 -kernel ~/vmlinuz-3.2.0-2000-highbank -append console=ttyAMA0 -dtb ~/highbank.dtb
l2x0_priv_write: Bad offset 900
l2x0_priv_write: Bad offset 904
Booting Linux on physical CPU 0
Linux version 3.2.0-2000-highbank (buildd@nikusui) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu3) ) #1-Ubuntu SMP PREEMPT Tue Mar 27 01:49:53 UTC 2012 (Ubuntu 3.2.0-2000.1-highbank 3.2.12)
CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
[...]

Related branches

Revision history for this message
dann frazier (dannf) wrote :

I'd also recommend this fix, which makes -dtb consistent with other parameters (that is, can use relative paths):
  https://bugs.launchpad.net/qemu-linaro/+bug/1004205

Bryce Harrington (bryce)
description: updated
dann frazier (dannf)
description: updated
Revision history for this message
Fathi Boudra (fboudra) wrote :

This patch was accepted upstream and has now made its way into qemu-linaro. It's Linaro QEMU 2012.08 release.
We plan to get it before the FF.

Changed in qemu-linaro (Ubuntu Quantal):
assignee: nobody → Fathi Boudra (fboudra)
status: New → Confirmed
Fathi Boudra (fboudra)
Changed in qemu-linaro (Ubuntu Quantal):
status: Confirmed → In Progress
Fathi Boudra (fboudra)
summary: - enable flat device tree support
+ [FFE] enable flat device tree support
Revision history for this message
Micah Gersten (micahg) wrote :

unsubscribing sponsors until this FFe is approved

Changed in qemu-linaro (Ubuntu Quantal):
status: In Progress → New
assignee: Fathi Boudra (fboudra) → nobody
Revision history for this message
Iain Lane (laney) wrote :

FFe approved

Revision history for this message
Kate Stewart (kate.stewart) wrote :

Housekeeping so status reflects fact FFE was approved.
Note: FFe needs to land before Beta 2 else approval should be revisited.

Changed in qemu-linaro (Ubuntu Quantal):
status: New → Triaged
Changed in qemu-linaro (Ubuntu Quantal):
status: Triaged → Fix Released
Michael Vogt (mvo)
Changed in qemu-linaro (Ubuntu Precise):
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello dann, or anyone else affected,

Accepted qemu-linaro into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/qemu-linaro/1.0.50-2012.03-0ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in qemu-linaro (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
dann frazier (dannf) wrote :

Looks good:

ubuntu@server-1349287797-az-3-region-a-geo-1:~$ sudo qemu-system-arm -nographic -M highbank -m 4089 -kernel ~/vmlinuz-3.2.0-2000-highbank -append console=ttyAMA0 -dtb ~/highbank.dtb
l2x0_priv_write: Bad offset 900
l2x0_priv_write: Bad offset 904
Booting Linux on physical CPU 0
Linux version 3.2.0-2000-highbank (buildd@nikusui) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu3) ) #1-Ubuntu SMP PREEMPT Tue Mar 27 01:49:53 UTC 2012 (Ubuntu 3.2.0-2000.1-highbank 3.2.12)
CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Highbank, model: Calxeda Highbank
[....]

tags: added: verification-done
removed: verification-needed
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu-linaro - 1.0.50-2012.03-0ubuntu2.1

---------------
qemu-linaro (1.0.50-2012.03-0ubuntu2.1) precise-proposed; urgency=low

  * debian/patches/use-an-uint64_t-for-the-max_sz-parameter-in-load_image_targphys.patch:
    Allow loading kernels on systems w/ > 2G emulated memory. LP: #1030588.
  * Enable flat device tree support. LP: #1030594.
 -- dann frazier <email address hidden> Sun, 29 Jul 2012 12:40:25 -0600

Changed in qemu-linaro (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.