From patchwork Wed Jun 15 10:03:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1643575 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=GD87XuDZ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LNLYF68yZz9t6h for ; Wed, 15 Jun 2022 20:06:09 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B29FB844AA; Wed, 15 Jun 2022 12:04:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=monstr.eu 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=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="GD87XuDZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BC6D7844A1; Wed, 15 Jun 2022 12:04:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 56B3984467 for ; Wed, 15 Jun 2022 12:04:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=monstr.eu Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ed1-x52d.google.com with SMTP id w27so15350407edl.7 for ; Wed, 15 Jun 2022 03:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Zt7wP/CvOxaAsix7nJNGykoGnfpjanHccbmwcFe+j3g=; b=GD87XuDZoGc3SSD86pnH88c7ldBzOYIve+Goi86OzyCS2v/2sQesFpQKxpwH9TlKew UpoMu09UGCgvvvVIW3POsM4bTptlt+sDiVex0ulBuYpFTq1/AKRtSITCQU5iGqVui/gA H7GMhN2HrhHieqSgKFYwer1D7NoZ24jRv80hzl1P8Uexv62WSbB9G8UuND0j80V9r6wB Kur1HEvC9X2do+7mgClzlbGggC3rT5SxeL/1ZfRJXrDgdZpLoyllNmpjyHdIuZAuRRtV 4kh2zdjVlOeh3zjW00N7i9Q+HPGDZlOP4PVxew8p7Gn9kvMA3+C7UZ3bIpONtUyEU9T9 dL3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zt7wP/CvOxaAsix7nJNGykoGnfpjanHccbmwcFe+j3g=; b=iTcqiSLWVHIhGkgOdNkt9Dm/4g/czAoaiiSumhfsVRlQQoSZFbwvZTC3MVqYz+pnaH LmrEJMFtvNtZcjZuq/qTxFtF+eszoJZ2toUhqBIbiAtE7/NiH6SM+cYWW2qsVotDynPL 37jORHZ4brm2q0AEXm88Gy2uxXeRMEU4gI8+ExOoEgJkXUrdMYKVYemaV74UdJSJ1tfz pCKCnQJgq9BK2W3AijugClKDkMymN2+sXuyevD82uP/qToXaVar5wxe8msGozYtmiG70 IGPrh6Vu9USorBabkHHidCg+XritfQFUiay4dOov5C2XhObjTIQQXmhx2yl2QYk1wiQL CJ2g== X-Gm-Message-State: AOAM533dYw+92pmVBaNxKG84D2xYIIg+Jw5LeqRiHdqd2xMknRhQOUFC +MW6ExDEJAi18/XFZj65SuCZc2hDvnbs5A== X-Google-Smtp-Source: ABdhPJyL1l/hOkw050TWg3YEFBHdj4c3XbMy2RldRH2Uy/vrN+cGPFuJ5o+8VfwiBNGoOmBV8qJwBA== X-Received: by 2002:a05:6402:518d:b0:431:5487:9606 with SMTP id q13-20020a056402518d00b0043154879606mr11852872edd.177.1655287462603; Wed, 15 Jun 2022 03:04:22 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id p8-20020a056402500800b0042dc0181307sm8859331eda.93.2022.06.15.03.04.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 03:04:21 -0700 (PDT) From: Michal Simek X-Google-Original-From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Michal Simek , Rick Chen , Sean Anderson , Simon Glass Subject: [PATCH v3 11/23] microblaze: Enable REMAKE_ELF Date: Wed, 15 Jun 2022 12:03:48 +0200 Message-Id: X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 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.5 at phobos.denx.de X-Virus-Status: Clean Enable u-boot.elf recreation from u-boot.bin to prepare for removing manul relocation. Enable option for big endian configuration but it is not used too much that's why it is completely untested. By supporting this system there is a need to define LITTLE/BIG endian Kconfig options to pass -EL/-EB flags. Full command line for u-boot.elf recreation looks like this: microblazeel-xilinx-linux-gnu-objcopy -I binary -B microblaze \ -O elf32-microblazeel u-boot.bin u-boot-elf.o Signed-off-by: Michal Simek --- (no changes since v2) Changes in v2: - Fix endian selection arch/Kconfig | 6 +++--- arch/microblaze/config.mk | 6 ++++++ configs/microblaze-generic_defconfig | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 53a7c2a48da0..41f8ff78d9f5 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -445,7 +445,7 @@ source "arch/riscv/Kconfig" source "board/keymile/Kconfig" -if MIPS +if MIPS || MICROBLAZE choice prompt "Endianness selection" @@ -457,11 +457,11 @@ choice config SYS_BIG_ENDIAN bool "Big endian" - depends on SUPPORTS_BIG_ENDIAN + depends on (SUPPORTS_BIG_ENDIAN && MIPS) || MICROBLAZE config SYS_LITTLE_ENDIAN bool "Little endian" - depends on SUPPORTS_LITTLE_ENDIAN + depends on (SUPPORTS_LITTLE_ENDIAN && MIPS) || MICROBLAZE endchoice diff --git a/arch/microblaze/config.mk b/arch/microblaze/config.mk index de5b97e719cc..3e84a832fc12 100644 --- a/arch/microblaze/config.mk +++ b/arch/microblaze/config.mk @@ -16,3 +16,9 @@ LDFLAGS_FINAL += --gc-sections ifeq ($(CONFIG_SPL_BUILD),) PLATFORM_CPPFLAGS += -fPIC endif + +ifeq ($(CONFIG_SYS_LITTLE_ENDIAN),y) +PLATFORM_ELFFLAGS += -B microblaze $(OBJCOPYFLAGS) -O elf32-microblazeel +else +PLATFORM_ELFFLAGS += -B microblaze $(OBJCOPYFLAGS) -O elf32-microblaze +endif diff --git a/configs/microblaze-generic_defconfig b/configs/microblaze-generic_defconfig index 0875208cec62..0fd6239514da 100644 --- a/configs/microblaze-generic_defconfig +++ b/configs/microblaze-generic_defconfig @@ -18,6 +18,7 @@ CONFIG_XILINX_MICROBLAZE0_USE_DIV=1 CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2 CONFIG_DEBUG_UART=y CONFIG_DISTRO_DEFAULTS=y +CONFIG_REMAKE_ELF=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_BOOTDELAY=-1