[PATCH 5/6] qoriq: new target

Stijn Tintel stijn at linux-ipv6.be
Sun Aug 22 07:35:50 PDT 2021


On 22/08/2021 16:07, Hauke Mehrtens wrote:
> On 8/22/21 1:15 AM, Stijn Tintel wrote:
>> 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.
>>
>> Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
>> ---
>>   target/linux/qoriq/Makefile          |  21 ++
>>   target/linux/qoriq/config-5.10       | 414 +++++++++++++++++++++++++++
>>   target/linux/qoriq/generic/target.mk |   3 +
>>   target/linux/qoriq/image/Makefile    |  34 +++
>>   target/linux/qoriq/image/generic.mk  |   0
>>   5 files changed, 472 insertions(+)
>>   create mode 100644 target/linux/qoriq/Makefile
>>   create mode 100644 target/linux/qoriq/config-5.10
>>   create mode 100644 target/linux/qoriq/generic/target.mk
>>   create mode 100644 target/linux/qoriq/image/Makefile
>>   create mode 100644 target/linux/qoriq/image/generic.mk
>>
>> diff --git a/target/linux/qoriq/Makefile b/target/linux/qoriq/Makefile
>> new file mode 100644
>> index 0000000000..d9a9f4d226
>> --- /dev/null
>> +++ b/target/linux/qoriq/Makefile
>> @@ -0,0 +1,21 @@
>> +# SPDX-License-Identifier: GPL-2.0-only
>> +#
>> +# Copyright (C) 2021 Stijn Tintel <stijn at linux-ipv6.be>
>> +
>> +include $(TOPDIR)/rules.mk
>> +
>> +ARCH:=powerpc64
>> +BOARD:=qoriq
>> +BOARDNAME:=NXP QorIQ (PowerPC)
>> +CPU_TYPE:=e6500
>> +FEATURES:=boot-part ext4 fpu legacy-sdcard powerpc64 ramdisk
>> root-part rtc source-only
>> +SUBTARGETS:=generic
>> +
>> +KERNEL_PATCHVER:=5.10
>> +KERNEL_TESTING_PATCHVER:=5.10
>> +
>> +KERNELNAME:=zImage
>> +
>> +include $(INCLUDE_DIR)/target.mk
>> +
>> +$(eval $(call BuildTarget))
>> diff --git a/target/linux/qoriq/config-5.10
>> b/target/linux/qoriq/config-5.10
>> new file mode 100644
>> index 0000000000..d9d7e9bcf4
>> --- /dev/null
>> +++ b/target/linux/qoriq/config-5.10
>> @@ -0,0 +1,414 @@
> ....
>> +CONFIG_ASN1=y
>
> Why do you need CONFIG_ASN1?
Selected by [y]:                 

  - CRYPTO_RSA [=y] && CRYPTO [=y]

CRYPTO_RSA is selected by one of the CAAM symbols below.

>
> ....
>> +CONFIG_CRYPTO_AUTHENC=y
>> +CONFIG_CRYPTO_CRC32C=y
>> +# CONFIG_CRYPTO_CRC32C_VPMSUM is not set
>> +CONFIG_CRYPTO_DES=y
>> +CONFIG_CRYPTO_DEV_FSL_CAAM=y
>> +CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
>> +CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC=y
>> +CONFIG_CRYPTO_DEV_FSL_CAAM_COMMON=y
>> +CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
>> +CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC=y
>> +CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI=y
>> +# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
>> +# CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
>> +CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
>> +CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
>> +CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
>> +CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
>> +# CONFIG_CRYPTO_DEV_NX is not set
>> +CONFIG_CRYPTO_ECB=y
>> +CONFIG_CRYPTO_ENGINE=y
>> +CONFIG_CRYPTO_GF128MUL=y
>> +CONFIG_CRYPTO_HW=y
>> +CONFIG_CRYPTO_LIB_DES=y
>> +CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
>> +# CONFIG_CRYPTO_MD5_PPC is not set
>> +CONFIG_CRYPTO_NULL2=y
>> +CONFIG_CRYPTO_RNG=y
>> +CONFIG_CRYPTO_RNG2=y
>> +CONFIG_CRYPTO_RSA=y
>> +# CONFIG_CRYPTO_SHA1_PPC is not set
>> +CONFIG_CRYPTO_XTS=y
>
> Do you need all this crypto stuff com,piled in or is a module also
> sufficent?

We don't have kmod packages for FSL CAAM, and as they are rather target
specific, I don't want to add those. The other CRYPTO_* symbols are
enabled as dependencies of the CONFIG_CRYPTO_DEV_FSL_CAAM_* symbols.
This is also consistent with how it's done for the imx6 target.


>
> ....
>> +CONFIG_EXT4_FS=y
>> +CONFIG_EXT4_FS_POSIX_ACL=y
>> +CONFIG_EXT4_FS_SECURITY=y
>
> CONFIG_EXT4_FS_SECURITY is normally activated by
> KERNEL_EXT4_FS_SECURITY in OpenWrt.
Disabled.
>
> ....
>> +CONFIG_GCC_PLUGINS=y
>
> Why do you activate CONFIG_GCC_PLUGINS ?
This must be a leftover from starting this at the time 5.10 kernel was
not supported in OpenWrt yet. The generic 5.4 config also has this
enabled. I'll remove it from the target config.
>
>> +# CONFIG_GCC_PLUGIN_CYC_COMPLEXITY is not set
>> +# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set
>> +# CONFIG_GCC_PLUGIN_RANDSTRUCT is not set
>> +# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set
>> +# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is not set
>> +# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set
> ....
>> +# CONFIG_HANGCHECK_TIMER is not set
>> +# CONFIG_HARDENED_USERCOPY is not set
>
> CONFIG_HARDENED_USERCOPY should only cause crashes when it detects a
> buffer overflow. Do you have more details about the crashes?
Looks like cannot reproduce that now. I've enabled it again.
>
> ....
>> +CONFIG_KGDB=y
>
> Is KGDB needed in the default kernel config?
Enabled a bunch of debugging related symbols in an attempt to find the
random crashes caused by CONFIG_THREAD_SHIFT=13. Removed, together with
a bunch of other debugging options I enabled for the same purpose.
>
>> +CONFIG_KGDB_HONOUR_BLOCKLIST=y
>> +# CONFIG_KGDB_KDB is not set
>> +CONFIG_KGDB_SERIAL_CONSOLE=y
>> +# CONFIG_KGDB_TESTS is not set
> ....
>> +CONFIG_PTP_1588_CLOCK=y
>> +CONFIG_PTP_1588_CLOCK_QORIQ=y
>
> We also have kmod-ptp-qoriq
Disabled and replaced by dependency to the kmod package. On the other
hand, there is also a kmod-ptp module, yet CONFIG_PTP_1588_CLOCK=y in
many target configs.

Thanks for your quick review, Hauke, really appreciate it!

Stijn




More information about the openwrt-devel mailing list