FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 07-30-2012, 04:42 PM
Andy Whitcroft
 
Default UBUNTU: add support for generating binary device trees and install them in /lib/firmware

Add support for generating a device tree binary for this flavour and
installing it in /lib/firmware. This is useful for QEMU for some flavours
and likely will be useful later for systems which need to include a device
tree when flashing the kernel (this is the overall vision for device tree
with generic ARM kernels).

Adds flavour specific configuration for the name of the dtb_file.
Currently this only supports one dtb file per flavour but it is possible
there could be more than one when flavours can support more than one SOC,
so futureproof by including the hardware name in the dtb path.

Based on a patch by Dann Frazier.

BugLink: http://bugs.launchpad.net/bugs/1030600
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
debian/rules.d/2-binary-arch.mk | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 75caf91..b665191 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -33,9 +33,10 @@ build-%: $(stampdir)/stamp-build-%

# Do the actual build, including image and modules
$(stampdir)/stamp-build-%: target_flavour = $*
+$(stampdir)/stamp-build-%: dtb_target = $(notdir $(dtb_file_$*))
$(stampdir)/stamp-build-%: $(stampdir)/stamp-prepare-%
@echo "Building $*..."
- $(build_cd) $(kmake) $(build_O) $(conc_level) $(build_image) modules
+ $(build_cd) $(kmake) $(build_O) $(conc_level) $(build_image) modules $(dtb_target)
@touch $@

# Install the finished build
@@ -46,6 +47,8 @@ install-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym
install-%: basepkg = $(hdrs_pkg_name)
install-%: hdrdir = $(CURDIR)/debian/$(basepkg)-$*/usr/src/$(basepkg)-$*
install-%: target_flavour = $*
+install-%: dtb_file=$(dtb_file_$*)
+install-%: dtb_target=$(notdir $(dtb_file_$*))
install-%: checks-%
dh_testdir
dh_testroot
@@ -72,6 +75,11 @@ endif
$(pkgdir)/boot/abi-$(abi_release)-$*
install -m600 $(builddir)/build-$*/System.map
$(pkgdir)/boot/System.map-$(abi_release)-$*
+ if [ "$(dtb_target)" ]; then
+ install -d $(pkgdir)/lib/firmware/$(abi_release)-$*/device-tree;
+ install -m644 $(builddir)/build-$*/$(dtb_file)
+ $(pkgdir)/lib/firmware/$(abi_release)-$*/device-tree/$(dtb_target);
+ fi
ifeq ($(no_dumpfile),)
makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$*
-x $(builddir)/build-$*/vmlinux
--
1.7.10.4


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 09:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org