From patchwork Mon Apr 23 05:59:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 133951 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp615025lji; Sun, 22 Apr 2018 23:00:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx49AZVSuGWq1PVmoHyfSwno85sGIadbJ9Go+3nCKQ1JmFzGMQ0Pfvc04Y1i8q/8TcqYNWu+0 X-Received: by 10.80.158.40 with SMTP id z37mr26644312ede.246.1524463247060; Sun, 22 Apr 2018 23:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524463247; cv=none; d=google.com; s=arc-20160816; b=loe/D3aA3gyD1oNPNyCgCRnWUxdBnrXGKRUxwbSTX/T1fMOXvdDI3J6cGy7ZyX/z1L ZEDRNwcnDi5iOQC4NyDp7gcIPfiC9rZy+xqKVOysjGtJ5UeSpXJuZdF8YCoIcVW7JMAE GlrVYc6ZY1FykUIFo+/zDsctK+O93sxLpu2QumjYZJPtkYknug51dzjbuSU1I8bAFMuS TjUUB8JQDTtLi7uiwxudfLvtqsqkAGgY7OLaj2wSQXrtBjcwKOTh+pJyMeFOUR81HJxZ t5VdpkXFuXnpi0C3XvZQ3Y+Xv8G+SuYd4ZddK0nnxXZOqlGyqk69GhMovrQaAjm72fs/ YP2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:arc-authentication-results; bh=m/49hZyaBWv8+T9KV58SXA4zMrUiuG5mBleY4wcmPr4=; b=var9ftO2Oi99ByMVnY3ggNHRYRb7POkjlouGJ6jVEfkG7IlWaP1jQ9uM9IzZgngZii S8+EK5q17mjlCqAexNywvGzWjz56oxH1AgGMoeQbmaKzONlghrB/ZdLI3s5u652ntdfy tiGnwdYq9KgIDnzk4mjLqEulggXz6vToYwG2cyfp3oNU2Hs83m9EvsVHEgh0Qnl/tKqC GLqAWbDkoGbiOKvAnYssWWqXj+I/PxBf3e/Pqu0+a4oriorBwLMXSg76sJmjsFt4Qpes 09Zfs5/y6QiFiaDhGgbPT+qe4HxvCPlphZ3l/McgLP+z866WsGAaWpDVCWE7Y5DJk4O7 QGVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id l48si1005290edd.186.2018.04.22.23.00.46; Sun, 22 Apr 2018 23:00:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 9C711C21D65; Mon, 23 Apr 2018 06:00:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 32D8BC21DFA; Mon, 23 Apr 2018 06:00:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 21E6CC21C6A; Mon, 23 Apr 2018 05:59:52 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id D6CDDC21DD7 for ; Mon, 23 Apr 2018 05:59:51 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8C8C6AE90; Mon, 23 Apr 2018 05:59:51 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Mon, 23 Apr 2018 07:59:49 +0200 Message-Id: <20180423055950.78818-8-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20180423055950.78818-1-agraf@suse.de> References: <20180423055950.78818-1-agraf@suse.de> Cc: Heinrich Schuchardt , schwab@suse.de, Greentime Hu Subject: [U-Boot] [PATCH v3 7/8] riscv: nx25: Enable distro boot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Distro boot allows for a common boot path on systems that allow distributions to easily boot from a default configuration. This patch enables distro boot for the nx25-ae250. Hopefully this can serve as a good example for new boards, so they enable it as well. Signed-off-by: Alexander Graf Reviewed-by: Rick Chen --- configs/nx25-ae250_defconfig | 1 + include/configs/nx25-ae250.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/configs/nx25-ae250_defconfig b/configs/nx25-ae250_defconfig index 4f9bd58f75..437083231b 100644 --- a/configs/nx25-ae250_defconfig +++ b/configs/nx25-ae250_defconfig @@ -37,3 +37,4 @@ CONFIG_DM_SPI=y CONFIG_ATCSPI200_SPI=y CONFIG_TIMER=y CONFIG_ATCPIT100_TIMER=y +CONFIG_DISTRO_DEFAULTS=y diff --git a/include/configs/nx25-ae250.h b/include/configs/nx25-ae250.h index 0e4c431cab..a90c75abc4 100644 --- a/include/configs/nx25-ae250.h +++ b/include/configs/nx25-ae250.h @@ -105,4 +105,21 @@ /* Increase max gunzip size */ #define CONFIG_SYS_BOOTM_LEN (64 << 20) +/* When we use RAM as ENV */ +#define CONFIG_ENV_SIZE 0x2000 + +/* Enable distro boot */ +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) \ + func(DHCP, dhcp, na) +#include + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "kernel_addr_r=0x00080000\0" \ + "pxefile_addr_r=0x01f00000\0" \ + "scriptaddr=0x01f00000\0" \ + "fdt_addr_r=0x02000000\0" \ + "ramdisk_addr_r=0x02800000\0" \ + BOOTENV + #endif /* __CONFIG_H */