mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-27 23:44:04 +00:00
core/linux-aarch64 to 5.14.9-1
This commit is contained in:
parent
fb9b108c7b
commit
741efaa360
2 changed files with 82 additions and 106 deletions
|
@ -7,7 +7,7 @@ pkgbase=linux-aarch64
|
|||
_srcname=linux-5.14
|
||||
_kernelname=${pkgbase#linux}
|
||||
_desc="AArch64 multi-platform"
|
||||
pkgver=5.14.8
|
||||
pkgver=5.14.9
|
||||
pkgrel=1
|
||||
arch=('aarch64')
|
||||
url="http://www.kernel.org/"
|
||||
|
@ -19,18 +19,18 @@ source=("http://www.kernel.org/pub/linux/kernel/v5.x/${_srcname}.tar.xz"
|
|||
'0001-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch'
|
||||
'0002-arm64-dts-rockchip-disable-pwm0-on-rk3399-firefly.patch'
|
||||
'config'
|
||||
'kernel.its'
|
||||
'generate_chromebook_its.sh'
|
||||
'kernel.keyblock'
|
||||
'kernel_data_key.vbprivk'
|
||||
'linux.preset'
|
||||
'60-linux.hook'
|
||||
'90-linux.hook')
|
||||
md5sums=('a082ef5748b813abca0649dab8be5f52'
|
||||
'767e2bd13b4f1497f7500877792cbff2'
|
||||
'64e3961a575595f67cb7abea4ad28ba4'
|
||||
'21d3e833437461aed3b6ca68b5d8afa0'
|
||||
'd679f49645578a193d6e3c220787a40d'
|
||||
'9cadd5e212ed2b3ae60e68a6c9daef0f'
|
||||
'bcec049f6d71e59b28159c8bc8189822'
|
||||
'e19fbe69f1258b99ee6bed21d7afcbce'
|
||||
'61c5ff73c136ed07a7aadbf58db3d96a'
|
||||
'584777ae88bce2c5659960151b64c7d8'
|
||||
'41cb5fef62715ead2dd109dbea8413d6'
|
||||
|
@ -127,9 +127,6 @@ _package() {
|
|||
# now we call depmod...
|
||||
depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
|
||||
|
||||
# add vmlinux
|
||||
install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux
|
||||
|
||||
# sed expression for following substitutions
|
||||
local _subst="
|
||||
s|%PKGBASE%|${pkgbase}|g
|
||||
|
@ -154,66 +151,76 @@ _package-headers() {
|
|||
conflicts=('linux-headers')
|
||||
|
||||
cd ${_srcname}
|
||||
local _builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||
local builddir="${pkgdir}/usr/lib/modules/${_kernver}/build"
|
||||
|
||||
install -Dt "${_builddir}" -m644 Makefile .config Module.symvers
|
||||
install -Dt "${_builddir}/kernel" -m644 kernel/Makefile
|
||||
|
||||
mkdir "${_builddir}/.tmp_versions"
|
||||
|
||||
cp -t "${_builddir}" -a include scripts
|
||||
|
||||
install -Dt "${_builddir}/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
|
||||
install -Dt "${_builddir}/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s
|
||||
|
||||
cp -t "${_builddir}/arch/${KARCH}" -a arch/${KARCH}/include
|
||||
mkdir -p "${_builddir}/arch/arm"
|
||||
cp -t "${_builddir}/arch/arm" -a arch/arm/include
|
||||
|
||||
install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
|
||||
install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
|
||||
|
||||
# http://bugs.archlinux.org/task/13146
|
||||
install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
||||
|
||||
# http://bugs.archlinux.org/task/20402
|
||||
install -Dt "${_builddir}/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
|
||||
install -Dt "${_builddir}/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
|
||||
install -Dt "${_builddir}/drivers/media/tuners" -m644 drivers/media/tuners/*.h
|
||||
echo "Installing build files..."
|
||||
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map vmlinux
|
||||
install -Dt "$builddir/kernel" -m644 kernel/Makefile
|
||||
install -Dt "$builddir/arch/${KARCH}" -m644 arch/${KARCH}/Makefile
|
||||
cp -t "$builddir" -a scripts
|
||||
|
||||
# add xfs and shmem for aufs building
|
||||
mkdir -p "${_builddir}"/{fs/xfs,mm}
|
||||
mkdir -p "$builddir"/{fs/xfs,mm}
|
||||
|
||||
# copy in Kconfig files
|
||||
find . -name Kconfig\* -exec install -Dm644 {} "${_builddir}/{}" \;
|
||||
echo "Installing headers..."
|
||||
cp -t "$builddir" -a include
|
||||
cp -t "$builddir/arch/${KARCH}" -a arch/${KARCH}/include
|
||||
install -Dt "$builddir/arch/${KARCH}/kernel" -m644 arch/${KARCH}/kernel/asm-offsets.s
|
||||
mkdir -p "$builddir/arch/arm"
|
||||
cp -t "$builddir/arch/arm" -a arch/arm/include
|
||||
|
||||
# remove unneeded architectures
|
||||
local _arch
|
||||
for _arch in "${_builddir}"/arch/*/; do
|
||||
[[ ${_arch} == */${KARCH}/ || ${_arch} == */arm/ ]] && continue
|
||||
rm -r "${_arch}"
|
||||
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
|
||||
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
|
||||
|
||||
# https://bugs.archlinux.org/task/13146
|
||||
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
||||
|
||||
# https://bugs.archlinux.org/task/20402
|
||||
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
|
||||
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
|
||||
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
|
||||
|
||||
# https://bugs.archlinux.org/task/71392
|
||||
install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
|
||||
|
||||
echo "Installing KConfig files..."
|
||||
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
|
||||
|
||||
echo "Removing unneeded architectures..."
|
||||
local arch
|
||||
for arch in "$builddir"/arch/*/; do
|
||||
[[ $arch = */${KARCH}/ || $arch == */arm/ ]] && continue
|
||||
echo "Removing $(basename "$arch")"
|
||||
rm -r "$arch"
|
||||
done
|
||||
|
||||
# remove files already in linux-docs package
|
||||
rm -r "${_builddir}/Documentation"
|
||||
echo "Removing documentation..."
|
||||
rm -r "$builddir/Documentation"
|
||||
|
||||
# remove now broken symlinks
|
||||
find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete
|
||||
echo "Removing broken symlinks..."
|
||||
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
|
||||
|
||||
# Fix permissions
|
||||
chmod -R u=rwX,go=rX "${_builddir}"
|
||||
echo "Removing loose objects..."
|
||||
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
|
||||
|
||||
# strip scripts directory
|
||||
local _binary _strip
|
||||
while read -rd '' _binary; do
|
||||
case "$(file -bi "${_binary}")" in
|
||||
*application/x-sharedlib*) _strip="${STRIP_SHARED}" ;; # Libraries (.so)
|
||||
*application/x-archive*) _strip="${STRIP_STATIC}" ;; # Libraries (.a)
|
||||
*application/x-executable*) _strip="${STRIP_BINARIES}" ;; # Binaries
|
||||
*) continue ;;
|
||||
echo "Stripping build tools..."
|
||||
local file
|
||||
while read -rd '' file; do
|
||||
case "$(file -bi "$file")" in
|
||||
application/x-sharedlib\;*) # Libraries (.so)
|
||||
strip -v $STRIP_SHARED "$file" ;;
|
||||
application/x-archive\;*) # Libraries (.a)
|
||||
strip -v $STRIP_STATIC "$file" ;;
|
||||
application/x-executable\;*) # Binaries
|
||||
strip -v $STRIP_BINARIES "$file" ;;
|
||||
application/x-pie-executable\;*) # Relocatable binaries
|
||||
strip -v $STRIP_SHARED "$file" ;;
|
||||
esac
|
||||
/usr/bin/strip ${_strip} "${_binary}"
|
||||
done < <(find "${_builddir}/scripts" -type f -perm -u+w -print0 2>/dev/null)
|
||||
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
|
||||
|
||||
echo "Adding symlink..."
|
||||
mkdir -p "$pkgdir/usr/src"
|
||||
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
|
||||
}
|
||||
|
||||
_package-chromebook() {
|
||||
|
@ -225,11 +232,28 @@ _package-chromebook() {
|
|||
cd ${_srcname}
|
||||
|
||||
mkdir -p "${pkgdir}/boot"
|
||||
cp ../kernel.its .
|
||||
|
||||
KARCH=arm64
|
||||
image=arch/${KARCH}/boot/Image
|
||||
|
||||
chromeos_boards=(
|
||||
'elm'
|
||||
'gru'
|
||||
'kukui'
|
||||
'trogdor'
|
||||
'asurada'
|
||||
)
|
||||
chromebook_dtbs=($(for b in ${chromeos_boards[@]}; do find arch/${KARCH}/boot -name "*${b}*.dtb" | LC_COLLATE=C sort; done))
|
||||
|
||||
for to_compress in ${chromebook_dtbs[@]} ${image}; do
|
||||
#lzma -9 -z -f -k ${to_compress} # This is 40% smaller but takes ~1 sec longer to boot
|
||||
lz4 -20 -z -f ${to_compress}
|
||||
done
|
||||
echo ${chromebook_dtbs[@]/%/.lz4} | ../generate_chromebook_its.sh ${image}.lz4 ${KARCH} lz4 > kernel.its
|
||||
|
||||
mkimage -D "-I dts -O dtb -p 2048" -f kernel.its vmlinux.uimg
|
||||
dd if=/dev/zero of=bootloader.bin bs=512 count=1
|
||||
echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline
|
||||
echo "console=tty0 console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 console=ttyMSM0,115200n8 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd" > cmdline
|
||||
vbutil_kernel \
|
||||
--pack vmlinux.kpart \
|
||||
--version 1 \
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
description = "Chrome OS kernel image with one or more FDT blobs";
|
||||
images {
|
||||
kernel {
|
||||
description = "kernel";
|
||||
data = /incbin/("arch/arm64/boot/Image");
|
||||
type = "kernel_noload";
|
||||
arch = "arm64";
|
||||
os = "linux";
|
||||
compression = "none";
|
||||
load = <0>;
|
||||
entry = <0>;
|
||||
};
|
||||
fdt-bob {
|
||||
description = "rk3399-gru-bob.dtb";
|
||||
data = /incbin/("arch/arm64/boot/dts/rockchip/rk3399-gru-bob.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm64";
|
||||
compression = "none";
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
fdt-kevin {
|
||||
description = "rk3399-gru-kevin.dtb";
|
||||
data = /incbin/("arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm64";
|
||||
compression = "none";
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
};
|
||||
configurations {
|
||||
default = "conf-bob";
|
||||
conf-bob {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-bob";
|
||||
};
|
||||
conf-kevin {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-kevin";
|
||||
};
|
||||
};
|
||||
};
|
Loading…
Reference in a new issue