mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 07:33:48 +02:00
linux4.4: add ppc64 and ppc support
This commit is contained in:
parent
5a9e97ca76
commit
883f868a69
3 changed files with 13955 additions and 9 deletions
6326
srcpkgs/linux4.4/files/ppc-dotconfig
Normal file
6326
srcpkgs/linux4.4/files/ppc-dotconfig
Normal file
File diff suppressed because it is too large
Load diff
7601
srcpkgs/linux4.4/files/ppc64-dotconfig
Normal file
7601
srcpkgs/linux4.4/files/ppc64-dotconfig
Normal file
File diff suppressed because it is too large
Load diff
|
@ -17,9 +17,13 @@ noverifyrdeps=yes
|
||||||
noshlibprovides=yes
|
noshlibprovides=yes
|
||||||
preserve=yes
|
preserve=yes
|
||||||
|
|
||||||
archs="i686* x86_64* armv7l* aarch64*"
|
archs="i686* x86_64* armv7l* aarch64* ppc*"
|
||||||
hostmakedepends="bc perl kmod uboot-mkimage libressl-devel"
|
hostmakedepends="bc perl kmod uboot-mkimage libressl-devel"
|
||||||
|
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
ppc64le*) broken="No ppc64le support";;
|
||||||
|
esac
|
||||||
|
|
||||||
triggers="kernel-hooks"
|
triggers="kernel-hooks"
|
||||||
_kernver="${version}_${revision}"
|
_kernver="${version}_${revision}"
|
||||||
|
|
||||||
|
@ -39,7 +43,7 @@ do_configure() {
|
||||||
# If there's a file called <arch>-dotconfig, use it to
|
# If there's a file called <arch>-dotconfig, use it to
|
||||||
# configure the kernel; otherwise use arch defaults and all stuff
|
# configure the kernel; otherwise use arch defaults and all stuff
|
||||||
# as modules (defconfig+allmodconfig).
|
# as modules (defconfig+allmodconfig).
|
||||||
local arch _args
|
local arch subarch _args
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
i686*) arch=i386;;
|
i686*) arch=i386;;
|
||||||
|
@ -50,19 +54,25 @@ do_configure() {
|
||||||
patch -Np1 -i patch-${version}-armv7-x16.diff
|
patch -Np1 -i patch-${version}-armv7-x16.diff
|
||||||
;;
|
;;
|
||||||
aarch64*) arch=arm64;;
|
aarch64*) arch=arm64;;
|
||||||
|
ppc64*) arch=powerpc; subarch=ppc64;;
|
||||||
|
ppc*) arch=powerpc;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
_args="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
|
_args="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
|
||||||
fi
|
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"
|
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
|
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"
|
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"
|
||||||
|
cp -f ${FILESDIR}/${XBPS_TARGET_MACHINE%%-musl}-dotconfig .config
|
||||||
make ${makejobs} ARCH=$arch ${_args} oldconfig
|
make ${makejobs} ARCH=$arch ${_args} oldconfig
|
||||||
else
|
else
|
||||||
msg_normal "Defaulting to 'defconfig and allmodconfig'.\n"
|
msg_normal "Defaulting to 'defconfig and allmodconfig'.\n"
|
||||||
|
@ -80,6 +90,7 @@ do_build() {
|
||||||
x86_64*) _args="bzImage modules"; arch=x86_64;;
|
x86_64*) _args="bzImage modules"; arch=x86_64;;
|
||||||
armv7*) _args="zImage modules dtbs"; arch=arm;;
|
armv7*) _args="zImage modules dtbs"; arch=arm;;
|
||||||
aarch64*) _args="Image modules dtbs"; arch=arm64;;
|
aarch64*) _args="Image modules dtbs"; arch=arm64;;
|
||||||
|
ppc*) _args="zImage modules"; arch=powerpc;;
|
||||||
esac
|
esac
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
_cross="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
|
_cross="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
|
||||||
|
@ -97,6 +108,7 @@ do_install() {
|
||||||
x86_64*) arch=x86; subarch=x86_64;;
|
x86_64*) arch=x86; subarch=x86_64;;
|
||||||
armv7*) arch=arm;;
|
armv7*) arch=arm;;
|
||||||
aarch64*) arch=arm64;;
|
aarch64*) arch=arm64;;
|
||||||
|
ppc*) arch=powerpc;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Run depmod after compressing modules.
|
# Run depmod after compressing modules.
|
||||||
|
@ -124,6 +136,12 @@ do_install() {
|
||||||
# vmkdir boot/dtbs
|
# vmkdir boot/dtbs
|
||||||
# cp arch/arm64/boot/dts/*.dtb ${DESTDIR}/boot/dtbs
|
# cp arch/arm64/boot/dts/*.dtb ${DESTDIR}/boot/dtbs
|
||||||
;;
|
;;
|
||||||
|
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
|
esac
|
||||||
|
|
||||||
# Switch to /usr.
|
# Switch to /usr.
|
||||||
|
@ -237,11 +255,12 @@ do_install() {
|
||||||
|
|
||||||
# Remove unneeded architectures
|
# Remove unneeded architectures
|
||||||
case "$arch" in
|
case "$arch" in
|
||||||
i386|x86_64) _args="arm*";;
|
i386|x86_64) _args="arm* p*";;
|
||||||
arm|arm64) _args="x86*";;
|
arm|arm64) _args="x86* p*";;
|
||||||
|
powerpc) _args="arm* x86* parisc";;
|
||||||
esac
|
esac
|
||||||
for arch in alpha avr32 blackfin cris frv h8300 \
|
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}
|
rm -rf ${hdrdest}/arch/${arch}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue