diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-03-10 23:45:36 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-12 11:57:41 -0700 |
commit | cda5d455992e1aceae911178b7143b67e0ac29cc (patch) | |
tree | 3ab2e3a9bf0ed62c869f6c05ae82b94149d9728c /meta/recipes-kernel | |
parent | 75d744c26b2e34e433a80f2478e3d2bf85126672 (diff) | |
download | poky-cda5d455992e1aceae911178b7143b67e0ac29cc.tar.gz |
linux-yocto/5.0: fix system tap for arm
Integrating Richard Purdie's kernel patch to fix systemtap on arm:
[
arm/Makefile: Fix systemtap
Currently systemtap fails to operate correctly on armv7 systems such as beaglebone and
soon, qemuarm.
root@qemuarm:/usr/src/kernel# env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE -uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH PATH=/usr/bin:/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin make -C /lib/modules/4.19.19-yocto-standard/build M=/tmp/staptcNU6M modules CONFIG_DEBUG_INFO= CONFIG_STACK_VALIDATION= ARCH=arm stap_4321_src.i --no-print-directory -j2 V=1
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
mkdir -p /tmp/staptcNU6M/.tmp_versions ; rm -f /tmp/staptcNU6M/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/tmp/staptcNU6M
(cat /dev/null; echo kernel//tmp/staptcNU6M/stap_4321.ko;) > /tmp/staptcNU6M/modules.order
gcc -Wp,-MD,/tmp/staptcNU6M/.stap_4321_src.o.d -nostdinc -isystem /usr/lib/gcc/arm-poky-linux-gnueabi/8.3.0/include -I./arch/arm/include -I./arch/arm/include/generated -I./include -I./arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -fno-ipa-sra -mabi=aapcs-linux -mfpu=vfp -funwind-tables -marm -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=7 -march=armv5t -Wa,-march=armv7-a -msoft-float -Uarm -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -Os -Wno-maybe-uninitialized --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -Iinclude2/asm/mach-default -I/lib/modules/4.19.19-yocto-standard/build -include /tmp/staptcNU6M/stapconf_4321.h -D "STP_NO_VELREL_CHECK" -freorder-blocks -fasynchronous-unwind-tables -Wframe-larger-than=512 -fno-ipa-icf -Wno-unused -Wno-tautological-compare -Werror -I/usr/share/systemtap/runtime -DMODULE -DKBUILD_BASENAME='"stap_4321_src"' -DKBUILD_MODNAME='"stap_4321"' -c -o /tmp/staptcNU6M/stap_4321_src.o /tmp/staptcNU6M/stap_4321_src.c
/tmp/ccaE9CMG.s: Assembler messages:
/tmp/ccaE9CMG.s:49: Error: selected processor does not support `dmb ish' in ARM mode
/tmp/ccaE9CMG.s:52: Error: architectural extension `mp' is not allowed for the current b
(which was from running the stap command with -v -v -v -k and then being able to run the command individually)
Note that it says armv5t above.
That comes from the code this patch changes
root@qemuarm:/usr/src/kernel# gcc -march=armv7-a /tmp/staptcNU6M/stap_4321_aux_0.c
cc1: error: -mfloat-abi=hard: selected processor lacks an FPU
which makes me wonder if cc-option fails unless -mfpu-vfp is on the commandline too.
Since we have a gcc which accepts the armv7-a arch, just remove the cc-option
wrapper unconditionally here.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
]
(From OE-Core rev: 8c446ac6c1bba1502ac0a710a39b90c78fff41a3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r-- | meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb | 4 | ||||
-rw-r--r-- | meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb | 6 | ||||
-rw-r--r-- | meta/recipes-kernel/linux/linux-yocto_5.0.bb | 18 |
3 files changed, 14 insertions, 14 deletions
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb b/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb index 2350973fef..8629e5a867 100644 --- a/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb +++ b/meta/recipes-kernel/linux/linux-yocto-rt_5.0.bb | |||
@@ -11,8 +11,8 @@ python () { | |||
11 | raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") | 11 | raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") |
12 | } | 12 | } |
13 | 13 | ||
14 | SRCREV_machine ?= "1a0da7e50b77c82841efb501c648dbaca699eac2" | 14 | SRCREV_machine ?= "37c8f2a3df1e3154087538a27228fad0c6e172c5" |
15 | SRCREV_meta ?= "4faa4419884d2bbe65f637befd71a1e95629eaae" | 15 | SRCREV_meta ?= "8fbd119bd954443b1cae496d7797c458faa02495" |
16 | 16 | ||
17 | SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ | 17 | SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \ |
18 | git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.0;destsuffix=${KMETA}" | 18 | git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.0;destsuffix=${KMETA}" |
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb index e0a6801446..086b53bbbe 100644 --- a/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb +++ b/meta/recipes-kernel/linux/linux-yocto-tiny_5.0.bb | |||
@@ -15,9 +15,9 @@ DEPENDS += "openssl-native util-linux-native" | |||
15 | KMETA = "kernel-meta" | 15 | KMETA = "kernel-meta" |
16 | KCONF_BSP_AUDIT_LEVEL = "2" | 16 | KCONF_BSP_AUDIT_LEVEL = "2" |
17 | 17 | ||
18 | SRCREV_machine_qemuarm ?= "6da91ac9afd3b8c144760e3ceacc6a812ddfa3f6" | 18 | SRCREV_machine_qemuarm ?= "2260c031075188dce4d30223527dda68e3940574" |
19 | SRCREV_machine ?= "1a0da7e50b77c82841efb501c648dbaca699eac2" | 19 | SRCREV_machine ?= "37c8f2a3df1e3154087538a27228fad0c6e172c5" |
20 | SRCREV_meta ?= "4faa4419884d2bbe65f637befd71a1e95629eaae" | 20 | SRCREV_meta ?= "8fbd119bd954443b1cae496d7797c458faa02495" |
21 | 21 | ||
22 | PV = "${LINUX_VERSION}+git${SRCPV}" | 22 | PV = "${LINUX_VERSION}+git${SRCPV}" |
23 | 23 | ||
diff --git a/meta/recipes-kernel/linux/linux-yocto_5.0.bb b/meta/recipes-kernel/linux/linux-yocto_5.0.bb index f2c066a150..ab8e5aff50 100644 --- a/meta/recipes-kernel/linux/linux-yocto_5.0.bb +++ b/meta/recipes-kernel/linux/linux-yocto_5.0.bb | |||
@@ -11,15 +11,15 @@ KBRANCH_qemux86 ?= "v5.0/standard/base" | |||
11 | KBRANCH_qemux86-64 ?= "v5.0/standard/base" | 11 | KBRANCH_qemux86-64 ?= "v5.0/standard/base" |
12 | KBRANCH_qemumips64 ?= "v5.0/standard/mti-malta64" | 12 | KBRANCH_qemumips64 ?= "v5.0/standard/mti-malta64" |
13 | 13 | ||
14 | SRCREV_machine_qemuarm ?= "1fbecad0e6a68b6c57b4f6ef8207e7e90ea764a3" | 14 | SRCREV_machine_qemuarm ?= "23b538073fdc803b0a749de77677508671e246af" |
15 | SRCREV_machine_qemuarm64 ?= "1a0da7e50b77c82841efb501c648dbaca699eac2" | 15 | SRCREV_machine_qemuarm64 ?= "37c8f2a3df1e3154087538a27228fad0c6e172c5" |
16 | SRCREV_machine_qemumips ?= "d9dd6d4cfe689efd5cb7bbacd118a3888ac7c517" | 16 | SRCREV_machine_qemumips ?= "50b5b709ac6b1d14ac815f9a002c50a196306b02" |
17 | SRCREV_machine_qemuppc ?= "1a0da7e50b77c82841efb501c648dbaca699eac2" | 17 | SRCREV_machine_qemuppc ?= "37c8f2a3df1e3154087538a27228fad0c6e172c5" |
18 | SRCREV_machine_qemux86 ?= "1a0da7e50b77c82841efb501c648dbaca699eac2" | 18 | SRCREV_machine_qemux86 ?= "37c8f2a3df1e3154087538a27228fad0c6e172c5" |
19 | SRCREV_machine_qemux86-64 ?= "1a0da7e50b77c82841efb501c648dbaca699eac2" | 19 | SRCREV_machine_qemux86-64 ?= "37c8f2a3df1e3154087538a27228fad0c6e172c5" |
20 | SRCREV_machine_qemumips64 ?= "5f072445126e6a9e44f9435a552f4fcf6fc15499" | 20 | SRCREV_machine_qemumips64 ?= "8322515ba7a858c47386b95c6e7201c8a3a41175" |
21 | SRCREV_machine ?= "1a0da7e50b77c82841efb501c648dbaca699eac2" | 21 | SRCREV_machine ?= "37c8f2a3df1e3154087538a27228fad0c6e172c5" |
22 | SRCREV_meta ?= "4faa4419884d2bbe65f637befd71a1e95629eaae" | 22 | SRCREV_meta ?= "8fbd119bd954443b1cae496d7797c458faa02495" |
23 | 23 | ||
24 | # remap qemuarm to qemuarma15 for the 5.0 kernel | 24 | # remap qemuarm to qemuarma15 for the 5.0 kernel |
25 | # KMACHINE_qemuarm ?= "qemuarma15" | 25 | # KMACHINE_qemuarm ?= "qemuarma15" |