linux4.9: add ppc64 and ppc support
This commit is contained in:
parent
a60bfaccce
commit
5a9e97ca76
3 changed files with 14679 additions and 9 deletions
6602
srcpkgs/linux4.9/files/ppc-dotconfig
Normal file
6602
srcpkgs/linux4.9/files/ppc-dotconfig
Normal file
File diff suppressed because it is too large
Load diff
8049
srcpkgs/linux4.9/files/ppc64-dotconfig
Normal file
8049
srcpkgs/linux4.9/files/ppc64-dotconfig
Normal file
File diff suppressed because it is too large
Load diff
|
@ -17,9 +17,13 @@ noverifyrdeps=yes
|
|||
noshlibprovides=yes
|
||||
preserve=yes
|
||||
|
||||
archs="i686* x86_64* armv7l* aarch64*"
|
||||
archs="i686* x86_64* armv7l* aarch64* ppc*"
|
||||
hostmakedepends="bc perl kmod uboot-mkimage libressl-devel"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64le*) broken="No ppc64le support";;
|
||||
esac
|
||||
|
||||
_kernver="${version}_${revision}"
|
||||
triggers="kernel-hooks"
|
||||
kernel_hooks_version="${_kernver}"
|
||||
|
@ -39,26 +43,32 @@ 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;;
|
||||
armv7*) arch=arm;;
|
||||
aarch64*) arch=arm64;;
|
||||
ppc64*) arch=powerpc; subarch=ppc64;;
|
||||
ppc*) arch=powerpc;;
|
||||
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"
|
||||
cp -f ${FILESDIR}/${XBPS_TARGET_MACHINE%%-musl}-dotconfig .config
|
||||
make ${makejobs} ARCH=$arch ${_args} oldconfig
|
||||
else
|
||||
msg_normal "Defaulting to 'defconfig and allmodconfig'.\n"
|
||||
|
@ -76,6 +86,7 @@ do_build() {
|
|||
x86_64*) _args="bzImage modules"; arch=x86_64;;
|
||||
armv7*) _args="zImage modules dtbs"; arch=arm;;
|
||||
aarch64*) _args="Image modules dtbs"; arch=arm64;;
|
||||
ppc*) _args="zImage modules"; arch=powerpc;;
|
||||
esac
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
_cross="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
|
||||
|
@ -95,6 +106,7 @@ do_install() {
|
|||
x86_64*) arch=x86; subarch=x86_64;;
|
||||
armv7*) arch=arm;;
|
||||
aarch64*) arch=arm64;;
|
||||
ppc*) arch=powerpc;;
|
||||
esac
|
||||
|
||||
# Run depmod after compressing modules.
|
||||
|
@ -122,6 +134,12 @@ do_install() {
|
|||
vmkdir 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
|
||||
|
||||
# Switch to /usr.
|
||||
|
@ -235,11 +253,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