diff mbox series

[5/6] qoriq: new target

Message ID 20210821231513.90996-6-stijn@linux-ipv6.be
State Changes Requested
Delegated to: Stijn Tintel
Headers show
Series qoriq: new target | expand

Commit Message

Stijn Tintel Aug. 21, 2021, 11:15 p.m. UTC
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@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

Comments

Hauke Mehrtens Aug. 22, 2021, 1:07 p.m. UTC | #1
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@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@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?

....
> +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?

....
> +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.

....
> +CONFIG_GCC_PLUGINS=y

Why do you activate CONFIG_GCC_PLUGINS ?

> +# 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?

....
> +CONFIG_KGDB=y

Is KGDB needed in the default kernel config?

> +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

....

Hauke
Stijn Tintel Aug. 22, 2021, 2:35 p.m. UTC | #2
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@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@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
Stijn Tintel Aug. 22, 2021, 4:01 p.m. UTC | #3
On 22/08/2021 17:35, Stijn Tintel wrote:
> 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@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@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.
>
And of course, when flashing the image with CONFIG_HARDENED_USERCOPY to
my main router, I do hit it, so I'll be disabling it again for now.

[   26.333649] usercopy: Kernel memory overwrite attempt detected to
SLUB object not in SLUB page?! (offset 0, size 8)!
[   26.344273] ------------[ cut here ]------------
[   26.348908] Kernel BUG at .usercopy_abort+0x94/0x9c [verbose debug
info unavailable]
[   26.356667] Oops: Exception in kernel mode, sig: 5 [#1]
[   26.361899] BE PAGE_SIZE=4K SMP NR_CPUS=24 CoreNet Generic
[   26.367387] Modules linked in: xt_connlimit pppoe ppp_async
nf_conncount l2tp_ppp iptable_nat cdc_mbim xt_state xt_nat xt_helper
xt_conntrack xt_connmark xt_connbytes xt_REDIRECT xt_MASQUERADE
xt_FLOWOFFLOAD xt_CT wireguard pppox ppp
_generic nft_redir nft_ct nf_nat_tftp nf_nat_snmp_basic nf_nat_sip
nf_nat_pptp nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda nf_nat
nf_flow_table nf_conntrack_tftp nf_conntrack_snmp nf_conntrack_sip
nf_conntrack_pptp nf_conntrack_netl
ink nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp
nf_conntrack_broadcast nf_conntrack_amanda nf_conntrack
libchacha20poly1305 libblake2s ipt_REJECT cdc_ncm cdc_ether xt_time
xt_tcpudp xt_tcpmss xt_string xt_statistic xt_recent xt_quota xt_policy
xt_pkttype xt_physdev xt_owner xt_multiport xt_mark xt_mac xt_limit
xt_length xt_hl xt_esp xt_ecn xt_dscp xt_comment xt_cgroup xt_bpf
xt_addrtype xt_TRACE xt_TCPMSS xt_NFQUEUE xt_LOG xt_HL xt_DSCP
xt_CLASSIFY xfrm_interface w83793 usbnet ts_kmp ts_fsm ts_bm slhc
sch_cake ptp_qoriq
[   26.367603]  nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet
nft_reject_bridge nft_reject nft_quota nft_objref nft_numgen
nft_meta_bridge nft_log nft_limit nft_hash nft_fwd_netdev nft_dup_netdev
nft_counter nfnetlink_queue nf_tables nf_reject_ipv4 nf_log_ipv4
nf_dup_netdev nf_defrag_ipv6 nf_defrag_ipv4 macvlan libpoly1305
libcurve25519_generic libcrc32c libchacha libblake2s_generic iptable_raw
iptable_mangle iptable_filter ipt_ah ipt_ECN ip6table_raw ip_tables
crc_ccitt cdc_wdm br_netfilter sch_tbf sch_ingress sch_htb sch_hfsc
em_u32 cls_u32 cls_tcindex cls_route cls_matchall cls_fw cls_flow
cls_basic act_skbedit act_mirred act_gact i2c_dev xt_set ip_set_list_set
ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet
ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac
ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport
ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac
ip_set_bitmap_ip ip_set nfnetlink nf_log_ipv6 nf_log_common ip6table_mangle
[   26.455354]  ip6table_filter ip6_tables ip6t_REJECT x_tables
nf_reject_ipv6 hwmon_vid ifb sit l2tp_netlink l2tp_core udp_tunnel
ip6_udp_tunnel ipcomp6 xfrm6_tunnel esp6 ah6 xfrm4_tunnel ipcomp esp4
ah4 netlink_diag tunnel6 tunnel4 ip_tunnel xfrm_user xfrm_ipcomp af_key
xfrm_algo crypto_user algif_skcipher algif_rng algif_hash algif_aead
af_alg sha512_generic sha256_generic libsha256 sha1_generic seqiv
jitterentropy_rng drbg md5 hmac echainiv deflate zlib_inflate cbc
crypto_acompress leds_gpio rtc_rs5c372 ehci_platform tpm_i2c_atmel
i2c_core ptp mii tpm
[   26.591596] CPU: 5 PID: 5633 Comm: fw3 Not tainted 5.10.60 #0
[   26.597357] NIP:  c000000000203f38 LR: c000000000203f34 CTR:
c000000000038560
[   26.604503] REGS: c00000008d9c3550 TRAP: 0700   Not tainted  (5.10.60)
[   26.611035] MSR:  0000000080029002 <CE,EE,ME>  CR: 28004248  XER:
20000000
[   26.617924] IRQMASK: 0
[   26.617924] GPR00: c000000000203f34 c00000008d9c37e0 c000000000c6d400
0000000000000068
[   26.617924] GPR04: c0000000ffea0678 c0000000ffea5f40 0000000000000027
c0000000ffea0680
[   26.617924] GPR08: 0000000000000023 0000000000000000 0000000000000000
0000000000000001
[   26.617924] GPR12: 0000000024004448 c00000003fffdc40 0000000000000000
0000000000000000
[   26.617924] GPR16: 0000000000000000 0000000000000000 00003fff9d113880
00003fff9d20bb80
[   26.617924] GPR20: 0000000017c8a640 00003fff9d1137e0 0000000000000009
0000000000000001
[   26.617924] GPR24: 0000000000000000 00003ffff411d430 c0000000831b64e0
0000000000000008
[   26.617924] GPR28: 8000000001000008 0000000000000000 0000000000000008
8000000001000000
[   26.684450] NIP [c000000000203f38] .usercopy_abort+0x94/0x9c
[   26.690109] LR [c000000000203f34] .usercopy_abort+0x90/0x9c
[   26.695679] Call Trace:
[   26.698122] [c00000008d9c37e0] [c000000000203f34]
.usercopy_abort+0x90/0x9c (unreliable)
[   26.706225] [c00000008d9c3860] [c0000000001f1820]
.__check_heap_object+0x170/0x190
[   26.713800] [c00000008d9c38d0] [c0000000002040c0]
.__check_object_size+0x180/0x1f0
[   26.721384] [c00000008d9c3960] [80000000004244f4]
.ip_set_sockfn_get+0xb4/0x380 [ip_set]
[   26.729482] [c00000008d9c3a10] [c000000000774b18]
.nf_getsockopt+0x78/0xf0
[   26.736368] [c00000008d9c3ab0] [c000000000788a3c]
.ip_getsockopt+0xcc/0x120
[   26.743340] [c00000008d9c3b50] [c0000000007c358c]
.raw_getsockopt+0x10c/0x1a0
[   26.750490] [c00000008d9c3be0] [c0000000006a0d1c]
.sock_common_getsockopt+0x2c/0x40
[   26.758152] [c00000008d9c3c50] [c00000000069f240]
.__sys_getsockopt+0xa0/0x220
[   26.765380] [c00000008d9c3d00] [c00000000069f3dc]
.__se_sys_getsockopt+0x1c/0x30
[   26.772784] [c00000008d9c3d70] [c00000000000fb5c]
.system_call_exception+0x11c/0x220
[   26.780534] [c00000008d9c3e20] [c000000000000678]
system_call_common+0xf8/0x200
[   26.787848] --- interrupt: c00 at 0x3fff9d25915c
[   26.787848]     LR = 0x100077e4
[   26.795592] Instruction dump:
[   26.798558] 392929d0 48000014 3d02ffd5 3908ee40 7d074378 7d094378
f8c10070 7c661b78
[   26.806319] 3c62ffd5 38639ae0 4be9abf5 60000000 <0fe00000> 60000000
3d22ffde 81298ab8
[   26.814258] ---[ end trace 70b7c82100ca71f1 ]---
diff mbox series

Patch

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@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_64BIT=y
+CONFIG_ALTIVEC=y
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
+CONFIG_ARCH_MMAP_RND_BITS=18
+CONFIG_ARCH_MMAP_RND_BITS_MAX=32
+CONFIG_ARCH_MMAP_RND_BITS_MIN=18
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=17
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_WEAK_RELEASE_ACQUIRE=y
+CONFIG_ASN1=y
+CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y
+CONFIG_AUDIT_ARCH=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BLK_PM=y
+CONFIG_BLK_SCSI_REQUEST=y
+CONFIG_BLOCK_COMPAT=y
+CONFIG_BOOKE=y
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLK_QORIQ=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CLZ_TAB=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMPAT=y
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_COMPAT_BINFMT_ELF=y
+CONFIG_COMPAT_NETLINK_MESSAGES=y
+CONFIG_COMPAT_OLD_SIGACTION=y
+CONFIG_CONSOLE_POLL=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CORENET_GENERIC=y
+# CONFIG_CPUFREQ_DT is not set
+CONFIG_CPU_BIG_ENDIAN=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_STAT is not set
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_TEO=y
+CONFIG_CPU_ISOLATION=y
+CONFIG_CPU_RMAP=y
+CONFIG_CRC16=y
+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
+CONFIG_DATA_SHIFT=12
+CONFIG_DEBUGGER=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_INFO_DWARF4=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_STACKOVERFLOW=y
+CONFIG_DEFAULT_UIMAGE=y
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
+CONFIG_DMA_OPS_BYPASS=y
+CONFIG_DTC=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_E500=y
+# CONFIG_E5500_CPU is not set
+CONFIG_E6500_CPU=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_EDAC=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+# CONFIG_EDAC_CPC925 is not set
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_LEGACY_SYSFS=y
+CONFIG_EDAC_MPC85XX=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EPAPR_PARAVIRT=y
+CONFIG_EXT4_FS=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
+CONFIG_FIXED_PHY=y
+CONFIG_FORCE_MAX_ZONEORDER=13
+# CONFIG_FSL_BMAN_TEST is not set
+CONFIG_FSL_CORENET_CF=y
+CONFIG_FSL_CORENET_RCPM=y
+CONFIG_FSL_DMA=y
+CONFIG_FSL_DPAA=y
+# CONFIG_FSL_DPAA_CHECKING is not set
+CONFIG_FSL_DPAA_ETH=y
+CONFIG_FSL_EMB_PERFMON=y
+# CONFIG_FSL_ENETC is not set
+# CONFIG_FSL_ENETC_MDIO is not set
+# CONFIG_FSL_ENETC_VF is not set
+CONFIG_FSL_FMAN=y
+CONFIG_FSL_GUTS=y
+CONFIG_FSL_IFC=y
+CONFIG_FSL_LBC=y
+CONFIG_FSL_MPIC_TIMER_WAKEUP=y
+CONFIG_FSL_PAMU=y
+CONFIG_FSL_PCI=y
+# CONFIG_FSL_QMAN_TEST is not set
+CONFIG_FSL_SOC=y
+CONFIG_FSL_SOC_BOOKE=y
+CONFIG_FSL_XGMAC_MDIO=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FTL=y
+CONFIG_FUNCTION_ERROR_INJECTION=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_GCC_PLUGINS=y
+# 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_GDB_SCRIPTS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+# CONFIG_GENERIC_CPU is not set
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+# CONFIG_GEN_RTC is not set
+# CONFIG_GIANFAR is not set
+CONFIG_GLOB=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_MPC8XXX=y
+CONFIG_GRO_CELLS=y
+# CONFIG_HANGCHECK_TIMER is not set
+# CONFIG_HARDENED_USERCOPY is not set
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HWMON=y
+CONFIG_HW_CONSOLE=y
+CONFIG_HW_RANDOM=y
+CONFIG_HZ_PERIODIC=y
+CONFIG_ILLEGAL_POINTER_VALUE=0x5deadbeef0000000
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+CONFIG_IOMMU_API=y
+# CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
+CONFIG_IOMMU_HELPER=y
+CONFIG_IOMMU_SUPPORT=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_ISA_DMA_API=y
+CONFIG_JBD2=y
+CONFIG_KALLSYMS=y
+CONFIG_KERNEL_GZIP=y
+CONFIG_KERNEL_START=0xc000000000000000
+CONFIG_KGDB=y
+CONFIG_KGDB_HONOUR_BLOCKLIST=y
+# CONFIG_KGDB_KDB is not set
+CONFIG_KGDB_SERIAL_CONSOLE=y
+# CONFIG_KGDB_TESTS is not set
+CONFIG_KPROBES=y
+CONFIG_KRETPROBES=y
+# CONFIG_LD_HEAD_STUB_CATCH is not set
+CONFIG_LIBFDT=y
+CONFIG_LLD_VERSION=0
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_MATH_EMULATION is not set
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MEMORY=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_DEBUG=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_IO_ACCESSORS=y
+CONFIG_MMC_SDHCI_OF_ESDHC=y
+# CONFIG_MMC_SDHCI_PCI is not set
+CONFIG_MMC_SDHCI_PLTFM=y
+# CONFIG_MMC_WBSD is not set
+CONFIG_MMIOWB=y
+CONFIG_MMU_GATHER_PAGE_SIZE=y
+CONFIG_MODULES_USE_ELF_RELA=y
+CONFIG_MPIC=y
+CONFIG_MPIC_MSGR=y
+CONFIG_MPIC_TIMER=y
+CONFIG_MPILIB=y
+CONFIG_MTD_NAND_CORE=y
+CONFIG_MTD_NAND_ECC=y
+CONFIG_MTD_NAND_ECC_SW_HAMMING=y
+CONFIG_MTD_NAND_FSL_IFC=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_RAW_NAND=y
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
+CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
+CONFIG_NEED_SG_DMA_LENGTH=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+# CONFIG_NET_DSA_MSCC_FELIX is not set
+CONFIG_NET_DSA_MV88E6XXX=y
+CONFIG_NET_DSA_MV88E6XXX_GLOBAL2=y
+CONFIG_NET_DSA_MV88E6XXX_PTP=y
+CONFIG_NET_DSA_TAG_DSA=y
+CONFIG_NET_DSA_TAG_EDSA=y
+CONFIG_NET_DSA_TAG_OCELOT=y
+CONFIG_NET_DSA_TAG_TRAILER=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SWITCHDEV=y
+CONFIG_NLS=y
+CONFIG_NMI_IPI=y
+CONFIG_NR_CPUS=24
+CONFIG_NR_IRQS=512
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_DMA_DEFAULT_COHERENT=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IOMMU=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OF_NET=y
+CONFIG_OLD_SIGSUSPEND=y
+CONFIG_OPTPROBES=y
+CONFIG_PACKING=y
+CONFIG_PADATA=y
+CONFIG_PAGE_OFFSET=0xc000000000000000
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_ARCH_FALLBACKS=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
+CONFIG_PGTABLE_LEVELS=4
+CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
+CONFIG_PHYSICAL_START=0x00000000
+CONFIG_PHYS_64BIT=y
+CONFIG_PHYS_ADDR_T_64BIT=y
+CONFIG_PM=y
+# CONFIG_PMU_SYSFS is not set
+CONFIG_PM_CLK=y
+CONFIG_PPC=y
+CONFIG_PPC64=y
+CONFIG_PPC_ADV_DEBUG_DACS=2
+CONFIG_PPC_ADV_DEBUG_DVCS=0
+CONFIG_PPC_ADV_DEBUG_IACS=2
+CONFIG_PPC_ADV_DEBUG_REGS=y
+CONFIG_PPC_BARRIER_NOSPEC=y
+CONFIG_PPC_BOOK3E=y
+CONFIG_PPC_BOOK3E_64=y
+CONFIG_PPC_BOOK3E_MMU=y
+# CONFIG_PPC_BOOK3S_64 is not set
+CONFIG_PPC_DAWR=y
+CONFIG_PPC_DOORBELL=y
+CONFIG_PPC_E500MC=y
+# CONFIG_PPC_EARLY_DEBUG is not set
+CONFIG_PPC_EPAPR_HV_PIC=y
+CONFIG_PPC_FPU=y
+CONFIG_PPC_FSL_BOOK3E=y
+CONFIG_PPC_INDIRECT_PCI=y
+# CONFIG_PPC_IRQ_SOFT_MASK_DEBUG is not set
+CONFIG_PPC_MMU_NOHASH=y
+CONFIG_PPC_MSI_BITMAP=y
+CONFIG_PPC_OF_BOOT_TRAMPOLINE=y
+CONFIG_PPC_PAGE_SHIFT=12
+# CONFIG_PPC_PTDUMP is not set
+# CONFIG_PPC_QEMU_E500 is not set
+# CONFIG_PPC_QUEUED_SPINLOCKS is not set
+CONFIG_PPC_SMP_MUXED_IPI=y
+CONFIG_PPC_UDBG_16550=y
+CONFIG_PPC_WERROR=y
+CONFIG_PPS=y
+CONFIG_PTE_64BIT=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_QORIQ=y
+CONFIG_QORIQ_CPUFREQ=y
+CONFIG_QORIQ_THERMAL=y
+CONFIG_RAS=y
+CONFIG_RATIONAL=y
+# CONFIG_RAVE_SP_CORE is not set
+# CONFIG_RCU_EXPERT is not set
+CONFIG_RCU_NEED_SEGCBLIST=y
+CONFIG_RCU_STALL_COMMON=y
+CONFIG_RCU_TRACE=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_SCHED_SMT=y
+CONFIG_SCHED_STACK_END_CHECK=y
+# CONFIG_SCOM_DEBUGFS is not set
+CONFIG_SCSI=y
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_FSL=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_DEV_BUS=y
+CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
+CONFIG_SERIAL_FSL_LINFLEXUART=y
+CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y
+CONFIG_SERIAL_FSL_LPUART=y
+CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
+# CONFIG_SERIAL_KGDB_NMI is not set
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SG_POOL=y
+CONFIG_SLUB_DEBUG=y
+CONFIG_SLUB_DEBUG_ON=y
+CONFIG_SMP=y
+CONFIG_SOC_BUS=y
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_FSL_ESPI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SRCU=y
+CONFIG_SWIOTLB=y
+CONFIG_SWPHY=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYSVIPC_COMPAT=y
+CONFIG_SYS_SUPPORTS_HUGETLBFS=y
+CONFIG_TARGET_CPU_BOOL=y
+CONFIG_THERMAL=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_OF=y
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_THREAD_SHIFT=14
+CONFIG_TRACE_CLOCK=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+# CONFIG_UACCE is not set
+CONFIG_USB=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_EHCI_FSL=y
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_HCD_PLATFORM is not set
+CONFIG_USB_STORAGE=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_UAS=y
+CONFIG_VDSO32=y
+CONFIG_VGA_CONSOLE=y
+CONFIG_VIRT_CPU_ACCOUNTING=y
+CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
+CONFIG_XPS=y
+CONFIG_ZLIB_DEFLATE=y
diff --git a/target/linux/qoriq/generic/target.mk b/target/linux/qoriq/generic/target.mk
new file mode 100644
index 0000000000..b3bdb405f7
--- /dev/null
+++ b/target/linux/qoriq/generic/target.mk
@@ -0,0 +1,3 @@ 
+define Target/Description
+        Build firmware images for NXP QorIQ boards in the AMP series.
+endef
diff --git a/target/linux/qoriq/image/Makefile b/target/linux/qoriq/image/Makefile
new file mode 100644
index 0000000000..bda44ed69f
--- /dev/null
+++ b/target/linux/qoriq/image/Makefile
@@ -0,0 +1,34 @@ 
+# SPDX-License-Identifier: GPL-2.0-only
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/image.mk
+
+define Build/sdcard-img
+        rm -fR $@.boot
+        mkdir -p $@.boot
+        $(CP) $(KDIR)/$(DEVICE_NAME)-kernel.bin $@.boot
+        $(if $(DEVICE_DTS),\
+                $(foreach dtb,$(DEVICE_DTS),$(CP) $(KDIR)/image-$(dtb).dtb $@.boot), \
+                $(CP) $(KDIR)/image-/*.dtb $@.boot)
+
+        $(SCRIPT_DIR)/gen_image_generic.sh \
+                $@ \
+                $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \
+                $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \
+                2048
+
+        $(if $(UBOOT),dd if=$(STAGING_DIR_IMAGE)/$(UBOOT).img of=$@ bs=512 skip=1 seek=1 conv=notrunc)
+endef
+
+define Device/Default
+  PROFILES := Default
+  DEVICE_DTS := $(lastword $(subst _, ,$(1)))
+  KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
+  KERNEL_ENTRY := 0x00000000
+  KERNEL_LOADADDR := 0x00000000
+  KERNEL := kernel-bin
+endef
+
+include $(SUBTARGET).mk
+
+$(eval $(call BuildImage))
diff --git a/target/linux/qoriq/image/generic.mk b/target/linux/qoriq/image/generic.mk
new file mode 100644
index 0000000000..e69de29bb2