[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Install on Orange Pi Plus eMMC work but no reboot



Le 07. 10. 16 à 13:33, Karsten Merker a écrit :
On Fri, Oct 07, 2016 at 01:57:41AM +0200, Jean-Christian de Rivaz wrote:

The debian-installer doesn't install u-boot, but it takes
explicit care not to destroy an existing u-boot installation
during the partitioning step.
Yes. It take so much care that it don't write u-boot when it
must write it...
Such an aggressive undertone doesn't exactly further the
discussion.

This was a joke, but I understand that it could hurt. Sorry about this.

If the installer is able to take care of the region where
u-boot is, why don't allow him to optionally copy that region
from the SD card to the eMMC ?
First, there is a massive difference between taking care to
preserve the boot area and thereby an existing u-boot setup
(which might not even come from Debian) and performing a write
operation that has the potential to wipe out the user's setup and
even potentially brick the system.

On some system, maybe. Not on the Orange Pi Plus

Second, simply copying the u-boot region from SD card to the eMMC
has a number of practical problems.  The exact layout of u-boot
and its environment is system-specific.  So while on many systems
simply copying the area between the partition table and the first
megabyte of the medium works in practice without negative
effects, that is not the case for _all_ systems, which again ends
up with the point that I already made: installing u-boot is a
system-dependent step where there is no "one size fits for all".

Agree.

Another practical problem is that the installer has no way to
know whether there is a valid u-boot setup on the SD card.  The
user might have a system that came preinstalled with a u-boot at
another location (eMMC, SPI NOR flash) and uses that to boot.
The SD card images are not the only way the installer can get
started, it can be booted by tftp or from a USB stick and there
is no way for the installer to know from where it was loaded and
whether the SD card that might happen to be in the slot by chance
contains a valid u-boot, so blindly copying the boot region from
the SD card might end up with a broken system.

Ok, I understand that if some code have to install u-boot, it have to get u-boot from a clean place.

You wrote an another mail:
This thread is explicitly about the Orange Pi Plus board,
because there exists a specific Debian installer SD card
firmware for that board.  This board do the boot order in the
right way and it's perfectly safe to write the bootloader on
is eMMC.
You might have misunderstood the way the SD card images are
built.  The "firmware" part of the images contains only the
partition table and the system-specific u-boot.  The actual
installer is the same for all platforms.  There is no such thing
as "the installer for the Orange Pi Plus", therefore all
components of the installer must use a platform-neutral design.

Well, I understand the technical part. But from a user point, when he see the Orange Pi Plus in the board list of the Debian installer, I think it's normal that he expect to be able to install a working system like the Debian installer do for a PC.

Again, I am not against providing an option to install u-boot
from within the installer, but it has to be done in a way that
works for multiple platforms and doesn't easily brick the user's
system.  These requirements cannot be fulfilled with "blindly
copy some sectors from the SD card in the slot".

A possible design could work similar to what the flash-kernel
package does, i.e. having a database of systems which lists the
specific needs and angles of each system and providing methods
to deal with common cases.

You mean the flash-kernel package and not by the flash-kernel-installer ?


Regarding the hd-media image: installing to the SD card from
which the installer is started works if the CD/DVD iso is
provided on another storage device such as on a USB stick.
What's the point to support a such complicated install setup if
at the end there is no u-boot to start the system ?
I'm sorry to have to say that, but to me this looks like it is
intended as flamebait :-(. I'll try to answer the question
nonetheless.

First, you were talking about the case of installing the system
onto the SD card from which you have booted u-boot and the
installer, so in this case there _is_ a u-boot.

Yes, but only at the installer time on that board. As soon as you reboot it without the SD card or without FEL OTG injection of u-boot, you are left with a useless board.

Second, the setup isn't complicated at all. The function of the
hd-media installer is to perform offline installations.  It pulls
the packages from a CD/DVD which can be available anywhere on the
system, be it in form of a physical disk in a CD/DVD drive or in
form of an ISO image on any block device.  Whether this block
device is an SD card or a USB stick doesn't matter at all from
the viewpoint of the installer.  That the case "have the packages
to be installed in a location that you repartition and format
during their installation" cannot work appears rather obvious to
me.

Agree, but again take the point of view of a user that simply want to install Debian on the Orange Pi Plus. By fare, the simplest way is to write a SD card image of the Debian installer into a SD card and insert it into the board slot. It could be netboot, or hd.media with an additional partition for the ISO image. Both will work to install Debian on the eMMC. Any others way require more work. Anyway, actually either methods will let the user with a useless board.

Regards,
Jean-Christian


Reply to: