From e1bd1bb5571a16864f5ffa684bc4dec17e81078c Mon Sep 17 00:00:00 2001 From: niusmallnan Date: Fri, 5 Apr 2019 19:11:27 +0800 Subject: [PATCH] Specific the generic kernel --- scripts/package | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/scripts/package b/scripts/package index 250c36b..57f14ea 100755 --- a/scripts/package +++ b/scripts/package @@ -4,39 +4,47 @@ set -e source $(dirname $0)/version cd $(dirname $0)/.. -mkdir -p dist/headers dist/main dist/modules-extra +# +# Currently only package the generic artifacts +# + +GENERIC_HEADERS_DIR=dist/generic/headers +GENERIC_MAIN_DIR=dist/generic/main +GENERIC_EXTRA_DIR=dist/generic/modules-extra + +mkdir -p ${GENERIC_HEADERS_DIR} ${GENERIC_MAIN_DIR} ${GENERIC_EXTRA_DIR} KERNEL_BASE_DIR=build/kernel/ubuntu-kernel-*/debian FIRMWARE_BASE_DIR=build/firmware/ubuntu-firmware-* # headers -cp -rf ${KERNEL_BASE_DIR}/linux-headers-*-generic/usr dist/headers/ -cp -rf ${KERNEL_BASE_DIR}/linux-headers-*-generic/lib dist/headers/ +cp -rf ${KERNEL_BASE_DIR}/linux-headers-*-generic/usr ${GENERIC_HEADERS_DIR} +cp -rf ${KERNEL_BASE_DIR}/linux-headers-*-generic/lib ${GENERIC_HEADERS_DIR} # main modules and vmlinuz and firmware -cp -rf ${KERNEL_BASE_DIR}/linux-image-unsigned-*-generic/boot dist/main/ -cp -rf ${KERNEL_BASE_DIR}/linux-modules-*-generic/boot dist/main/ -cp -rf ${KERNEL_BASE_DIR}/linux-modules-*-generic/lib dist/main/ -FIRMWARE_DESTDIR=$(pwd)/dist/main +cp -rf ${KERNEL_BASE_DIR}/linux-image-unsigned-*-generic/boot ${GENERIC_MAIN_DIR} +cp -rf ${KERNEL_BASE_DIR}/linux-modules-*-generic/boot ${GENERIC_MAIN_DIR} +cp -rf ${KERNEL_BASE_DIR}/linux-modules-*-generic/lib ${GENERIC_MAIN_DIR} +FIRMWARE_DESTDIR=$(pwd)/${GENERIC_MAIN_DIR} pushd ${FIRMWARE_BASE_DIR} rm -f *.py DESTDIR=${FIRMWARE_DESTDIR} make install popd # extra modules -cp -rf ${KERNEL_BASE_DIR}/linux-modules-extra-*-generic/lib dist/modules-extra/ +cp -rf ${KERNEL_BASE_DIR}/linux-modules-extra-*-generic/lib ${GENERIC_EXTRA_DIR} # package artifacts mkdir -p dist/artifacts -pushd dist/headers -tar cvJf ../artifacts/kernel-headers_${ARCH}.tar.xz . +pushd ${GENERIC_HEADERS_DIR} +tar cvJf ../../artifacts/kernel-headers-generic_${ARCH}.tar.xz . popd -pushd dist/main/ -tar cvJf ../artifacts/kernel_${ARCH}.tar.xz . +pushd ${GENERIC_MAIN_DIR} +tar cvJf ../../artifacts/kernel-generic_${ARCH}.tar.xz . popd -pushd dist/modules-extra -tar cvJf ../artifacts/kernel-extra_${ARCH}.tar.xz . +pushd ${GENERIC_EXTRA_DIR} +tar cvJf ../../artifacts/kernel-extra-generic_${ARCH}.tar.xz . popd