unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: guix-devel@gnu.org
Subject: Re: Question about Guix on Novena - mainly U-Boot
Date: Sat, 5 Dec 2020 01:33:55 +0100	[thread overview]
Message-ID: <20201205013355.122af4b3@primarylaptop.localdomain> (raw)
In-Reply-To: <20201204194937.6060a798@scratchpost.org>

[-- Attachment #1: Type: text/plain, Size: 2746 bytes --]

On Fri, 4 Dec 2020 19:49:37 +0100
Danny Milosavljevic <dannym@scratchpost.org> wrote:> 
> Now I want to make it boot it from SATA instead.
The question is what "boot from SATA" means here, it could mean
different things:
- Have u-boot on the microSD card and load the rootfs from the SATA
  HDD/SSD.
- Make the bootrom load u-boot from the SATA HDD/SSD.

Luckily the I.MX6 SOC is capable of loading u-boot from a SATA HDD/SSD
but it needs to be configured for that.

However it looks like the novena-eeprom utility only somehow does the
former:
https://github.com/xobs/novena-eeprom/blob/master/novena-eeprom.h

In addition I'm unsure if upstream u-boot can parse the sataroot flag
as I didn't find it but I only looked very rapidely and not on the
latest source code.

To configure the I.MX6 SOC to boot from a SATA HDD/SSD you'll have to
dig in the I.MX6Q reference manual and the schematics of the novena to
see how it is configured.

- You have fuses that select a boot mode
- One of the boot mode selected by the fuses configuration enables GPIO
  overrides (this is what we want here).

So with the reference manual and the schematics depending on the
fuses configurations, you could be able to understand the boot order of
the SOC (which peripherals it tries to load u-boot from and in which
order).

And if it's set in GPIO override mode and that the GPIOs are routed to
some switch or jumpers, you can probably manage to change the way it
boots and make sure it tries to load u-boot from the SATA HDD/SSD.

The u-boot source code also may have documentation about that. Some
boards (like the TBS2910) have some documentation on how they are
configured to boot. Since I didn't find the novena in doc/boards, you
might still have some luck if there is some more generic documentation
about booting devices with I.MX6Q.

If the Novena can't boot from SATA as-is, you could try to see if there
isn't a way through the configuration headers to configure the bootrom
to try to boot on SATA somehow. That configuration header (DCD) will
probably need to be on a peripheral that the bootrom tries to boot on.
Booting of I2C eeproms is possible on I.MX6 but again you'll have to
check the documentation to see if it satisfies all requirements
(including if the eeprom is wired to the proper I2C controller
and/or pads to be able to be read from the bootrom).

If not in the worst case you will probably need some minimal code on a
peripheral the bootrom tries to load code from.

There is probably some resources for the Novena (Forums, IRC channels
etc) that already have all theses answers but in any case understanding
a bit of the context here could help parse the answers.

Denis.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2020-12-05 12:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 18:49 Question about Guix on Novena - mainly U-Boot Danny Milosavljevic
2020-12-04 19:15 ` Danny Milosavljevic
2020-12-05  0:33 ` Denis 'GNUtoo' Carikli [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-05  0:08 Stefan

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20201205013355.122af4b3@primarylaptop.localdomain \
    --to=gnutoo@cyberdimension.org \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).