From patchwork Thu Feb 15 20:52:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 773022 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp1036368wre; Thu, 15 Feb 2024 12:58:03 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVpia9s+eTsWRZoAv+zQJOfCuq8UWqkPChX0vzxFrnCLlAE7axjnTsxSwnZm+uCnmSivACdgSe+Y17gzwb1ghi7 X-Google-Smtp-Source: AGHT+IHQxNagwEAthyw+hurOc3aZk+RYsQqhasVceQRZ3biV99/WQTFUoEPkhip3uOcMEGDqmeC0 X-Received: by 2002:a05:6402:165a:b0:561:f7da:ee30 with SMTP id s26-20020a056402165a00b00561f7daee30mr1781575edx.42.1708030683256; Thu, 15 Feb 2024 12:58:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708030683; cv=none; d=google.com; s=arc-20160816; b=HdJPKr1nqVEbtWZWbKFItguVZW0Q3h2uW9m2EC2TBwOsiQk/fzoDbUiAISNcPdzRDA AUa88ZAcJf2zm2p/MlAi7waC2yAuMr87z/f6mPyO1IakTJN5bNyygd9MSHRv3tGNDZO/ ZuothpaiSZ5Mm7ibRjUMLos/iNiL7EdgN6A13FEHzK8iT2Yeth3+9qGyjNZC+zbiTzYY oGPPovVpB6YH59hUTdVKAVIkxib7gvzxVAKjvbL2q2YMvH+0vKdW9+9sA/KGT6OFXmqe jxZIrQ4HuQZdBgyV/cbnQKFIT1irIwS7/T1p8vqQAtuChk5AeihQ18s4u+fCAyFOiKly RXoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=xgyenr9wkbe4ZW3R/61adtNJnLoKSyW7Ttu1HNLErK4=; fh=VfQXnhYww4g9XPPqGwFPL+wnU7EywOOXcAcye/HUrXk=; b=maeqD9GVeeurlU7sr7zHQyARN5KxNEsPJHU+onRE0rKFb4ltkuq0msjSzEUxcNl/cg E6HvAyxrshr2k1QyOmQhkoEQsmLeKU3Hf1mIWDu1BsoKZz2KWasBXZ76FtFjSloWFcMv vN4kMycRc93GpinNVcdrCMY0wc9KwGQY1DwxdlKPYqzf76rvfBcuYNEzXnQLB6aJCzkY VDWD8ETAOM76vEzQedkhIv9mNL4GDRnXIy/5KA50gwR0GaxsSnWPdahFagdgwickdYdA R1GgMeT6QRlrlWKYJKvqUFGRviHOvEHx3X/cd3DUTRbIZuLYy1Z8VqvxBqNkXRUrvv57 E52g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ctwky/E/"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id m6-20020a50ef06000000b005614a0e6566si927080eds.11.2024.02.15.12.58.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 12:58:03 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ctwky/E/"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C758887EF1; Thu, 15 Feb 2024 21:53:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ctwky/E/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 779EB87F2B; Thu, 15 Feb 2024 21:53:34 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3943A87EDB for ; Thu, 15 Feb 2024 21:52:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-33d173acb98so76761f8f.2 for ; Thu, 15 Feb 2024 12:52:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708030363; x=1708635163; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=xgyenr9wkbe4ZW3R/61adtNJnLoKSyW7Ttu1HNLErK4=; b=ctwky/E/qH08AQYxaeea9vc3PIYB/Q699rO1MiwsWnvugsDWf6D8aYhNbolNLOC0i2 yjV5jAze9mxdNbi90tD0cjV13j648ktFicVK29fxrXdon3PbHz59JpqPp9N6WX8vUe3l gREOuqEVDerbb5Qv8LsWtfmD+KypdN12+QvyB65xd4PI9Ehy/GIiQKwt63d8gm71jl+D qKlQYmK+IySs0YeKmAHkhUL5RoJcmnB2x83tlSbCKPwGAWmAIEvs7EgNn8f4uMWHBV1n uPpA7uMrbVV1DNQdMNUnmjo7JieI9l7lI5vDhoPJKX8nF4HVrqIEsg0qtga5grWuAU+M 4wYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708030363; x=1708635163; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xgyenr9wkbe4ZW3R/61adtNJnLoKSyW7Ttu1HNLErK4=; b=LouhEtwDXwy6QBADcAKOIHEx/StluaOdmp95Uyb0iXT+ZuPpOZHxGcRwIhBvbPebvr /QPvaWclzx7yZqvuHzbJvaOA3Spmc72mq0dz6xdghW2roRvQ9et8rhXhXgA+1Zl/aW7T v7fUNemGlDarXtAQ68nOHYKIjEuCcj0ft+1cszA6PnuN492IKGvUgPY8uxuq7viY4JLR WUlJRlaN2b6eeDjheU48ooWQAbN+7jt/cBZ0z+RAOoLTNGhBkLCgANEEyu1hqPWr2SiE Ya1jDE+t3hEF5oFDUtII8nUMgpxJZwX1f+Dqu7SzyL35SWLRJeYsG+V4LyTzNFrFiLkb I/Sw== X-Forwarded-Encrypted: i=1; AJvYcCUF3YNpGuCRZ6fqO5Kbmr3NoMB1aIF8cxvCDwzuEqZXP/SchJzRLLEfKQbt804gPPwNMbOtNXjPRoNNitVI6x8F2cSDOg== X-Gm-Message-State: AOJu0YxsJrzvizkww07XTPmR7OZLtRNfRotDv0Gqbt2jQtEKVoKhAgEu JXH9SMAKbal5FoTltyexaxIv+Kug6MJkPtHzTzU9gIEJB8OEltUHDW3uFjDkK6GcudQSSKwzhPl o X-Received: by 2002:adf:ec82:0:b0:33b:1a39:e501 with SMTP id z2-20020adfec82000000b0033b1a39e501mr1974328wrn.28.1708030363546; Thu, 15 Feb 2024 12:52:43 -0800 (PST) Received: from lion.localdomain (host-92-17-96-232.as13285.net. [92.17.96.232]) by smtp.gmail.com with ESMTPSA id e4-20020adfe384000000b0033cfa00e497sm194025wrm.64.2024.02.15.12.52.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 12:52:43 -0800 (PST) From: Caleb Connolly Date: Thu, 15 Feb 2024 20:52:37 +0000 Subject: [PATCH v4 19/39] board: dragonboard820c: use LINUX_KERNEL_IMAGE_HEADER MIME-Version: 1.0 Message-Id: <20240215-b4-qcom-common-target-v4-19-ed06355c634a@linaro.org> References: <20240215-b4-qcom-common-target-v4-0-ed06355c634a@linaro.org> In-Reply-To: <20240215-b4-qcom-common-target-v4-0-ed06355c634a@linaro.org> To: Neil Armstrong , Sumit Garg , Ramon Fried , Dzmitry Sankouski , Caleb Connolly , Peng Fan , Jaehoon Chung , Rayagonda Kokatanur , Lukasz Majewski , Sean Anderson , Jorge Ramirez-Ortiz , Stephan Gerhold Cc: Marek Vasut , u-boot@lists.denx.de X-Mailer: b4 0.13-dev-4bd13 X-Developer-Signature: v=1; a=openpgp-sha256; l=4839; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=TB+rEOKQi0BInDj0rjvhEg9UlCH4+k/WgcTWUfjAHXc=; b=owGbwMvMwCFYaeA6f6eBkTjjabUkhtRzla2rYlRuul0549da7f44dbPqtO6VntyJrHoc1i2Tj hl7/cvrKGVhEORgkBVTZBE/scyyae1le43tCy7AzGFlAhnCwMUpABNZ1Mbwz5C1JDEo9d/m/ZvX zdF4X3++aPVdJ7WLm9aXnWTUdC2L/sTwP/5n+rUjJr+m+y93sjb3y+j0P+7vlOh10y154sRpCX1 vhQA= X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean db820c predated support for prepending the kernel image header automatically, drop it's custom linker script and head.S in favour of this generic support. Reviewed-by: Neil Armstrong Signed-off-by: Caleb Connolly Reviewed-by: Ilias Apalodimas Reviewed-by: Sumit Garg --- arch/arm/mach-snapdragon/Kconfig | 1 + board/qualcomm/dragonboard820c/Makefile | 1 - board/qualcomm/dragonboard820c/head.S | 33 --------- board/qualcomm/dragonboard820c/u-boot.lds | 111 ------------------------------ 4 files changed, 1 insertion(+), 145 deletions(-) diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig index ad6671081910..f897c393464f 100644 --- a/arch/arm/mach-snapdragon/Kconfig +++ b/arch/arm/mach-snapdragon/Kconfig @@ -45,6 +45,7 @@ config TARGET_DRAGONBOARD410C config TARGET_DRAGONBOARD820C bool "96Boards Dragonboard 820C" + select LINUX_KERNEL_IMAGE_HEADER imply CLK_QCOM_APQ8096 imply PINCTRL_QCOM_APQ8096 imply BUTTON_QCOM_PMIC diff --git a/board/qualcomm/dragonboard820c/Makefile b/board/qualcomm/dragonboard820c/Makefile index 643311f5b3ba..2ae6d16364aa 100644 --- a/board/qualcomm/dragonboard820c/Makefile +++ b/board/qualcomm/dragonboard820c/Makefile @@ -3,4 +3,3 @@ # (C) Copyright 2017 Jorge Ramirez-Ortiz obj-y := dragonboard820c.o -extra-y += head.o diff --git a/board/qualcomm/dragonboard820c/head.S b/board/qualcomm/dragonboard820c/head.S deleted file mode 100644 index b052a858fd32..000000000000 --- a/board/qualcomm/dragonboard820c/head.S +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * ARM64 header for proper chain-loading with Little Kernel. - * - * Little Kernel shipped with Dragonboard820C boots standard Linux images for - * ARM64. This file adds header that is required to boot U-Boot properly. - * - * For details see: - * https://www.kernel.org/doc/Documentation/arm64/booting.txt - * - * (C) Copyright 2015 Mateusz Kulikowski - */ - -#include - -/* - * per document in linux/Doc/arm64/booting.text - */ -.global _arm64_header -_arm64_header: - b _start - .word 0 - .quad CONFIG_TEXT_BASE-PHYS_SDRAM_1 /* Image load offset, LE */ - .quad 0 /* Effective size of kernel image, little-endian */ - .quad 0 /* kernel flags, little-endian */ - .quad 0 /* reserved */ - .quad 0 /* reserved */ - .quad 0 /* reserved */ - .byte 0x41 /* Magic number, "ARM\x64" */ - .byte 0x52 - .byte 0x4d - .byte 0x64 - .word 0 /* reserved (used for PE COFF offset) */ diff --git a/board/qualcomm/dragonboard820c/u-boot.lds b/board/qualcomm/dragonboard820c/u-boot.lds deleted file mode 100644 index 5251b59fbe76..000000000000 --- a/board/qualcomm/dragonboard820c/u-boot.lds +++ /dev/null @@ -1,111 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Override linker script for fastboot-readable images - * - * (C) Copyright 2015 Mateusz Kulikowski - * - * Based on arch/arm/cpu/armv8/u-boot.lds (Just add header) - */ - -OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64") -OUTPUT_ARCH(aarch64) -ENTRY(_arm64_header) -SECTIONS -{ - . = 0x00000000; - - . = ALIGN(8); - .text : - { - *(.__image_copy_start) - board/qualcomm/dragonboard820c/head.o (.text*) - CPUDIR/start.o (.text*) - } - - /* This needs to come before *(.text*) */ - .efi_runtime : { - __efi_runtime_start = .; - *(.text.efi_runtime*) - *(.rodata.efi_runtime*) - *(.data.efi_runtime*) - __efi_runtime_stop = .; - } - - .text_rest : - { - *(.text*) - } - - . = ALIGN(8); - .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } - - . = ALIGN(8); - .data : { - *(.data*) - } - - . = ALIGN(8); - - . = .; - - . = ALIGN(8); - __u_boot_list : { - KEEP(*(SORT(__u_boot_list*))); - } - - . = ALIGN(8); - - .efi_runtime_rel : { - __efi_runtime_rel_start = .; - *(.rel*.efi_runtime) - *(.rel*.efi_runtime.*) - __efi_runtime_rel_stop = .; - } - - . = ALIGN(8); - - .image_copy_end : - { - *(.__image_copy_end) - } - - . = ALIGN(8); - - .rel_dyn_start : - { - *(.__rel_dyn_start) - } - - .rela.dyn : { - *(.rela*) - } - - .rel_dyn_end : - { - *(.__rel_dyn_end) - } - - _end = .; - - . = ALIGN(8); - - .bss_start : { - KEEP(*(.__bss_start)); - } - - .bss : { - *(.bss*) - . = ALIGN(8); - } - - .bss_end : { - KEEP(*(.__bss_end)); - } - - /DISCARD/ : { *(.dynsym) } - /DISCARD/ : { *(.dynstr*) } - /DISCARD/ : { *(.dynamic*) } - /DISCARD/ : { *(.plt*) } - /DISCARD/ : { *(.interp*) } - /DISCARD/ : { *(.gnu*) } -}