iglunix/linux/raspberrypi-linux/build.sh

51 lines
1.6 KiB
Bash
Raw Normal View History

2021-09-11 08:24:20 +00:00
pkgver=1.20210303-1
2021-06-19 14:02:01 +00:00
pkgname=raspberrypi-linux
ext="dev"
fetch() {
curl "https://raw.githubusercontent.com/kisslinux/website/master/site/dist/kernel-no-perl.patch" -o kernel-no-perl.patch
2021-09-11 08:24:20 +00:00
curl -L "https://github.com/raspberrypi/linux/archive/refs/tags/raspberrypi-kernel_$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz
2021-06-19 14:02:01 +00:00
tar -xf $pkgname-$pkgver.tar.gz
2021-09-11 08:24:20 +00:00
mv linux-raspberrypi-kernel_$pkgver $pkgname-$pkgver
2021-06-19 14:02:01 +00:00
cd $pkgname-$pkgver
patch -p1 < ../kernel-no-perl.patch
patch -p1 < ../../kernel-byacc.patch
2021-09-11 08:24:20 +00:00
# patch -p1 < ../../reflex.patch
2021-06-19 14:02:01 +00:00
}
build() {
cd $pkgname-$pkgver
2021-09-11 08:24:20 +00:00
gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 bcm2711_defconfig
gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1
2021-06-19 14:02:01 +00:00
}
package() {
cd $pkgname-$pkgver
install -d $pkgdir/boot
2021-06-24 21:10:19 +00:00
cp arch/arm64/boot/Image $pkgdir/boot/kernel8.img
2021-09-11 08:24:20 +00:00
gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_PATH=$pkgdir/boot install
gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_DTBS_PATH=$pkgdir/boot dtbs_install
gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_MOD_PATH=$pkgdir/ modules_install
mv $pkgdir/boot/broadcom/* $pkgdir/boot/
rmdir $pkgdir/boot/broadcom
2021-06-19 14:02:01 +00:00
}
package_dev() {
cd $pkgname-$pkgver
if stat /usr/bin/rsync 2>/dev/null /dev/null; then
2021-09-11 08:24:20 +00:00
gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 INSTALL_HDR_PATH=$pkgdir/usr headers_install
2021-06-19 14:02:01 +00:00
else
2021-09-11 08:24:20 +00:00
gmake ARCH=arm64 CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 headers
2021-06-19 14:02:01 +00:00
find -name '.*' -exec rm {} \;
rm usr/include/Makefile
cp -r usr/include $pkgdir/usr
fi
}
license() {
cd $pkgname-$pkgver
cat COPYING
}