UBUNTU: Sync debian rules with master-next
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
This commit is contained in:
@@ -26,11 +26,10 @@ Architecture: ARCH
|
|||||||
Section: admin
|
Section: admin
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Pre-Depends: dpkg (>= 1.10.24)
|
Pre-Depends: dpkg (>= 1.10.24)
|
||||||
#Provides: linux-image, linux-image-2.6, fuse-module, =PROVIDES=
|
|
||||||
Depends: ${misc:Depends}, ${shlibs:Depends}, initramfs-tools (>= 0.36ubuntu6), coreutils | fileutils (>= 4.0), module-init-tools (>= 3.3-pre11-4ubuntu3), wireless-crda
|
Depends: ${misc:Depends}, ${shlibs:Depends}, initramfs-tools (>= 0.36ubuntu6), coreutils | fileutils (>= 4.0), module-init-tools (>= 3.3-pre11-4ubuntu3), wireless-crda
|
||||||
Conflicts: hotplug (<< 0.0.20040105-1)
|
Conflicts: hotplug (<< 0.0.20040105-1)
|
||||||
Recommends: BOOTLOADER
|
Recommends: BOOTLOADER
|
||||||
Suggests: fdutils, SRCPKGNAME-doc-PKGVER | SRCPKGNAME-source-PKGVER, SRCPKGNAME-tools
|
Suggests: fdutils, SRCPKGNAME-source-PKGVER
|
||||||
Description: Linux kernel image for version PKGVER on DESC
|
Description: Linux kernel image for version PKGVER on DESC
|
||||||
This package contains the Linux kernel image for version PKGVER on
|
This package contains the Linux kernel image for version PKGVER on
|
||||||
DESC.
|
DESC.
|
||||||
@@ -51,8 +50,7 @@ Package: linux-headers-PKGVER-ABINUM-FLAVOUR
|
|||||||
Architecture: ARCH
|
Architecture: ARCH
|
||||||
Section: devel
|
Section: devel
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Depends: ${misc:Depends}, coreutils | fileutils (>= 4.0), linux-headers-PKGVER-ABINUM, ${shlibs:Depends}
|
Depends: ${misc:Depends}, coreutils | fileutils (>= 4.0), SRCPKGNAME-headers-PKGVER-ABINUM, ${shlibs:Depends}
|
||||||
#Provides: SRCPKGNAME-headers, SRCPKGNAME-headers-2.6
|
|
||||||
Description: Linux kernel headers for version PKGVER on DESC
|
Description: Linux kernel headers for version PKGVER on DESC
|
||||||
This package provides kernel header files for version PKGVER on
|
This package provides kernel header files for version PKGVER on
|
||||||
DESC.
|
DESC.
|
||||||
@@ -60,7 +58,7 @@ Description: Linux kernel headers for version PKGVER on DESC
|
|||||||
This is for sites that want the latest kernel headers. Please read
|
This is for sites that want the latest kernel headers. Please read
|
||||||
/usr/share/doc/SRCPKGNAME-headers-PKGVER-ABINUM/debian.README.gz for details.
|
/usr/share/doc/SRCPKGNAME-headers-PKGVER-ABINUM/debian.README.gz for details.
|
||||||
|
|
||||||
Package: linux-image-PKGVER-ABINUM-FLAVOUR-dbgsym
|
Package: SRCPKGNAME-image-PKGVER-ABINUM-FLAVOUR-dbgsym
|
||||||
Architecture: ARCH
|
Architecture: ARCH
|
||||||
Section: devel
|
Section: devel
|
||||||
Priority: optional
|
Priority: optional
|
||||||
|
|||||||
@@ -8,12 +8,11 @@ Build-Depends-Indep: xmlto, docbook-utils, ghostscript, transfig, bzip2, sharuti
|
|||||||
Build-Conflicts: findutils (= 4.4.1-1ubuntu1)
|
Build-Conflicts: findutils (= 4.4.1-1ubuntu1)
|
||||||
Vcs-Git: git://kernel.ubuntu.com/ubuntu/ubuntu-saucy.git manta
|
Vcs-Git: git://kernel.ubuntu.com/ubuntu/ubuntu-saucy.git manta
|
||||||
|
|
||||||
Package: linux-headers-PKGVER-ABINUM
|
Package: SRCPKGNAME-headers-PKGVER-ABINUM
|
||||||
Architecture: armhf
|
Architecture: armhf
|
||||||
Section: devel
|
Section: devel
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Depends: ${misc:Depends}, coreutils | fileutils (>= 4.0)
|
Depends: ${misc:Depends}, coreutils | fileutils (>= 4.0)
|
||||||
#Provides: SRCPKGNAME-headers, SRCPKGNAME-headers-2.6
|
|
||||||
Description: Header files related to Linux kernel version PKGVER
|
Description: Header files related to Linux kernel version PKGVER
|
||||||
This package provides kernel header files for version PKGVER, for sites
|
This package provides kernel header files for version PKGVER, for sites
|
||||||
that want the latest kernel headers. Please read
|
that want the latest kernel headers. Please read
|
||||||
|
|||||||
0
debian.master/config/enforce
Normal file
0
debian.master/config/enforce
Normal file
4
debian/commit-templates/external-driver
vendored
4
debian/commit-templates/external-driver
vendored
@@ -11,9 +11,9 @@
|
|||||||
#
|
#
|
||||||
# to the commit, and you can remove all other tags (except UBUNTU:).
|
# to the commit, and you can remove all other tags (except UBUNTU:).
|
||||||
#
|
#
|
||||||
UBUNTU:
|
UBUNTU:
|
||||||
|
|
||||||
ExternalDriver:
|
ExternalDriver:
|
||||||
Description:
|
Description:
|
||||||
Url:
|
Url:
|
||||||
Mask:
|
Mask:
|
||||||
|
|||||||
8
debian/commit-templates/sauce-patch
vendored
8
debian/commit-templates/sauce-patch
vendored
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# SAUCE refers to the fact that this patch might not go upstream, but we need to
|
# SAUCE refers to the fact that this patch might not go upstream, but we need to
|
||||||
# carry it to successive releases. In most cases you DONOT want to use this
|
# carry it to successive releases. In most cases you DONOT want to use this
|
||||||
# template.
|
# template.
|
||||||
#
|
#
|
||||||
# An example of a SAUCE patch is the ACPI DSDT-in-initramfs patch which has been
|
# An example of a SAUCE patch is the ACPI DSDT-in-initramfs patch which has been
|
||||||
# refused upstream, but still provides useful functionality to users with broken
|
# refused upstream, but still provides useful functionality to users with broken
|
||||||
@@ -29,12 +29,12 @@
|
|||||||
#
|
#
|
||||||
# Ignore: yes will keep this commit from showing up in the changelog.
|
# Ignore: yes will keep this commit from showing up in the changelog.
|
||||||
#
|
#
|
||||||
UBUNTU: SAUCE:
|
UBUNTU: SAUCE:
|
||||||
|
|
||||||
<Why is this patch not going upstream?>
|
<Why is this patch not going upstream?>
|
||||||
|
|
||||||
# OriginalAuthor:
|
# OriginalAuthor:
|
||||||
# OriginalLocation:
|
# OriginalLocation:
|
||||||
# BugLink: http://bugs.launchpad.net/bugs/<enter bug# here>
|
# BugLink: http://bugs.launchpad.net/bugs/<enter bug# here>
|
||||||
# Ignore: yes
|
# Ignore: yes
|
||||||
# Other text below here.
|
# Other text below here.
|
||||||
|
|||||||
4
debian/commit-templates/upstream-patch
vendored
4
debian/commit-templates/upstream-patch
vendored
@@ -20,8 +20,8 @@
|
|||||||
#
|
#
|
||||||
UBUNTU: [Upstream]
|
UBUNTU: [Upstream]
|
||||||
|
|
||||||
# OriginalAuthor:
|
# OriginalAuthor:
|
||||||
# OriginalLocation:
|
# OriginalLocation:
|
||||||
# BugLink: http://bugs.launchpad.net/bugs/<enter bug# here>
|
# BugLink: http://bugs.launchpad.net/bugs/<enter bug# here>
|
||||||
# Ignore: yes
|
# Ignore: yes
|
||||||
# Other text below here.
|
# Other text below here.
|
||||||
|
|||||||
2
debian/control-scripts/headers-postinst
vendored
2
debian/control-scripts/headers-postinst
vendored
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
# -*- Mode: Cperl -*-
|
# -*- Mode: Cperl -*-
|
||||||
# debian.postinst ---
|
# debian.postinst ---
|
||||||
# Author : Manoj Srivastava ( srivasta@pilgrim.umass.edu )
|
# Author : Manoj Srivastava ( srivasta@pilgrim.umass.edu )
|
||||||
# Created On : Sat Apr 27 05:42:43 1996
|
# Created On : Sat Apr 27 05:42:43 1996
|
||||||
|
|||||||
85
debian/control-scripts/postinst
vendored
85
debian/control-scripts/postinst
vendored
@@ -254,16 +254,16 @@ sub test_relative {
|
|||||||
# while (@work) {
|
# while (@work) {
|
||||||
# my $seg = shift @work;
|
# my $seg = shift @work;
|
||||||
# if ($seg eq "." || $seg eq "") {
|
# if ($seg eq "." || $seg eq "") {
|
||||||
# }
|
# }
|
||||||
# elsif ($seg eq "..") {
|
# elsif ($seg eq "..") {
|
||||||
# if (@out && $out[-1] ne "..") {
|
# if (@out && $out[-1] ne "..") {
|
||||||
# pop @out;
|
# pop @out;
|
||||||
# }
|
# }
|
||||||
# else {
|
# else {
|
||||||
# # Leading "..", or "../..", etc.
|
# # Leading "..", or "../..", etc.
|
||||||
# push @out, $seg;
|
# push @out, $seg;
|
||||||
# }
|
# }
|
||||||
# }
|
# }
|
||||||
# else {
|
# else {
|
||||||
# push @out, $seg;
|
# push @out, $seg;
|
||||||
# }
|
# }
|
||||||
@@ -332,7 +332,7 @@ sub really_move_image {
|
|||||||
" $target");
|
" $target");
|
||||||
if ($ret) {
|
if ($ret) {
|
||||||
die("Failed to move " . $src_dir . "$target to "
|
die("Failed to move " . $src_dir . "$target to "
|
||||||
. $dest_dir . "$target.\n");
|
. $dest_dir . "$target");
|
||||||
}
|
}
|
||||||
# Ok, now we may clobber the previous .old files
|
# Ok, now we may clobber the previous .old files
|
||||||
if (-e "$target.$$") {
|
if (-e "$target.$$") {
|
||||||
@@ -342,9 +342,9 @@ sub really_move_image {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Normally called after really_move_image; and only called if we asked for
|
# Normally called after really_move_image; and only called if we asked for
|
||||||
# reversed link this routine reverses the symbolic link that is notmally
|
# reversed link this routine reverses the symbolic link that is notmally
|
||||||
# created. Since the real kernel image has been moved over to
|
# created. Since the real kernel image has been moved over to
|
||||||
# $image_dest/$kimage-$version. So, this routine links
|
# $image_dest/$kimage-$version. So, this routine links
|
||||||
# From: $image_dest/$kimage-$version (/vmlinuz-2.6.12)
|
# From: $image_dest/$kimage-$version (/vmlinuz-2.6.12)
|
||||||
# To: $realimageloc/$kimage-$version (/boot/vmlinuz-2.6.12)
|
# To: $realimageloc/$kimage-$version (/boot/vmlinuz-2.6.12)
|
||||||
@@ -366,14 +366,14 @@ sub really_reverse_link {
|
|||||||
|
|
||||||
if ($use_hard_links =~ m/YES/i) {
|
if ($use_hard_links =~ m/YES/i) {
|
||||||
link($Old . "$link_name", $src_dir . "$link_name") ||
|
link($Old . "$link_name", $src_dir . "$link_name") ||
|
||||||
die("Failed to link " . $dest_dir . "$link_name to " . $src_dir .
|
die("Failed to link " . $dest_dir . "$link_name to " . $src_dir .
|
||||||
"$link_name .\n");
|
"$link_name:$!");
|
||||||
warn "ln " . $Old . "$link_name " . $src_dir . "$link_name" if $DEBUG;
|
warn "ln " . $Old . "$link_name " . $src_dir . "$link_name" if $DEBUG;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
symlink($Old . "$link_name", $src_dir . "$link_name") ||
|
symlink($Old . "$link_name", $src_dir . "$link_name") ||
|
||||||
die("Failed to symbolic-link " . $dest_dir . "$link_name to " . $src_dir
|
die("Failed to symbolic-link " . $dest_dir . "$link_name to " . $src_dir
|
||||||
. "$link_name : $!\n");
|
. "$link_name:$!");
|
||||||
warn "ln -s " . $Old . "$link_name " . $src_dir . "$link_name" if $DEBUG;
|
warn "ln -s " . $Old . "$link_name " . $src_dir . "$link_name" if $DEBUG;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -385,8 +385,8 @@ sub really_reverse_link {
|
|||||||
sub move_p {
|
sub move_p {
|
||||||
my $kimage = $_[0]; # Name of the symbolic link
|
my $kimage = $_[0]; # Name of the symbolic link
|
||||||
my $image_dest = $_[1]; # The directory the links goes into
|
my $image_dest = $_[1]; # The directory the links goes into
|
||||||
my $image_name = $_[2];
|
my $image_name = $_[2];
|
||||||
my $src_dir = $_[3];
|
my $src_dir = $_[3];
|
||||||
my $force_move = 0;
|
my $force_move = 0;
|
||||||
warn "Move?: kimage=$kimage, image_dest=$image_dest, \n" .
|
warn "Move?: kimage=$kimage, image_dest=$image_dest, \n" .
|
||||||
"\timage_name=$image_name, src_dir=$src_dir" if $DEBUG;
|
"\timage_name=$image_name, src_dir=$src_dir" if $DEBUG;
|
||||||
@@ -448,24 +448,24 @@ sub move_p {
|
|||||||
$force_move = 1;
|
$force_move = 1;
|
||||||
warn "DEBUG: Old link ($old_target) does not point to us ($target)\n"
|
warn "DEBUG: Old link ($old_target) does not point to us ($target)\n"
|
||||||
if $DEBUG;
|
if $DEBUG;
|
||||||
}
|
}
|
||||||
else { # The .old points to the current
|
else { # The .old points to the current
|
||||||
warn "$kimage.old --> $target -- doing nothing";
|
warn "$kimage.old --> $target -- doing nothing";
|
||||||
$force_move = 0;
|
$force_move = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
warn "DEBUG: Well, the old link does not exist -- so we move\n"
|
warn "DEBUG: Well, the old link does not exist -- so we move\n"
|
||||||
if $DEBUG;
|
if $DEBUG;
|
||||||
$force_move = 1;
|
$force_move = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
warn "DEBUG: No .old link -- OK to move\n"
|
warn "DEBUG: No .old link -- OK to move\n"
|
||||||
if $DEBUG;
|
if $DEBUG;
|
||||||
$force_move = 1;
|
$force_move = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
warn "DEBUG: ok, minimal swap is no-- so we move.\n"
|
warn "DEBUG: ok, minimal swap is no-- so we move.\n"
|
||||||
if $DEBUG;
|
if $DEBUG;
|
||||||
@@ -486,8 +486,8 @@ sub move_p {
|
|||||||
sub really_move_link {
|
sub really_move_link {
|
||||||
my $kimage = $_[0]; # Name of the symbolic link
|
my $kimage = $_[0]; # Name of the symbolic link
|
||||||
my $image_dest = $_[1]; # The directory the links goes into
|
my $image_dest = $_[1]; # The directory the links goes into
|
||||||
my $image_name = $_[2];
|
my $image_name = $_[2];
|
||||||
my $src_dir = $_[3];
|
my $src_dir = $_[3];
|
||||||
warn "really_move_link: kimage=$kimage, image_dest=$image_dest\n" .
|
warn "really_move_link: kimage=$kimage, image_dest=$image_dest\n" .
|
||||||
"\t image_name=$image_name, src_dir=$src_dir" if $DEBUG;
|
"\t image_name=$image_name, src_dir=$src_dir" if $DEBUG;
|
||||||
|
|
||||||
@@ -512,15 +512,15 @@ sub really_move_link {
|
|||||||
if (! link("${Old}${image_name}", "$kimage")) {
|
if (! link("${Old}${image_name}", "$kimage")) {
|
||||||
rename("$kimage.$$", "$kimage");
|
rename("$kimage.$$", "$kimage");
|
||||||
die("Failed to link ${Old}${image_name} to " .
|
die("Failed to link ${Old}${image_name} to " .
|
||||||
"${image_dest}${kimage}.\n");
|
"${image_dest}${kimage}:$!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
warn "ln -s ${Old}${image_name} $kimage" if $DEBUG;
|
warn "ln -s ${Old}${image_name} $kimage" if $DEBUG;
|
||||||
if (! symlink("${Old}${image_name}", "$kimage")) {
|
if (! symlink("${Old}${image_name}", "$kimage")) {
|
||||||
rename("$kimage.$$", "$kimage");
|
rename("$kimage.$$", "$kimage");
|
||||||
die("Failed to symbolic-link ${Old}${image_name} to " .
|
die("Failed to symbolic-link ${Old}${image_name} to " .
|
||||||
"${image_dest}${kimage}: $!\n");
|
"${image_dest}${kimage}:$!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -544,8 +544,8 @@ sub really_move_link {
|
|||||||
sub handle_missing_link {
|
sub handle_missing_link {
|
||||||
my $kimage = $_[0]; # Name of the symbolic link
|
my $kimage = $_[0]; # Name of the symbolic link
|
||||||
my $image_dest = $_[1]; # The directory the links goes into
|
my $image_dest = $_[1]; # The directory the links goes into
|
||||||
my $image_name = $_[2];
|
my $image_name = $_[2];
|
||||||
my $src_dir = $_[3];
|
my $src_dir = $_[3];
|
||||||
warn "handle_missing_link: kimage=$kimage, image_dest=$image_dest\n" .
|
warn "handle_missing_link: kimage=$kimage, image_dest=$image_dest\n" .
|
||||||
"\t image_name=$image_name, src_dir=$src_dir" if $DEBUG;
|
"\t image_name=$image_name, src_dir=$src_dir" if $DEBUG;
|
||||||
|
|
||||||
@@ -555,18 +555,18 @@ sub handle_missing_link {
|
|||||||
"$image_name " . " $kimage");
|
"$image_name " . " $kimage");
|
||||||
if ($ret) {
|
if ($ret) {
|
||||||
die("Failed to copy " . $realimageloc . "$image_name to "
|
die("Failed to copy " . $realimageloc . "$image_name to "
|
||||||
. $image_dest . "$kimage .\n");
|
. $image_dest . "$kimage");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ($reverse_symlink) {
|
elsif ($reverse_symlink) {
|
||||||
warn "mv -f $realimageloc$image_name $kimage" if $DEBUG;
|
warn "mv -f $realimageloc$image_name $kimage" if $DEBUG;
|
||||||
my $ret = system("mv -f " . $realimageloc . "$image_name "
|
my $ret = system("mv -f " . $realimageloc . "$image_name "
|
||||||
. "$kimage");
|
. "$kimage");
|
||||||
if ($ret) {
|
if ($ret) {
|
||||||
die("Failed to move " . $realimageloc . "$image_name to "
|
die("Failed to move " . $realimageloc . "$image_name to "
|
||||||
. $image_dest . "$kimage .\n");
|
. $image_dest . "$kimage");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (! $have_conffile) {
|
if (! $have_conffile) {
|
||||||
my $ret;
|
my $ret;
|
||||||
@@ -612,28 +612,28 @@ sub handle_missing_link {
|
|||||||
$Old ="" if $rel_path =~ m/^\s*$/o;
|
$Old ="" if $rel_path =~ m/^\s*$/o;
|
||||||
|
|
||||||
symlink($Old . "$Name", "$Link_Dest") ||
|
symlink($Old . "$Name", "$Link_Dest") ||
|
||||||
die("Failed to symbolic-link ${Old}$Name to $Link_Dest: $!\n");
|
die("Failed to symbolic-link ${Old}$Name to $Link_Dest:$!");
|
||||||
warn "ln -s ${Old}$Name $Link_Dest" if $DEBUG;
|
warn "ln -s ${Old}$Name $Link_Dest" if $DEBUG;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# This routine handles the rest of the cases, where the user has requested
|
# This routine handles the rest of the cases, where the user has requested
|
||||||
# non-traditional handling, like using cp, or reverse symlinks, or hard links.
|
# non-traditional handling, like using cp, or reverse symlinks, or hard links.
|
||||||
sub handle_non_symlinks {
|
sub handle_non_symlinks {
|
||||||
my $kimage = $_[0]; # Name of the symbolic link
|
my $kimage = $_[0]; # Name of the symbolic link
|
||||||
my $image_dest = $_[1]; # The directory the links goes into
|
my $image_dest = $_[1]; # The directory the links goes into
|
||||||
my $image_name = $_[2];
|
my $image_name = $_[2];
|
||||||
my $src_dir = $_[3];
|
my $src_dir = $_[3];
|
||||||
warn "handle_non_link: kimage=$kimage, image_dest=$image_dest\n" .
|
warn "handle_non_link: kimage=$kimage, image_dest=$image_dest\n" .
|
||||||
"\t image_name=$image_name, src_dir=$src_dir" if $DEBUG;
|
"\t image_name=$image_name, src_dir=$src_dir" if $DEBUG;
|
||||||
|
|
||||||
# Save the current image. We do this in all four cases
|
# Save the current image. We do this in all four cases
|
||||||
rename("$kimage", "$kimage.$$") ||
|
rename("$kimage", "$kimage.$$") ||
|
||||||
die "failed to move " . $image_dest . "$kimage:$!";
|
die "failed to move " . $image_dest . "$kimage:$!";
|
||||||
warn "mv $kimage $kimage.$$" if $DEBUG;
|
warn "mv $kimage $kimage.$$" if $DEBUG;
|
||||||
|
|
||||||
##,####
|
##,####
|
||||||
# case One
|
# case One
|
||||||
#`####
|
#`####
|
||||||
if ($no_symlink) {
|
if ($no_symlink) {
|
||||||
@@ -647,10 +647,10 @@ sub handle_non_symlinks {
|
|||||||
warn "mv $kimage.$$ $kimage" if $DEBUG;
|
warn "mv $kimage.$$ $kimage" if $DEBUG;
|
||||||
}
|
}
|
||||||
die("Failed to copy " . $realimageloc . "$image_name to "
|
die("Failed to copy " . $realimageloc . "$image_name to "
|
||||||
. $image_dest . "$kimage .\n");
|
. $image_dest . "$kimage");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
##,####
|
##,####
|
||||||
# case Two
|
# case Two
|
||||||
#`####
|
#`####
|
||||||
elsif ($reverse_symlink) { # Maybe /$image_dest is on a dos system?
|
elsif ($reverse_symlink) { # Maybe /$image_dest is on a dos system?
|
||||||
@@ -663,7 +663,7 @@ sub handle_non_symlinks {
|
|||||||
warn "mv $kimage.$$ $kimage" if $DEBUG;
|
warn "mv $kimage.$$ $kimage" if $DEBUG;
|
||||||
}
|
}
|
||||||
die("Failed to move " . $realimageloc . "$image_name to "
|
die("Failed to move " . $realimageloc . "$image_name to "
|
||||||
. $image_dest . "$kimage .\n");
|
. $image_dest . "$kimage");
|
||||||
}
|
}
|
||||||
my $Old = $image_dest;
|
my $Old = $image_dest;
|
||||||
if (test_relative ('Old Dir' => $Old, 'New Dir' => $realimageloc,
|
if (test_relative ('Old Dir' => $Old, 'New Dir' => $realimageloc,
|
||||||
@@ -711,7 +711,7 @@ sub handle_non_symlinks {
|
|||||||
warn "mv $kimage.$$ $kimage" if $DEBUG;
|
warn "mv $kimage.$$ $kimage" if $DEBUG;
|
||||||
rename("$kimage.$$", "$kimage");
|
rename("$kimage.$$", "$kimage");
|
||||||
die("Failed to link " . $realimageloc . "$image_name to "
|
die("Failed to link " . $realimageloc . "$image_name to "
|
||||||
. $image_dest . "$kimage .\n");
|
. $image_dest . "$kimage");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
##,####
|
##,####
|
||||||
@@ -728,7 +728,7 @@ sub handle_non_symlinks {
|
|||||||
rename("$kimage.$$", "$kimage");
|
rename("$kimage.$$", "$kimage");
|
||||||
}
|
}
|
||||||
die("Failed to copy " . $realimageloc . "$image_name to "
|
die("Failed to copy " . $realimageloc . "$image_name to "
|
||||||
. $image_dest . "$kimage .\n");
|
. $image_dest . "$kimage");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# Ok, now we may clobber the previous .old file
|
# Ok, now we may clobber the previous .old file
|
||||||
@@ -811,7 +811,7 @@ sub find_initrd_tool {
|
|||||||
print STDERR "Finding valid ramdisk creators.\n";
|
print STDERR "Finding valid ramdisk creators.\n";
|
||||||
my @ramdisks =
|
my @ramdisks =
|
||||||
grep {
|
grep {
|
||||||
my $args =
|
my $args =
|
||||||
"$_ " .
|
"$_ " .
|
||||||
"--supported-host-version=$hostversion " .
|
"--supported-host-version=$hostversion " .
|
||||||
"--supported-target-version=$version " .
|
"--supported-target-version=$version " .
|
||||||
@@ -863,7 +863,7 @@ if ($initrd) {
|
|||||||
}
|
}
|
||||||
else { # Not making an initrd emage
|
else { # Not making an initrd emage
|
||||||
if (-l "initrd.img") {
|
if (-l "initrd.img") {
|
||||||
# Ooh, last image was an initrd image? in any case, we should move it.
|
# Ooh, last image was an initrd image? in any case, we should move it.
|
||||||
my $target = readlink "initrd.img";
|
my $target = readlink "initrd.img";
|
||||||
my $real_target = '';
|
my $real_target = '';
|
||||||
$real_target = abs_path($target) if defined ($target);
|
$real_target = abs_path($target) if defined ($target);
|
||||||
@@ -900,7 +900,7 @@ if (! defined $ARGV[1] || ! $ARGV[1] || $ARGV[1] =~ m/<unknown>/og) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (! -e "$kimage") {
|
if (! -e "$kimage") {
|
||||||
handle_missing_link($kimage, $image_dest, "$kimage-$version",
|
handle_missing_link($kimage, $image_dest, "$kimage-$version",
|
||||||
$realimageloc);
|
$realimageloc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1092,3 +1092,4 @@ sub run_lilo (){
|
|||||||
exit 0;
|
exit 0;
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
|
|||||||
28
debian/control-scripts/postrm
vendored
28
debian/control-scripts/postrm
vendored
@@ -1,7 +1,7 @@
|
|||||||
#! /usr/bin/perl
|
#! /usr/bin/perl
|
||||||
# -*- Mode: Cperl -*-
|
# -*- Mode: Cperl -*-
|
||||||
# image.postrm ---
|
# image.postrm ---
|
||||||
# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com )
|
# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com )
|
||||||
# Created On : Sat May 15 11:05:13 1999
|
# Created On : Sat May 15 11:05:13 1999
|
||||||
# Created On Node : glaurung.green-gryphon.com
|
# Created On Node : glaurung.green-gryphon.com
|
||||||
# Last Modified By : Manoj Srivastava
|
# Last Modified By : Manoj Srivastava
|
||||||
@@ -9,14 +9,14 @@
|
|||||||
# Last Machine Used: glaurung.internal.golden-gryphon.com
|
# Last Machine Used: glaurung.internal.golden-gryphon.com
|
||||||
# Update Count : 57
|
# Update Count : 57
|
||||||
# Status : Unknown, Use with caution!
|
# Status : Unknown, Use with caution!
|
||||||
# HISTORY :
|
# HISTORY :
|
||||||
# Description :
|
# Description :
|
||||||
#
|
#
|
||||||
# $Id: image.postrm,v 1.31 2003/10/07 16:24:20 srivasta Exp $
|
# $Id: image.postrm,v 1.31 2003/10/07 16:24:20 srivasta Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
#use strict; #for debugging
|
#use strict; #for debugging
|
||||||
use Cwd 'abs_path';
|
use Cwd 'abs_path';
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ my $kernel_arch = "=B";
|
|||||||
my $ramdisk = "/usr/sbin/update-initramfs";
|
my $ramdisk = "/usr/sbin/update-initramfs";
|
||||||
my $package_name = "linux-image-$version";
|
my $package_name = "linux-image-$version";
|
||||||
|
|
||||||
my $Loader = "NoLOADER"; #
|
my $Loader = "NoLOADER"; #
|
||||||
$Loader = "LILO" if $loader =~ /^lilo/io;
|
$Loader = "LILO" if $loader =~ /^lilo/io;
|
||||||
$Loader = "SILO" if $loader =~ /^silo/io;
|
$Loader = "SILO" if $loader =~ /^silo/io;
|
||||||
$Loader = "QUIK" if $loader =~ /^quik/io;
|
$Loader = "QUIK" if $loader =~ /^quik/io;
|
||||||
@@ -189,7 +189,7 @@ sub remove_sym_link {
|
|||||||
my $bad_image = $_[0];
|
my $bad_image = $_[0];
|
||||||
|
|
||||||
warn "Removing symbolic link $bad_image \n";
|
warn "Removing symbolic link $bad_image \n";
|
||||||
if ($loader =~ /lilo/i)
|
if ($loader =~ /lilo/i)
|
||||||
{
|
{
|
||||||
warn "Unless you used the optional flag in lilo, \n";
|
warn "Unless you used the optional flag in lilo, \n";
|
||||||
}
|
}
|
||||||
@@ -236,8 +236,8 @@ sub CanonicalizePath {
|
|||||||
############
|
############
|
||||||
######################################################################
|
######################################################################
|
||||||
######################################################################
|
######################################################################
|
||||||
# This removes dangling symlinks. What do we do about hard links? Surely a
|
# This removes dangling symlinks. What do we do about hard links? Surely a
|
||||||
# something with the nane $image_dest . "$kimage" ought not to be left behind?
|
# something with the nane $image_dest . "$kimage" ought not to be left behind?
|
||||||
sub image_magic {
|
sub image_magic {
|
||||||
my $kimage = $_[0];
|
my $kimage = $_[0];
|
||||||
my $image_dest = $_[1];
|
my $image_dest = $_[1];
|
||||||
@@ -353,3 +353,9 @@ if ($ARGV[0] !~ /upgrade/) {
|
|||||||
exit 0;
|
exit 0;
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
13
debian/control-scripts/preinst
vendored
13
debian/control-scripts/preinst
vendored
@@ -90,6 +90,15 @@ die "Pre inst Internal error. Aborting." unless $version;
|
|||||||
exit 0 if $ARGV[0] =~ /abort-upgrade/;
|
exit 0 if $ARGV[0] =~ /abort-upgrade/;
|
||||||
exit 1 unless $ARGV[0] =~ /(install|upgrade)/;
|
exit 1 unless $ARGV[0] =~ /(install|upgrade)/;
|
||||||
|
|
||||||
|
$arch = `uname -i`;
|
||||||
|
if ($arch =~ m/86/) {
|
||||||
|
system ("grep -q ' pae ' /proc/cpuinfo");
|
||||||
|
if ($?) {
|
||||||
|
print STDERR "This kernel does not support a non-PAE CPU.\n";
|
||||||
|
exit 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# remove multiple leading slashes; make sure there is at least one.
|
# remove multiple leading slashes; make sure there is at least one.
|
||||||
$realimageloc =~ s|^/*|/|o;
|
$realimageloc =~ s|^/*|/|o;
|
||||||
$realimageloc =~ s|/+|/|o;
|
$realimageloc =~ s|/+|/|o;
|
||||||
@@ -163,7 +172,7 @@ sub find_initrd_tool {
|
|||||||
my $version = shift;
|
my $version = shift;
|
||||||
my @ramdisks =
|
my @ramdisks =
|
||||||
grep {
|
grep {
|
||||||
my $args =
|
my $args =
|
||||||
"$_ " .
|
"$_ " .
|
||||||
"--supported-host-version=$hostversion " .
|
"--supported-host-version=$hostversion " .
|
||||||
"--supported-target-version=$version " .
|
"--supported-target-version=$version " .
|
||||||
@@ -302,3 +311,5 @@ print STDERR "Done.\n";
|
|||||||
exit 0;
|
exit 0;
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
23
debian/control-scripts/prerm
vendored
23
debian/control-scripts/prerm
vendored
@@ -1,7 +1,7 @@
|
|||||||
#! /usr/bin/perl
|
#! /usr/bin/perl
|
||||||
# -*- Mode: Perl -*-
|
# -*- Mode: Perl -*-
|
||||||
# image.prerm ---
|
# image.prerm ---
|
||||||
# Author : root ( root@melkor.pilgrim.umass.edu )
|
# Author : root ( root@melkor.pilgrim.umass.edu )
|
||||||
# Created On : Fri May 17 03:28:59 1996
|
# Created On : Fri May 17 03:28:59 1996
|
||||||
# Created On Node : melkor.pilgrim.umass.edu
|
# Created On Node : melkor.pilgrim.umass.edu
|
||||||
# Last Modified By : Manoj Srivastava
|
# Last Modified By : Manoj Srivastava
|
||||||
@@ -9,13 +9,13 @@
|
|||||||
# Last Machine Used: glaurung.internal.golden-gryphon.com
|
# Last Machine Used: glaurung.internal.golden-gryphon.com
|
||||||
# Update Count : 85
|
# Update Count : 85
|
||||||
# Status : Unknown, Use with caution!
|
# Status : Unknown, Use with caution!
|
||||||
# HISTORY :
|
# HISTORY :
|
||||||
# Description :
|
# Description :
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# $Id: image.prerm,v 1.22 2003/10/07 16:24:20 srivasta Exp $
|
# $Id: image.prerm,v 1.22 2003/10/07 16:24:20 srivasta Exp $
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#use strict;
|
#use strict;
|
||||||
|
|
||||||
$|=1;
|
$|=1;
|
||||||
@@ -47,7 +47,7 @@ my $kernel_arch = "=B";
|
|||||||
my $ramdisk = "/usr/sbin/update-initramfs";
|
my $ramdisk = "/usr/sbin/update-initramfs";
|
||||||
my $package_name = "linux-image-$version";
|
my $package_name = "linux-image-$version";
|
||||||
|
|
||||||
my $Loader = "NoLOADER"; #
|
my $Loader = "NoLOADER"; #
|
||||||
$Loader = "LILO" if $loader =~ /^lilo/io;
|
$Loader = "LILO" if $loader =~ /^lilo/io;
|
||||||
$Loader = "SILO" if $loader =~ /^silo/io;
|
$Loader = "SILO" if $loader =~ /^silo/io;
|
||||||
$Loader = "QUIK" if $loader =~ /^quik/io;
|
$Loader = "QUIK" if $loader =~ /^quik/io;
|
||||||
@@ -272,7 +272,7 @@ if (-x "$prerm_hook") {
|
|||||||
}
|
}
|
||||||
if (-d "/etc/kernel/prerm.d") {
|
if (-d "/etc/kernel/prerm.d") {
|
||||||
print STDERR "Examining /etc/kernel/prerm.d.\n";
|
print STDERR "Examining /etc/kernel/prerm.d.\n";
|
||||||
system ("run-parts --verbose --exit-on-error --arg=$version " .
|
system ("run-parts --verbose --exit-on-error --arg=$version " .
|
||||||
"--arg=$realimageloc$kimage-$version /etc/kernel/prerm.d") &&
|
"--arg=$realimageloc$kimage-$version /etc/kernel/prerm.d") &&
|
||||||
die "Failed to process /etc/kernel/prerm.d";
|
die "Failed to process /etc/kernel/prerm.d";
|
||||||
}
|
}
|
||||||
@@ -305,3 +305,8 @@ sub success () {
|
|||||||
&success();
|
&success();
|
||||||
exit 0;
|
exit 0;
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
2
debian/docs/README.inclusion-list
vendored
2
debian/docs/README.inclusion-list
vendored
@@ -22,7 +22,7 @@ order to continue to keep the minimal number of modules.
|
|||||||
A module inclusion list is applied on a per-flavour basis. For example,
|
A module inclusion list is applied on a per-flavour basis. For example,
|
||||||
debian.<BRANCH>/control.d/${flavour}.inclusion-list. For example, the
|
debian.<BRANCH>/control.d/${flavour}.inclusion-list. For example, the
|
||||||
config for virtual is very close to server and generic, but the inclusion list
|
config for virtual is very close to server and generic, but the inclusion list
|
||||||
causes the virtual package to be constructed with _only_ the modules described
|
causes the virtual package to be constructed with _only_ the modules described
|
||||||
in the inclusion list.
|
in the inclusion list.
|
||||||
|
|
||||||
The inclusion list format is a simple bash regular expression list of files. For example,
|
The inclusion list format is a simple bash regular expression list of files. For example,
|
||||||
|
|||||||
14
debian/rules
vendored
14
debian/rules
vendored
@@ -29,8 +29,11 @@ include $(DROOT)/rules.d/0-common-vars.mk
|
|||||||
# Maintainer targets
|
# Maintainer targets
|
||||||
include $(DROOT)/rules.d/1-maintainer.mk
|
include $(DROOT)/rules.d/1-maintainer.mk
|
||||||
|
|
||||||
# Stages
|
# Stages -- support both DEB_STAGE=stage1 and DEB_BUILD_PROFILE=bootstrap
|
||||||
ifeq ($(DEB_STAGE),stage1)
|
ifeq ($(DEB_STAGE),stage1)
|
||||||
|
DEB_BUILD_PROFILE=bootstrap
|
||||||
|
endif
|
||||||
|
ifeq ($(DEB_BUILD_PROFILE),bootstrap)
|
||||||
do_tools=false
|
do_tools=false
|
||||||
do_doc_package=false
|
do_doc_package=false
|
||||||
do_source_package=false
|
do_source_package=false
|
||||||
@@ -38,6 +41,12 @@ ifeq ($(DEB_STAGE),stage1)
|
|||||||
do_flavour_header_package=false
|
do_flavour_header_package=false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# autopkgtest -- rebuild support
|
||||||
|
# only build the first flavour on the assumption it is representative
|
||||||
|
ifeq ($(DEB_BUILD_PROFILE),autopkgtest)
|
||||||
|
flavours := $(firstword $(flavours))
|
||||||
|
endif
|
||||||
|
|
||||||
# Debian Build System targets
|
# Debian Build System targets
|
||||||
binary: binary-indep binary-arch
|
binary: binary-indep binary-arch
|
||||||
|
|
||||||
@@ -82,6 +91,7 @@ include $(DROOT)/rules.d/3-binary-indep.mk
|
|||||||
include $(DROOT)/rules.d/4-checks.mk
|
include $(DROOT)/rules.d/4-checks.mk
|
||||||
|
|
||||||
# Misc stuff
|
# Misc stuff
|
||||||
|
.PHONY: $(DEBIAN)/control.stub
|
||||||
$(DEBIAN)/control.stub: $(DEBIAN)/d-i/kernel-versions.in \
|
$(DEBIAN)/control.stub: $(DEBIAN)/d-i/kernel-versions.in \
|
||||||
$(DROOT)/scripts/control-create \
|
$(DROOT)/scripts/control-create \
|
||||||
$(DEBIAN)/control.stub.in \
|
$(DEBIAN)/control.stub.in \
|
||||||
@@ -92,6 +102,7 @@ $(DEBIAN)/control.stub: $(DEBIAN)/d-i/kernel-versions.in \
|
|||||||
cat $$i | sed -e 's/PKGVER/$(release)/g' \
|
cat $$i | sed -e 's/PKGVER/$(release)/g' \
|
||||||
-e 's/ABINUM/$(abinum)/g' \
|
-e 's/ABINUM/$(abinum)/g' \
|
||||||
-e 's/SRCPKGNAME/$(src_pkg_name)/g' \
|
-e 's/SRCPKGNAME/$(src_pkg_name)/g' \
|
||||||
|
-e 's/=HUMAN=/$(human_arch)/g' \
|
||||||
> $$new; \
|
> $$new; \
|
||||||
done
|
done
|
||||||
flavours="$(wildcard $(DEBIAN)/control.d/vars.* $(DEBIAN)/sub-flavours/*.vars)";\
|
flavours="$(wildcard $(DEBIAN)/control.d/vars.* $(DEBIAN)/sub-flavours/*.vars)";\
|
||||||
@@ -100,6 +111,7 @@ $(DEBIAN)/control.stub: $(DEBIAN)/d-i/kernel-versions.in \
|
|||||||
sed -e 's/PKGVER/$(release)/g' \
|
sed -e 's/PKGVER/$(release)/g' \
|
||||||
-e 's/ABINUM/$(abinum)/g' \
|
-e 's/ABINUM/$(abinum)/g' \
|
||||||
-e 's/SRCPKGNAME/$(src_pkg_name)/g' \
|
-e 's/SRCPKGNAME/$(src_pkg_name)/g' \
|
||||||
|
-e 's/=HUMAN=/$(human_arch)/g' \
|
||||||
>> $(DEBIAN)/control.stub; \
|
>> $(DEBIAN)/control.stub; \
|
||||||
done
|
done
|
||||||
cp $(DEBIAN)/control.stub $(DEBIAN)/control
|
cp $(DEBIAN)/control.stub $(DEBIAN)/control
|
||||||
|
|||||||
92
debian/rules.d/0-common-vars.mk
vendored
92
debian/rules.d/0-common-vars.mk
vendored
@@ -4,13 +4,14 @@
|
|||||||
src_pkg_name=$(shell sed -n '1s/^\(.*\) (.*).*$$/\1/p' $(DEBIAN)/changelog)
|
src_pkg_name=$(shell sed -n '1s/^\(.*\) (.*).*$$/\1/p' $(DEBIAN)/changelog)
|
||||||
|
|
||||||
# Get some version info
|
# Get some version info
|
||||||
series := maverick
|
|
||||||
release := $(shell sed -n '1s/^$(src_pkg_name).*(\(.*\)-.*).*$$/\1/p' $(DEBIAN)/changelog)
|
release := $(shell sed -n '1s/^$(src_pkg_name).*(\(.*\)-.*).*$$/\1/p' $(DEBIAN)/changelog)
|
||||||
revisions := $(shell sed -n 's/^$(src_pkg_name)\ .*($(release)-\(.*\)).*$$/\1/p' $(DEBIAN)/changelog | tac)
|
revisions := $(shell sed -n 's/^$(src_pkg_name)\ .*($(release)-\(.*\)).*$$/\1/p' $(DEBIAN)/changelog | tac)
|
||||||
revision ?= $(word $(words $(revisions)),$(revisions))
|
revision ?= $(word $(words $(revisions)),$(revisions))
|
||||||
prev_revisions := $(filter-out $(revision),0.0 $(revisions))
|
prev_revisions := $(filter-out $(revision),0.0 $(revisions))
|
||||||
prev_revision := $(word $(words $(prev_revisions)),$(prev_revisions))
|
prev_revision := $(word $(words $(prev_revisions)),$(prev_revisions))
|
||||||
|
|
||||||
|
prev_fullver ?= $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -o1 -c1 | sed -ne 's/^Version: *//p')
|
||||||
|
|
||||||
family=ubuntu
|
family=ubuntu
|
||||||
|
|
||||||
# This is an internally used mechanism for the daily kernel builds. It
|
# This is an internally used mechanism for the daily kernel builds. It
|
||||||
@@ -23,16 +24,6 @@ family=ubuntu
|
|||||||
# or configs.
|
# or configs.
|
||||||
AUTOBUILD=
|
AUTOBUILD=
|
||||||
|
|
||||||
#
|
|
||||||
# This is a way to support some external variables. A good example is
|
|
||||||
# a local setup for ccache and distcc See LOCAL_ENV_CC and
|
|
||||||
# LOCAL_ENV_DISTCC_HOSTS in the definition of kmake.
|
|
||||||
# For example:
|
|
||||||
# LOCAL_ENV_CC="ccache distcc"
|
|
||||||
# LOCAL_ENV_DISTCC_HOSTS="localhost 10.0.2.5 10.0.2.221"
|
|
||||||
#
|
|
||||||
-include $(CURDIR)/../.$(series)-env
|
|
||||||
|
|
||||||
ifneq ($(AUTOBUILD),)
|
ifneq ($(AUTOBUILD),)
|
||||||
skipabi = true
|
skipabi = true
|
||||||
skipmodule = true
|
skipmodule = true
|
||||||
@@ -51,7 +42,7 @@ ubuntu_log_opts += --print-shas
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Get the kernels own extra version to be added to the release signature.
|
# Get the kernels own extra version to be added to the release signature.
|
||||||
extraversion=$(shell awk '/EXTRAVERSION =/ { print $$3 }' <Makefile)
|
raw_kernelversion=$(shell make kernelversion)
|
||||||
|
|
||||||
#
|
#
|
||||||
# full_build -- are we doing a full buildd style build
|
# full_build -- are we doing a full buildd style build
|
||||||
@@ -79,17 +70,48 @@ ifneq ($(full_build),false)
|
|||||||
uploadnum := $(uploadnum)-Ubuntu
|
uploadnum := $(uploadnum)-Ubuntu
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# We force the sublevel to be exactly what we want. The actual source may
|
# XXX: linux-libc-dev got bumped to -803.N inadvertantly by a ti-omap4 upload
|
||||||
# be an in development git tree. We want to force it here instead of
|
# shift our version higher for this package only. Ensure this only
|
||||||
# committing changes to the top level Makefile
|
# occurs for the v2.6.35 kernel so that we do not propogate this into
|
||||||
SUBLEVEL := $(shell echo $(release) | awk -F. '{print $$3}')
|
# any other series.
|
||||||
|
raw_uploadnum := $(shell echo $(revision) | sed -e 's/.*\.//')
|
||||||
|
libc_dev_version :=
|
||||||
|
ifeq ($(DEBIAN),debian.master)
|
||||||
|
ifeq ($(release),2.6.35)
|
||||||
|
libc_dev_version := -v$(release)-$(shell expr "$(abinum)" + 1000).$(raw_uploadnum)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
DEB_HOST_MULTIARCH = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||||
|
DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||||
|
DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||||
|
DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||||
|
DEB_BUILD_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Detect invocations of the form 'fakeroot debian/rules binary arch=armhf'
|
||||||
|
# within an x86'en schroot. This only gets you part of the way since the
|
||||||
|
# packaging phase fails, but you can at least compile the kernel quickly.
|
||||||
|
#
|
||||||
|
arch := $(DEB_HOST_ARCH)
|
||||||
|
ifneq ($(arch),$(DEB_HOST_ARCH))
|
||||||
|
CROSS_COMPILE ?= $(shell dpkg-architecture -a$(arch) -qDEB_HOST_GNU_TYPE -f 2>/dev/null)-
|
||||||
|
endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# Detect invocations of the form 'dpkg-buildpackage -B -aarmhf' within
|
||||||
|
# an x86'en schroot. This is the only way to build all of the packages
|
||||||
|
# (except for tools).
|
||||||
|
#
|
||||||
|
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
|
||||||
|
CROSS_COMPILE ?= $(DEB_HOST_GNU_TYPE)-
|
||||||
|
endif
|
||||||
|
|
||||||
arch := $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
|
||||||
abidir := $(CURDIR)/$(DEBIAN)/abi/$(release)-$(revision)/$(arch)
|
abidir := $(CURDIR)/$(DEBIAN)/abi/$(release)-$(revision)/$(arch)
|
||||||
prev_abidir := $(CURDIR)/$(DEBIAN)/abi/$(release)-$(prev_revision)/$(arch)
|
prev_abidir := $(CURDIR)/$(DEBIAN)/abi/$(release)-$(prev_revision)/$(arch)
|
||||||
commonconfdir := $(CURDIR)/$(DEBIAN)/config
|
commonconfdir := $(CURDIR)/$(DEBIAN)/config
|
||||||
archconfdir := $(CURDIR)/$(DEBIAN)/config/$(arch)
|
archconfdir := $(CURDIR)/$(DEBIAN)/config/$(arch)
|
||||||
sharedconfdir := $(CURDIR)/$(DEBIAN)/config
|
sharedconfdir := $(CURDIR)/debian.master/config
|
||||||
builddir := $(CURDIR)/debian/build
|
builddir := $(CURDIR)/debian/build
|
||||||
stampdir := $(CURDIR)/debian/stamps
|
stampdir := $(CURDIR)/debian/stamps
|
||||||
|
|
||||||
@@ -99,7 +121,10 @@ stampdir := $(CURDIR)/debian/stamps
|
|||||||
# assumption that the binary package always starts with linux-image will never change.
|
# assumption that the binary package always starts with linux-image will never change.
|
||||||
#
|
#
|
||||||
bin_pkg_name=linux-image-$(abi_release)
|
bin_pkg_name=linux-image-$(abi_release)
|
||||||
|
extra_pkg_name=linux-image-extra-$(abi_release)
|
||||||
hdrs_pkg_name=linux-headers-$(abi_release)
|
hdrs_pkg_name=linux-headers-$(abi_release)
|
||||||
|
indep_hdrs_pkg_name=$(src_pkg_name)-headers-$(abi_release)
|
||||||
|
|
||||||
#
|
#
|
||||||
# The generation of content in the doc package depends on both 'AUTOBUILD=' and
|
# The generation of content in the doc package depends on both 'AUTOBUILD=' and
|
||||||
# 'do_doc_package_content=true'. There are usually build errors during the development
|
# 'do_doc_package_content=true'. There are usually build errors during the development
|
||||||
@@ -134,9 +159,14 @@ do_full_source=false
|
|||||||
|
|
||||||
# build tools
|
# build tools
|
||||||
ifneq ($(wildcard $(CURDIR)/tools),)
|
ifneq ($(wildcard $(CURDIR)/tools),)
|
||||||
do_tools?=true
|
ifeq ($(do_tools),)
|
||||||
|
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
|
||||||
|
do_tools=false
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
do_tools?=true
|
||||||
else
|
else
|
||||||
do_tools?=false
|
do_tools?=false
|
||||||
endif
|
endif
|
||||||
tools_pkg_name=$(src_pkg_name)-tools-$(abi_release)
|
tools_pkg_name=$(src_pkg_name)-tools-$(abi_release)
|
||||||
tools_common_pkg_name=$(src_pkg_name)-tools-common
|
tools_common_pkg_name=$(src_pkg_name)-tools-common
|
||||||
@@ -179,8 +209,22 @@ conc_level = -j$(CONCURRENCY_LEVEL)
|
|||||||
|
|
||||||
# target_flavour is filled in for each step
|
# target_flavour is filled in for each step
|
||||||
kmake = make ARCH=$(build_arch) \
|
kmake = make ARCH=$(build_arch) \
|
||||||
EXTRAVERSION=-$(abinum)-$(target_flavour) \
|
CROSS_COMPILE=$(CROSS_COMPILE) \
|
||||||
CONFIG_DEBUG_SECTION_MISMATCH=y SUBLEVEL=$(SUBLEVEL) \
|
KERNELVERSION=$(abi_release)-$(target_flavour) \
|
||||||
|
CONFIG_DEBUG_SECTION_MISMATCH=y \
|
||||||
KBUILD_BUILD_VERSION="$(uploadnum)" \
|
KBUILD_BUILD_VERSION="$(uploadnum)" \
|
||||||
LOCALVERSION= localver-extra= \
|
LOCALVERSION= localver-extra=
|
||||||
CC=gcc-4.7
|
ifneq ($(LOCAL_ENV_CC),)
|
||||||
|
kmake += CC=$(LOCAL_ENV_CC) DISTCC_HOSTS=$(LOCAL_ENV_DISTCC_HOSTS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Locking is required in parallel builds to prevent loss of contents
|
||||||
|
# of the debian/files.
|
||||||
|
lockme_file = $(CURDIR)/debian/.LOCK
|
||||||
|
lockme_cmd = flock -w 60
|
||||||
|
lockme = $(lockme_cmd) $(lockme_file)
|
||||||
|
|
||||||
|
# Checks if a var is overriden by the custom rules. Called with var and
|
||||||
|
# flavour as arguments.
|
||||||
|
custom_override = \
|
||||||
|
$(shell if [ -n "$($(1)_$(2))" ]; then echo "$($(1)_$(2))"; else echo "$($(1))"; fi)
|
||||||
|
|||||||
48
debian/rules.d/1-maintainer.mk
vendored
48
debian/rules.d/1-maintainer.mk
vendored
@@ -39,39 +39,14 @@ help:
|
|||||||
printdebian:
|
printdebian:
|
||||||
@echo "$(DEBIAN)"
|
@echo "$(DEBIAN)"
|
||||||
|
|
||||||
updateconfigs:
|
updateconfigs defaultconfigs editconfigs genconfigs dumpconfigs:
|
||||||
dh_testdir;
|
dh_testdir;
|
||||||
$(SHELL) $(DROOT)/scripts/misc/kernelconfig oldconfig
|
$(SHELL) $(DROOT)/scripts/misc/kernelconfig $@
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
||||||
defaultconfigs:
|
updateportsconfigs defaultportsconfigs editportsconfigs genportsconfigs askconfigs:
|
||||||
dh_testdir;
|
dh_testdir;
|
||||||
yes "" | $(SHELL) $(DROOT)/scripts/misc/kernelconfig defaultconfig
|
$(SHELL) $(DROOT)/scripts/misc/kernelconfig $@ ports
|
||||||
rm -rf build
|
|
||||||
|
|
||||||
editconfigs:
|
|
||||||
dh_testdir
|
|
||||||
$(SHELL) $(DROOT)/scripts/misc/kernelconfig editconfig
|
|
||||||
rm -rf build
|
|
||||||
|
|
||||||
genconfigs:
|
|
||||||
dh_testdir
|
|
||||||
$(SHELL) $(DROOT)/scripts/misc/kernelconfig genconfig
|
|
||||||
rm -rf build
|
|
||||||
|
|
||||||
updateportsconfigs:
|
|
||||||
dh_testdir;
|
|
||||||
$(SHELL) $(DROOT)/scripts/misc/kernelconfig oldconfig ports
|
|
||||||
rm -rf build
|
|
||||||
|
|
||||||
editportsconfigs:
|
|
||||||
dh_testdir
|
|
||||||
$(SHELL) $(DROOT)/scripts/misc/kernelconfig editconfig ports
|
|
||||||
rm -rf build
|
|
||||||
|
|
||||||
genportsconfigs:
|
|
||||||
dh_testdir
|
|
||||||
$(SHELL) $(DROOT)/scripts/misc/kernelconfig genconfig ports
|
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
||||||
printenv:
|
printenv:
|
||||||
@@ -90,9 +65,6 @@ printenv:
|
|||||||
@echo "skipmodule = $(skipmodule)"
|
@echo "skipmodule = $(skipmodule)"
|
||||||
@echo "skipdbg = $(skipdbg)"
|
@echo "skipdbg = $(skipdbg)"
|
||||||
@echo "ubuntu_log_opts = $(ubuntu_log_opts)"
|
@echo "ubuntu_log_opts = $(ubuntu_log_opts)"
|
||||||
ifneq ($(SUBLEVEL),)
|
|
||||||
@echo "SUBLEVEL = $(SUBLEVEL)"
|
|
||||||
endif
|
|
||||||
@echo "CONCURRENCY_LEVEL = $(CONCURRENCY_LEVEL)"
|
@echo "CONCURRENCY_LEVEL = $(CONCURRENCY_LEVEL)"
|
||||||
@echo "bin package name = $(bin_pkg_name)"
|
@echo "bin package name = $(bin_pkg_name)"
|
||||||
@echo "hdr package name = $(hdrs_pkg_name)"
|
@echo "hdr package name = $(hdrs_pkg_name)"
|
||||||
@@ -108,15 +80,22 @@ endif
|
|||||||
@echo "do_full_source = $(do_full_source)"
|
@echo "do_full_source = $(do_full_source)"
|
||||||
@echo "do_tools = $(do_tools)"
|
@echo "do_tools = $(do_tools)"
|
||||||
@echo "full_build = $(full_build)"
|
@echo "full_build = $(full_build)"
|
||||||
|
@echo "libc_dev_version = $(libc_dev_version)"
|
||||||
|
@echo "DEB_HOST_GNU_TYPE = $(DEB_HOST_GNU_TYPE)"
|
||||||
|
@echo "DEB_BUILD_GNU_TYPE = $(DEB_BUILD_GNU_TYPE)"
|
||||||
|
@echo "DEB_HOST_ARCH = $(DEB_HOST_ARCH)"
|
||||||
|
@echo "DEB_BUILD_ARCH = $(DEB_BUILD_ARCH)"
|
||||||
|
@echo "arch = $(arch)"
|
||||||
|
@echo "kmake = $(kmake)"
|
||||||
|
|
||||||
printchanges:
|
printchanges:
|
||||||
@baseCommit=$$(git log --pretty=format:'%H %s' | \
|
@baseCommit=$$(git log --pretty=format:'%H %s' | \
|
||||||
awk '/UBUNTU: '".*Ubuntu.*-$(release)-$(prev_revision)"'$$/ { print $$1; exit }'); \
|
awk '/UBUNTU: '".*Ubuntu-$(prev_fullver)"'$$/ { print $$1; exit }'); \
|
||||||
git log "$$baseCommit"..HEAD | \
|
git log "$$baseCommit"..HEAD | \
|
||||||
perl -w -f $(DROOT)/scripts/misc/git-ubuntu-log $(ubuntu_log_opts)
|
perl -w -f $(DROOT)/scripts/misc/git-ubuntu-log $(ubuntu_log_opts)
|
||||||
|
|
||||||
insertchanges:
|
insertchanges:
|
||||||
@perl -w -f $(DROOT)/scripts/misc/insert-changes.pl $(DROOT) $(DEBIAN)
|
@perl -w -f $(DROOT)/scripts/misc/insert-changes.pl $(DROOT) $(DEBIAN)
|
||||||
|
|
||||||
diffupstream:
|
diffupstream:
|
||||||
@git diff-tree -p refs/remotes/linux-2.6/master..HEAD $(shell ls | grep -vE '^(ubuntu|$(DEBIAN)|\.git.*)')
|
@git diff-tree -p refs/remotes/linux-2.6/master..HEAD $(shell ls | grep -vE '^(ubuntu|$(DEBIAN)|\.git.*)')
|
||||||
@@ -137,3 +116,4 @@ startnewrelease:
|
|||||||
$(DEBIAN)/changelog.new ; \
|
$(DEBIAN)/changelog.new ; \
|
||||||
cat $(DEBIAN)/changelog >> $(DEBIAN)/changelog.new; \
|
cat $(DEBIAN)/changelog >> $(DEBIAN)/changelog.new; \
|
||||||
mv $(DEBIAN)/changelog.new $(DEBIAN)/changelog
|
mv $(DEBIAN)/changelog.new $(DEBIAN)/changelog
|
||||||
|
|
||||||
|
|||||||
280
debian/rules.d/2-binary-arch.mk
vendored
280
debian/rules.d/2-binary-arch.mk
vendored
@@ -10,89 +10,135 @@ build_cd =
|
|||||||
build_O = O=$(builddir)/build-$*
|
build_O = O=$(builddir)/build-$*
|
||||||
endif
|
endif
|
||||||
|
|
||||||
prepare-%: $(stampdir)/stamp-prepare-%
|
$(stampdir)/stamp-prepare-%: config-prepare-check-%
|
||||||
@# Empty for make to be happy
|
@echo Debug: $@
|
||||||
$(stampdir)/stamp-prepare-%: $(stampdir)/stamp-prepare-tree-% prepare-checks-%
|
|
||||||
@touch $@
|
@touch $@
|
||||||
$(stampdir)/stamp-prepare-tree-%: target_flavour = $*
|
$(stampdir)/stamp-prepare-tree-%: target_flavour = $*
|
||||||
$(stampdir)/stamp-prepare-tree-%: $(commonconfdir)/config.common.$(family) $(archconfdir)/config.common.$(arch) $(archconfdir)/config.flavour.%
|
$(stampdir)/stamp-prepare-tree-%: $(commonconfdir)/config.common.$(family) $(archconfdir)/config.common.$(arch) $(archconfdir)/config.flavour.%
|
||||||
@echo "Preparing $*..."
|
@echo Debug: $@
|
||||||
install -d $(builddir)/build-$*
|
install -d $(builddir)/build-$*
|
||||||
touch $(builddir)/build-$*/ubuntu-build
|
touch $(builddir)/build-$*/ubuntu-build
|
||||||
[ "$(do_full_source)" != 'true' ] && true || \
|
[ "$(do_full_source)" != 'true' ] && true || \
|
||||||
rsync -a --exclude debian --exclude debian.master --exclude $(DEBIAN) * $(builddir)/build-$*
|
rsync -a --exclude debian --exclude debian.master --exclude $(DEBIAN) * $(builddir)/build-$*
|
||||||
cat $^ | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$* $(release)$(extraversion)"/' > $(builddir)/build-$*/.config
|
cat $^ | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$* $(raw_kernelversion)"/' > $(builddir)/build-$*/.config
|
||||||
find $(builddir)/build-$* -name "*.ko" | xargs rm -f
|
find $(builddir)/build-$* -name "*.ko" | xargs rm -f
|
||||||
$(build_cd) $(kmake) $(build_O) silentoldconfig prepare scripts
|
$(build_cd) $(kmake) $(build_O) -j1 silentoldconfig prepare scripts
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
# Do the actual build, including image and modules
|
# Used by developers as a shortcut to prepare a tree for compilation.
|
||||||
|
prepare-%: $(stampdir)/stamp-prepare-%
|
||||||
|
@echo Debug: $@
|
||||||
|
# Used by developers to allow efficient pre-building without fakeroot.
|
||||||
build-%: $(stampdir)/stamp-build-%
|
build-%: $(stampdir)/stamp-build-%
|
||||||
@# Empty for make to be happy
|
@echo Debug: $@
|
||||||
|
|
||||||
|
# Do the actual build, including image and modules
|
||||||
$(stampdir)/stamp-build-%: target_flavour = $*
|
$(stampdir)/stamp-build-%: target_flavour = $*
|
||||||
$(stampdir)/stamp-build-%: prepare-%
|
$(stampdir)/stamp-build-%: bldimg = $(call custom_override,build_image,$*)
|
||||||
@echo "Building $*..."
|
$(stampdir)/stamp-build-%: dtb_target = $(dtb_files_$*)
|
||||||
$(build_cd) $(kmake) $(build_O) $(conc_level) $(build_image)
|
$(stampdir)/stamp-build-%: $(stampdir)/stamp-prepare-%
|
||||||
$(build_cd) $(kmake) $(build_O) $(conc_level) modules
|
@echo Debug: $@ build_image $(build_image) bldimg $(bldimg)
|
||||||
|
$(build_cd) $(kmake) $(build_O) $(conc_level) $(bldimg) modules $(dtb_target)
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
# Install the finished build
|
# Install the finished build
|
||||||
install-%: pkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*
|
install-%: pkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*
|
||||||
|
install-%: pkgdir_ex = $(CURDIR)/debian/$(extra_pkg_name)-$*
|
||||||
install-%: bindoc = $(pkgdir)/usr/share/doc/$(bin_pkg_name)-$*
|
install-%: bindoc = $(pkgdir)/usr/share/doc/$(bin_pkg_name)-$*
|
||||||
install-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym
|
install-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym
|
||||||
|
install-%: signed = $(CURDIR)/debian/$(bin_pkg_name)-signed
|
||||||
install-%: basepkg = $(hdrs_pkg_name)
|
install-%: basepkg = $(hdrs_pkg_name)
|
||||||
|
install-%: indeppkg = $(indep_hdrs_pkg_name)
|
||||||
|
install-%: kernfile = $(call custom_override,kernel_file,$*)
|
||||||
|
install-%: instfile = $(call custom_override,install_file,$*)
|
||||||
install-%: hdrdir = $(CURDIR)/debian/$(basepkg)-$*/usr/src/$(basepkg)-$*
|
install-%: hdrdir = $(CURDIR)/debian/$(basepkg)-$*/usr/src/$(basepkg)-$*
|
||||||
install-%: target_flavour = $*
|
install-%: target_flavour = $*
|
||||||
install-%: $(stampdir)/stamp-build-% checks-%
|
install-%: dtb_files = $(dtb_files_$*)
|
||||||
|
install-%: checks-%
|
||||||
|
@echo Debug: $@ kernel_file $(kernel_file) kernfile $(kernfile) install_file $(install_file) instfile $(instfile)
|
||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
dh_prep -p$(bin_pkg_name)-$*
|
dh_clean -k -p$(bin_pkg_name)-$*
|
||||||
dh_prep -p$(hdrs_pkg_name)-$*
|
dh_clean -k -p$(hdrs_pkg_name)-$*
|
||||||
dh_prep -p$(dbg_pkg_name)-$*
|
ifneq ($(skipdbg),true)
|
||||||
dh_prep -p$(tools_pkg_name)-$*
|
dh_clean -k -p$(dbg_pkg_name)-$*
|
||||||
|
endif
|
||||||
|
|
||||||
# The main image
|
# The main image
|
||||||
# compress_file logic required because not all architectures
|
# compress_file logic required because not all architectures
|
||||||
# generate a zImage automatically out of the box
|
# generate a zImage automatically out of the box
|
||||||
ifeq ($(compress_file),)
|
ifeq ($(compress_file),)
|
||||||
install -m644 -D $(builddir)/build-$*/$(kernel_file) \
|
install -m600 -D $(builddir)/build-$*/$(kernfile) \
|
||||||
$(pkgdir)/boot/$(install_file)-$(abi_release)-$*
|
$(pkgdir)/boot/$(instfile)-$(abi_release)-$*
|
||||||
else
|
else
|
||||||
install -d $(pkgdir)/boot
|
install -d $(pkgdir)/boot
|
||||||
gzip -c9v $(builddir)/build-$*/$(kernel_file) > \
|
gzip -c9v $(builddir)/build-$*/$(kernfile) > \
|
||||||
$(pkgdir)/boot/$(install_file)-$(abi_release)-$*
|
$(pkgdir)/boot/$(instfile)-$(abi_release)-$*
|
||||||
chmod 644 $(pkgdir)/boot/$(install_file)-$(abi_release)-$*
|
chmod 600 $(pkgdir)/boot/$(instfile)-$(abi_release)-$*
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(arch),amd64)
|
||||||
|
ifeq ($(uefi_signed),true)
|
||||||
|
install -d $(signed)/$(release)-$(revision)
|
||||||
|
# Check to see if this supports handoff, if not do not sign it.
|
||||||
|
# Check the identification area magic and version >= 0x020b
|
||||||
|
handoff=`dd if="$(pkgdir)/boot/$(instfile)-$(abi_release)-$*" bs=1 skip=514 count=6 2>/dev/null | od -s | awk '($$1 == 0 && $$2 == 25672 && $$3 == 21362 && $$4 >= 523) { print "GOOD" }'`; \
|
||||||
|
if [ "$$handoff" = "GOOD" ]; then \
|
||||||
|
cp -p $(pkgdir)/boot/$(instfile)-$(abi_release)-$* \
|
||||||
|
$(signed)/$(release)-$(revision)/$(instfile)-$(abi_release)-$*.efi; \
|
||||||
|
fi
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install -m644 $(builddir)/build-$*/.config \
|
install -m644 $(builddir)/build-$*/.config \
|
||||||
$(pkgdir)/boot/config-$(abi_release)-$*
|
$(pkgdir)/boot/config-$(abi_release)-$*
|
||||||
install -m644 $(abidir)/$* \
|
install -m644 $(abidir)/$* \
|
||||||
$(pkgdir)/boot/abi-$(abi_release)-$*
|
$(pkgdir)/boot/abi-$(abi_release)-$*
|
||||||
install -m644 $(builddir)/build-$*/System.map \
|
install -m600 $(builddir)/build-$*/System.map \
|
||||||
$(pkgdir)/boot/System.map-$(abi_release)-$*
|
$(pkgdir)/boot/System.map-$(abi_release)-$*
|
||||||
|
if [ "$(dtb_files)" ]; then \
|
||||||
|
install -d $(pkgdir)/lib/firmware/$(abi_release)-$*/device-tree; \
|
||||||
|
for dtb_file in $(dtb_files); do \
|
||||||
|
install -m644 $(builddir)/build-$*/arch/$(build_arch)/boot/dts/$$dtb_file \
|
||||||
|
$(pkgdir)/lib/firmware/$(abi_release)-$*/device-tree/$$dtb_file; \
|
||||||
|
done \
|
||||||
|
fi
|
||||||
ifeq ($(no_dumpfile),)
|
ifeq ($(no_dumpfile),)
|
||||||
makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \
|
makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \
|
||||||
-x $(builddir)/build-$*/vmlinux
|
-x $(builddir)/build-$*/vmlinux
|
||||||
|
chmod 0600 $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$*
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(build_cd) $(kmake) $(build_O) modules_install \
|
$(build_cd) $(kmake) $(build_O) $(conc_level) modules_install \
|
||||||
INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$(pkgdir)/ \
|
INSTALL_MOD_STRIP=1 INSTALL_MOD_PATH=$(pkgdir)/ \
|
||||||
INSTALL_FW_PATH=$(pkgdir)/lib/firmware/$(abi_release)-$*
|
INSTALL_FW_PATH=$(pkgdir)/lib/firmware/$(abi_release)-$*
|
||||||
|
|
||||||
|
ifeq ($(do_extras_package),true)
|
||||||
#
|
#
|
||||||
# Remove all modules not in the inclusion list.
|
# Remove all modules not in the inclusion list.
|
||||||
#
|
#
|
||||||
if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
|
if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
|
||||||
$(DROOT)/scripts/module-inclusion $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
|
mkdir -p $(pkgdir_ex)/lib/modules/$(abi_release)-$*; \
|
||||||
|
mv $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
|
||||||
|
$(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel; \
|
||||||
|
$(SHELL) $(DROOT)/scripts/module-inclusion --master \
|
||||||
|
$(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel \
|
||||||
|
$(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
|
||||||
$(DEBIAN)/control.d/$(target_flavour).inclusion-list 2>&1 | \
|
$(DEBIAN)/control.d/$(target_flavour).inclusion-list 2>&1 | \
|
||||||
tee $(target_flavour).inclusion-list.log; \
|
tee $(target_flavour).inclusion-list.log; \
|
||||||
/sbin/depmod -b $(pkgdir) -ea -F $(pkgdir)/boot/System.map-$(abi_release)-$* \
|
/sbin/depmod -b $(pkgdir) -ea -F $(pkgdir)/boot/System.map-$(abi_release)-$* \
|
||||||
$(abi_release)-$* 2>&1 |tee $(target_flavour).depmod.log; \
|
$(abi_release)-$* 2>&1 |tee $(target_flavour).depmod.log; \
|
||||||
|
if [ `grep -c 'unknown symbol' $(target_flavour).depmod.log` -gt 0 ]; then \
|
||||||
|
echo "EE: Unresolved module dependencies in base package!"; \
|
||||||
|
exit 1; \
|
||||||
|
fi \
|
||||||
fi
|
fi
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(no_dumpfile),)
|
ifeq ($(no_dumpfile),)
|
||||||
makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \
|
makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \
|
||||||
-x $(builddir)/build-$*/vmlinux
|
-x $(builddir)/build-$*/vmlinux
|
||||||
|
chmod 0600 $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$*
|
||||||
endif
|
endif
|
||||||
rm -f $(pkgdir)/lib/modules/$(abi_release)-$*/build
|
rm -f $(pkgdir)/lib/modules/$(abi_release)-$*/build
|
||||||
rm -f $(pkgdir)/lib/modules/$(abi_release)-$*/source
|
rm -f $(pkgdir)/lib/modules/$(abi_release)-$*/source
|
||||||
@@ -107,11 +153,23 @@ endif
|
|||||||
# Now the image scripts
|
# Now the image scripts
|
||||||
install -d $(pkgdir)/DEBIAN
|
install -d $(pkgdir)/DEBIAN
|
||||||
for script in postinst postrm preinst prerm; do \
|
for script in postinst postrm preinst prerm; do \
|
||||||
sed -e 's/=V/$(abi_release)-$*/g' -e 's/=K/$(install_file)/g' \
|
sed -e 's/=V/$(abi_release)-$*/g' -e 's/=K/$(instfile)/g' \
|
||||||
-e 's/=L/$(loader)/g' -e 's@=B@$(build_arch)@g' \
|
-e 's/=L/$(loader)/g' -e 's@=B@$(build_arch)@g' \
|
||||||
$(DROOT)/control-scripts/$$script > $(pkgdir)/DEBIAN/$$script; \
|
$(DROOT)/control-scripts/$$script > $(pkgdir)/DEBIAN/$$script; \
|
||||||
chmod 755 $(pkgdir)/DEBIAN/$$script; \
|
chmod 755 $(pkgdir)/DEBIAN/$$script; \
|
||||||
done
|
done
|
||||||
|
ifeq ($(do_extras_package),true)
|
||||||
|
# Install the postinit/postrm scripts in the extras package.
|
||||||
|
if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
|
||||||
|
install -d $(pkgdir_ex)/DEBIAN; \
|
||||||
|
for script in postinst postrm ; do \
|
||||||
|
sed -e 's/=V/$(abi_release)-$*/g' -e 's/=K/$(instfile)/g' \
|
||||||
|
-e 's/=L/$(loader)/g' -e 's@=B@$(build_arch)@g' \
|
||||||
|
debian/control-scripts/$$script > $(pkgdir_ex)/DEBIAN/$$script; \
|
||||||
|
chmod 755 $(pkgdir_ex)/DEBIAN/$$script; \
|
||||||
|
done; \
|
||||||
|
fi
|
||||||
|
endif
|
||||||
|
|
||||||
# Install the full changelog.
|
# Install the full changelog.
|
||||||
ifeq ($(do_doc_package),true)
|
ifeq ($(do_doc_package),true)
|
||||||
@@ -131,7 +189,7 @@ ifneq ($(skipsub),true)
|
|||||||
install -d debian/$(bin_pkg_name)-$$sub/DEBIAN; \
|
install -d debian/$(bin_pkg_name)-$$sub/DEBIAN; \
|
||||||
for script in postinst postrm preinst prerm; do \
|
for script in postinst postrm preinst prerm; do \
|
||||||
sed -e 's/=V/$(abi_release)-$*/g' \
|
sed -e 's/=V/$(abi_release)-$*/g' \
|
||||||
-e 's/=K/$(install_file)/g' \
|
-e 's/=K/$(instfile)/g' \
|
||||||
-e 's/=L/$(loader)/g' \
|
-e 's/=L/$(loader)/g' \
|
||||||
-e 's@=B@$(build_arch)@g' \
|
-e 's@=B@$(build_arch)@g' \
|
||||||
$(DROOT)/control-scripts/$$script > \
|
$(DROOT)/control-scripts/$$script > \
|
||||||
@@ -147,6 +205,15 @@ ifneq ($(skipdbg),true)
|
|||||||
$(dbgpkgdir)/usr/lib/debug/boot/vmlinux-$(abi_release)-$*
|
$(dbgpkgdir)/usr/lib/debug/boot/vmlinux-$(abi_release)-$*
|
||||||
$(build_cd) $(kmake) $(build_O) modules_install \
|
$(build_cd) $(kmake) $(build_O) modules_install \
|
||||||
INSTALL_MOD_PATH=$(dbgpkgdir)/usr/lib/debug
|
INSTALL_MOD_PATH=$(dbgpkgdir)/usr/lib/debug
|
||||||
|
# Add .gnu_debuglink sections to each stripped .ko
|
||||||
|
# pointing to unstripped verson
|
||||||
|
find $(pkgdir) -name '*.ko' | sed 's|$(pkgdir)||'| while read module ; do \
|
||||||
|
if [[ -f "$(dbgpkgdir)/usr/lib/debug/$$module" ]] ; then \
|
||||||
|
$(CROSS_COMPILE)objcopy \
|
||||||
|
--add-gnu-debuglink=$(dbgpkgdir)/usr/lib/debug/$$module \
|
||||||
|
$(pkgdir)/$$module; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/build
|
rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/build
|
||||||
rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/source
|
rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/source
|
||||||
rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/modules.*
|
rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/modules.*
|
||||||
@@ -160,20 +227,20 @@ endif
|
|||||||
sed -e 's/.*CONFIG_DEBUG_INFO=.*/# CONFIG_DEBUG_INFO is not set/g' > \
|
sed -e 's/.*CONFIG_DEBUG_INFO=.*/# CONFIG_DEBUG_INFO is not set/g' > \
|
||||||
$(hdrdir)/.config
|
$(hdrdir)/.config
|
||||||
chmod 644 $(hdrdir)/.config
|
chmod 644 $(hdrdir)/.config
|
||||||
$(kmake) O=$(hdrdir) silentoldconfig prepare scripts
|
$(kmake) O=$(hdrdir) -j1 silentoldconfig prepare scripts
|
||||||
# We'll symlink this stuff
|
# We'll symlink this stuff
|
||||||
rm -f $(hdrdir)/Makefile
|
rm -f $(hdrdir)/Makefile
|
||||||
rm -rf $(hdrdir)/include2
|
rm -rf $(hdrdir)/include2 $(hdrdir)/source
|
||||||
|
# Copy over the compilation version.
|
||||||
|
cp "$(builddir)/build-$*/include/generated/compile.h" \
|
||||||
|
"$(hdrdir)/include/generated/compile.h"
|
||||||
# powerpc seems to need some .o files for external module linking. Add them in.
|
# powerpc seems to need some .o files for external module linking. Add them in.
|
||||||
ifeq ($(arch),powerpc)
|
ifeq ($(arch),powerpc)
|
||||||
mkdir -p $(hdrdir)/arch/powerpc/lib
|
mkdir -p $(hdrdir)/arch/powerpc/lib
|
||||||
cp $(builddir)/build-$*/arch/powerpc/lib/*.o $(hdrdir)/arch/powerpc/lib
|
cp $(builddir)/build-$*/arch/powerpc/lib/*.o $(hdrdir)/arch/powerpc/lib
|
||||||
endif
|
endif
|
||||||
# Script to symlink everything up
|
# Script to symlink everything up
|
||||||
$(SHELL) $(DROOT)/scripts/link-headers "$(hdrdir)" "$(basepkg)" "$*"
|
$(SHELL) $(DROOT)/scripts/link-headers "$(hdrdir)" "$(indeppkg)" "$*"
|
||||||
# Setup the proper asm symlink
|
|
||||||
rm -f $(hdrdir)/include/asm
|
|
||||||
ln -s asm-$(asm_link) $(hdrdir)/include/asm
|
|
||||||
# The build symlink
|
# The build symlink
|
||||||
install -d debian/$(basepkg)-$*/lib/modules/$(abi_release)-$*
|
install -d debian/$(basepkg)-$*/lib/modules/$(abi_release)-$*
|
||||||
ln -s /usr/src/$(basepkg)-$* \
|
ln -s /usr/src/$(basepkg)-$* \
|
||||||
@@ -185,7 +252,7 @@ endif
|
|||||||
# Now the header scripts
|
# Now the header scripts
|
||||||
install -d $(CURDIR)/debian/$(basepkg)-$*/DEBIAN
|
install -d $(CURDIR)/debian/$(basepkg)-$*/DEBIAN
|
||||||
for script in postinst; do \
|
for script in postinst; do \
|
||||||
sed -e 's/=V/$(abi_release)-$*/g' -e 's/=K/$(install_file)/g' \
|
sed -e 's/=V/$(abi_release)-$*/g' -e 's/=K/$(instfile)/g' \
|
||||||
$(DROOT)/control-scripts/headers-$$script > \
|
$(DROOT)/control-scripts/headers-$$script > \
|
||||||
$(CURDIR)/debian/$(basepkg)-$*/DEBIAN/$$script; \
|
$(CURDIR)/debian/$(basepkg)-$*/DEBIAN/$$script; \
|
||||||
chmod 755 $(CURDIR)/debian/$(basepkg)-$*/DEBIAN/$$script; \
|
chmod 755 $(CURDIR)/debian/$(basepkg)-$*/DEBIAN/$$script; \
|
||||||
@@ -197,12 +264,12 @@ endif
|
|||||||
PREV_REVISION="$(prev_revision)" ABI_NUM="$(abinum)" \
|
PREV_REVISION="$(prev_revision)" ABI_NUM="$(abinum)" \
|
||||||
PREV_ABI_NUM="$(prev_abinum)" BUILD_DIR="$(builddir)/build-$*" \
|
PREV_ABI_NUM="$(prev_abinum)" BUILD_DIR="$(builddir)/build-$*" \
|
||||||
INSTALL_DIR="$(pkgdir)" SOURCE_DIR="$(CURDIR)" \
|
INSTALL_DIR="$(pkgdir)" SOURCE_DIR="$(CURDIR)" \
|
||||||
run-parts -v $(DROOT)/tests
|
run-parts -v $(DROOT)/tests-build
|
||||||
|
|
||||||
#
|
#
|
||||||
# Remove files which are generated at installation by postinst,
|
# Remove files which are generated at installation by postinst,
|
||||||
# except for modules.order and modules.builtin
|
# except for modules.order and modules.builtin
|
||||||
#
|
#
|
||||||
# NOTE: need to keep this list in sync with postrm
|
# NOTE: need to keep this list in sync with postrm
|
||||||
#
|
#
|
||||||
mkdir $(pkgdir)/lib/modules/$(abi_release)-$*/_
|
mkdir $(pkgdir)/lib/modules/$(abi_release)-$*/_
|
||||||
@@ -220,14 +287,15 @@ endif
|
|||||||
headers_tmp := $(CURDIR)/debian/tmp-headers
|
headers_tmp := $(CURDIR)/debian/tmp-headers
|
||||||
headers_dir := $(CURDIR)/debian/linux-libc-dev
|
headers_dir := $(CURDIR)/debian/linux-libc-dev
|
||||||
|
|
||||||
hmake := $(MAKE) -C $(CURDIR) O=$(headers_tmp) SUBLEVEL=$(SUBLEVEL) \
|
hmake := $(MAKE) -C $(CURDIR) O=$(headers_tmp) \
|
||||||
EXTRAVERSION=-$(abinum) INSTALL_HDR_PATH=$(headers_tmp)/install \
|
KERNELVERSION=$(abi_release) INSTALL_HDR_PATH=$(headers_tmp)/install \
|
||||||
SHELL="$(SHELL)" ARCH=$(header_arch)
|
SHELL="$(SHELL)" ARCH=$(header_arch)
|
||||||
|
|
||||||
install-arch-headers:
|
install-arch-headers:
|
||||||
|
@echo Debug: $@
|
||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
dh_prep -plinux-libc-dev
|
dh_clean -k -plinux-libc-dev
|
||||||
|
|
||||||
rm -rf $(headers_tmp)
|
rm -rf $(headers_tmp)
|
||||||
install -d $(headers_tmp) $(headers_dir)/usr/include/
|
install -d $(headers_tmp) $(headers_dir)/usr/include/
|
||||||
@@ -244,47 +312,72 @@ install-arch-headers:
|
|||||||
find . -name '.' -o -name '.*' -prune -o -print | \
|
find . -name '.' -o -name '.*' -prune -o -print | \
|
||||||
cpio -pvd --preserve-modification-time \
|
cpio -pvd --preserve-modification-time \
|
||||||
$(headers_dir)/usr/include/ )
|
$(headers_dir)/usr/include/ )
|
||||||
|
mkdir $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)
|
||||||
|
mv $(headers_dir)/usr/include/asm $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)/
|
||||||
|
|
||||||
rm -rf $(headers_tmp)
|
rm -rf $(headers_tmp)
|
||||||
|
|
||||||
binary-arch-headers: install-arch-headers
|
binary-arch-headers: install-arch-headers
|
||||||
|
@echo Debug: $@
|
||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
ifeq ($(do_libc_dev_package),true)
|
ifeq ($(do_libc_dev_package),true)
|
||||||
|
ifneq ($(DEBIAN),debian.master)
|
||||||
|
echo "non-master branch building linux-libc-dev, aborting"
|
||||||
|
exit 1
|
||||||
|
endif
|
||||||
dh_installchangelogs -plinux-libc-dev
|
dh_installchangelogs -plinux-libc-dev
|
||||||
dh_installdocs -plinux-libc-dev
|
dh_installdocs -plinux-libc-dev
|
||||||
dh_compress -plinux-libc-dev
|
dh_compress -plinux-libc-dev
|
||||||
dh_fixperms -plinux-libc-dev
|
dh_fixperms -plinux-libc-dev
|
||||||
dh_installdeb -plinux-libc-dev
|
dh_installdeb -plinux-libc-dev
|
||||||
dh_gencontrol -plinux-libc-dev
|
$(lockme) dh_gencontrol -plinux-libc-dev -- $(libc_dev_version)
|
||||||
dh_md5sums -plinux-libc-dev
|
dh_md5sums -plinux-libc-dev
|
||||||
dh_builddeb -plinux-libc-dev
|
dh_builddeb -plinux-libc-dev
|
||||||
endif
|
endif
|
||||||
|
|
||||||
binary-%: pkgimg = $(bin_pkg_name)-$*
|
binary-%: pkgimg = $(bin_pkg_name)-$*
|
||||||
|
binary-%: pkgimg_ex = $(extra_pkg_name)-$*
|
||||||
binary-%: pkghdr = $(hdrs_pkg_name)-$*
|
binary-%: pkghdr = $(hdrs_pkg_name)-$*
|
||||||
binary-%: dbgpkg = $(bin_pkg_name)-$*-dbgsym
|
binary-%: dbgpkg = $(bin_pkg_name)-$*-dbgsym
|
||||||
|
binary-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym
|
||||||
|
binary-%: target_flavour = $*
|
||||||
binary-%: install-%
|
binary-%: install-%
|
||||||
|
@echo Debug: $@
|
||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
|
|
||||||
dh_installchangelogs -p$(pkgimg)
|
dh_installchangelogs -p$(pkgimg)
|
||||||
dh_installdocs -p$(pkgimg)
|
dh_installdocs -p$(pkgimg)
|
||||||
dh_compress -p$(pkgimg)
|
dh_compress -p$(pkgimg)
|
||||||
dh_fixperms -p$(pkgimg)
|
dh_fixperms -p$(pkgimg) -X/boot/
|
||||||
dh_installdeb -p$(pkgimg)
|
dh_installdeb -p$(pkgimg)
|
||||||
dh_shlibdeps -p$(pkgimg)
|
dh_shlibdeps -p$(pkgimg)
|
||||||
dh_gencontrol -p$(pkgimg)
|
$(lockme) dh_gencontrol -p$(pkgimg)
|
||||||
dh_md5sums -p$(pkgimg)
|
dh_md5sums -p$(pkgimg)
|
||||||
dh_builddeb -p$(pkgimg) -- -Zbzip2 -z9
|
dh_builddeb -p$(pkgimg) -- -Zbzip2 -z9
|
||||||
|
|
||||||
|
ifeq ($(do_extras_package),true)
|
||||||
|
if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
|
||||||
|
dh_installchangelogs -p$(pkgimg_ex); \
|
||||||
|
dh_installdocs -p$(pkgimg_ex); \
|
||||||
|
dh_compress -p$(pkgimg_ex); \
|
||||||
|
dh_fixperms -p$(pkgimg_ex) -X/boot/; \
|
||||||
|
dh_installdeb -p$(pkgimg_ex); \
|
||||||
|
dh_shlibdeps -p$(pkgimg_ex); \
|
||||||
|
$(lockme) dh_gencontrol -p$(pkgimg_ex); \
|
||||||
|
dh_md5sums -p$(pkgimg_ex); \
|
||||||
|
dh_builddeb -p$(pkgimg_ex) -- -Zbzip2 -z9; \
|
||||||
|
fi
|
||||||
|
endif
|
||||||
|
|
||||||
dh_installchangelogs -p$(pkghdr)
|
dh_installchangelogs -p$(pkghdr)
|
||||||
dh_installdocs -p$(pkghdr)
|
dh_installdocs -p$(pkghdr)
|
||||||
dh_compress -p$(pkghdr)
|
dh_compress -p$(pkghdr)
|
||||||
dh_fixperms -p$(pkghdr)
|
dh_fixperms -p$(pkghdr)
|
||||||
dh_shlibdeps -p$(pkghdr)
|
dh_shlibdeps -p$(pkghdr)
|
||||||
dh_installdeb -p$(pkghdr)
|
dh_installdeb -p$(pkghdr)
|
||||||
dh_gencontrol -p$(pkghdr)
|
$(lockme) dh_gencontrol -p$(pkghdr)
|
||||||
dh_md5sums -p$(pkghdr)
|
dh_md5sums -p$(pkghdr)
|
||||||
dh_builddeb -p$(pkghdr)
|
dh_builddeb -p$(pkghdr)
|
||||||
|
|
||||||
@@ -294,10 +387,10 @@ ifneq ($(skipsub),true)
|
|||||||
dh_installchangelogs -p$$pkg; \
|
dh_installchangelogs -p$$pkg; \
|
||||||
dh_installdocs -p$$pkg; \
|
dh_installdocs -p$$pkg; \
|
||||||
dh_compress -p$$pkg; \
|
dh_compress -p$$pkg; \
|
||||||
dh_fixperms -p$$pkg; \
|
dh_fixperms -p$$pkg -X/boot/; \
|
||||||
dh_shlibdeps -p$$pkg; \
|
dh_shlibdeps -p$$pkg; \
|
||||||
dh_installdeb -p$$pkg; \
|
dh_installdeb -p$$pkg; \
|
||||||
dh_gencontrol -p$$pkg; \
|
$(lockme) dh_gencontrol -p$$pkg; \
|
||||||
dh_md5sums -p$$pkg; \
|
dh_md5sums -p$$pkg; \
|
||||||
dh_builddeb -p$$pkg; \
|
dh_builddeb -p$$pkg; \
|
||||||
done
|
done
|
||||||
@@ -309,7 +402,7 @@ ifneq ($(skipdbg),true)
|
|||||||
dh_compress -p$(dbgpkg)
|
dh_compress -p$(dbgpkg)
|
||||||
dh_fixperms -p$(dbgpkg)
|
dh_fixperms -p$(dbgpkg)
|
||||||
dh_installdeb -p$(dbgpkg)
|
dh_installdeb -p$(dbgpkg)
|
||||||
dh_gencontrol -p$(dbgpkg)
|
$(lockme) dh_gencontrol -p$(dbgpkg)
|
||||||
dh_md5sums -p$(dbgpkg)
|
dh_md5sums -p$(dbgpkg)
|
||||||
dh_builddeb -p$(dbgpkg)
|
dh_builddeb -p$(dbgpkg)
|
||||||
|
|
||||||
@@ -322,74 +415,123 @@ ifneq ($(skipdbg),true)
|
|||||||
mv ../$(dbgpkg)_$(release)-$(revision)_$(arch).deb \
|
mv ../$(dbgpkg)_$(release)-$(revision)_$(arch).deb \
|
||||||
../$(dbgpkg)_$(release)-$(revision)_$(arch).ddeb
|
../$(dbgpkg)_$(release)-$(revision)_$(arch).ddeb
|
||||||
set -e; \
|
set -e; \
|
||||||
if grep -qs '^Build-Debug-Symbols: yes$$' /CurrentlyBuilding; then \
|
( \
|
||||||
sed -i '/^$(dbgpkg)_/s/\.deb /.ddeb /' debian/files; \
|
$(lockme_cmd) 9 || exit 1; \
|
||||||
else \
|
if grep -qs '^Build-Debug-Symbols: yes$$' /CurrentlyBuilding; then \
|
||||||
grep -v '^$(dbgpkg)_.*$$' debian/files > debian/files.new; \
|
sed -i '/^$(dbgpkg)_/s/\.deb /.ddeb /' debian/files; \
|
||||||
mv debian/files.new debian/files; \
|
else \
|
||||||
fi
|
grep -v '^$(dbgpkg)_.*$$' debian/files > debian/files.new; \
|
||||||
|
mv debian/files.new debian/files; \
|
||||||
|
fi; \
|
||||||
|
) 9>$(lockme_file)
|
||||||
# Now, the package wont get into the archive, but it will get put
|
# Now, the package wont get into the archive, but it will get put
|
||||||
# into the debug system.
|
# into the debug system.
|
||||||
endif
|
endif
|
||||||
|
ifneq ($(full_build),false)
|
||||||
$(stampdir)/stamp-flavours:
|
# Clean out this flavours build directory.
|
||||||
@echo $(flavours) > $@
|
rm -rf $(builddir)/build-$*
|
||||||
|
# Clean out the debugging package source directory.
|
||||||
|
rm -rf $(dbgpkgdir)
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# per-architecture packages
|
# per-architecture packages
|
||||||
#
|
#
|
||||||
|
builddirpa = $(builddir)/tools-perarch
|
||||||
|
|
||||||
$(stampdir)/stamp-prepare-perarch:
|
$(stampdir)/stamp-prepare-perarch:
|
||||||
@echo "Preparing perarch ..."
|
@echo Debug: $@
|
||||||
ifeq ($(do_tools),true)
|
ifeq ($(do_tools),true)
|
||||||
install -d $(builddir)/tools-$*
|
rm -rf $(builddirpa)
|
||||||
for i in *; do ln -sf $(CURDIR)/$$i $(builddir)/tools-$*/; done
|
install -d $(builddirpa)
|
||||||
rm $(builddir)/tools-$*/tools
|
for i in *; do ln -s $(CURDIR)/$$i $(builddirpa); done
|
||||||
rsync -a tools/ $(builddir)/tools-$*/tools/
|
rm $(builddirpa)/tools
|
||||||
|
rsync -a tools/ $(builddirpa)/tools/
|
||||||
endif
|
endif
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(stampdir)/stamp-build-perarch: prepare-perarch
|
$(stampdir)/stamp-build-perarch: $(stampdir)/stamp-prepare-perarch
|
||||||
|
@echo Debug: $@
|
||||||
ifeq ($(do_tools),true)
|
ifeq ($(do_tools),true)
|
||||||
cd $(builddir)/tools-$*/tools/perf && make
|
ifeq ($(do_tools_perf),true)
|
||||||
|
cd $(builddirpa)/tools/perf && \
|
||||||
|
make HAVE_CPLUS_DEMANGLE=1 CROSS_COMPILE=$(CROSS_COMPILE) NO_LIBPYTHON=1 NO_LIBPERL=1 PYTHON=python2.7
|
||||||
|
endif
|
||||||
|
if [ "$(arch)" = "amd64" ] || [ "$(arch)" = "i386" ]; then \
|
||||||
|
cd $(builddirpa)/tools/power/x86/x86_energy_perf_policy && make CROSS_COMPILE=$(CROSS_COMPILE); \
|
||||||
|
cd $(builddirpa)/tools/power/x86/turbostat && make CROSS_COMPILE=$(CROSS_COMPILE); \
|
||||||
|
if [ "$(do_hyperv)" = "true" ]; then \
|
||||||
|
cd $(builddirpa)/tools/hv && make CROSS_COMPILE=$(CROSS_COMPILE); \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
endif
|
endif
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
install-perarch: toolspkgdir = $(CURDIR)/debian/$(tools_pkg_name)
|
install-perarch: toolspkgdir = $(CURDIR)/debian/$(tools_pkg_name)
|
||||||
install-perarch: $(stampdir)/stamp-build-perarch
|
install-perarch: $(stampdir)/stamp-build-perarch
|
||||||
|
@echo Debug: $@
|
||||||
# Add the tools.
|
# Add the tools.
|
||||||
ifeq ($(do_tools),true)
|
ifeq ($(do_tools),true)
|
||||||
install -d $(toolspkgdir)/usr/bin
|
install -d $(toolspkgdir)/usr/bin
|
||||||
install -m755 $(builddir)/tools-$*/tools/perf/perf \
|
ifeq ($(do_tools_perf),true)
|
||||||
|
install -s -m755 $(builddirpa)/tools/perf/perf \
|
||||||
$(toolspkgdir)/usr/bin/perf_$(abi_release)
|
$(toolspkgdir)/usr/bin/perf_$(abi_release)
|
||||||
endif
|
endif
|
||||||
|
if [ "$(arch)" = "amd64" ] || [ "$(arch)" = "i386" ]; then \
|
||||||
|
install -s -m755 $(builddirpa)/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy \
|
||||||
|
$(toolspkgdir)/usr/bin/x86_energy_perf_policy_$(abi_release); \
|
||||||
|
install -s -m755 $(builddirpa)/tools/power/x86/turbostat/turbostat \
|
||||||
|
$(toolspkgdir)/usr/bin/turbostat_$(abi_release); \
|
||||||
|
if [ "$(do_hyperv)" = "true" ]; then \
|
||||||
|
install -d $(toolspkgdir)/usr/sbin; \
|
||||||
|
install -s -m755 $(builddirpa)/tools/hv/hv_kvp_daemon \
|
||||||
|
$(toolspkgdir)/usr/sbin/hv_kvp_daemon_$(abi_release); \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
endif
|
||||||
|
|
||||||
binary-perarch: toolspkg = $(tools_pkg_name)
|
binary-perarch: toolspkg = $(tools_pkg_name)
|
||||||
binary-perarch: install-perarch
|
binary-perarch: install-perarch
|
||||||
@# Empty for make to be happy
|
@echo Debug: $@
|
||||||
ifeq ($(do_tools),true)
|
ifeq ($(do_tools),true)
|
||||||
dh_installchangelogs -p$(toolspkg)
|
dh_installchangelogs -p$(toolspkg)
|
||||||
dh_installdocs -p$(toolspkg)
|
dh_installdocs -p$(toolspkg)
|
||||||
dh_compress -p$(toolspkg)
|
dh_compress -p$(toolspkg)
|
||||||
dh_fixperms -p$(toolspkg)
|
dh_fixperms -p$(toolspkg)
|
||||||
dh_strip -p$(toolspkg)
|
|
||||||
dh_shlibdeps -p$(toolspkg)
|
dh_shlibdeps -p$(toolspkg)
|
||||||
dh_installdeb -p$(toolspkg)
|
dh_installdeb -p$(toolspkg)
|
||||||
dh_gencontrol -p$(toolspkg)
|
$(lockme) dh_gencontrol -p$(toolspkg)
|
||||||
dh_md5sums -p$(toolspkg)
|
dh_md5sums -p$(toolspkg)
|
||||||
dh_builddeb -p$(toolspkg)
|
dh_builddeb -p$(toolspkg)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
binary-debs: binary-perarch $(stampdir)/stamp-flavours $(addprefix binary-,$(flavours))
|
binary-debs: signed = $(CURDIR)/debian/$(bin_pkg_name)-signed
|
||||||
|
binary-debs: signedv = $(CURDIR)/debian/$(bin_pkg_name)-signed/$(release)-$(revision)
|
||||||
|
binary-debs: signed_tar = $(src_pkg_name)_$(release)-$(revision)_$(arch).tar.gz
|
||||||
|
binary-debs: binary-perarch $(addprefix binary-,$(flavours))
|
||||||
|
@echo Debug: $@
|
||||||
|
ifeq ($(arch),amd64)
|
||||||
|
ifeq ($(uefi_signed),true)
|
||||||
|
echo $(release)-$(revision) > $(signedv)/version
|
||||||
|
cd $(signedv) && ls *.efi >flavours
|
||||||
|
cd $(signed) && tar czvf ../../../$(signed_tar) .
|
||||||
|
dpkg-distaddfile $(signed_tar) raw-uefi -
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
build-arch-deps-$(do_flavour_image_package) += $(addprefix build-,$(flavours))
|
build-arch-deps-$(do_flavour_image_package) += $(addprefix $(stampdir)/stamp-build-,$(flavours))
|
||||||
build-arch: $(build-arch-deps-true)
|
build-arch: $(build-arch-deps-true)
|
||||||
|
@echo Debug: $@
|
||||||
|
|
||||||
binary-arch-deps-$(do_flavour_image_package) = binary-debs
|
|
||||||
ifeq ($(AUTOBUILD),)
|
ifeq ($(AUTOBUILD),)
|
||||||
binary-arch-deps-$(do_flavour_image_package) += binary-udebs
|
binary-arch-deps-$(do_flavour_image_package) += binary-udebs
|
||||||
|
else
|
||||||
|
binary-arch-deps-$(do_flavour_image_package) = binary-debs
|
||||||
endif
|
endif
|
||||||
binary-arch-deps-$(do_libc_dev_package) += binary-arch-headers
|
binary-arch-deps-$(do_libc_dev_package) += binary-arch-headers
|
||||||
ifneq ($(do_common_headers_indep),true)
|
ifneq ($(do_common_headers_indep),true)
|
||||||
binary-arch-deps-$(do_flavour_header_package) += binary-headers
|
binary-arch-deps-$(do_flavour_header_package) += binary-headers
|
||||||
endif
|
endif
|
||||||
binary-arch: $(binary-arch-deps-true)
|
binary-arch: $(binary-arch-deps-true)
|
||||||
|
@echo Debug: $@
|
||||||
|
|
||||||
|
|||||||
115
debian/rules.d/3-binary-indep.mk
vendored
115
debian/rules.d/3-binary-indep.mk
vendored
@@ -1,11 +1,40 @@
|
|||||||
build-indep:
|
build-indep:
|
||||||
|
@echo Debug: $@
|
||||||
|
|
||||||
|
# The binary-indep dependency chain is:
|
||||||
|
#
|
||||||
|
# install-headers <- install-doc <- install-source <- install-tools <- install-indep <- binary-indep
|
||||||
|
# install-headers <- binary-headers
|
||||||
|
#
|
||||||
|
indep_hdrpkg = $(indep_hdrs_pkg_name)
|
||||||
|
indep_hdrdir = $(CURDIR)/debian/$(indep_hdrpkg)/usr/src/$(indep_hdrpkg)
|
||||||
|
install-headers:
|
||||||
|
@echo Debug: $@
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_prep
|
||||||
|
|
||||||
|
ifeq ($(do_flavour_header_package),true)
|
||||||
|
install -d $(indep_hdrdir)
|
||||||
|
find . -path './debian' -prune -o -path './$(DEBIAN)' -prune \
|
||||||
|
-o -path './include/*' -prune \
|
||||||
|
-o -path './scripts/*' -prune -o -type f \
|
||||||
|
\( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
|
||||||
|
-name '*.sh' -o -name '*.pl' -o -name '*.lds' \) \
|
||||||
|
-print | cpio -pd --preserve-modification-time $(indep_hdrdir)
|
||||||
|
cp -a scripts include $(indep_hdrdir)
|
||||||
|
(find arch -name include -type d -print | \
|
||||||
|
xargs -n1 -i: find : -type f) | \
|
||||||
|
cpio -pd --preserve-modification-time $(indep_hdrdir)
|
||||||
|
endif
|
||||||
|
|
||||||
docpkg = $(doc_pkg_name)
|
docpkg = $(doc_pkg_name)
|
||||||
docdir = $(CURDIR)/debian/$(docpkg)/usr/share/doc/$(docpkg)
|
docdir = $(CURDIR)/debian/$(docpkg)/usr/share/doc/$(docpkg)
|
||||||
install-doc:
|
install-doc: install-headers
|
||||||
|
@echo Debug: $@
|
||||||
|
ifeq ($(do_doc_package),true)
|
||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
dh_prep -p$(docpkg)
|
|
||||||
|
|
||||||
install -d $(docdir)
|
install -d $(docdir)
|
||||||
ifeq ($(do_doc_package_content),true)
|
ifeq ($(do_doc_package_content),true)
|
||||||
@@ -22,36 +51,14 @@ endif
|
|||||||
cp -a Documentation/* $(docdir)
|
cp -a Documentation/* $(docdir)
|
||||||
rm -rf $(docdir)/DocBook
|
rm -rf $(docdir)/DocBook
|
||||||
find $(docdir) -name .gitignore | xargs rm -f
|
find $(docdir) -name .gitignore | xargs rm -f
|
||||||
|
endif
|
||||||
indep_hdrpkg = $(hdrs_pkg_name)
|
|
||||||
indep_hdrdir = $(CURDIR)/debian/$(indep_hdrpkg)/usr/src/$(indep_hdrpkg)
|
|
||||||
install-headers:
|
|
||||||
dh_testdir
|
|
||||||
dh_testroot
|
|
||||||
dh_prep -p$(indep_hdrpkg)
|
|
||||||
|
|
||||||
install -d $(indep_hdrdir)
|
|
||||||
find . -path './debian' -prune -o -path './$(DEBIAN)' -prune \
|
|
||||||
-o -path './include/*' -prune \
|
|
||||||
-o -path './scripts/*' -prune -o -type f \
|
|
||||||
\( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
|
|
||||||
-name '*.sh' -o -name '*.pl' -o -name '*.lds' \) \
|
|
||||||
-print | cpio -pd --preserve-modification-time $(indep_hdrdir)
|
|
||||||
cp -a drivers/media/dvb/dvb-core/*.h $(indep_hdrdir)/drivers/media/dvb/dvb-core
|
|
||||||
cp -a drivers/media/video/*.h $(indep_hdrdir)/drivers/media/video
|
|
||||||
cp -a drivers/media/dvb/frontends/*.h $(indep_hdrdir)/drivers/media/dvb/frontends
|
|
||||||
cp -a scripts include $(indep_hdrdir)
|
|
||||||
(find arch -name include -type d -print | \
|
|
||||||
xargs -n1 -i: find : -type f) | \
|
|
||||||
cpio -pd --preserve-modification-time $(indep_hdrdir)
|
|
||||||
|
|
||||||
srcpkg = $(src_pkg_name)-source-$(release)
|
srcpkg = $(src_pkg_name)-source-$(release)
|
||||||
srcdir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)
|
srcdir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)
|
||||||
balldir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)/$(srcpkg)
|
balldir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)/$(srcpkg)
|
||||||
install-source:
|
install-source: install-doc
|
||||||
dh_testdir
|
@echo Debug: $@
|
||||||
dh_testroot
|
ifeq ($(do_source_package),true)
|
||||||
dh_prep -p$(srcpkg)
|
|
||||||
|
|
||||||
install -d $(srcdir)
|
install -d $(srcdir)
|
||||||
ifeq ($(do_source_package_content),true)
|
ifeq ($(do_source_package_content),true)
|
||||||
@@ -72,60 +79,76 @@ ifeq ($(do_source_package_content),true)
|
|||||||
cpio -pd --preserve-modification-time $(srcdir)
|
cpio -pd --preserve-modification-time $(srcdir)
|
||||||
ln -s $(srcpkg)/$(srcpkg).tar.bz2 $(srcdir)/..
|
ln -s $(srcpkg)/$(srcpkg).tar.bz2 $(srcdir)/..
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
install-tools: toolspkg = $(tools_common_pkg_name)
|
install-tools: toolspkg = $(tools_common_pkg_name)
|
||||||
install-tools: toolsbin = $(CURDIR)/debian/$(toolspkg)/usr/bin
|
install-tools: toolsbin = $(CURDIR)/debian/$(toolspkg)/usr/bin
|
||||||
|
install-tools: toolssbin = $(CURDIR)/debian/$(toolspkg)/usr/sbin
|
||||||
install-tools: toolsman = $(CURDIR)/debian/$(toolspkg)/usr/share/man
|
install-tools: toolsman = $(CURDIR)/debian/$(toolspkg)/usr/share/man
|
||||||
install-tools:
|
install-tools: install-source $(stampdir)/stamp-build-perarch
|
||||||
dh_testdir
|
@echo Debug: $@
|
||||||
dh_testroot
|
ifeq ($(do_tools),true)
|
||||||
dh_prep -p$(toolspkg)
|
|
||||||
|
|
||||||
install -d $(toolsbin)
|
install -d $(toolsbin)
|
||||||
install -d $(toolsman)/man1
|
install -d $(toolsman)/man1
|
||||||
|
|
||||||
|
ifeq ($(do_tools_perf),true)
|
||||||
install -m755 debian/tools/perf $(toolsbin)/perf
|
install -m755 debian/tools/perf $(toolsbin)/perf
|
||||||
|
endif
|
||||||
|
if [ "$(arch)" = "amd64" ] || [ "$(arch)" = "i386" ]; then \
|
||||||
|
install -m755 debian/tools/x86_energy_perf_policy $(toolsbin)/x86_energy_perf_policy; \
|
||||||
|
install -m755 debian/tools/turbostat $(toolsbin)/turbostat; \
|
||||||
|
if [ "$(do_hyperv)" = "true" ]; then \
|
||||||
|
install -d $(toolssbin) ; \
|
||||||
|
install -m755 debian/tools/generic $(toolssbin)/hv_kvp_daemon; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf $(builddir)/tools
|
||||||
install -d $(builddir)/tools
|
install -d $(builddir)/tools
|
||||||
for i in *; do ln -sf $(CURDIR)/$$i $(builddir)/tools/; done
|
for i in *; do ln -s $(CURDIR)/$$i $(builddir)/tools/; done
|
||||||
rm $(builddir)/tools/tools
|
rm $(builddir)/tools/tools
|
||||||
rsync -a tools/ $(builddir)/tools/tools/
|
rsync -a tools/ $(builddir)/tools/tools/
|
||||||
|
|
||||||
|
ifeq ($(do_tools_perf),true)
|
||||||
cd $(builddir)/tools/tools/perf && make man
|
cd $(builddir)/tools/tools/perf && make man
|
||||||
install -m644 $(builddir)/tools/tools/perf/Documentation/*.1 \
|
install -m644 $(builddir)/tools/tools/perf/Documentation/*.1 \
|
||||||
$(toolsman)/man1
|
$(toolsman)/man1
|
||||||
|
|
||||||
ifeq ($(do_common_headers_indep),true)
|
|
||||||
install-indep-deps-$(do_flavour_header_package) += install-headers
|
|
||||||
endif
|
endif
|
||||||
install-indep-deps-$(do_doc_package) += install-doc
|
if [ "$(arch)" = "amd64" ] || [ "$(arch)" = "i386" ]; then \
|
||||||
install-indep-deps-$(do_source_package) += install-source
|
install -d $(toolsman)/man8; \
|
||||||
install-indep-deps-$(do_tools) += install-tools
|
install -m644 $(CURDIR)/tools/power/x86/x86_energy_perf_policy/*.8 $(toolsman)/man8; \
|
||||||
install-indep: $(install-indep-deps-true)
|
install -m644 $(CURDIR)/tools/power/x86/turbostat/*.8 $(toolsman)/man8; \
|
||||||
|
if [ "$(do_hyperv)" = "true" ]; then \
|
||||||
|
install -m644 $(CURDIR)/tools/hv/*.8 $(toolsman)/man8; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
|
endif
|
||||||
|
|
||||||
|
install-indep: install-tools
|
||||||
|
@echo Debug: $@
|
||||||
|
|
||||||
# This is just to make it easy to call manually. Normally done in
|
# This is just to make it easy to call manually. Normally done in
|
||||||
# binary-indep target during builds.
|
# binary-indep target during builds.
|
||||||
binary-headers: install-headers
|
binary-headers: install-headers
|
||||||
dh_testdir
|
@echo Debug: $@
|
||||||
dh_testroot
|
|
||||||
dh_installchangelogs -p$(indep_hdrpkg)
|
dh_installchangelogs -p$(indep_hdrpkg)
|
||||||
dh_installdocs -p$(indep_hdrpkg)
|
dh_installdocs -p$(indep_hdrpkg)
|
||||||
dh_compress -p$(indep_hdrpkg)
|
dh_compress -p$(indep_hdrpkg)
|
||||||
dh_fixperms -p$(indep_hdrpkg)
|
dh_fixperms -p$(indep_hdrpkg)
|
||||||
dh_installdeb -p$(indep_hdrpkg)
|
dh_installdeb -p$(indep_hdrpkg)
|
||||||
dh_gencontrol -p$(indep_hdrpkg)
|
$(lockme) dh_gencontrol -p$(indep_hdrpkg)
|
||||||
dh_md5sums -p$(indep_hdrpkg)
|
dh_md5sums -p$(indep_hdrpkg)
|
||||||
dh_builddeb -p$(indep_hdrpkg)
|
dh_builddeb -p$(indep_hdrpkg)
|
||||||
|
|
||||||
binary-indep: install-indep
|
binary-indep: install-indep
|
||||||
dh_testdir
|
@echo Debug: $@
|
||||||
dh_testroot
|
|
||||||
|
|
||||||
dh_installchangelogs -i
|
dh_installchangelogs -i
|
||||||
dh_installdocs -i
|
dh_installdocs -i
|
||||||
dh_compress -i
|
dh_compress -i
|
||||||
dh_fixperms -i
|
dh_fixperms -i
|
||||||
dh_installdeb -i
|
dh_installdeb -i
|
||||||
dh_gencontrol -i
|
$(lockme) dh_gencontrol -i
|
||||||
dh_md5sums -i
|
dh_md5sums -i
|
||||||
dh_builddeb -i
|
dh_builddeb -i
|
||||||
|
|||||||
25
debian/rules.d/4-checks.mk
vendored
25
debian/rules.d/4-checks.mk
vendored
@@ -1,34 +1,27 @@
|
|||||||
# Check ABI for package against last release (if not same abinum)
|
# Check ABI for package against last release (if not same abinum)
|
||||||
abi-%: $(abidir)/%
|
abi-check-%: $(stampdir)/stamp-build-%
|
||||||
@# Empty for make to be happy
|
@echo Debug: $@
|
||||||
$(abidir)/%: $(stampdir)/stamp-build-%
|
|
||||||
install -d $(abidir)
|
install -d $(abidir)
|
||||||
sed -e 's/^\(.\+\)[[:space:]]\+\(.\+\)[[:space:]]\(.\+\)$$/\3 \2 \1/' \
|
sed -e 's/^\(.\+\)[[:space:]]\+\(.\+\)[[:space:]]\(.\+\)$$/\3 \2 \1/' \
|
||||||
$(builddir)/build-$*/Module.symvers | sort > $@
|
$(builddir)/build-$*/Module.symvers | sort > $(abidir)/$*
|
||||||
|
|
||||||
abi-check-%: $(abidir)/%
|
|
||||||
@perl -f $(DROOT)/scripts/abi-check "$*" "$(prev_abinum)" "$(abinum)" \
|
@perl -f $(DROOT)/scripts/abi-check "$*" "$(prev_abinum)" "$(abinum)" \
|
||||||
"$(prev_abidir)" "$(abidir)" "$(skipabi)"
|
"$(prev_abidir)" "$(abidir)" "$(skipabi)"
|
||||||
|
|
||||||
# Check the module list against the last release (always)
|
# Check the module list against the last release (always)
|
||||||
module-%: $(abidir)/%.modules
|
module-check-%: $(stampdir)/stamp-build-%
|
||||||
@# Empty for make to be happy
|
@echo Debug: $@
|
||||||
$(abidir)/%.modules: $(stampdir)/stamp-build-%
|
|
||||||
install -d $(abidir)
|
install -d $(abidir)
|
||||||
find $(builddir)/build-$*/ -name \*.ko | \
|
find $(builddir)/build-$*/ -name \*.ko | \
|
||||||
sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > $@
|
sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > $(abidir)/$*.modules
|
||||||
|
|
||||||
module-check-%: $(abidir)/%.modules
|
|
||||||
@perl -f $(DROOT)/scripts/module-check "$*" \
|
@perl -f $(DROOT)/scripts/module-check "$*" \
|
||||||
"$(prev_abidir)" "$(abidir)" $(skipmodule)
|
"$(prev_abidir)" "$(abidir)" $(skipmodule)
|
||||||
|
|
||||||
checks-%: abi-check-% module-check-%
|
checks-%: module-check-% abi-check-%
|
||||||
@# Will be calling more stuff later
|
@echo Debug: $@
|
||||||
|
|
||||||
# Check the config against the known options list.
|
# Check the config against the known options list.
|
||||||
config-prepare-check-%: $(stampdir)/stamp-prepare-tree-%
|
config-prepare-check-%: $(stampdir)/stamp-prepare-tree-%
|
||||||
|
@echo Debug: $@
|
||||||
@perl -f $(DROOT)/scripts/config-check \
|
@perl -f $(DROOT)/scripts/config-check \
|
||||||
$(builddir)/build-$*/.config "$(arch)" "$*" "$(sharedconfdir)" "$(skipconfig)"
|
$(builddir)/build-$*/.config "$(arch)" "$*" "$(sharedconfdir)" "$(skipconfig)"
|
||||||
|
|
||||||
prepare-checks-%: config-prepare-check-%
|
|
||||||
@# Will be calling more stuff later
|
|
||||||
|
|||||||
14
debian/rules.d/5-udebs.mk
vendored
14
debian/rules.d/5-udebs.mk
vendored
@@ -1,11 +1,13 @@
|
|||||||
# Do udebs if not disabled in the arch-specific makefile
|
# Do udebs if not disabled in the arch-specific makefile
|
||||||
binary-udebs: binary-debs debian/control
|
binary-udebs: binary-debs
|
||||||
|
@echo Debug: $@
|
||||||
ifeq ($(disable_d_i),)
|
ifeq ($(disable_d_i),)
|
||||||
@$(MAKE) --no-print-directory -f $(DROOT)/rules DEBIAN=$(DEBIAN) \
|
@$(MAKE) --no-print-directory -f $(DROOT)/rules DEBIAN=$(DEBIAN) \
|
||||||
do-binary-udebs
|
do-binary-udebs
|
||||||
endif
|
endif
|
||||||
|
|
||||||
do-binary-udebs:
|
do-binary-udebs: debian/control
|
||||||
|
@echo Debug: $@
|
||||||
dh_testdir
|
dh_testdir
|
||||||
dh_testroot
|
dh_testroot
|
||||||
|
|
||||||
@@ -16,6 +18,10 @@ do-binary-udebs:
|
|||||||
for i in $$imagelist; do \
|
for i in $$imagelist; do \
|
||||||
dpkg -x $$(ls ../linux-image-$$i\_$(release)-$(revision)_${arch}.deb) \
|
dpkg -x $$(ls ../linux-image-$$i\_$(release)-$(revision)_${arch}.deb) \
|
||||||
debian/d-i-${arch}; \
|
debian/d-i-${arch}; \
|
||||||
|
if [ -f ../linux-image-extra-$$i\_$(release)-$(revision)_${arch}.deb ] ; then \
|
||||||
|
dpkg -x ../linux-image-extra-$$i\_$(release)-$(revision)_${arch}.deb \
|
||||||
|
debian/d-i-${arch}; \
|
||||||
|
fi; \
|
||||||
/sbin/depmod -b debian/d-i-${arch} $$i; \
|
/sbin/depmod -b debian/d-i-${arch} $$i; \
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -26,13 +32,13 @@ do-binary-udebs:
|
|||||||
export SOURCEDIR=$(CURDIR)/debian/d-i-${arch} && \
|
export SOURCEDIR=$(CURDIR)/debian/d-i-${arch} && \
|
||||||
cd $(builddir) && \
|
cd $(builddir) && \
|
||||||
kernel-wedge install-files && \
|
kernel-wedge install-files && \
|
||||||
kernel-wedge check || true
|
kernel-wedge check
|
||||||
|
|
||||||
# Build just the udebs
|
# Build just the udebs
|
||||||
dilist=$$(dh_listpackages -s | grep "\-di$$") && \
|
dilist=$$(dh_listpackages -s | grep "\-di$$") && \
|
||||||
[ -z "$dilist" ] || \
|
[ -z "$dilist" ] || \
|
||||||
for i in $$dilist; do \
|
for i in $$dilist; do \
|
||||||
dh_fixperms -p$$i; \
|
dh_fixperms -p$$i; \
|
||||||
dh_gencontrol -p$$i; \
|
$(lockme) dh_gencontrol -p$$i; \
|
||||||
dh_builddeb -p$$i; \
|
dh_builddeb -p$$i; \
|
||||||
done
|
done
|
||||||
|
|||||||
72
debian/scripts/config-check
vendored
72
debian/scripts/config-check
vendored
@@ -32,7 +32,7 @@ sub pred_first {
|
|||||||
my $off;
|
my $off;
|
||||||
my $char;
|
my $char;
|
||||||
my $pred;
|
my $pred;
|
||||||
|
|
||||||
for ($off = 0; $off <= length($rest); $off++) {
|
for ($off = 0; $off <= length($rest); $off++) {
|
||||||
$char = substr($rest, $off, 1);
|
$char = substr($rest, $off, 1);
|
||||||
if ($char eq '(') {
|
if ($char eq '(') {
|
||||||
@@ -59,19 +59,26 @@ sub pred_first {
|
|||||||
#print "pred<$pred> rest<$rest> char<$char>\n";
|
#print "pred<$pred> rest<$rest> char<$char>\n";
|
||||||
($pred, $rest, $char);
|
($pred, $rest, $char);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub pred_do {
|
sub pred_do {
|
||||||
my ($pred) = @_;
|
my ($pred) = @_;
|
||||||
my (@a) = split(' ', $pred);
|
my (@a) = split(' ', $pred);
|
||||||
|
my $possible;
|
||||||
|
|
||||||
if ($a[0] eq 'arch') {
|
if ($a[0] eq 'arch') {
|
||||||
die "$P: $pred: malformed -- $pred <arch>\n" if ($#a != 1);
|
die "$P: $pred: malformed -- $pred <arch>\n" if ($#a < 1);
|
||||||
#print " *** ARCH<$arch ?? $a[1]>\n";
|
for $possible (@a[1..$#a]) {
|
||||||
return ($arch eq $a[1])
|
#print " *** ARCH<$flavour ?? $possible>\n";
|
||||||
|
return 1 if ($arch eq $possible);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
} elsif ($a[0] eq 'flavour') {
|
} elsif ($a[0] eq 'flavour') {
|
||||||
die "$P: $pred: malformed -- $pred <flavour>\n" if ($#a != 1);
|
die "$P: $pred: malformed -- $pred <flavour>\n" if ($#a < 1);
|
||||||
#print " *** FLAVOUR<$flavour ?? $a[1]>\n";
|
for $possible (@a[1..$#a]) {
|
||||||
return ($flavour eq $a[1])
|
#print " *** FLAVOUR<$flavour ?? $possible>\n";
|
||||||
|
return 1 if ($flavour eq $possible);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
} elsif ($a[0] eq 'value') {
|
} elsif ($a[0] eq 'value') {
|
||||||
die "$P: $pred: malformed -- $pred <name> <val>\n" if ($#a != 2);
|
die "$P: $pred: malformed -- $pred <name> <val>\n" if ($#a != 2);
|
||||||
#print " *** CHECK<$a[1] $a[2] ?? " . $values{$a[1]} . ">\n";
|
#print " *** CHECK<$a[1] $a[2] ?? " . $values{$a[1]} . ">\n";
|
||||||
@@ -87,6 +94,7 @@ sub pred_do {
|
|||||||
sub pred_exec {
|
sub pred_exec {
|
||||||
my ($rest) = @_;
|
my ($rest) = @_;
|
||||||
my $pred;
|
my $pred;
|
||||||
|
my $cut = 0;
|
||||||
my $res;
|
my $res;
|
||||||
my $sep;
|
my $sep;
|
||||||
|
|
||||||
@@ -97,12 +105,19 @@ sub pred_exec {
|
|||||||
# Leading ! implies inversion.
|
# Leading ! implies inversion.
|
||||||
if ($pred =~ /^\s*!\s*(.*)$/) {
|
if ($pred =~ /^\s*!\s*(.*)$/) {
|
||||||
#print " invert<$1>\n";
|
#print " invert<$1>\n";
|
||||||
$res = !pred_exec($1);
|
($cut, $res) = pred_exec($1);
|
||||||
|
$res = !$res;
|
||||||
|
|
||||||
|
# Leading / implies a CUT operation.
|
||||||
|
} elsif ($pred =~ /^\s*\/\s*(.*)$/) {
|
||||||
|
#print " cut<$1>\n";
|
||||||
|
($cut, $res) = pred_exec($1);
|
||||||
|
$cut = 1;
|
||||||
|
|
||||||
# Recurse left for complex expressions.
|
# Recurse left for complex expressions.
|
||||||
} elsif ($pred =~ /^\s*\((.*)\)\s*$/) {
|
} elsif ($pred =~ /^\s*\((.*)\)\s*$/) {
|
||||||
#print " left<$1>\n";
|
#print " left<$1>\n";
|
||||||
$res = pred_exec($1);
|
($cut, $res) = pred_exec($1);
|
||||||
|
|
||||||
# Check for common syntax issues.
|
# Check for common syntax issues.
|
||||||
} elsif ($pred eq '') {
|
} elsif ($pred eq '') {
|
||||||
@@ -111,7 +126,7 @@ sub pred_exec {
|
|||||||
} else {
|
} else {
|
||||||
die "$P: $pred$rest: syntax error\n";
|
die "$P: $pred$rest: syntax error\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# A predicate, execute it.
|
# A predicate, execute it.
|
||||||
} else {
|
} else {
|
||||||
#print " DO<$pred> sep<$sep>\n";
|
#print " DO<$pred> sep<$sep>\n";
|
||||||
@@ -121,23 +136,23 @@ sub pred_exec {
|
|||||||
#print " pre-return res<$res> sep<$sep>\n";
|
#print " pre-return res<$res> sep<$sep>\n";
|
||||||
if ($sep eq '') {
|
if ($sep eq '') {
|
||||||
#
|
#
|
||||||
|
|
||||||
# Recurse right for binary operators -- note these are lazy.
|
# Recurse right for binary operators -- note these are lazy.
|
||||||
} elsif ($sep eq '&' || $sep eq '|') {
|
} elsif ($sep eq '&' || $sep eq '|') {
|
||||||
#print " right<$rest> ? sep<$sep> res<$res>\n";
|
#print " right<$rest> ? sep<$sep> res<$res>\n";
|
||||||
if ($rest =~ /^\s*($|\||\&)/) {
|
if ($rest =~ /^\s*($|\||\&)/) {
|
||||||
die "$P: $pred$rest: malformed binary operator\n";
|
die "$P: $pred$rest: malformed binary operator\n";
|
||||||
}
|
}
|
||||||
if (($res && $sep eq '&') || (!$res && $sep eq '|')) {
|
if ($cut == 0 && (($res && $sep eq '&') || (!$res && $sep eq '|'))) {
|
||||||
#print " right<$rest>\n";
|
#print " right<$rest>\n";
|
||||||
$res = pred_exec($rest);
|
($cut, $res) = pred_exec($rest);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
die "$P: $pred$rest: malformed predicate\n";
|
die "$P: $pred$rest: malformed predicate\n";
|
||||||
}
|
}
|
||||||
#print " return res<$res> sep<$sep>\n";
|
#warn " return cut<$cut> res<$res> sep<$sep>\n";
|
||||||
return $res;
|
return ($cut, $res);
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -147,7 +162,7 @@ my $test_total = 1;
|
|||||||
my $test_good = 0;
|
my $test_good = 0;
|
||||||
sub pred_test {
|
sub pred_test {
|
||||||
my ($pred, $eres, $eerr) = @_;
|
my ($pred, $eres, $eerr) = @_;
|
||||||
my ($res, $err, $fail);
|
my ($cut, $res, $err, $fail);
|
||||||
|
|
||||||
$test_total++;
|
$test_total++;
|
||||||
if ($test != 0 && $test != $test_total - 1) {
|
if ($test != 0 && $test != $test_total - 1) {
|
||||||
@@ -155,7 +170,7 @@ sub pred_test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
$res = pred_exec($pred);
|
($cut, $res) = pred_exec($pred);
|
||||||
};
|
};
|
||||||
$err = $@;
|
$err = $@;
|
||||||
chomp($err);
|
chomp($err);
|
||||||
@@ -174,7 +189,7 @@ sub pred_test {
|
|||||||
} elsif (!defined $eerr && $err ne '') {
|
} elsif (!defined $eerr && $err ne '') {
|
||||||
$fail = "error missmatch, expected success returned '$err'";
|
$fail = "error missmatch, expected success returned '$err'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($fail eq '') {
|
if ($fail eq '') {
|
||||||
$test_good++;
|
$test_good++;
|
||||||
} else {
|
} else {
|
||||||
@@ -199,13 +214,18 @@ if ($test >= 0) {
|
|||||||
|
|
||||||
pred_test('nosuchcommand', undef, $eunkn);
|
pred_test('nosuchcommand', undef, $eunkn);
|
||||||
pred_test('arch', undef, $epred);
|
pred_test('arch', undef, $epred);
|
||||||
pred_test('arch MYARCH MYARCH', undef, $epred);
|
|
||||||
pred_test('arch MYARCH', 1, undef);
|
pred_test('arch MYARCH', 1, undef);
|
||||||
|
pred_test('arch MYARCH NOTMYARCH', 1, undef);
|
||||||
|
pred_test('arch NOTMYARCH MYARCH', 1, undef);
|
||||||
|
pred_test('arch NOTMYARCH NOTMYARCH MYARCH', 1, undef);
|
||||||
|
pred_test('arch NOTMYARCH MYARCH NOTMYARCH', 1, undef);
|
||||||
pred_test('arch NOTMYARCH', 0, undef);
|
pred_test('arch NOTMYARCH', 0, undef);
|
||||||
|
|
||||||
pred_test('flavour', undef, $epred);
|
pred_test('flavour', undef, $epred);
|
||||||
pred_test('flavour MYFLAVOUR myflavour', undef, $epred);
|
|
||||||
pred_test('flavour MYFLAVOUR', 1, undef);
|
pred_test('flavour MYFLAVOUR', 1, undef);
|
||||||
|
pred_test('flavour NOTMYFLAVOUR MYFLAVOUR', 1, undef);
|
||||||
|
pred_test('flavour NOTMYFLAVOUR NOTMYFLAVOUR MYFLAVOUR', 1, undef);
|
||||||
|
pred_test('flavour NOTMYFLAVOUR MYFLAVOUR NOTMYFLAVOUR', 1, undef);
|
||||||
pred_test('flavour NOTMYFLAVOUR', 0, undef);
|
pred_test('flavour NOTMYFLAVOUR', 0, undef);
|
||||||
|
|
||||||
pred_test('value', undef, $epred);
|
pred_test('value', undef, $epred);
|
||||||
@@ -222,7 +242,7 @@ if ($test >= 0) {
|
|||||||
pred_test('exists DISABLED', 1, undef);
|
pred_test('exists DISABLED', 1, undef);
|
||||||
pred_test('exists MISSING', 0, undef);
|
pred_test('exists MISSING', 0, undef);
|
||||||
|
|
||||||
print "TEST: $test_total: inversion tests ...\n";
|
print "TEST: $test_total: inversion tests ...\n";
|
||||||
pred_test('!exists ENABLED', 0, undef);
|
pred_test('!exists ENABLED', 0, undef);
|
||||||
pred_test('!exists MISSING', 1, undef);
|
pred_test('!exists MISSING', 1, undef);
|
||||||
pred_test('!!exists ENABLED', 1, undef);
|
pred_test('!!exists ENABLED', 1, undef);
|
||||||
@@ -230,7 +250,7 @@ if ($test >= 0) {
|
|||||||
pred_test('!!!exists ENABLED', 0, undef);
|
pred_test('!!!exists ENABLED', 0, undef);
|
||||||
pred_test('!!!exists MISSING', 1, undef);
|
pred_test('!!!exists MISSING', 1, undef);
|
||||||
|
|
||||||
print "TEST: $test_total: parentheses tests ...\n";
|
print "TEST: $test_total: parentheses tests ...\n";
|
||||||
pred_test('(exists ENABLED)', 1, undef);
|
pred_test('(exists ENABLED)', 1, undef);
|
||||||
pred_test('((exists ENABLED))', 1, undef);
|
pred_test('((exists ENABLED))', 1, undef);
|
||||||
pred_test('(((exists ENABLED)))', 1, undef);
|
pred_test('(((exists ENABLED)))', 1, undef);
|
||||||
@@ -333,6 +353,10 @@ if ($test >= 0) {
|
|||||||
pred_test('exists ENABLED & exists ENABLED | exists MISSING', 1, undef);
|
pred_test('exists ENABLED & exists ENABLED | exists MISSING', 1, undef);
|
||||||
pred_test('exists ENABLED & exists ENABLED | exists ENABLED', 1, undef);
|
pred_test('exists ENABLED & exists ENABLED | exists ENABLED', 1, undef);
|
||||||
|
|
||||||
|
print "TEST: $test_total: cut tests ...\n";
|
||||||
|
pred_test('(arch MYARCH & exists MISSING) | exists ENABLED', 1, undef);
|
||||||
|
pred_test('(arch MYARCH &/ exists MISSING) | exists ENABLED', 0, undef);
|
||||||
|
|
||||||
$test_total--;
|
$test_total--;
|
||||||
print "TEST: $test_good/$test_total succeeded\n";
|
print "TEST: $test_good/$test_total succeeded\n";
|
||||||
|
|
||||||
@@ -373,7 +397,7 @@ while (<CHECKS>) {
|
|||||||
|
|
||||||
#print "CHECK: <$line>\n";
|
#print "CHECK: <$line>\n";
|
||||||
$total++;
|
$total++;
|
||||||
my $result = pred_exec($line);
|
my (undef, $result) = pred_exec($line);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
print "$P: FAIL: $line\n";
|
print "$P: FAIL: $line\n";
|
||||||
$exit_val = $fail_exit;
|
$exit_val = $fail_exit;
|
||||||
|
|||||||
91
debian/scripts/misc/find-obsolete-firmware
vendored
Executable file
91
debian/scripts/misc/find-obsolete-firmware
vendored
Executable file
@@ -0,0 +1,91 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Find all duplicate or obsolete firmware that is being carried
|
||||||
|
# in the kernel firmware directory. Compare these files against
|
||||||
|
# the linux-firmware package for the approriate release. For example,
|
||||||
|
# assuming this is raring, then compare the kernel firmware files
|
||||||
|
# against the raring branch of linux-firmware.
|
||||||
|
#
|
||||||
|
# Example: $0 ~/ubuntu/linux-firmware-raring
|
||||||
|
|
||||||
|
USEAGE="$0 LINUX-FIRMWARE"
|
||||||
|
|
||||||
|
. debian/debian.env
|
||||||
|
|
||||||
|
NFWINFO="`find $DEBIAN -name fwinfo|wc -l`"
|
||||||
|
if [ ! "$NFWINFO" = "1" ]
|
||||||
|
then
|
||||||
|
echo Your repo is hosed. There can only be one fwinfo file.
|
||||||
|
find $DEBIAN -name fwinfo
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
FWINFO="`pwd`/`find $DEBIAN -name fwinfo`"
|
||||||
|
|
||||||
|
if [ "$1" = "" ]
|
||||||
|
then
|
||||||
|
echo $USEAGE
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
FW="$1"
|
||||||
|
|
||||||
|
if [ ! -f $FW/WHENCE ]
|
||||||
|
then
|
||||||
|
echo Bogus linux-firmware directory
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! egrep -q "^firmware:" $FWINFO
|
||||||
|
then
|
||||||
|
echo Bogus firmware info file
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Prepare the tree and make firmware.
|
||||||
|
#
|
||||||
|
TEE="tee -a"
|
||||||
|
LO=`pwd`/firmware.txt
|
||||||
|
LF=`pwd`/lib/firmware
|
||||||
|
rm -rf debian/build $LF $LO
|
||||||
|
fakeroot debian/rules clean prepare-generic
|
||||||
|
cp debian/build/build-generic/.config .
|
||||||
|
mkdir -p $LF
|
||||||
|
make firmware_install INSTALL_MOD_PATH=`pwd`
|
||||||
|
|
||||||
|
(cd $LF
|
||||||
|
find . -type f | while read f
|
||||||
|
do
|
||||||
|
BN="`basename $f`"
|
||||||
|
|
||||||
|
if ! grep -q $BN $FWINFO
|
||||||
|
then
|
||||||
|
echo "Unused firmware: $f" | $TEE $LO
|
||||||
|
else
|
||||||
|
if [ -f $FW/$f ]
|
||||||
|
then
|
||||||
|
if ! cmp $FW/$f $f
|
||||||
|
then
|
||||||
|
echo "$f differs" | $TEE $LO
|
||||||
|
else
|
||||||
|
echo "$f is duplicated" | $TEE $LO
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "$f does not exist in $FW" | $TEE $LO
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for firmware files referenced by the kernel
|
||||||
|
# that do not exist in either location.
|
||||||
|
#
|
||||||
|
cat $FWINFO | while read fwi f
|
||||||
|
do
|
||||||
|
if [ -s lib/firmware/$f ] || [ -s $FW/$f ]
|
||||||
|
then
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
echo "Missing firmware $f" | $TEE $LO
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
18
debian/scripts/misc/fw-to-ihex.sh
vendored
Executable file
18
debian/scripts/misc/fw-to-ihex.sh
vendored
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
F=$1
|
||||||
|
if [ "$F" = "" ]
|
||||||
|
then
|
||||||
|
echo You must supply a firmware file.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "unsigned char d[] = {" > $F.c
|
||||||
|
hexdump -v -e '"\t" 8/1 "0x%02x, " "\n"' $F >> $F.c
|
||||||
|
echo "};" >> $F.c
|
||||||
|
sed -i 's/0x .*$//' $F.c
|
||||||
|
|
||||||
|
O="`dirname $F`/`basename $F`.o"
|
||||||
|
gcc -o $O -c $F.c
|
||||||
|
objcopy -Oihex $F.o $F.ihex
|
||||||
|
|
||||||
62
debian/scripts/misc/get-firmware
vendored
Executable file
62
debian/scripts/misc/get-firmware
vendored
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Find all files in linux-firmware that are new or different since the previous release
|
||||||
|
# and copy them into the kernel firmware directory. You should only do this on the
|
||||||
|
# backport branch since it would be redundant on the released kernel. It assumed you've
|
||||||
|
# unpacked linux-firmware from each release into separate directories.
|
||||||
|
#
|
||||||
|
# Example: $0 ~/ubuntu/linux-firmware-precise ~/ubuntu/linux-firmware-quantal
|
||||||
|
|
||||||
|
if [ "$1" = "" ] || [ "$2" = "" ] || [ ! -f $1/WHENCE ] || [ ! -f $2/WHENCE ]
|
||||||
|
then
|
||||||
|
echo You must supply 2 firmware directories.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f debian/debian.env ]
|
||||||
|
then
|
||||||
|
echo You must run this script from the root of the repo
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
. debian/debian.env
|
||||||
|
|
||||||
|
NFWINFO="`find $DEBIAN -name fwinfo|wc -l`"
|
||||||
|
if [ ! "$NFWINFO" = "1" ]
|
||||||
|
then
|
||||||
|
echo Your repo is hosed. There can only be one fwinfo file.
|
||||||
|
find $DEBIAN -name fwinfo
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
FWINFO="`pwd`/`find $DEBIAN -name fwinfo`"
|
||||||
|
|
||||||
|
CDIR=`pwd`
|
||||||
|
OFW=$1
|
||||||
|
NFW=$2
|
||||||
|
|
||||||
|
cd $NFW
|
||||||
|
#
|
||||||
|
# Find all files in $NFW that are new or different from $1
|
||||||
|
#
|
||||||
|
(find . -type f | egrep -v "debian|git|LICEN|WHEN|READ|Make|configure" | sed 's;\./;;' | \
|
||||||
|
while read f
|
||||||
|
do
|
||||||
|
if grep -q $f $FWINFO
|
||||||
|
then
|
||||||
|
if [ ! -f $OFW/$f ]
|
||||||
|
then
|
||||||
|
echo $f
|
||||||
|
elif ! cmp $f $OFW/$f > /dev/null
|
||||||
|
then
|
||||||
|
echo $f
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done) |\
|
||||||
|
while read f
|
||||||
|
do
|
||||||
|
mkdir -p $CDIR/firmware/`dirname $f`
|
||||||
|
if [ ! -f $CDIR/firmware/`dirname $f`/`basename $f`.ihex ]
|
||||||
|
then
|
||||||
|
cp -v $f $CDIR/firmware/`dirname $f`
|
||||||
|
fi
|
||||||
|
done
|
||||||
79
debian/scripts/misc/getabis
vendored
79
debian/scripts/misc/getabis
vendored
@@ -1,12 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. debian/debian.env
|
|
||||||
|
|
||||||
if [ "$#" != "2" ]; then
|
if [ "$#" != "2" ]; then
|
||||||
echo "Usage: $0 <release> <revision>" 1>&2
|
echo "Usage: $0 <release> <revision>" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$DEBIAN" = "" ]; then
|
||||||
|
. debian/debian.env
|
||||||
|
fi
|
||||||
|
|
||||||
ver=$1
|
ver=$1
|
||||||
revision=$2
|
revision=$2
|
||||||
abi=$(echo $revision | awk -F. '{print $1}')
|
abi=$(echo $revision | awk -F. '{print $1}')
|
||||||
@@ -14,16 +16,19 @@ abi=$(echo $revision | awk -F. '{print $1}')
|
|||||||
verabi=$ver-$abi
|
verabi=$ver-$abi
|
||||||
verfull=$ver-$revision
|
verfull=$ver-$revision
|
||||||
|
|
||||||
src_pkg_name=$(dpkg-parsechangelog -l${DEBIAN}/changelog|grep Source|sed 's/^.*Source: //')
|
WGET="wget --tries=1 --timeout=10 --quiet -c"
|
||||||
|
|
||||||
WGET="wget --quiet -c"
|
|
||||||
|
|
||||||
abidir="`pwd`/$DEBIAN/abi/$verfull"
|
abidir="`pwd`/$DEBIAN/abi/$verfull"
|
||||||
tmpdir="`pwd`/abi-tmp-$verfull"
|
tmpdir="`pwd`/abi-tmp-$verfull"
|
||||||
origdir="`pwd`"
|
origdir="`pwd`"
|
||||||
|
fwinfo=$abidir/fwinfo
|
||||||
|
|
||||||
test -d $tmpdir || mkdir $tmpdir
|
test -d $tmpdir || mkdir $tmpdir
|
||||||
|
|
||||||
|
package_prefixes() {
|
||||||
|
__package_prefixes="$@"
|
||||||
|
}
|
||||||
|
|
||||||
getall() {
|
getall() {
|
||||||
arch=$1
|
arch=$1
|
||||||
shift
|
shift
|
||||||
@@ -35,19 +40,34 @@ getall() {
|
|||||||
echo "Exists: $sub"
|
echo "Exists: $sub"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo -n "Fetching $sub..."
|
echo -n "Fetching $sub($arch)..."
|
||||||
filename=linux-image-${verabi}-${sub}_${verfull}_${arch}.deb
|
prefixes=""
|
||||||
|
filenames=""
|
||||||
cd $tmpdir
|
cd $tmpdir
|
||||||
for r in "${repo_list[@]}"
|
for prefix in $__package_prefixes
|
||||||
do
|
do
|
||||||
url="`echo $r | sed 's/linux$/'${src_pkg_name}'/'`"
|
filename=${prefix}-${verabi}-${sub}_${verfull}_${arch}.deb
|
||||||
if ! [ -f $filename ]; then
|
for r in "${repo_list[@]}"
|
||||||
$WGET $url/$filename
|
do
|
||||||
fi
|
if ! [ -f $filename ]; then
|
||||||
|
$WGET $r/$filename
|
||||||
|
fi
|
||||||
|
if [ -f $filename ]; then
|
||||||
|
prefixes="$prefixes $prefix"
|
||||||
|
filenames="$filenames $filename"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
if [ "$?" = "0" ]; then
|
if [ "$filenames" != "" ]; then
|
||||||
echo -n "extracting..."
|
echo -n "extracting$prefixes..."
|
||||||
dpkg-deb --extract $filename tmp
|
for filename in $filenames
|
||||||
|
do
|
||||||
|
dpkg-deb --extract $filename tmp
|
||||||
|
done
|
||||||
|
find tmp -name "*.ko" | while read f; do
|
||||||
|
modinfo $f | grep ^firmware >> $fwinfo
|
||||||
|
done
|
||||||
if [ -f tmp/boot/abi-* ]; then
|
if [ -f tmp/boot/abi-* ]; then
|
||||||
mv tmp/boot/abi-* $abidir/$arch/$sub
|
mv tmp/boot/abi-* $abidir/$arch/$sub
|
||||||
else
|
else
|
||||||
@@ -56,7 +76,24 @@ getall() {
|
|||||||
(cd tmp; find lib/modules/$verabi-$sub/kernel -name '*.ko') | \
|
(cd tmp; find lib/modules/$verabi-$sub/kernel -name '*.ko') | \
|
||||||
sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > \
|
sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > \
|
||||||
$abidir/$arch/$sub.modules
|
$abidir/$arch/$sub.modules
|
||||||
rm -rf tmp $filename
|
(
|
||||||
|
cd tmp;
|
||||||
|
# Prevent exposing some errors when called by python scripts. SIGPIPE seems to get
|
||||||
|
# exposed when using the `find ...` form of the command.
|
||||||
|
ko=$(find lib/modules/$verabi-$sub/kernel \
|
||||||
|
-name '*.ko' | head -1)
|
||||||
|
readelf -p .comment "$ko" | awk '
|
||||||
|
($1 == "[") {
|
||||||
|
printf("%s", $3);
|
||||||
|
for (n=4; n<=NF; n++) {
|
||||||
|
printf(" %s", $n);
|
||||||
|
}
|
||||||
|
print ""
|
||||||
|
}' | sort -u >$abidir/$arch/$sub.compiler
|
||||||
|
version=`cat $abidir/$arch/$sub.compiler`
|
||||||
|
echo -n "$version..."
|
||||||
|
)
|
||||||
|
rm -rf tmp $filenames
|
||||||
echo "done."
|
echo "done."
|
||||||
else
|
else
|
||||||
echo "FAILED."
|
echo "FAILED."
|
||||||
@@ -74,6 +111,16 @@ echo $abi > $abidir/abiname
|
|||||||
# NOTE: The flavours are hardcoded, because they may have changed from the
|
# NOTE: The flavours are hardcoded, because they may have changed from the
|
||||||
# current build.
|
# current build.
|
||||||
|
|
||||||
|
__package_prefixes="linux-image"
|
||||||
|
|
||||||
. $DEBIAN/etc/getabis
|
. $DEBIAN/etc/getabis
|
||||||
|
|
||||||
|
compilers=`cat $abidir/*/*.compiler | sort -u | wc -l`
|
||||||
|
if [ "$compilers" != 1 ]; then
|
||||||
|
echo "WARNING: inconsistant compiler versions detected" 1>&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
sort < $fwinfo | uniq > fwinfo.tmp
|
||||||
|
mv fwinfo.tmp $fwinfo
|
||||||
|
|
||||||
rmdir $tmpdir
|
rmdir $tmpdir
|
||||||
|
|||||||
4
debian/scripts/misc/git-ubuntu-log
vendored
4
debian/scripts/misc/git-ubuntu-log
vendored
@@ -215,7 +215,7 @@ sub changelog_input {
|
|||||||
$pstate++;
|
$pstate++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
die "invalid parse state $pstate";
|
die "invalid parse state $pstate";
|
||||||
}
|
}
|
||||||
@@ -223,7 +223,7 @@ sub changelog_input {
|
|||||||
|
|
||||||
foreach $entry (@reverts) {
|
foreach $entry (@reverts) {
|
||||||
add_entry($entry);
|
add_entry($entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&changelog_input;
|
&changelog_input;
|
||||||
|
|||||||
42
debian/scripts/misc/insert-mainline-changes
vendored
Executable file
42
debian/scripts/misc/insert-mainline-changes
vendored
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
if ($#ARGV != 2) {
|
||||||
|
warn "Usage: $0 <changelog> <to> <range>\n";
|
||||||
|
die " $0 debian.master/changelog v3.2.3 v3.2.2..v3.2.3\n";
|
||||||
|
}
|
||||||
|
my ($changelog, $to, $range) = @ARGV;
|
||||||
|
|
||||||
|
my @changes = ();
|
||||||
|
|
||||||
|
push(@changes, "\n");
|
||||||
|
push(@changes, " [ Upstream Kernel Changes ]\n\n");
|
||||||
|
push(@changes, " * rebase to $to\n");
|
||||||
|
|
||||||
|
open(LOG, "git log '$range'|") || die "$0: git log failed: - $!\n";
|
||||||
|
while (<LOG>) {
|
||||||
|
if (m@BugLink: .*launchpad.net/.*/([0-9]+)\s$@) {
|
||||||
|
push(@changes, " - LP: #$1\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close(LOG);
|
||||||
|
|
||||||
|
open(CHANGELOG, "< $changelog") or die "Cannot open changelog";
|
||||||
|
open(NEW, "> $changelog.new") or die "Cannot open new changelog";
|
||||||
|
|
||||||
|
$printed = 3;
|
||||||
|
while (<CHANGELOG>) {
|
||||||
|
if (/^ CHANGELOG: /) {
|
||||||
|
$printed--;
|
||||||
|
print NEW;
|
||||||
|
if ($printed == 0) {
|
||||||
|
print NEW @changes;
|
||||||
|
}
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
print NEW;
|
||||||
|
}
|
||||||
|
|
||||||
|
close(NEW);
|
||||||
|
close(CHANGELOG);
|
||||||
|
|
||||||
|
rename("$changelog.new", "$changelog");
|
||||||
2
debian/scripts/misc/insert-ubuntu-changes
vendored
2
debian/scripts/misc/insert-ubuntu-changes
vendored
@@ -10,7 +10,7 @@ $start =~ s/.*\.//;
|
|||||||
|
|
||||||
my @changes = ();
|
my @changes = ();
|
||||||
my $output = 0;
|
my $output = 0;
|
||||||
open(CHG, "<debian.manta/changelog") ||
|
open(CHG, "<debian.master/changelog") ||
|
||||||
open(CHG, "<debian/changelog") ||
|
open(CHG, "<debian/changelog") ||
|
||||||
die "$0: debian/changelog: open failed - $!\n";
|
die "$0: debian/changelog: open failed - $!\n";
|
||||||
while (<CHG>) {
|
while (<CHG>) {
|
||||||
|
|||||||
55
debian/scripts/misc/kernelconfig
vendored
55
debian/scripts/misc/kernelconfig
vendored
@@ -12,17 +12,19 @@ if [ ! -f MAINTAINERS ] || [ ! -f Makefile ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mode=${1:?"Usage: $0 [oldconfig|editconfig]"}
|
mode=${1:?"Usage: $0 [oldconfig|editconfig]"}
|
||||||
|
yes=0
|
||||||
case "$mode" in
|
case "$mode" in
|
||||||
oldconfig) ;; # All is good
|
update*configs) mode='silentoldconfig' ;;
|
||||||
defaultconfig) ;; # All is good
|
default*configs) mode='oldconfig'; yes=1 ;;
|
||||||
editconfig) ;; # All is good
|
edit*configs) ;; # All is good
|
||||||
genconfig) ;; # All is good
|
gen*configs) mode='genconfigs' ;; # All is good
|
||||||
|
dump*configs) mode='config'; yes=1 ;;
|
||||||
*) echo "$0 called with invalid mode" 1>&2
|
*) echo "$0 called with invalid mode" 1>&2
|
||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
esac
|
esac
|
||||||
kerneldir="`pwd`"
|
kerneldir="`pwd`"
|
||||||
confdir="$kerneldir/${DEBIAN}/config"
|
confdir="$kerneldir/${DEBIAN}/config"
|
||||||
sharedconfdir="$kerneldir/debian.manta/config"
|
sharedconfdir="$kerneldir/debian.master/config"
|
||||||
variant="$2"
|
variant="$2"
|
||||||
|
|
||||||
. $DEBIAN/etc/kernelconfig
|
. $DEBIAN/etc/kernelconfig
|
||||||
@@ -32,7 +34,7 @@ common_conf="$confdir/config.common.$family"
|
|||||||
tmpdir=`mktemp -d`
|
tmpdir=`mktemp -d`
|
||||||
mkdir "$tmpdir/CONFIGS"
|
mkdir "$tmpdir/CONFIGS"
|
||||||
|
|
||||||
if [ "$mode" = "genconfig" ]; then
|
if [ "$mode" = "genconfigs" ]; then
|
||||||
keep=1
|
keep=1
|
||||||
mode="oldconfig"
|
mode="oldconfig"
|
||||||
test -d CONFIGS || mkdir CONFIGS
|
test -d CONFIGS || mkdir CONFIGS
|
||||||
@@ -44,12 +46,12 @@ for arch in $archs; do
|
|||||||
|
|
||||||
# Map debian archs to kernel archs
|
# Map debian archs to kernel archs
|
||||||
case "$arch" in
|
case "$arch" in
|
||||||
amd64) kernarch="x86_64" ;;
|
ppc64) kernarch="powerpc" ;;
|
||||||
lpia) kernarch="x86" ;;
|
amd64) kernarch="x86_64" ;;
|
||||||
sparc) kernarch="sparc64" ;;
|
lpia) kernarch="x86" ;;
|
||||||
armel) kernarch="arm" ;;
|
sparc) kernarch="sparc64" ;;
|
||||||
armhf) kernarch="arm" ;;
|
armel|armhf) kernarch="arm" ;;
|
||||||
*) kernarch="$arch" ;;
|
*) kernarch="$arch" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
archconfdir=$confdir/$arch
|
archconfdir=$confdir/$arch
|
||||||
@@ -84,20 +86,12 @@ for arch in $archs; do
|
|||||||
cat "$fullconf" > build/.config
|
cat "$fullconf" > build/.config
|
||||||
# Call oldconfig or menuconfig
|
# Call oldconfig or menuconfig
|
||||||
case "$mode" in
|
case "$mode" in
|
||||||
oldconfig)
|
editconfigs)
|
||||||
# Weed out incorrect config parameters
|
|
||||||
echo "* Run silentoldconfig on $arch/$config ..."
|
|
||||||
make O=`pwd`/build ARCH=$kernarch silentoldconfig ;;
|
|
||||||
defaultconfig)
|
|
||||||
# Weed out incorrect config parameters
|
|
||||||
echo "* Run oldconfig on $arch/$config ..."
|
|
||||||
make O=`pwd`/build ARCH=$kernarch oldconfig ;;
|
|
||||||
editconfig)
|
|
||||||
# Interactively edit config parameters
|
# Interactively edit config parameters
|
||||||
while : ; do
|
while : ; do
|
||||||
echo -n "Do you want to edit config: $arch/$config? [Y/n] "
|
echo -n "Do you want to edit config: $arch/$config? [Y/n] "
|
||||||
read choice
|
read choice
|
||||||
|
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
y* | Y* | "" )
|
y* | Y* | "" )
|
||||||
make O=`pwd`/build ARCH=$kernarch menuconfig
|
make O=`pwd`/build ARCH=$kernarch menuconfig
|
||||||
@@ -109,8 +103,13 @@ for arch in $archs; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
*) # Bad!
|
*)
|
||||||
exit 1 ;;
|
echo "* Run $mode (yes=$yes) on $arch/$config ..."
|
||||||
|
if [ "$yes" -eq 1 ]; then
|
||||||
|
yes "" | make O=`pwd`/build ARCH=$kernarch "$mode"
|
||||||
|
else
|
||||||
|
make O=`pwd`/build ARCH=$kernarch "$mode"
|
||||||
|
fi ;;
|
||||||
esac
|
esac
|
||||||
cat build/.config > $archconfdir/$config
|
cat build/.config > $archconfdir/$config
|
||||||
cat build/.config > "$tmpdir/CONFIGS/$arch-$config"
|
cat build/.config > "$tmpdir/CONFIGS/$arch-$config"
|
||||||
@@ -128,7 +127,7 @@ for arch in $archs; do
|
|||||||
# Can we make this more robust by avoiding $tmpdir completely?
|
# Can we make this more robust by avoiding $tmpdir completely?
|
||||||
# This approach was used for now because I didn't want to change
|
# This approach was used for now because I didn't want to change
|
||||||
# splitconfig.pl
|
# splitconfig.pl
|
||||||
(cd $archconfdir; $bindir/splitconfig.pl; mv config.common \
|
(cd $archconfdir; $bindir/splitconfig.pl config.flavour.*; mv config.common \
|
||||||
config.common.$arch; cp config.common.$arch $tmpdir)
|
config.common.$arch; cp config.common.$arch $tmpdir)
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -136,7 +135,7 @@ rm -f $common_conf
|
|||||||
|
|
||||||
# Now run splitconfig.pl on all the config.common.<arch> copied to
|
# Now run splitconfig.pl on all the config.common.<arch> copied to
|
||||||
# $tmpdir
|
# $tmpdir
|
||||||
(cd $tmpdir; $bindir/splitconfig.pl)
|
(cd $tmpdir; $bindir/splitconfig.pl *)
|
||||||
(
|
(
|
||||||
cd $confdir;
|
cd $confdir;
|
||||||
rm -f *-full
|
rm -f *-full
|
||||||
@@ -155,9 +154,10 @@ for arch in $archs; do
|
|||||||
archconfdir=$confdir/$arch
|
archconfdir=$confdir/$arch
|
||||||
flavourconfigs=$(cd $archconfdir && ls config.flavour.*)
|
flavourconfigs=$(cd $archconfdir && ls config.flavour.*)
|
||||||
for config in $flavourconfigs; do
|
for config in $flavourconfigs; do
|
||||||
|
flavour="${config##*.}"
|
||||||
if [ -f $archconfdir/$config ]; then
|
if [ -f $archconfdir/$config ]; then
|
||||||
fullconf="$tmpdir/CONFIGS/$arch-$config"
|
fullconf="$tmpdir/CONFIGS/$arch-$config"
|
||||||
"$bindir/../config-check" "$fullconf" "$arch" "$config" "$sharedconfdir" "0" || let "fail=$fail+1"
|
"$bindir/../config-check" "$fullconf" "$arch" "$flavour" "$sharedconfdir" "0" || let "fail=$fail+1"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
@@ -169,3 +169,4 @@ if [ "$fail" != 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
||||||
|
|||||||
6
debian/scripts/misc/splitconfig.pl
vendored
6
debian/scripts/misc/splitconfig.pl
vendored
@@ -5,9 +5,7 @@
|
|||||||
|
|
||||||
print "Reading config's ...\n";
|
print "Reading config's ...\n";
|
||||||
|
|
||||||
opendir(DIR, ".");
|
for $config (@ARGV) {
|
||||||
|
|
||||||
while (defined($config = readdir(DIR))) {
|
|
||||||
# Only config.*
|
# Only config.*
|
||||||
next if $config !~ /^config\..*/;
|
next if $config !~ /^config\..*/;
|
||||||
# Nothing that is disabled, or remnant
|
# Nothing that is disabled, or remnant
|
||||||
@@ -33,8 +31,6 @@ while (defined($config = readdir(DIR))) {
|
|||||||
print "done.\n";
|
print "done.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
closedir(DIR);
|
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
print "Merging lists ... \n";
|
print "Merging lists ... \n";
|
||||||
|
|||||||
36
debian/scripts/module-inclusion
vendored
36
debian/scripts/module-inclusion
vendored
@@ -5,17 +5,33 @@
|
|||||||
# The includsion list format must be a bash regular expression.
|
# The includsion list format must be a bash regular expression.
|
||||||
#
|
#
|
||||||
# usage: $0 ROOT INCLUSION_LIST
|
# usage: $0 ROOT INCLUSION_LIST
|
||||||
# example: $0 debian/build/build-virtual debian.linaro/control.d/virtual.inclusion-list
|
# example: $0 debian/build/build-virtual \
|
||||||
ROOT=$1
|
# debian/build/build-virtual-ALL debian/build/build-virtual \
|
||||||
ILIST=$2
|
# debian.master/control.d/virtual.inclusion-list
|
||||||
|
master=0
|
||||||
|
if [ "$1" = "--master" ]; then
|
||||||
|
master=1
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
NROOT=${ROOT}.new
|
ROOT=$1
|
||||||
|
NROOT=$2
|
||||||
|
ILIST=$3
|
||||||
|
|
||||||
#
|
#
|
||||||
# Prep a destination directory.
|
# Prep a destination directory.
|
||||||
#
|
#
|
||||||
mkdir -p ${NROOT}
|
mkdir -p ${NROOT}
|
||||||
rsync -a --exclude="*.ko" ${ROOT}/ ${NROOT}
|
|
||||||
|
# Copy over the framework...
|
||||||
|
if [ "$master" -eq 1 ]; then
|
||||||
|
(cd ${ROOT}; find . ! -name "*.ko" -type f) | \
|
||||||
|
while read f
|
||||||
|
do
|
||||||
|
mkdir -p ${NROOT}/`dirname $f`
|
||||||
|
mv ${ROOT}/$f ${NROOT}/$f
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
cat ${ILIST} |while read i
|
cat ${ILIST} |while read i
|
||||||
do
|
do
|
||||||
@@ -27,13 +43,13 @@ do
|
|||||||
(cd ${ROOT}; eval find "${i}" -name "*.ko") |while read f
|
(cd ${ROOT}; eval find "${i}" -name "*.ko") |while read f
|
||||||
do
|
do
|
||||||
mkdir -p ${NROOT}/`dirname $f`
|
mkdir -p ${NROOT}/`dirname $f`
|
||||||
cp ${ROOT}/$f ${NROOT}/$f
|
mv ${ROOT}/$f ${NROOT}/$f
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
if [ -f "${ROOT}/$i" ]
|
if [ -f "${ROOT}/$i" ]
|
||||||
then
|
then
|
||||||
mkdir -p ${NROOT}/`dirname $i`
|
mkdir -p ${NROOT}/`dirname $i`
|
||||||
cp ${ROOT}/$i ${NROOT}/$i
|
mv ${ROOT}/$i ${NROOT}/$i
|
||||||
else
|
else
|
||||||
echo Warning: Could not find ${ROOT}/$i
|
echo Warning: Could not find ${ROOT}/$i
|
||||||
fi
|
fi
|
||||||
@@ -41,10 +57,4 @@ do
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
#
|
|
||||||
# Cleanup
|
|
||||||
#
|
|
||||||
rm -rf ${ROOT}
|
|
||||||
mv ${NROOT} ${ROOT}
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
4
debian/scripts/sub-flavour
vendored
4
debian/scripts/sub-flavour
vendored
@@ -11,7 +11,9 @@ from_moddir="debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM"
|
|||||||
to_moddir="debian/$to_pkg/lib/modules/$ABI_RELEASE-$FROM"
|
to_moddir="debian/$to_pkg/lib/modules/$ABI_RELEASE-$FROM"
|
||||||
|
|
||||||
install -d "debian/$to_pkg/boot"
|
install -d "debian/$to_pkg/boot"
|
||||||
install -m644 debian/$from_pkg/boot/{vmlinuz,System.map,config}-$ABI_RELEASE-$FROM \
|
install -m644 debian/$from_pkg/boot/config-$ABI_RELEASE-$FROM \
|
||||||
|
debian/$to_pkg/boot/
|
||||||
|
install -m600 debian/$from_pkg/boot/{vmlinuz,System.map}-$ABI_RELEASE-$FROM \
|
||||||
debian/$to_pkg/boot/
|
debian/$to_pkg/boot/
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
2
debian/source/format
vendored
2
debian/source/format
vendored
@@ -1 +1 @@
|
|||||||
3.0 (native)
|
1.0
|
||||||
|
|||||||
21
debian/tests-build/README
vendored
Normal file
21
debian/tests-build/README
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Scripts placed in this directory get called one at a time by run-parts(8).
|
||||||
|
The scripts are expected to perform some sort of sanity checks on the
|
||||||
|
finished build. Scripts will be called once for each flavour.
|
||||||
|
|
||||||
|
Some environment variables are exported to make life a little easier:
|
||||||
|
|
||||||
|
DPKG_ARCH : The dpkg architecture (e.g. "amd64")
|
||||||
|
KERN_ARCH : The kernel architecture (e.g. "x86_64")
|
||||||
|
FLAVOUR : The specific flavour for this run (e.g. "generic")
|
||||||
|
VERSION : The full version of this build (e.g. 2.6.22-1)
|
||||||
|
REVISION : The exact revision of this build (e.g. 1.3)
|
||||||
|
PREV_REVISION : The revision prior to this one
|
||||||
|
ABI_NUM : The specific ABI number for this build (e.g. 2)
|
||||||
|
PREV_ABI_NUM : The previous ABI number. Can be the same as ABI_NUM.
|
||||||
|
BUILD_DIR : The directory where this build took place
|
||||||
|
INSTALL_DIR : The directory where the package is prepared
|
||||||
|
SOURCE_DIR : Where the main kernel source is
|
||||||
|
|
||||||
|
Scripts are expected to have a zero exit status when no problems occur,
|
||||||
|
and non-zero when an error occurs that should stop the build. Scripts
|
||||||
|
should print whatever info they deem needed to deduce the problem.
|
||||||
24
debian/tests-build/check-aliases
vendored
Executable file
24
debian/tests-build/check-aliases
vendored
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
my %map;
|
||||||
|
|
||||||
|
print "Checking for dupe aliases in $ENV{'FLAVOUR'}...\n";
|
||||||
|
|
||||||
|
$aliases =
|
||||||
|
"$ENV{'INSTALL_DIR'}/lib/modules/$ENV{'VERSION'}-$ENV{'FLAVOUR'}/modules.alias";
|
||||||
|
|
||||||
|
open(ALIASES, "< $aliases") or die "Could not open $aliases";
|
||||||
|
|
||||||
|
while (<ALIASES>) {
|
||||||
|
chomp;
|
||||||
|
my ($junk, $alias, $module) = split;
|
||||||
|
|
||||||
|
if (defined($map{$alias})) {
|
||||||
|
printf("%s %20s / %-20s : %s \n", ("$map{$alias}" eq "$module")
|
||||||
|
? "INT" : " ", $map{$alias}, $module, $alias);
|
||||||
|
} else {
|
||||||
|
$map{$alias} = $module;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exit(0);
|
||||||
3
debian/tests/control
vendored
Normal file
3
debian/tests/control
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Tests: rebuild
|
||||||
|
Depends:
|
||||||
|
Restrictions: build-needed
|
||||||
1
debian/tests/rebuild
vendored
Executable file
1
debian/tests/rebuild
vendored
Executable file
@@ -0,0 +1 @@
|
|||||||
|
#!/bin/true
|
||||||
16
debian/tools/generic
vendored
Normal file
16
debian/tools/generic
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
full_version=`uname -r`
|
||||||
|
|
||||||
|
# Removing flavour from version i.e. generic or server.
|
||||||
|
flavour_abi=${full_version#*-}
|
||||||
|
flavour=${flavour_abi#*-}
|
||||||
|
version=${full_version%-$flavour}
|
||||||
|
this="$0_$version"
|
||||||
|
|
||||||
|
if [ ! -f "$this" ]; then
|
||||||
|
echo "$this not found" >&2
|
||||||
|
echo "You may need to install linux-tools-$version" >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$this" "$@"
|
||||||
16
debian/tools/turbostat
vendored
Normal file
16
debian/tools/turbostat
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
full_version=`uname -r`
|
||||||
|
|
||||||
|
# Removing flavour from version i.e. generic or server.
|
||||||
|
flavour_abi=${full_version#*-}
|
||||||
|
flavour=${flavour_abi#*-}
|
||||||
|
version=${full_version%-$flavour}
|
||||||
|
turbostat="turbostat_$version"
|
||||||
|
|
||||||
|
if ! which "$turbostat" > /dev/null; then
|
||||||
|
echo "$turbostat not found" >&2
|
||||||
|
echo "You may need to install linux-tools-$version" >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$turbostat" "$@"
|
||||||
16
debian/tools/x86_energy_perf_policy
vendored
Normal file
16
debian/tools/x86_energy_perf_policy
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
full_version=`uname -r`
|
||||||
|
|
||||||
|
# Removing flavour from version i.e. generic or server.
|
||||||
|
flavour_abi=${full_version#*-}
|
||||||
|
flavour=${flavour_abi#*-}
|
||||||
|
version=${full_version%-$flavour}
|
||||||
|
x86_energy_perf_policy="x86_energy_perf_policy_$version"
|
||||||
|
|
||||||
|
if ! which "$x86_energy_perf_policy" > /dev/null; then
|
||||||
|
echo "$x86_energy_perf_policy not found" >&2
|
||||||
|
echo "You may need to install linux-tools-$version" >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$x86_energy_perf_policy" "$@"
|
||||||
Reference in New Issue
Block a user