From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5147C433EF for ; Wed, 15 Jun 2022 13:23:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 98C5A844E9; Wed, 15 Jun 2022 15:21:56 +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="FTaLJyac"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 82742844D8; Wed, 15 Jun 2022 15:21:46 +0200 (CEST) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (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 2AC57844BF for ; Wed, 15 Jun 2022 15:21:44 +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-ej1-x62b.google.com with SMTP id gl15so23212966ejb.4 for ; Wed, 15 Jun 2022 06:21:44 -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=lT9pkI+MRQ8liiNWPW7P4ydX9cyyA6vABPpGsK2JKmI=; b=FTaLJyacXR0BK5febimixJ5AXZgcNm1cxjZQh5MDvavad9z7+URBvUdMonhWG61Lcm pg//KJ7GdeFzij/S/OH3jDz9VgbuPVwtYH15HH+ydBrzrKvWWAka25GFaA3bWnVWstB8 8QzVabLbrWrutIowYtigXq6qfDweo9FjP5Xz+8fsFLE4tK35NrPZ4NeTUKfMCEHa4qyo EeKNa2jPfxbPlgNzxFaddSGXcwvKXQiWKiADAG0feCxRQ7p0Jzh1Q7+mOevaDLXOOCIt NP8a1CKSrL7vYeix6Vl0qct0cfSmsK9ojUf+0L6dB0FovWGSWRsrh2/KDzfdbO1z2dD7 cyVA== 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=lT9pkI+MRQ8liiNWPW7P4ydX9cyyA6vABPpGsK2JKmI=; b=HFr296wjLssfV4XsWF9cMAPeTD8E5+9OckRIvvtiGFrJejmp9fieJwzKN7d2E3JN/i fQZfSUJaVeYebddJXPJcYm/83G2Bngy3sdpDm0u48CNCJJWNm/IoyKpWOlr0bGCLJB8i 8vS8Ae0k//SBcRhG22u6vZNjYNTdUGp9VVLig2xWADFvHzmYii/itFP3WWAse6y7yNgT AwcFCunKAUxRT7pySpi0rDNjYyMAHIngEsw7cTI4ZzjgxQdokyrzRgcfRgomPWjYtLjQ dyaGE6HfGVtLBRZK9Z1vpd5cgK2onmnYb+uG2Zfi6d49hTLjxujI46Yv0LKV3AEy8e+h xI7A== X-Gm-Message-State: AJIora9m3TBKIk4W9Qv+3smWsVF2eiNOU332oaGmK2oURasStIHAUjz8 Kqe8zlOwYTARTKuhKzWd7g4GB9ETLKAlmw== X-Google-Smtp-Source: AGRyM1sIrAQLhNfzLX/mpzblL7qqR8huQeRGUhwZTtF+R62GvodvjsGMOdL1hpI9U6LTvwGdKfumag== X-Received: by 2002:a17:906:610:b0:715:79ac:7db9 with SMTP id s16-20020a170906061000b0071579ac7db9mr8826707ejb.226.1655299303379; Wed, 15 Jun 2022 06:21:43 -0700 (PDT) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id j10-20020a50d00a000000b004319b12371asm9481370edf.47.2022.06.15.06.21.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 06:21:42 -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 v4 11/23] microblaze: Enable REMAKE_ELF Date: Wed, 15 Jun 2022 15:21:07 +0200 Message-Id: <7e242a519fcd1c693b9103c5599b515af555ca43.1655299267.git.michal.simek@amd.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 4851300e9bbe..02de32f9c77f 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -448,7 +448,7 @@ source "arch/riscv/Kconfig" source "board/keymile/Kconfig" -if MIPS +if MIPS || MICROBLAZE choice prompt "Endianness selection" @@ -460,11 +460,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 7994110b28a7..35e32466bdff 100644 --- a/configs/microblaze-generic_defconfig +++ b/configs/microblaze-generic_defconfig @@ -14,6 +14,7 @@ CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 CONFIG_XILINX_MICROBLAZE0_USE_DIV=1 CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1 CONFIG_DISTRO_DEFAULTS=y +CONFIG_REMAKE_ELF=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_BOOTDELAY=-1 -- 2.36.1