public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dennis Gilmore <dennis@ausil.us>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 0/3] sunxi: Fix boot of Cubietruk and al.
Date: Wed, 25 Oct 2017 20:46:08 -0500	[thread overview]
Message-ID: <1508982368.6410.13.camel@ausil.us> (raw)
In-Reply-To: <20171025184101.aihe47qongf52e7c@excalibur.cnev.de>

El mié, 25-10-2017 a las 20:41 +0200, Karsten Merker escribió:
> [CCing Vagrant Cascadian, the Debian U-Boot maintainer]
> 
> On Wed, Oct 25, 2017 at 02:42:50PM +0100, Andre Przywara wrote:
> > On 25/10/17 12:58, Siarhei Siamashka wrote:
> > > On Tue, 24 Oct 2017 18:21:43 +0100
> > > Andre Przywara <andre.przywara@arm.com> wrote:
> > > > That being said I have prepared a patch to switch sunxi ARM64
> > > > boards
> > > > over to ENV_IS_IN_FAT, because I guess we will hit the wall
> > > > soon there
> > > > and have no Thumb2 to get off lightly.
> 
> [...]
> > > I don't think that we have any significant number of U-Boot env
> > > users
> > > on 32-bit sunxi hardware either. For example, we can do a search
> > > in
> > > the linux-sunxi wiki to compare the usage of environment vs.
> > > boot.scr
> > > and uEnv.txt:
> > > 
> > >    https://linux-sunxi.org/index.php?search=saveenv
> > >    https://linux-sunxi.org/index.php?search=boot.scr
> > >    https://linux-sunxi.org/index.php?search=uenv.txt
> > > 
> > > Using saveenv is justified only in very rare exceptional cases.
> > > They do
> > > exist, otherwise Maxime would not have encountered the problem in
> > > the
> > > first place. But I think that we should encourage Maxime to
> > > migrate 
> > > away from it. I would really like to know a bit more about his
> > > use case.
> 
> Hello,
> 
> I cannot speak for Maxime, but from a distro point of view there are
> at
> least two common usecases:
> 
> a) Changing the default boot order
> 
>    At least among Debian users it is not uncommon to run the
>    installer from an SD-card (Debian provides SD-card images with
>    u-boot and the Debian installer) and install the distro to a
>    harddisk (especially on the A20 where native SATA is
>    available).  The default boot order is MMC before SATA and
>    USB, i.e. after installing to SATA or USB, the user must
>    change the boot order by setting the boot_targets variable
>    accordingly and saving it into the persistent environment,
>    because otherwise the system would reboot into the installer
>    on the SD card all the time instead of booting the installed
>    system.  Removing the SD card isn't an option because then
>    there wouldn't be any (mainline) u-boot anymore.
> 
>    This isn't a problem when installing to the SD-card from which
>    the installer was loaded as the SD-card gets repartitioned and
>    the installer is overwritten in that case.
This is a bit unfortunate, if only we had spi or some other flash for
stroing u-boot on all the hardware so that vendors could ship something
that just works. wiping out the installer would b an option, but that
is pretty ugly. 

> b) Changing the default console device
> 
>    The Debian boot.scr passes the contents of the u-boot console
>    variable to the kernel as the system console device.  All
>    sunxi-based systems default to serial console, but there are
>    quite a number of users that don't have a serial console cable
>    but instead run their console on HDMI.  They change their
>    system console by setting the u-boot "console" variable
>    accordingly and running saveenv. This works as u-boot runs
>    its own console both on serial and simplefb in parallel, while
>    the Linux kernel can only have one system console device at
>    a time.
u-boot and the linux kernel actually default to displaying to both the
serial console and the HDMI console. the user can intereact with both
at the same time. At least it is true on the sunxi machines I have
tested it on, with zero need to setup any console lines or do anything
special. I suspect that you no longer need to have a boot.scr at all.

> > As mentioned above, I don't care so much about a saved environment,
> > but
> > I am merely a "user" of U-Boot, so it's not really my call.
> > As long as there is a non-negligible amount of users, we should
> > consider
> > preserving the saved environment.
> > 
> > > The Linux distributions don't seem to rely on the U-Boot
> > > environment
> > > (if I understood their feedback correctly).
> > 
> > That would be an interesting data point to know for sure.
> 
> Please see above :-).
> 
> > > Currently boot.scr or uEnv.txt is loaded from FAT or other
> > > partitions as part of distro boot. Is this really not enough?

> In Debian's case it is "other partitions". Debian doesn't create
> any FAT partitions on non-UEFI systems. The /boot partition is
> ext2 and for the other partitions ext4 is the default filesystem.
> Therefore forcing the environment onto a FAT partition would
> surely cause problems when upgrading an existing system to a
> newer u-boot version.
> 
> uEnv.txt is AFAICS not used by mainline u-boot at all, at least
> on sunxi-based systems.

Fedora does not use or support uEnv.txt or boot.scr our disk images
ship with a fat partition at the start so that we can ship the firmware
needed to boot on a raspberry pi, however any 32 bit system installed
using anaconda will not have a fat partition at all. /boot is ext4 and
depeding on if you use server or a different installer you will by
default get xfs or ext4 on lvm, there is the ability to choose
different options. Older disk images before we supported raspberry pi
did not have fat partition at all. so there is likely a lot of machines
without access to afat partition that would break if if it became
required.

Dennis

  parent reply	other threads:[~2017-10-26  1:46 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-19  8:26 [U-Boot] [PATCH 0/3] sunxi: Fix boot of Cubietruk and al Maxime Ripard
2017-10-19  8:26 ` [U-Boot] [PATCH 1/3] ARM: sunxi: Disable USB host options by default Maxime Ripard
2017-10-19  8:48   ` Alexander Graf
2017-10-19  9:11     ` Andre Przywara
2017-10-19 11:55       ` Maxime Ripard
2017-10-19  8:54   ` Peter Robinson
2017-10-19 11:44   ` Mark Kettenis
2017-10-19  8:26 ` [U-Boot] [PATCH 2/3] ARM: sunxi: Disable FAT write " Maxime Ripard
2017-10-19  8:26 ` [U-Boot] [PATCH 3/3] efi_loader: Do not enable it by default for sunxi Maxime Ripard
2017-10-19  8:43   ` Peter Robinson
2017-10-19  9:01     ` Maxime Ripard
2017-10-19  9:06       ` Peter Robinson
2017-10-19  9:12         ` Peter Robinson
2017-10-19 11:43           ` Maxime Ripard
2017-10-19 21:40             ` Rob Clark
2017-10-20  7:20               ` Maxime Ripard
2017-10-20 12:27                 ` Peter Robinson
2017-10-20 12:36                   ` Maxime Ripard
2017-10-20 12:54                     ` Tom Rini
2017-10-20 16:39                       ` Maxime Ripard
2017-10-20 17:57                         ` Tom Rini
2017-10-20 18:52                         ` Peter Robinson
2017-10-20 12:56                     ` Peter Robinson
2017-10-19  9:12         ` Maxime Ripard
2017-10-23 13:35     ` Heinrich Schuchardt
2017-10-19  8:51   ` Alexander Graf
2017-10-19 10:54     ` Jonathan Gray
2017-10-19 11:52     ` Maxime Ripard
2017-10-19 11:39   ` Mark Kettenis
2017-10-19 11:48     ` Maxime Ripard
2017-10-19 13:24   ` Tom Rini
2017-10-19  8:44 ` [U-Boot] [PATCH 0/3] sunxi: Fix boot of Cubietruk and al Alexander Graf
2017-10-19  9:11   ` Maxime Ripard
2017-10-19 12:10     ` Alexander Graf
2017-10-19  9:10 ` Siarhei Siamashka
2017-10-19 13:20   ` Tom Rini
2017-10-19 13:26   ` Maxime Ripard
2017-10-19 13:03 ` Andre Przywara
2017-10-19 13:24   ` Maxime Ripard
2017-10-19 13:31     ` Tom Rini
2017-10-19 14:42     ` Andre Przywara
2017-10-19 14:58       ` Maxime Ripard
2017-10-20 21:33         ` Dennis Gilmore
2017-10-23  7:35           ` Maxime Ripard
2017-10-24 17:05             ` Dennis Gilmore
2017-10-24 17:21               ` Andre Przywara
2017-10-25  9:42                 ` Maxime Ripard
2017-10-25  9:55                   ` Jagan Teki
2017-10-25 12:30                     ` Maxime Ripard
2017-10-25 10:01                   ` Andre Przywara
2017-10-25 11:58                 ` Siarhei Siamashka
2017-10-25 13:42                   ` Andre Przywara
     [not found]                     ` <20171025184101.aihe47qongf52e7c@excalibur.cnev.de>
2017-10-26  1:46                       ` Dennis Gilmore [this message]
2017-10-25 13:45                   ` Tom Rini
2017-10-25 13:50                   ` Maxime Ripard
2017-10-20 21:31     ` Dennis Gilmore
2017-10-19 13:28 ` Tom Rini
2017-10-19 13:50   ` Maxime Ripard

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=1508982368.6410.13.camel@ausil.us \
    --to=dennis@ausil.us \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox