#!/bin/sh
#
# builddeb 1.3
# Copyright 2003 Wichert Akkerman <wichert@wiggy.net>
#
# Simple script to generate a deb package for a Linux kernel. All the
# complexity of what to do with a kernel after it is installed or removed
# is left to other scripts and packages: they can install scripts in the
# /etc/kernel/{pre,post}{inst,rm}.d/ directories (or an alternative location
# specified in KDEB_HOOKDIR) that will be called on package install and
# removal.

set -eu

is_enabled() {
	grep -q "^$1=y" include/config/auto.conf
}

if_enabled_echo() {
	if is_enabled "$1"; then
		echo -n "$2"
	elif [ $# -ge 3 ]; then
		echo -n "$3"
	fi
}

install_linux_image () {
	pname=$1
	pdir=debian/$1

	# Only some architectures with OF support have this target
	if is_enabled CONFIG_OF_EARLY_FLATTREE && [ -d "${srctree}/arch/${SRCARCH}/boot/dts" ]; then
		${MAKE} -f ${srctree}/Makefile INSTALL_DTBS_PATH="${pdir}/usr/lib/linux-image-${KERNELRELEASE}" dtbs_install
	fi

	${MAKE} -f ${srctree}/Makefile INSTALL_MOD_PATH="${pdir}" INSTALL_MOD_STRIP=1 modules_install
	rm -f "${pdir}/lib/modules/${KERNELRELEASE}/build"

	# Install the kernel
	if [ "${ARCH}" = um ] ; then
		mkdir -p "${pdir}/usr/lib/uml/modules"
		mv "${pdir}/lib/modules/${KERNELRELEASE}" "${pdir}/usr/lib/uml/modules/${KERNELRELEASE}"
		mkdir -p "${pdir}/usr/bin" "${pdir}/usr/share/doc/${pname}"
		cp System.map "${pdir}/usr/lib/uml/modules/${KERNELRELEASE}/System.map"
		cp ${KCONFIG_CONFIG} "${pdir}/usr/share/doc/${pname}/config"
		gzip "${pdir}/usr/share/doc/${pname}/config"
	else
		mkdir -p "${pdir}/boot"
		cp System.map "${pdir}/boot/System.map-${KERNELRELEASE}"
		cp ${KCONFIG_CONFIG} "${pdir}/boot/config-${KERNELRELEASE}"
	fi

	# Not all arches have the same installed path in debian
	# XXX: have each arch Makefile export a variable of the canonical image install
	# path instead
	case "${SRCARCH}" in
	um)
		installed_image_path="usr/bin/linux-${KERNELRELEASE}";;
	parisc|mips|powerpc)
		installed_image_path="boot/vmlinux-${KERNELRELEASE}";;
	*)
		installed_image_path="boot/vmlinuz-${KERNELRELEASE}";;
	esac
	cp "$(${MAKE} -s -f ${srctree}/Makefile image_name)" "${pdir}/${installed_image_path}"

	# Install the maintainer scripts
	# Note: hook scripts under /etc/kernel are also executed by official Debian
	# kernel packages, as well as kernel packages built using make-kpkg.
	# make-kpkg sets $INITRD to indicate whether an initramfs is wanted, and
	# so do we; recent versions of dracut and initramfs-tools will obey this.
	debhookdir=${KDEB_HOOKDIR:-/etc/kernel}
	for script in postinst postrm preinst prerm; do
		mkdir -p "${pdir}${debhookdir}/${script}.d"

		mkdir -p "${pdir}/DEBIAN"
		cat <<-EOF > "${pdir}/DEBIAN/${script}"
		#!/bin/sh

		set -e

		# Pass maintainer script parameters to hook scripts
		export DEB_MAINT_PARAMS="\$*"

		# Tell initramfs builder whether it's wanted
		export INITRD=$(if_enabled_echo CONFIG_BLK_DEV_INITRD Yes No)

		test -d ${debhookdir}/${script}.d && run-parts --arg="${KERNELRELEASE}" --arg="/${installed_image_path}" ${debhookdir}/${script}.d
		exit 0
		EOF
		chmod 755 "${pdir}/DEBIAN/${script}"
	done
}

install_linux_image_dbg () {
	pdir=debian/$1

	# Parse modules.order directly because 'make modules_install' may sign,
	# compress modules, and then run unneeded depmod.
	while read -r mod; do
		mod="${mod%.o}.ko"
		dbg="${pdir}/usr/lib/debug/lib/modules/${KERNELRELEASE}/kernel/${mod}"
		buildid=$("${READELF}" -n "${mod}" | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p')
		link="${pdir}/usr/lib/debug/.build-id/${buildid}.debug"

		mkdir -p "${dbg%/*}" "${link%/*}"
		"${OBJCOPY}" --only-keep-debug "${mod}" "${dbg}"
		ln -sf --relative "${dbg}" "${link}"
	done < modules.order

	# Build debug package
	# Different tools want the image in different locations
	# perf
	mkdir -p ${pdir}/usr/lib/debug/lib/modules/${KERNELRELEASE}/
	cp vmlinux ${pdir}/usr/lib/debug/lib/modules/${KERNELRELEASE}/
	# systemtap
	mkdir -p ${pdir}/usr/lib/debug/boot/
	ln -s ../lib/modules/${KERNELRELEASE}/vmlinux ${pdir}/usr/lib/debug/boot/vmlinux-${KERNELRELEASE}
	# kdump-tools
	ln -s lib/modules/${KERNELRELEASE}/vmlinux ${pdir}/usr/lib/debug/vmlinux-${KERNELRELEASE}
}

install_kernel_headers () {
	pdir=debian/$1
	version=${1#linux-headers-}

	"${srctree}/scripts/package/install-extmod-build" "${pdir}/usr/src/linux-headers-${version}"

	mkdir -p $pdir/lib/modules/$version/
	ln -s /usr/src/linux-headers-$version $pdir/lib/modules/$version/build
}

install_libc_headers () {
	pdir=debian/$1

	$MAKE -f $srctree/Makefile headers_install INSTALL_HDR_PATH=$pdir/usr

	# move asm headers to /usr/include/<libc-machine>/asm to match the structure
	# used by Debian-based distros (to support multi-arch)
	mkdir "$pdir/usr/include/${DEB_HOST_MULTIARCH}"
	mv "$pdir/usr/include/asm" "$pdir/usr/include/${DEB_HOST_MULTIARCH}"
}

package=$1

case "${package}" in
*-dbg)
	install_linux_image_dbg "${package}";;
linux-image-*|user-mode-linux-*)
	install_linux_image "${package}";;
linux-libc-dev)
	install_libc_headers "${package}";;
linux-headers-*)
	install_kernel_headers "${package}";;
esac
