build/patch/kernel/media-legacy/00980-builddeb.patch.disabled

102 lines
3.0 KiB
Plaintext

--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -64,25 +64,6 @@
chmod -R a+rX "$pdir"
# in case we build in a setuid/setgid directory
chmod -R ug-s "$pdir"
-
- # Create preinstall and post install script to remove dtb
- if [ "$3" = "dtb" ]; then
-
- cat >> $pdir/DEBIAN/preinst <<- EOT
- rm -rf /boot/dtb
- rm -rf /boot/dtb-$version
- exit 0
- EOT
-
- cat >> $pdir/DEBIAN/postinst <<- EOT
- cd /boot
- ln -sfT dtb-$version dtb 2> /dev/null || mv dtb-$version dtb
- exit 0
- EOT
-
- chmod 775 $pdir/DEBIAN/preinst
- chmod 775 $pdir/DEBIAN/postinst
- fi
# Create postinst prerm script for headers
if [ "$3" = "headers" ]; then
@@ -194,10 +175,8 @@
kernel_headers_dir="debian/hdrtmp"
libc_headers_dir="debian/headertmp"
dbg_dir="debian/dbgtmp"
-dtb_dir="debian/dtbtmp"
packagename=linux-image-"$BRANCH$LOCALVERSION"
kernel_headers_packagename=linux-headers-"$BRANCH$LOCALVERSION"
-dtb_packagename=linux-dtb-"$BRANCH$LOCALVERSION"
libc_headers_packagename=linux-libc-dev
dbg_packagename=$packagename-dbg
@@ -232,11 +211,9 @@
BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes)
# Setup the directory structure
-rm -rf "$tmpdir" "$dbg_dir" "$dtb_dir" debian/files
+rm -rf "$tmpdir" "$dbg_dir" debian/files
mkdir -m 755 -p "$tmpdir/DEBIAN"
mkdir -p "$tmpdir/lib" "$tmpdir/boot"
-mkdir -m 755 -p "$dtb_dir/DEBIAN"
-mkdir -p "$dtb_dir/boot/dtb-$version" "$dtb_dir/usr/share/doc/$dtb_packagename"
mkdir -m 755 -p "$kernel_headers_dir/lib/modules/$version/"
mkdir -m 755 -p "$libc_headers_dir/DEBIAN"
@@ -256,13 +233,8 @@
if is_enabled CONFIG_OF_EARLY_FLATTREE; then
# Only some architectures with OF support have this target
if [ -d "${srctree}/arch/$SRCARCH/boot/dts" ]; then
- $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/usr/lib/linux-image-$version" dtbs_install
- fi
-fi
-
-if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG; then
- #mkdir -p "$tmpdir/boot/dtb"
- INSTALL_DTBS_PATH="$dtb_dir/boot/dtb-$version" $MAKE KBUILD_SRC= dtbs_install
+ $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/boot/linux-image-$version" dtbs_install
+ fi
fi
if is_enabled CONFIG_MODULES; then
@@ -325,6 +297,8 @@
sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst
cat >> $tmpdir/DEBIAN/postinst <<- EOT
ln -sf $(basename $installed_image_path) /boot/$image_name 2> /dev/null || cp /$installed_image_path /boot/$image_name
+ cd /boot
+ ln -sfT linux-image-$version dtb 2> /dev/null || cp linux-image-$version dtb
touch /boot/.next
exit 0
EOT
@@ -353,6 +327,10 @@
rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/$image_name /boot/uImage
fi
}
+# if [ -d /boot/dtb ]; then
+ rm -rf /boot/dtb
+ rm -rf /boot/linux-image-$version
+# fi
mountpoint -q /boot && check_boot_dev
exit 0
EOT
@@ -360,11 +338,6 @@
create_package "$packagename" "$tmpdir"
if [ "$ARCH" != "um" ]; then
-
- if [ "$(cat debian/arch)" != "amd64" ]; then # No DTB for amd64 target
- create_package "$dtb_packagename" "$dtb_dir" "dtb"
- fi
-
deploy_libc_headers $libc_headers_dir
create_package $libc_headers_packagename $libc_headers_dir