From patchwork Mon Feb 4 22:30:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1036319 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Ui35r4yI"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43tj8P0qWcz9sN8 for ; Tue, 5 Feb 2019 09:30:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1FF7D2EE62; Mon, 4 Feb 2019 22:30:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XL2jxxd-3XsK; Mon, 4 Feb 2019 22:30:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 59F982E46D; Mon, 4 Feb 2019 22:30:18 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id CA3F31BF282 for ; Mon, 4 Feb 2019 22:30:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C8111226B2 for ; Mon, 4 Feb 2019 22:30:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xiWdDVzyAr-g for ; Mon, 4 Feb 2019 22:30:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by silver.osuosl.org (Postfix) with ESMTPS id D41EC2E40A for ; Mon, 4 Feb 2019 22:30:15 +0000 (UTC) Received: by mail-wm1-f49.google.com with SMTP id m22so1669879wml.3 for ; Mon, 04 Feb 2019 14:30:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=HXSI9N0n1ghxLpIdvjUpT7cbb4gIpWBO5KzHP5n7hds=; b=Ui35r4yIb81OQu4ytlUxCKbVtkEGTVDTBePeC7LI66kiP4TriwMmN8f3g+tLO2M7OX Rg/RtArEvvtB/GggmxeNl7TgPgECLNi4Oc+GqT+6lSDsJ5xdsI22/m8wA0o2n34VPSW3 1dGUMHEAKK+DUbK1BealHsA8RVxpjhNB/IYE0NNAQkePInvu2m6Z13Vfoz/qnap1BW1g Q8heNJfHvY0ikQUyNUpjt7+QhCkgejLAOFOtMHvMTdJvG19JiE2g6QG/ovK5+1njL/Dp zez7LNoyZ91jhWUf4IwEf3LIllre6O+TvMhP57OgSRpaRQz4f/NPTD7yypl1843CRn76 IWLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HXSI9N0n1ghxLpIdvjUpT7cbb4gIpWBO5KzHP5n7hds=; b=SdlD0E3AO4ZBJJQv70rSZZHJaJds0IdjJjTeWXOQRwVNeyGYohedF7b1RVWFT9kHds af3a4qpYu4k704VwYZTwNqIn5nIloW9a77LU6/EjEpftC2TVy4A2zbOCRDXFP8btaa4g wfuaPyJEwmqXhsijqH2FWW2gel0U7k0qsapaW6u5sUEmmEfBWqDqed0wqEo0XVphZDow I8j3+K5CMLT9HjseZgRwt3ys2cPEGE8ZYbiWIeUOn236MhZNAGcLPlQkq1i4Sgurnc8W DRoKnDwG4MoMxQkUZpjoShNszkYSO7zmXa+5Wzc9j+rxThpKX6btX7qntyl7oph7Egi3 6ZjQ== X-Gm-Message-State: AHQUAuYlfh8LWgBqpS7f8vvrsbK4DO6mY3POwCbnj1bT5r9rXfIJrQ2w zHsT0EAqpB6t5RL5fgg+9mtfNsoS X-Google-Smtp-Source: AHgI3IY9yf2ZLnKItGdfHZnDWasvrkuPzzdRvPmQ2Bi+j3BEv/xzCz9MaV3WSLRdgUTueKwWDVbCqA== X-Received: by 2002:a7b:cc86:: with SMTP id p6mr1099523wma.19.1549319413821; Mon, 04 Feb 2019 14:30:13 -0800 (PST) Received: from adeos.home (2a01cb000577e4007362e7db4e8430b1.ipv6.abo.wanadoo.fr. [2a01:cb00:577:e400:7362:e7db:4e84:30b1]) by smtp.gmail.com with ESMTPSA id u10sm12823894wrr.33.2019.02.04.14.30.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Feb 2019 14:30:13 -0800 (PST) From: Romain Naour To: buildroot@buildroot.org Date: Mon, 4 Feb 2019 23:30:08 +0100 Message-Id: <20190204223010.19733-1-romain.naour@gmail.com> X-Mailer: git-send-email 2.14.5 Subject: [Buildroot] [PATCH 1/3] package/elf2flt: fix build with Binutils >= 2.32 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Binutils added bfd_stdint.h to bfd.h [1], so elf2flt must create a symlink for this header. Fixes: [armv7m-uclibc] https://gitlab.com/kubu93/toolchains-builder/-/jobs/148356410 [m68k-coldfire-uclibc] https://gitlab.com/kubu93/toolchains-builder/-/jobs/148356412 [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=2d5d5a8f0a8b5a03454bf168b7fa7024bb1ebbd8 Signed-off-by: Romain Naour --- ...003-Makefile-fix-build-with-Binutils-2.32.patch | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 package/elf2flt/0003-Makefile-fix-build-with-Binutils-2.32.patch diff --git a/package/elf2flt/0003-Makefile-fix-build-with-Binutils-2.32.patch b/package/elf2flt/0003-Makefile-fix-build-with-Binutils-2.32.patch new file mode 100644 index 0000000000..6bbe3af80b --- /dev/null +++ b/package/elf2flt/0003-Makefile-fix-build-with-Binutils-2.32.patch @@ -0,0 +1,40 @@ +From 58a9bd43e6b068f9b29982a2fe688d0ed34a8663 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Tue, 22 Jan 2019 22:18:02 +0100 +Subject: [PATCH] Makefile: fix build with Binutils 2.32 + +Binutils added bfd_stdint.h to bfd.h [1], so elf2flt must create a +symlink for this header. + +Fixes: +[armv7m-uclibc] +https://gitlab.com/kubu93/toolchains-builder/-/jobs/148356410 + +[m68k-coldfire-uclibc] +https://gitlab.com/kubu93/toolchains-builder/-/jobs/148356412 + +[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=2d5d5a8f0a8b5a03454bf168b7fa7024bb1ebbd8 + +Signed-off-by: Romain Naour +--- + Makefile.in | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 164e306..57fff5c 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -126,7 +126,9 @@ sinclude .deps + bfd-headers/.stamp: + rm -rf bfd-headers + mkdir bfd-headers +- ln -sf $(BFD_INCLUDE_DIR)/bfd.h bfd-headers/bfd.h ++ for f in bfd bfd_stdint; do \ ++ ln -sf $(BFD_INCLUDE_DIR)/$$f.h bfd-headers/$$f.h || exit 1; \ ++ done + for f in ansidecl diagnostics filenames hashtab libiberty symcat; do \ + ln -sf $(BINUTILS_INCLUDE_DIR)/$$f.h bfd-headers/$$f.h || exit 1; \ + done +-- +2.14.5 + From patchwork Mon Feb 4 22:30:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1036321 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="N8nhvhnZ"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43tj8P1XXsz9sN9 for ; Tue, 5 Feb 2019 09:30:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6CC39872B8; Mon, 4 Feb 2019 22:30:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f5W0T5bEsx-u; Mon, 4 Feb 2019 22:30:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 1B25A87232; Mon, 4 Feb 2019 22:30:21 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 88E3C1BF282 for ; Mon, 4 Feb 2019 22:30:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 855F8867C6 for ; Mon, 4 Feb 2019 22:30:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z5m6dUV62h5K for ; Mon, 4 Feb 2019 22:30:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id E79088710A for ; Mon, 4 Feb 2019 22:30:16 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id z3so1664000wrv.3 for ; Mon, 04 Feb 2019 14:30:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2XOmcI/DKgKrGghNF924ghqQGTkOCUP5G7iwaiuFITg=; b=N8nhvhnZlp1ezpoGSDxuaRagp23ygIMj63O2mkboEVi1gkYEoQSACx3ETt5bKhiFys 8HMnbE35MOm07rJqqiWZue1X2S2nswFZwZNck7gHOotQ84TjGNEDyx9sH8aamzgP1Bvc XWgVnc5tvrPHeaZTSFbTQI+uLWVKrcEbNjughsys1mj6oT747mTNzfc9ija1+LUxAy9p 9VW7nKegEA9ouuiGvTH7i6o+JpPt4eE0U4XnNeKMS8ok2i8BiTDfd/V2GJzNh3Jm4D4x PmKO6mE47ebNa19rX+q2yAGdbZ0D6dOvRxP4uPctE92FgDZjyMReNKgOCpcZDhKtl+rb 9Nzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2XOmcI/DKgKrGghNF924ghqQGTkOCUP5G7iwaiuFITg=; b=toEi2zaiZbNQL0C0EQWFgFCvt0E4ljn5QzuJLvyo77xNhPJLxnQPnB37smNESzw1qt 2mncQPR7wmZAkZcT823GDxCO0UvRZbt7P1jiWsfMZzfKJy+jrHSY5MX7Sb31mMFp7QQj xpHP5lQD4kgUnmTOwrhZARWdndNs2hV9leeneCDrjNDDp4nO6s9P0+JLfNTuiYfpJEyO Uu474Vn0o4RnPIlxbxk+WYyENVAmlU/rpuNrJaIIDmjaK0tSr02Mv8Qlx0C8c+rvIj/B NrWDkNOAUHdWYqDmzaEpWRIcJC3y8U4RDMUWyIeTzwusYAkXO+A6YY7Lu4jg6RARS7eM KPNQ== X-Gm-Message-State: AHQUAuby3TnjnpKmC/VnrjNxw6AbzMGvJouL+aLDi/VB8zNA574EIiPF 5QawLgHkErsV4mbhXfKylQ88JWYQ X-Google-Smtp-Source: AHgI3IZZlgJ1HyCdQcNrDQFMnK6mOQ1kmoCQpTCvKr2VSK7Ox+LvCYSjYeHZ7VKQepT6RRoq7n/TFw== X-Received: by 2002:a05:6000:108d:: with SMTP id y13mr1119291wrw.135.1549319414572; Mon, 04 Feb 2019 14:30:14 -0800 (PST) Received: from adeos.home (2a01cb000577e4007362e7db4e8430b1.ipv6.abo.wanadoo.fr. [2a01:cb00:577:e400:7362:e7db:4e84:30b1]) by smtp.gmail.com with ESMTPSA id u10sm12823894wrr.33.2019.02.04.14.30.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Feb 2019 14:30:14 -0800 (PST) From: Romain Naour To: buildroot@buildroot.org Date: Mon, 4 Feb 2019 23:30:09 +0100 Message-Id: <20190204223010.19733-2-romain.naour@gmail.com> X-Mailer: git-send-email 2.14.5 In-Reply-To: <20190204223010.19733-1-romain.naour@gmail.com> References: <20190204223010.19733-1-romain.naour@gmail.com> Subject: [Buildroot] [PATCH 2/3] board/qemu/xtensa-lx60: backport upsteam patch fixing kernel runtime issue with Binutils 2.32. X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" With Binutils 2.32, xtensa kernel <= 4.18 need an upstream patch from kernel 4.19 [1] [1] https://www.sourceware.org/ml/binutils/2019-02/msg00015.html Fixes: https://gitlab.com/kubu93/toolchains-builder/-/jobs/155355484 Signed-off-by: Romain Naour --- ...sa-add-NOTES-section-to-the-linker-script.patch | 47 ++++++++++++++++++++++ configs/qemu_xtensa_lx60_defconfig | 2 + configs/qemu_xtensa_lx60_nommu_defconfig | 2 + 3 files changed, 51 insertions(+) create mode 100644 board/qemu/xtensa-lx60/patches/linux/0001-xtensa-add-NOTES-section-to-the-linker-script.patch diff --git a/board/qemu/xtensa-lx60/patches/linux/0001-xtensa-add-NOTES-section-to-the-linker-script.patch b/board/qemu/xtensa-lx60/patches/linux/0001-xtensa-add-NOTES-section-to-the-linker-script.patch new file mode 100644 index 0000000000..8d82e9e168 --- /dev/null +++ b/board/qemu/xtensa-lx60/patches/linux/0001-xtensa-add-NOTES-section-to-the-linker-script.patch @@ -0,0 +1,47 @@ +From 72b5dcc807e664b705540b2a94ed318889b7a9af Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Mon, 29 Oct 2018 18:30:13 -0700 +Subject: [PATCH] xtensa: add NOTES section to the linker script + +This section collects all source .note.* sections together in the +vmlinux image. Without it .note.Linux section may be placed at address +0, while the rest of the kernel is at its normal address, resulting in a +huge vmlinux.bin image that may not be linked into the xtensa Image.elf. + +Cc: stable@vger.kernel.org +Signed-off-by: Max Filippov +(cherry picked from commit 4119ba211bc4f1bf638f41e50b7a0f329f58aa16) +Signed-off-by: Romain Naour +--- + arch/xtensa/boot/Makefile | 2 +- + arch/xtensa/kernel/vmlinux.lds.S | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile +index 53e4178711e6..8c20a7965bda 100644 +--- a/arch/xtensa/boot/Makefile ++++ b/arch/xtensa/boot/Makefile +@@ -34,7 +34,7 @@ boot-elf boot-redboot: $(addprefix $(obj)/,$(subdir-y)) \ + $(addprefix $(obj)/,$(host-progs)) + $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS) + +-OBJCOPYFLAGS = --strip-all -R .comment -R .note.gnu.build-id -O binary ++OBJCOPYFLAGS = --strip-all -R .comment -R .notes -O binary + + vmlinux.bin: vmlinux FORCE + $(call if_changed,objcopy) +diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S +index 70b731edc7b8..c430c96ea723 100644 +--- a/arch/xtensa/kernel/vmlinux.lds.S ++++ b/arch/xtensa/kernel/vmlinux.lds.S +@@ -131,6 +131,7 @@ SECTIONS + .fixup : { *(.fixup) } + + EXCEPTION_TABLE(16) ++ NOTES + /* Data section */ + + _sdata = .; +-- +2.14.5 + diff --git a/configs/qemu_xtensa_lx60_defconfig b/configs/qemu_xtensa_lx60_defconfig index a735c991c7..14fcc4e982 100644 --- a/configs/qemu_xtensa_lx60_defconfig +++ b/configs/qemu_xtensa_lx60_defconfig @@ -3,6 +3,8 @@ BR2_xtensa=y BR2_XTENSA_CUSTOM=y BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/95291b7c39e6f790d0b2f062c945a630290f2c81/overlays/xtensa_dc233c.tar.gz" +BR2_GLOBAL_PATCH_DIR="board/qemu/xtensa-lx60/patches/" + # System BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" diff --git a/configs/qemu_xtensa_lx60_nommu_defconfig b/configs/qemu_xtensa_lx60_nommu_defconfig index f4d6837bc1..b22716a65a 100644 --- a/configs/qemu_xtensa_lx60_nommu_defconfig +++ b/configs/qemu_xtensa_lx60_nommu_defconfig @@ -3,6 +3,8 @@ BR2_xtensa=y BR2_XTENSA_CUSTOM=y BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/95291b7c39e6f790d0b2f062c945a630290f2c81/overlays/xtensa_dc233c.tar.gz" +BR2_GLOBAL_PATCH_DIR="board/qemu/xtensa-lx60/patches/" + # Toolchain BR2_PACKAGE_HOST_ELF2FLT=y # BR2_USE_MMU is not set