From patchwork Thu Jul 8 17:30:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1502571 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.a=rsa-sha256 header.s=default header.b=HcJKstlm; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GLNcC12tHz9sWq for ; Fri, 9 Jul 2021 03:30:51 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0A094831AE; Thu, 8 Jul 2021 19:30:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="HcJKstlm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AA45183221; Thu, 8 Jul 2021 19:30:44 +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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D8994831AC for ; Thu, 8 Jul 2021 19:30:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:8747:7254:5571:3010]) by mail.nic.cz (Postfix) with ESMTPSA id 751EB142663; Thu, 8 Jul 2021 19:30:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1625765437; bh=w2T+sjvJFoTSFUBJiCW9kbaaBvJKaCTgmBSFpzEw90U=; h=From:To:Date; b=HcJKstlmGAp3b8hv7G1RCLR7nNeH/b5WIuOWYlMyHO23MVv24qqHHMlEvugouYADG uMKYNNAtq6AflaIV6MfAdyiPoGzp7rq1LIfFiKsJlSrVqPGl7TNAzu73jpJ7CRNBVP sIWoVOEB2gGLi5H5yflHkl7Y8z5rjVGDH4ejstLY= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de, Chris Packham , Stefan Roese , Baruch Siach , Dirk Eibach , Chris Packham Cc: Dennis Gilmore , Mario Six , Jon Nettleton , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH u-boot-mvebu 00/31] kwboot / kwbimage improvements Date: Thu, 8 Jul 2021 19:30:01 +0200 Message-Id: <20210708173032.27999-1-marek.behun@nic.cz> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Hi Stefan and others, this is a series of improvements to kwboot, kwbimage and mvebu. The main goal of this series is to correctly use BootROM's code for loading U-Boot from NOR / NAND: currently only SPL is read by BootROM and the main U-Boot is read by SPL. By using BootROM to also load main U-Boot we can reduce the size of SPL image, since it does not need to contain code for reading NOR / NAND. Before merging, this series should be tested on as many relevant boards as possible. Marek & Pali Marek Behún (2): tools: kwbimage: Add constant for SDIO bootfrom tools: kwbimage: Cosmetic fix - remove redundant space character Pali Rohár (29): tools: kwbimage: Fix compilation without CONFIG_SYS_U_BOOT_OFFS tools: kwbimage: Simplify aligning and calculating checksum tools: kwbimage: Align SPI and NAND images to 256 bytes tools: kwbimage: Fix generation of SATA, SDIO and PCIe images tools: kwbimage: Don't crash when binary file name does not contain '/' tools: kwbimage: Fix check for v0 extended header checksum tools: kwbimage: Validate extended headers of v1 images tools: kwbimage: Validate data checksum of v1 images tools: kwbimage: Print size of binary header in kwbimage_print_header() tools: kwboot: Fix wrong parameter passed to read() tools: kwboot: Fix restoring terminal tools: kwboot: Print trailing newline after terminal is terminated tools: kwboot: Cosmetic fix - add missing curly brackets tools: kwboot: Check for v1 header size tools: kwbimage: Use -a parameter (load address) for v1 images arm: mvebu: Fix return_to_bootrom() arm: mvebu: Mark return_to_bootrom() as a noreturn function arm: mvebu: Implement return_to_bootrom() via U-Boot's SPL framework arm: mvebu: Use U-Boot's SPL BootROM framework for booting from NAND/UART arm: mvebu: Always use BootROM for loading the rest of U-Boot's binary arm: mvebu: gdsys: Remove custom spl_board_init() arm: mvebu: Remove legacy U-Boot header from kwbimage v1 files tools: kwbimage: Remove v1 kwbimage SPL padding to CONFIG_SYS_U_BOOT_OFFS bytes arm: mvebu: Remove unused macro CONFIG_SYS_U_BOOT_OFFS tools: kwbimage: Add support for more BINARY headers tools: kwbimage: Don't parse PAYLOAD keyword tools: kwbimage: Add support for DATA command also for v1 images tools: kwbimage: Add support for a new DATA_DELAY command tools: kwbimage: Do not hide usage of secure header under CONFIG_ARMADA_38X Makefile | 2 +- arch/arm/mach-mvebu/Kconfig | 16 +- arch/arm/mach-mvebu/include/mach/cpu.h | 2 +- arch/arm/mach-mvebu/lowlevel_spl.S | 3 +- arch/arm/mach-mvebu/spl.c | 90 +------ board/gdsys/a38x/Makefile | 2 +- board/gdsys/a38x/spl.c | 20 -- include/configs/clearfog.h | 6 +- include/configs/controlcenterdc.h | 8 +- include/configs/db-88f6720.h | 3 - include/configs/db-88f6820-amc.h | 5 - include/configs/db-88f6820-gp.h | 6 - include/configs/db-mv784mp-gp.h | 3 - include/configs/ds414.h | 5 - include/configs/helios4.h | 6 +- include/configs/theadorable.h | 3 - include/configs/turris_omnia.h | 6 - include/configs/x530.h | 3 - scripts/config_whitelist.txt | 1 - tools/Makefile | 8 - tools/kwbimage.c | 339 +++++++++++++++++-------- tools/kwbimage.h | 30 ++- tools/kwboot.c | 14 +- 23 files changed, 296 insertions(+), 285 deletions(-) delete mode 100644 board/gdsys/a38x/spl.c Tested-by: Chris Packham