From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Date: Wed, 18 Apr 2018 15:40:29 +0200 Subject: [U-Boot] [PATCH 7/8] riscv: nx25: Enable distro boot In-Reply-To: <20180418134030.55127-1-agraf@suse.de> References: <20180418134030.55127-1-agraf@suse.de> Message-ID: <20180418134030.55127-8-agraf@suse.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 */ -- 2.12.3