linux4.20: add support for ppc64 targets
[ci skip]
This commit is contained in:
parent
fb3d2b5843
commit
950a06f625
3 changed files with 17250 additions and 9 deletions
8662
srcpkgs/linux4.20/files/ppc64-dotconfig
Normal file
8662
srcpkgs/linux4.20/files/ppc64-dotconfig
Normal file
File diff suppressed because it is too large
Load diff
8568
srcpkgs/linux4.20/files/ppc64le-dotconfig
Normal file
8568
srcpkgs/linux4.20/files/ppc64le-dotconfig
Normal file
File diff suppressed because it is too large
Load diff
|
@ -17,7 +17,7 @@ noverifyrdeps=yes
|
|||
noshlibprovides=yes
|
||||
preserve=yes
|
||||
|
||||
only_for_archs="i686 i686-musl x86_64 x86_64-musl armv5tel armv5tel-musl armv6l armv6l-musl armv7l armv7l-musl aarch64 aarch64-musl"
|
||||
only_for_archs="i686 i686-musl x86_64 x86_64-musl armv5tel armv5tel-musl armv6l armv6l-musl armv7l armv7l-musl aarch64 aarch64-musl ppc64le ppc64le-musl ppc64-musl"
|
||||
hostmakedepends="bc elfutils-devel flex gmp-devel kmod libmpc-devel libressl-devel perl uboot-mkimage"
|
||||
|
||||
_kernver="${version}_${revision}"
|
||||
|
@ -43,26 +43,28 @@ do_configure() {
|
|||
# If there's a file called <arch>-dotconfig, use it to
|
||||
# configure the kernel; otherwise use arch defaults and all stuff
|
||||
# as modules (defconfig+allmodconfig).
|
||||
local arch _args
|
||||
local arch subarch _args
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
i686*) arch=i386;;
|
||||
x86_64*) arch=x86_64;;
|
||||
arm*) arch=arm;;
|
||||
aarch64*) arch=arm64;;
|
||||
ppc64le*) arch=powerpc; subarch=ppc64le;;
|
||||
ppc64*) arch=powerpc; subarch=ppc64;;
|
||||
esac
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
_args="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
|
||||
fi
|
||||
|
||||
if [ -f ${FILESDIR}/${arch}-dotconfig-custom ]; then
|
||||
if [ -f ${FILESDIR}/${subarch:-$arch}-dotconfig-custom ]; then
|
||||
msg_normal "Detected a custom .config file for your arch, using it.\n"
|
||||
cp -f ${FILESDIR}/${arch}-dotconfig-custom .config
|
||||
cp -f ${FILESDIR}/${subarch:-$arch}-dotconfig-custom .config
|
||||
make ${makejobs} ARCH=$arch ${_args} oldconfig
|
||||
elif [ -f ${FILESDIR}/${arch}-dotconfig ]; then
|
||||
elif [ -f ${FILESDIR}/${subarch:-$arch}-dotconfig ]; then
|
||||
msg_normal "Detected a .config file for your arch, using it.\n"
|
||||
cp -f ${FILESDIR}/${arch}-dotconfig .config
|
||||
cp -f ${FILESDIR}/${subarch:-$arch}-dotconfig .config
|
||||
make ${makejobs} ARCH=$arch ${_args} oldconfig
|
||||
elif [ -f ${FILESDIR}/${XBPS_TARGET_MACHINE%%-musl}-dotconfig ]; then
|
||||
msg_normal "Detected a .config file for your cpu family, using it.\n"
|
||||
|
@ -84,6 +86,7 @@ do_build() {
|
|||
x86_64*) _args="bzImage modules"; arch=x86_64;;
|
||||
arm*) _args="zImage modules dtbs"; arch=arm;;
|
||||
aarch64*) _args="Image modules dtbs"; arch=arm64;;
|
||||
ppc64*) _args="zImage modules"; arch=powerpc;;
|
||||
esac
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
_cross="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
|
||||
|
@ -103,6 +106,7 @@ do_install() {
|
|||
x86_64*) arch=x86; subarch=x86_64;;
|
||||
arm*) arch=arm;;
|
||||
aarch64*) arch=arm64;;
|
||||
ppc64*) arch=powerpc;;
|
||||
esac
|
||||
|
||||
# Run depmod after compressing modules.
|
||||
|
@ -128,6 +132,12 @@ do_install() {
|
|||
vinstall arch/arm64/boot/Image 644 boot vmlinux-${_kernver}
|
||||
make ${makejobs} ARCH=${subarch:-$arch} INSTALL_DTBS_PATH=${DESTDIR}/boot/dtbs/dtbs-${_kernver} dtbs_install
|
||||
;;
|
||||
powerpc)
|
||||
# zImage on powerpc is useless as it won't load initramfs
|
||||
# raw vmlinux is huge, and this is nostrip, so do it manually
|
||||
vinstall vmlinux 644 boot vmlinux-${_kernver}
|
||||
/usr/bin/$STRIP ${DESTDIR}/boot/vmlinux-${_kernver}
|
||||
;;
|
||||
esac
|
||||
|
||||
# Switch to /usr.
|
||||
|
@ -247,11 +257,12 @@ do_install() {
|
|||
|
||||
# Remove unneeded architectures
|
||||
case "$arch" in
|
||||
i386|x86_64) _args="arm*";;
|
||||
arm|arm64) _args="x86*";;
|
||||
i386|x86_64) _args="arm* p*";;
|
||||
arm|arm64) _args="x86* p*";;
|
||||
powerpc) _args="arm* x86* parisc";;
|
||||
esac
|
||||
for arch in alpha avr32 blackfin cris frv h8300 \
|
||||
ia64 m* p* s* um v850 xtensa ${_args}; do
|
||||
ia64 m* s* um v850 xtensa ${_args}; do
|
||||
rm -rf ${hdrdest}/arch/${arch}
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue