All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RESENT PATCH v3] rockchip: update emmc/sd index for distro boot order
Date: Thu, 29 Nov 2018 22:04:50 +0100	[thread overview]
Message-ID: <45E10C94-4909-4C3E-8323-262935CE9492@theobroma-systems.com> (raw)
In-Reply-To: <8a6d4260-8b60-66aa-0058-4f11d4b01985@phytec.de>

+Vagrant

Let’s also hear the opinion of the Debian project on this...

> On 29.11.2018, at 10:54, Wadim Egorov <w.egorov@phytec.de> wrote:
> 
> Hi,
> 
> Am 29.11.18 um 02:48 schrieb Kever Yang:
>> 
>> On 11/28/2018 05:15 PM, Philipp Tomsich wrote:
>>> Kever,
>>> 
>>>> On 28.11.2018, at 03:06, Kever Yang <kever.yang@rock-chips.com> wrote:
>>>> 
>>>> According to the emmc/sdcard index in dts alias, emmc is always 0 and
>>>> sdcard index is 1, let's update to using correct mmc number for distro
>>>> boot order in common header.
>>>> 
>>>> SD card suppost to have higher priority so that people can boot into
>>>> the firmware in SD card, this is very convenient for developer try with
>>>> distro img from SUSE, Fedora and etc. Developer only need to 'dd' the
>>>> Distro image(which id download from OS vendor release) into SD card without
>>>> any modify and then we can boot it up directly.
>>> You never addressed the review comment from Klaus (from the review in May):
>> I do address the review comment and that's why this patch has been V3
>> but not a RESEND for V1. The source code does not change, while the commit
>> message has update to make it more clear why this patch is needed.
>> 
>> I'm sorry to Klaus for not sure if I have reply to him directly, but I
>> do this
>> because I always not get response after I send out my comments in this
>> channel,
>> then I thought send a new patch with necessary update may be more fast to
>> make patch merged.
>> 
>>>> Also prioritising SD card over eMMC does not make any sense to me. At least on
>>>> RK3399 and RK3368 the default ROM boot order is first eMMC then SD card. So 
>>>> starting U-Boot from eMMC and then loading the Kernel from SD-card doesn’t sound
>>>> right for me. 
> 
> +1 for keeping the ROM boot order also for u-boot.
> 
> 
>>> This will change default behaviour and may break things for users in the field.
>>> Before we can move forward, we really need to establish a consensus on this
>>> and how users will be affected.
>>> 
>>> While this doesn’t matter much for our boards, as we have logic to rewrite the
>>> default boot during boot-up anyway, I expect a lot of trouble for mainline users
>>> with their own boards...
>> First we have to understand what we want and what we should do, I think the
>> origin comment "First try to boot from SD (index 0), then eMMC (index 1)" is
>> what we want, but the index is wrong, so we have to correct it, and my first
>> commit message is about "index fix".
>> And I do explain in latest commit message about why we need boot SD first,
>> but I'm not sure if you have read it.
>> 
>> Rockchip private loaders always make SD as higher priority then eMMC,
>> because
>> we may need use SD to update the firmware for eMMC or just a temporary test
>> only image to check if the PCB is good or not.
>> I think most of SBC developers prefer to use SD card instead of eMMC,
>> because
>> write a SD is easier then update eMMC firmware with vendor tools, and we can
>> use SD card just like we try a Ubuntu in a Udisk without install it in
>> hard disk for PC,
>> just like I write in the commit message.
> 
> If that is the case, then the SBC developers can override
> BOOT_TARGET_DEVICES to their needs in the specific board include file.
> 
> 
>> 
>> If we keep eMMC as higher priority, then people have no chance to use
>> firmware
>> in SD card if there already have firmware in eMMC.
> 
> AFAIK most of the rockchip boards provide a jumper to somehow cut the
> eMMC clock and bypass the fixed ROM boot order.
> 
> Regards,
> Wadim
> 
>> 
>> Then let's check if this "break things for users in the field ", this
>> patch only affect the
>> case both eMMC and SD have available firmware(boot.img), right?
>> I think people only write firmware to SD when they want to boot from it,
>> or else
>> people would never do it, the SD will be a normal external storage if
>> they want to use
>> the firmware in eMMC. I don't think  there will be "a lot of trouble for
>> mainline users ".
>> 
>> With this patch, people can use firmware in SD card if they want;
>> Without this patch, people never able to use firmware in SD card if eMMC
>> firmware exist
>> (even if it's broken).
>>  
>> 
>> Hi Klaus,
>>     How do you think?
>> 
>> Thanks,
>> - Kever
>>>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>>>> ---
>>>> 
>>>> Changes in v3:
>>>> - update the commit message
>>>> Series-changes: 2
>>>> - update the commit message
>>>> 
>>>> include/configs/rockchip-common.h | 6 +++---
>>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>> 
>>>> diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
>>>> index 68e1105a4b..8a72613e52 100644
>>>> --- a/include/configs/rockchip-common.h
>>>> +++ b/include/configs/rockchip-common.h
>>>> @@ -11,11 +11,11 @@
>>>> 
>>>> #ifndef CONFIG_SPL_BUILD
>>>> 
>>>> -/* First try to boot from SD (index 0), then eMMC (index 1) */
>>>> +/* First try to boot from SD (index 1), then eMMC (index 0) */
>>>> #if CONFIG_IS_ENABLED(CMD_MMC)
>>>> 	#define BOOT_TARGET_MMC(func) \
>>>> -		func(MMC, mmc, 0) \
>>>> -		func(MMC, mmc, 1)
>>>> +		func(MMC, mmc, 1) \
>>>> +		func(MMC, mmc, 0)
>>>> #else
>>>> 	#define BOOT_TARGET_MMC(func)
>>>> #endif
>>>> -- 
>>>> 2.18.0
>>>> 
>> 
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de <mailto:U-Boot@lists.denx.de>
>> https://lists.denx.de/listinfo/u-boot <https://lists.denx.de/listinfo/u-boot>

  reply	other threads:[~2018-11-29 21:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28  2:06 [U-Boot] [RESENT PATCH v3] rockchip: update emmc/sd index for distro boot order Kever Yang
2018-11-28  9:15 ` Philipp Tomsich
2018-11-29  1:48   ` Kever Yang
2018-11-29  9:54     ` Wadim Egorov
2018-11-29 21:04       ` Philipp Tomsich [this message]
2018-11-30  1:27       ` Kever Yang
2018-11-30 10:26         ` Wadim Egorov
2018-11-29 21:31     ` Philipp Tomsich
2018-11-29 21:44       ` Philipp Tomsich
2018-11-29 22:01         ` Klaus Goger
2018-11-29 22:14           ` Klaus Goger
2018-11-30  2:08         ` Kever Yang
2019-01-23  2:14 ` Kever Yang
2019-01-23 11:00   ` Philipp Tomsich
2019-01-24  8:21     ` Kever Yang

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=45E10C94-4909-4C3E-8323-262935CE9492@theobroma-systems.com \
    --to=philipp.tomsich@theobroma-systems.com \
    --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.