All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 7/8] riscv: nx25: Enable distro boot
Date: Tue, 24 Apr 2018 09:53:37 +0200	[thread overview]
Message-ID: <cb68141f-3814-5dd7-0ebf-07cf31f6fae2@suse.de> (raw)
In-Reply-To: <752D002CFF5D0F4FA35C0100F1D73F3F6B78CAD2@ATCPCS16.andestech.com>

On 04/24/2018 08:28 AM, rick at andestech.com wrote:
>
>> -----Original Message-----
>> From: Alexander Graf [mailto:agraf at suse.de]
>> Sent: Monday, April 23, 2018 2:00 PM
>> To: u-boot at lists.denx.de
>> Cc: Rick Jian-Zhi Chen(陳建志); Greentime Hu; Philipp Tomsich; Heinrich
>> Schuchardt; schwab at suse.de
>> Subject: [PATCH v3 7/8] riscv: nx25: Enable distro 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 <agraf@suse.de>
>> ---
>>   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 <config_distro_bootcmd.h>
>> +
>> +#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
>> +
> Hi Alexander
>
> This default env setting seem try to load something(maybe script, or kernel and dtb ?) from mmc and tftpserver
> But I do not know how to prepare this script or image.
>
> I am not sure if the understanding is correct ?
> Can you explain it ?

The distro boot script logic is described quite nicely here:

   https://github.com/u-boot/u-boot/blob/master/doc/README.distro

I personally only care about a subset of it though, which is the 
efi_loader loading logic:

   https://github.com/u-boot/u-boot/blob/master/doc/README.uefi

With distro boot enabled, the distro boot script will automatically 
search for a file called /efi/boot/bootriscv64.efi (or 32 respectively) 
and execute it as UEFI binary. The next step I need to get to still is 
to enable RISC-V UEFI support in grub. Once we have that, we can boot 
RISC-V systems like any other platform we support in openSUSE.


Alex

  reply	other threads:[~2018-04-24  7:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23  5:59 [U-Boot] [PATCH v3 0/8] riscv: Enable efi_loader support Alexander Graf
2018-04-23  5:59 ` [U-Boot] [PATCH v3 1/8] riscv: Add setjmp/longjmp code Alexander Graf
2018-05-07  2:25   ` rick at andestech.com
2018-04-23  5:59 ` [U-Boot] [PATCH v3 2/8] riscv: Enable function sections Alexander Graf
2018-04-23  7:35   ` Heinrich Schuchardt
2018-04-23 17:21     ` Alexander Graf
2018-05-07  2:24   ` rick at andestech.com
2018-04-23  5:59 ` [U-Boot] [PATCH v3 3/8] riscv: Add EFI application infrastructure Alexander Graf
2018-04-23  5:59 ` [U-Boot] [PATCH v3 4/8] riscv: Add board_quiesce_devices stub Alexander Graf
2018-05-07  2:25   ` rick at andestech.com
2018-04-23  5:59 ` [U-Boot] [PATCH v3 5/8] efi_loader: Use EFI_CACHELINE_SIZE in the image loader too Alexander Graf
2018-04-23  7:19   ` Heinrich Schuchardt
2018-04-23  5:59 ` [U-Boot] [PATCH v3 6/8] distro: Extend with RISC-V defines Alexander Graf
2018-04-23  6:56   ` Heinrich Schuchardt
2018-04-23  5:59 ` [U-Boot] [PATCH v3 7/8] riscv: nx25: Enable distro boot Alexander Graf
2018-04-24  6:28   ` rick at andestech.com
2018-04-24  7:53     ` Alexander Graf [this message]
2018-05-07  2:33   ` rick at andestech.com
2018-04-23  5:59 ` [U-Boot] [PATCH v3 8/8] efi_loader: Enable RISC-V support Alexander Graf
2018-05-06 20:59 ` [U-Boot] [PATCH v3 0/8] riscv: Enable efi_loader support Alexander Graf
2018-05-07  2:13   ` rick at andestech.com
2018-05-09  7:30     ` Alexander Graf
2018-05-06 21:11 ` Tom Rini
2018-05-07  2:18   ` rick at andestech.com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb68141f-3814-5dd7-0ebf-07cf31f6fae2@suse.de \
    --to=agraf@suse.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.