linux: bump ver and use new corss utils
This commit is contained in:
parent
c10ccb744d
commit
cff05c4fa6
1 changed files with 29 additions and 25 deletions
|
@ -1,55 +1,59 @@
|
|||
pkgver=5.15
|
||||
pkgver=5.17.2
|
||||
pkgname=linux
|
||||
pkgrel=1
|
||||
ext="dev"
|
||||
|
||||
fetch() {
|
||||
return
|
||||
# curl "https://raw.githubusercontent.com/kisslinux/website/master/site/dist/kernel-no-perl.patch" -o kernel-no-perl.patch
|
||||
curl "https://cdn.kernel.org/pub/linux/kernel/v5.x/$pkgname-$pkgver.tar.xz" -o $pkgname-$pkgver.tar.xz
|
||||
tar -xf $pkgname-$pkgver.tar.xz
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
# use Alpine's kernel config so we don't have to maintain one
|
||||
# curl "https://git.alpinelinux.org/aports/plain/community/linux-edge/config-edge.$(uname -m)" -o .config
|
||||
# patch -p1 < ../kernel-no-perl.patch
|
||||
patch -p1 < ../../kernel-byacc.patch
|
||||
patch -p1 < ../../v3d-enable.patch
|
||||
# patch -p1 < ../../reflex.patch
|
||||
curl "https://git.alpinelinux.org/aports/plain/community/linux-edge/config-edge.$(uname -m)" -o .config
|
||||
}
|
||||
|
||||
_arch=$ARCH
|
||||
case $_arch in
|
||||
aarch64*) _arch="arm64" ;;
|
||||
riscv64*) _arch="riscv" ;;
|
||||
ppc64le*) _arch="powerpc" ;;
|
||||
esac
|
||||
|
||||
if [ ! -z "$WITH_CROSS" ]; then
|
||||
export CROSS_COMPILE=$WITH_CROSS-linux-musl
|
||||
fi
|
||||
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
return
|
||||
bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch defconfig
|
||||
bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch localmodconfig
|
||||
# gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 menuconfig
|
||||
# cp .config ../../$(uname -m).config.new
|
||||
bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch olddefconfig
|
||||
sed -i 's/CONFIG_UNWINDER_ORC=y/# CONFIG_UNWINDER_ORC is not set/g' .config
|
||||
sed -i 's/# CONFIG_UNWINDER_FRAME_POINTER is not set/CONFIG_UNWINDER_FRAME_POINTER=y/g' .config
|
||||
bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch
|
||||
|
||||
if [ -z "$FOR_CROSS" ]; then
|
||||
bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch
|
||||
fi
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
install -d $pkgdir/boot
|
||||
bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install
|
||||
bad --gmake gmake CC=cc HOSTCC=cc LEX=flex YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_DTBS_PATH=$pkgdir/boot dtbs_install
|
||||
bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install
|
||||
|
||||
if stat /usr/bin/rsync 2>/dev/null /dev/null; then
|
||||
bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch INSTALL_HDR_PATH=$pkgdir/usr headers_install
|
||||
else
|
||||
bad --gmake gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 ARCH=$_arch headers
|
||||
find -name '.*' -exec rm {} \;
|
||||
rm usr/include/Makefile
|
||||
if [ -z "$FOR_CROSS" ]; then
|
||||
install -d $pkgdir/boot
|
||||
bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_PATH=$pkgdir/boot install
|
||||
set +e # depmod causes errors
|
||||
bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch INSTALL_MOD_PATH=$pkgdir/ modules_install
|
||||
set -e
|
||||
fi
|
||||
|
||||
bad --gmake gmake CC=cc HOSTCC=cc YACC=yacc LLVM=1 LLVM_IAS=1 ARCH=$_arch headers
|
||||
find -name '.*' -exec rm {} \;
|
||||
rm -f usr/include/Makefile
|
||||
if [ -z "$FOR_CROSS" ]; then
|
||||
install -d $pkgdir/usr/
|
||||
cp -r usr/include $pkgdir/usr/
|
||||
else
|
||||
install -d $pkgdir/usr/$FOR_CROSS_DIR
|
||||
cp -r usr/include $pkgdir/$FOR_CROSS_DIR
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue