From patchwork Wed Apr 18 13:40:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 133626 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp5895173ljb; Wed, 18 Apr 2018 06:43:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/V83Df0xSx7qyJrTn0wPrKnIoIdD6OClTypH616uWlryR7XRMn0fDg6iz2P20phCZxm9Yl X-Received: by 10.80.136.81 with SMTP id c17mr3219809edc.211.1524059003387; Wed, 18 Apr 2018 06:43:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524059003; cv=none; d=google.com; s=arc-20160816; b=0Qv/7g8NrUAP5SiIDT4VFujkdW3N9IifsZjybON6OuLeqfriAiNgnL3N8NIJEP5ikb 74qYRitLcz6zImtfb+ChF+zUJ0CzyfI2aHS/MZ22YMsZmzoIVFRnuAQHttEcWuULkpS9 4BktnyKbVoHPBtyIyZ6dbCXLW+9smH3XYI0olfWnXgtlVRwkwj2kKBPzvynB5muX0oYn nVb+wgarZ0DLUuo4IpNRSTWYg32CUH8p8+/zyXSezrw9YWfwrpWUCh/Y+TvKsikRCwqs vU0HqZNSlhTGzVY9e/+tlyoplYQ+HN+jXOMAqCE925c7H2H2hkcwYDBxb4aSasMbbJvX heEw== 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=tLWQ+9FNAGGzR79R4E19XtlD0n238hrcReziw8U389VEZ50+59R2EEnvLj2482uuOf IrnoFfBWvOJimRnnzdLm33gDhVoPLHpacjL9G4jYDbMnlb+2MVdnnnCs/LWc9THzRlfv 9YEh8lYUDeBjPFv5YfXlKhwwqSVwSuKb+XdpKWBJCI1GsE3I7dh6SqKMAGwkms4WE1Xx LQYs4/TT2Kb+ajNKWBD1QqWMzObRnG2HzVRFU3Rw7rv50WzcBxHwC9SW6wwp3pe1CXBl UFgCTaCrqX1wVNMqohYPpgwIE1iznOATlXIg++yCSIxPYkM5ugGbUjkzq5eTop+hiEUw BGMA== 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 v45si1588239edc.307.2018.04.18.06.43.22; Wed, 18 Apr 2018 06:43:23 -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 C021DC21EE4; Wed, 18 Apr 2018 13:41:49 +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 971D4C21ECE; Wed, 18 Apr 2018 13:40:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 77503C21C93; Wed, 18 Apr 2018 13:40:34 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id A3F09C21D4A for ; Wed, 18 Apr 2018 13:40:33 +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 16F76AD7F; Wed, 18 Apr 2018 13:40:33 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Wed, 18 Apr 2018 15:40:29 +0200 Message-Id: <20180418134030.55127-8-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20180418134030.55127-1-agraf@suse.de> References: <20180418134030.55127-1-agraf@suse.de> Cc: Heinrich Schuchardt , Greentime Hu Subject: [U-Boot] [PATCH 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 */