Skip to content

Commit

Permalink
qoriq: new target
Browse files Browse the repository at this point in the history
Add a new target named "qoriq", that will support boards using PowerPC
processors from NXP's QorIQ brand.

This doesn't actually add support for any board yet, so that
installation instructions can go in the commit message of the commit
that adds actual support for a board.

Using CONFIG_E6500_CPU here due to the kernel using -mcpu=powerpc64
rather than -mcpu=e5500 when selecting CONFIG_E5500_CPU. The only
difference between e5500 and e6500 is AltiVec support, and the kernel
checks for it at runtime. Musl will only check at runtime if AltiVec
support is disabled at compile-time, so we need to use e5500 in CPU_TYPE
to avoid SIGILL.

Math emulation (CONFIG_MATH_EMULATION_HW_UNIMPLEMENTED) is required, as
neither e5500 nor e6500 implement fsqrt nor fsqrts, and musl hardcodes
sqrt and sqrtf to use these ASM instructions on PowerPC64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Reviewed-by: Rui Salvaterra <rsalvaterra@gmail.com>
  • Loading branch information
stintel committed Dec 21, 2021
1 parent 052e31e commit 080a769
Show file tree
Hide file tree
Showing 6 changed files with 453 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package/kernel/linux/modules/other.mk
Expand Up @@ -992,7 +992,7 @@ $(eval $(call KernelPackage,ptp))
define KernelPackage/ptp-qoriq
SUBMENU:=$(OTHER_MENU)
TITLE:=Freescale QorIQ PTP support
DEPENDS:=@TARGET_mpc85xx +kmod-ptp
DEPENDS:=@(TARGET_mpc85xx||TARGET_qoriq) +kmod-ptp
KCONFIG:=CONFIG_PTP_1588_CLOCK_QORIQ
FILES:=$(LINUX_DIR)/drivers/ptp/ptp-qoriq.ko
AUTOLOAD:=$(call AutoProbe,ptp-qoriq)
Expand Down
22 changes: 22 additions & 0 deletions target/linux/qoriq/Makefile
@@ -0,0 +1,22 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2021 Stijn Tintel <stijn@linux-ipv6.be>

include $(TOPDIR)/rules.mk

ARCH:=powerpc64
BOARD:=qoriq
BOARDNAME:=NXP QorIQ (PowerPC)
CPU_TYPE:=e5500
FEATURES:=boot-part ext4 fpu legacy-sdcard powerpc64 ramdisk root-part rtc source-only
SUBTARGETS:=generic

KERNEL_PATCHVER:=5.10

KERNELNAME:=zImage

include $(INCLUDE_DIR)/target.mk

DEFAULT_PACKAGES += e2fsprogs mkf2fs uboot-envtools

$(eval $(call BuildTarget))

0 comments on commit 080a769

Please sign in to comment.