From patchwork Thu Apr 19 15:49:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 133832 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp790620ljf; Thu, 19 Apr 2018 08:51:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+JWB1y85vF96ehw1bU5fLijNduTS1rSYii4/HXj+rvLFERPCPO/x3rFqzcm+CVqZFixyHH X-Received: by 10.80.131.199 with SMTP id 65mr9341205edi.197.1524153116284; Thu, 19 Apr 2018 08:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524153116; cv=none; d=google.com; s=arc-20160816; b=sP8rjBd14Q1mznKCvbFsQgr0I0pmtcwmeAjRxMuJXQfnLBaiEOORaGAQsqdjkXlZ43 DDKKib7MVeNeurxgugzqRAbu3uCpZkLdZ9O4Jn3o9716bECM/Yt63IizIexB1HWBjlS9 Gh2WHPp5xo1lj6UbjV1GlPBwyVx2s+F6cvcAiUo3VNx244sTGjeIQ3MGC36JWYH6KGDh JpR/EXd3jihU9PtODaf5P6GXWGHcQQOBizie3b5hfy2/zSxVxHQELHz5nM4RqpheaBFh xfyKA92FnZ0QCyCODJ3XD6NaKCH4GGM0YDNeW6K2XEsH105oPZ2iL+61NPht9R5WIdFi rzAw== 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=bH+p1QYlmU3tTCGtBBU9543uBgBJhU8xNB8ngbzCRmFVLmWqeKyl2HLdLrEkOalOsC 8cVUJpS7ELf2VI7qlA1CAD06mKsXPEpKZ4gNsiFA30mPificYkYXp4UmfvicycH4PHzg WSVBnpVrlSYwy1a9Eb6mrNrmENAohFhsB+37VRwyoresZPZqRIv1ah0Oay+jcSyD5pVK Xj4bYuRoSR3IlGl4/M5AaBRsNh7E/DG9kzHtMDArLlXd/br+PTiQuwGeW7IluBgKDMsj X2+54BA/FeHps+J97Wb9IQZj7OBRDaq/gSz2VCyJaxaT8EiWFds/lJcpagegHBxu5TpH NI5A== 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 d10si3682313edn.22.2018.04.19.08.51.55; Thu, 19 Apr 2018 08:51:56 -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 CD26CC21FE2; Thu, 19 Apr 2018 15:50:07 +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 D93E1C21FCF; Thu, 19 Apr 2018 15:49:30 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B0362C21E89; Thu, 19 Apr 2018 15:49:26 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id BDEB7C21FA3 for ; Thu, 19 Apr 2018 15:49:25 +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 3A512AF87; Thu, 19 Apr 2018 15:49:25 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Thu, 19 Apr 2018 17:49:22 +0200 Message-Id: <20180419154923.70719-8-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20180419154923.70719-1-agraf@suse.de> References: <20180419154923.70719-1-agraf@suse.de> Cc: Heinrich Schuchardt , schwab@suse.de, Greentime Hu Subject: [U-Boot] [PATCH v2 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 --- 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 */