From nobody Tue Jan 25 01:40:17 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 25E0B1973403; Tue, 25 Jan 2022 01:40:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JjV0d2jw3z4ZlG; Tue, 25 Jan 2022 01:40:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643074817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AZbi/cRK2MGgD/9U3ptye/7KnIthlAJxpA02Ir+QBd4=; b=S9O65NngFM1qNawqdRhquZfsYUuE3rZ0E679G+W3DFZgiXUaid6NejWDyJNk+uAZyUCF/Q DUApNizNNVzXSmO66beq7ebHC5NH771tv19jfgHvm4Iyd6d+2SbtBRuXdBeRTadAY9AcLc 18uEc6NuuT2oEIX5zLDE5GCzBkFvcBpxu5x4A1CQMckfzrchvHDYVhURG9ZMmBcOcksRg+ kCCqG+OJ2PQrt9K72svzBbB2p5cpPjSbV00sjVkrbZMusqNbhNmgPkJVi2bbRGl167OFZ3 acFssK3P+lGE5LMzfJj112l7FuMwSKAktR1eyEIUypM0JoJGySuOjXe+rfM1IA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2740D20B3B; Tue, 25 Jan 2022 01:40:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20P1eHLc049278; Tue, 25 Jan 2022 01:40:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20P1eHQp049272; Tue, 25 Jan 2022 01:40:17 GMT (envelope-from git) Date: Tue, 25 Jan 2022 01:40:17 GMT Message-Id: <202201250140.20P1eHQp049272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: b85b57e0f41f - stable/13 - arm64: Don't rely on host readelf for u-boot booti image generation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b85b57e0f41ff7477c8bcf316fb5b5d545a276bd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643074817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AZbi/cRK2MGgD/9U3ptye/7KnIthlAJxpA02Ir+QBd4=; b=ThTxkw1k0V9WrYC0aZ6xNXLD5J4xqHK83CMDtaSJDhbAGNV4p7eDHU+cxpni6WvNQ6nuBU QIY5Z366CpDuDBvW7p6FrQX4h5zmc09xiw0ngOJ8niZd5wROEVS4pImEF9bRhBvdKHHGyJ UM17JM7MSNe+LlQ2d0S0IyMBfb1ESc2vw1Mnak3BDaV4+W+xzTBR3f1atSO/dLcipS97Nb ySihAc3FXduy2Sggn9wtgiwJUYMk70wA6MnlCxyLsex83Nu3xklfy4dDF8C1D6acQuDh5O fLzkST9w69w7xx8qQ+Rd9aIvewKhuUToxb2rpAWug1QUfb/DryVUoFWu89oXKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643074817; a=rsa-sha256; cv=none; b=OjHVd3jIXAOOzW7O5G1cpXkKXzldExWerL6NX8qZvyopdzOxeWo1b8Dzi2Lh39GaOIqRD+ 7rsL6YgRuSyeF6BbtK2veWy6sgECFDJ090B9L87ormlLAqsusrAtQCmkBqEJL1adleoSvm C7wZ1gzuwlbftOCmjXEcXwmbsEr5Gi9fDZDXAe8OornZDja+PwThxL/mM/2ZvlwfBkdD/D CZKJdk/7lS1gKoNpxzFumXBLLixhvIV/+jFJ+linffkLgunKfe3NidgTFky/+vj9aYiMe8 5jIFwzHIX8OfKSlcPhWnJ8Ojz6D865klR2o1XFRGkYEtnnp8WjsfZU90KhI2LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=b85b57e0f41ff7477c8bcf316fb5b5d545a276bd commit b85b57e0f41ff7477c8bcf316fb5b5d545a276bd Author: Jessica Clarke AuthorDate: 2021-12-24 19:25:20 +0000 Commit: Jessica Clarke CommitDate: 2022-01-24 23:59:51 +0000 arm64: Don't rely on host readelf for u-boot booti image generation readelf is not a bootstrap tool and so cannot be relied upon to exist. On macOS there is no system readelf, and even on Linux or FreeBSD where it does exist, BUILD_WITH_STRICT_TMPPATH builds won't be able to use it. Instead of making it a bootstrap tool, just use nm as that suffices and already is a bootstrap tool. Fixes: 28482babd08a ("arm64: Use new arm_kernel_boothdr script for generating booti images.") Reviewed by: emaste, mmel MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D32734 (cherry picked from commit 1846bbd1b34e0269e0edd829dcff4729b37a149b) --- sys/conf/Makefile.arm64 | 2 +- sys/tools/arm_kernel_boothdr.awk | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/conf/Makefile.arm64 b/sys/conf/Makefile.arm64 index e75062115121..e8a534dadf5c 100644 --- a/sys/conf/Makefile.arm64 +++ b/sys/conf/Makefile.arm64 @@ -94,7 +94,7 @@ CLEAN+= ${KERNEL_KO}.bin ${KERNEL_KO}.bin: ${FULLKERNEL} @${OBJCOPY} --wildcard --strip-symbol='$$[adtx]*' \ --output-target=binary ${.ALLSRC} ${.TARGET}.temp - @{ readelf -s ${.ALLSRC} | \ + @{ ${NM} ${.ALLSRC} | \ ${AWK} -f $S/tools/arm_kernel_boothdr.awk -v hdrtype=v8booti && \ cat ${.TARGET}.temp; \ } > ${.TARGET} diff --git a/sys/tools/arm_kernel_boothdr.awk b/sys/tools/arm_kernel_boothdr.awk index f22c6167c7b0..cda56e2225cd 100644 --- a/sys/tools/arm_kernel_boothdr.awk +++ b/sys/tools/arm_kernel_boothdr.awk @@ -144,22 +144,22 @@ function write_v8booti() { /kernbase/ { # If the symbol name is exactly "kernbase" save its address. - if ($8 == "kernbase") { - gKernbase = hexstr_to_num($2) + if ($3 == "kernbase") { + gKernbase = hexstr_to_num($1) } } /_start/ { # If the symbol name is exactly "_start" save its address. - if ($8 == "_start") { - gStart = hexstr_to_num($2) + if ($3 == "_start") { + gStart = hexstr_to_num($1) } } /_end/ { # If the symbol name is exactly "_end" remember its value. - if ($8 == "_end") { - gEnd = hexstr_to_num($2) + if ($3 == "_end") { + gEnd = hexstr_to_num($1) } }