#!/bin/bash # The only parameter is the name of the folder where the source code # is extracted to. Pay attention to that the extracted package should # be put at the same path where this script is located. # Tools needed: tar KERNEL_HEAD_COMMIT=7d078581c0f754d6cb38b2bf1952925e0460ef84 DEBIAN_FILE=linux_5.10.28-1.debian.tar.xz tar xvf linux-yocto-${KERNEL_HEAD_COMMIT}.tar.gz if [ $? -ne 0 ] then echo "tar failed: linux-yocto source!" exit 1 fi mv linux-yocto-${KERNEL_HEAD_COMMIT} $1 cd $1 tar xvf ../${DEBIAN_FILE} if [ $? -ne 0 ] then echo "tar failed: debian folder for kernel!" exit 1 fi