Skip to content

tegra: Expand Nyan-big support

Sjoerd Simons u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 20 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 20 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/20] tegra: Expand Nyan-big support
Quoted 25 lines · Tomeu Vizoso
Quoted 24 lines · Tomeu Vizoso
Quoted 10 lines · Matthew Gorski

Seems if you change the FIT description from anything but

"description = "Chrome OS kernel image with one or more FDT blobs";"

the kernel wont load. So this issue has to be in the kernel- big.its
<https://git.collabora.com/cgit/user/tomeu/u-boot.git/tree/kernel
-big.its?h=nyan-big&id=35bcb399c0d78ba6a050cc775d467ee75ed06923>

Quoted 4 lines

https://git.collabora.com/cgit/user/tomeu/u-boot.git/tree/kernel-
big.its?h=nyan-big&id=35bcb399c0d78ba6a050cc775d467ee75ed06923

We may just need a proper working .its for nyan

Hi Matthew,

it has been quite a while, but I remember that if we only tried chainloading U-Boot was because the goal was to integrate these machines in our LAVA lab, which to date doesn't support Depthcharge (though I hope this will change once I get back some time).

Quoted 6 lines
Quoted 3 lines

I cannot remember how the correct position of the kernel within the FIT image was calculated, but it definitely involved looking at the depthcharge sources.

Actually, I have grepped my IRC logs and turns out that we need for the start of U-Boot's code to be aligned to 64kB.

Yup, U-boot both needs to be properly aligned and know its text base address.

So the calculation we did was basically look at depthcharge where in memory the FIT image gets loaded, determine a suitable load address after that (e.g fit load + 64k), configure that in u-boot and then add enough padding in the fit image itself such that the u-boot code starts at the determined address in memory by putting in just the right amount of padding ;).

It is rather ugly, but it does allow running u-boot without the need to change the firmware in flash.

Quoted 553 lines

Thus the padding.

Regards,

Tomeu

Quoted 547 lines

But I do think to remember that it was only an issue once U-Boot tried
to relocate itself.

I don't see any reason why my old branch wouldn't work today on your
machine, other than maybe your hw is a different revision with a memory chip that wasn't supported back then? I also don't see why mainline wouldn't work, provided you have that hack in the ITS.

I'm adding Sjoerd to CC in case he remembers.

Good luck,

Tomeu

Quoted 531 lines
Quoted 251 lines · Matthew Gorski
Quoted 235 lines · Simon Glass

Hi Matthew,

On 1 May 2017 at 17:27, Matthew Gorski <[email protected]

Quoted 14 lines

wrote:

Quoted 9 lines · Simon Glass

Hi Matthew,

Quoted 4 lines · Matthew Gorski

On Mon, May 1, 2017 at 2:36 PM, Simon Glass <sjg@chromi um.org>

Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

Hi Matthew,

On 1 May 2017 at 11:26, Matthew Gorski <matt.gorski@g mail.com>

Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

On Mon, May 1, 2017 at 1:03 PM, Simon Glass <sjg@ch romium.org>

Quoted 11 lines · wrote:
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

Hi Matthew,

Quoted 5 lines · Matthew Gorski

Let me repost this to the bottom.  New to the
mailing list ;)

I am using chained boot to test uboot as a FIT
image so I I

don't

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

have to
flash to spl flash.  Does CONFIG_SPL_TEXT_BASE
need to be

adjusted

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

for
chained boot?

I am using instructions to boot Linux for Tegra
from

sdcard/USB in

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines

developer
mode.  I can boot L4T fine with kernel v3.10.

What mainline branch should I try?

There's only one mainline, here:
http://git.denx.de/?p=u-boot.git;a=summary

There are various custodian branches but I don't
believe the

tegra

Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 28 lines
Quoted 11 lines
Quoted 5 lines

one
has anything different from mainline at present.

- Simon

I will give mainline a try with:

CONFIG_SYS_TEXT_BASE 0x8010E000
and

Quoted 7 lines

CONFIG_SPL_TEXT_BASE 0x80108000

I know I will also need:

CONFIG_DISPLAY_PORT=y

Do you mean CONFIG_DISPLAY? If so, it is already
defined.

Quoted 1 line

CONFIG_VIDEO_TEGRA124=y

That is defined in mainline

Quoted 2 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

for the console to display command prompt.

The FIT config I am using is from

here:https://git.collabora.com/cgit/user/tomeu/u-bo ot.git/

commit/?h=nyan-big

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

Do I need to adjust:

            load = <0>;
            entry = <0>;

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

/dts-v1/;

/ {
    description = "U-Boot + FDT --------- THIS
PADDING IS NEEDED

SO

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

THE
IMAGE STARTS AT THE RIGHT OFFSET";

Perhaps you need to adjust this? How was the length of it

calcualted?

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

I am really not sure how the padding was calculated.  I just assumed
this
kernel-big.its FIT config was correct for nyan_big.  I will try

using my

Quoted 36 lines
Quoted 36 lines
Quoted 36 lines

working linux kernel fit config.

Quoted 35 lines
Quoted 35 lines

    #address-cells = <1>;
    images {
        kernel at 1{
            description = "kernel";
            data = /incbin/("u-boot-dtb.bin"); type = "kernel_noload";
            arch = "arm";
            os = "linux";
            compression = "none";
            load = <0>;
            entry = <0>;
        };
        fdt at 1{
            description = "tegra124-nyan-big.dtb"; data = /incbin/("dts/dt.dtb"); type = "flat_dt";
            arch = "arm";
            compression = "none";
            hash at 1{
                algo = "sha1";
            };
        };
    };
    configurations {
        default = "conf at 1";
        conf at 1{
            kernel = "kernel at 1";
            fdt = "fdt at 1";
        };
    };
};

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

please let me know if I should also adjust the SPL CONFIG even

though

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

I
am chainbooting uboot:

https://www.chromium.org/chromium-os/firmware-porti
ng-guide/

using-nv-u-boot-on-the-samsung-arm-chromebook#TOC-Installing -nv-U-Boot-chained-U-Boot-method-

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

This is exynos, where we booted directly into U-Boot. Actually I'm
wondering we should boot directly into U-Boot (instead of SPL) on

nyan

Quoted 18 lines
Quoted 18 lines
Quoted 4 lines
Quoted 4 lines

also. Perhaps someone at collabora would know? Did you search the
mailing list?

Quoted 8 lines
Quoted 2 lines

Regards,
Simon

I have not searched the mailing list.  What should I search for?
Booting
nyan to u-boot directly bypassing SPL?

Here are two subjects to search for:

Veyron-speedy u-boot
[PATCH 0/20] tegra: Expand Nyan-big support

Quoted 8 lines
Quoted 2 lines

Regards,
Simon

Very odd if I do not use "#address-cells = <1>;" the display flashes and
reboots into recovery but if I do use #address-cells = <1>; in my FIT

config

Quoted 2 lines

I get a blank screen
so something is working when not using the padding.

If you figure out where u-boot-dtb.bin needs to start by looking at
depthcharge or where the kernel starts, then you can figure out how
long the padding needs to be at the start of the FIT. Rather than
guessing...!

Quoted 3 lines

- Simon

 Okay so depthcharge starts at 0x81000000 from here:

https://chromium.googlesource.com/chromiumos/platform/
depthcharge/+/master/board/nyan_big/defconfig#11

In my System.map for u-boot after building says the start is:
81000100 T __image_copy_start
81000100 T _start

Quoted 271 lines

Hence the define CONFIG_SYS_TEXT_BASE 0x81000100

So you say use 0x81000000 as the CONFIG_SYS_TEXT_BASE and not 0x81000100
correct?

Quoted 263 lines
Quoted 16 lines

/dts-v1/;

/ {
    description = "Chrome OS nyan u-boot chain boot method";
    #address-cells = <1>;
    images {
        kernel at 1{

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

On May 1, 2017 12:11 PM, "Matthew Gorski" <

matt.gorski at gmail.com>

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

wrote:

On May 1, 2017 11:45 AM, "Simon Glass" <sjg@chr
omium.org>

Quoted 10 lines · wrote:
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

Hi Matthew,

Quoted 4 lines · Matthew Gorski

Thanks for the reply Simon.

I have been trying to find the System.map for
depthcharge to

see

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 6 lines

the
kernel
load address but I am unable to find
anything.  I have tried
multiple
CONFIG_SYS_TEXT_BASE settings with no luck.

How did you choose what to use? Also note that
Tegra uses SPL

to

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

start, so you may need to adjust
CONFIG_SPL_TEXT_BASE instead.

Quoted 3 lines

I am creating my sdcard with a standard linux
(Linux for

Tegra)

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line

rootfs:

Did these instructions come from a web site
somewhere?

Quoted 3 lines

Partition an SD card

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

sudo cgpt create <MMC BLOCK DEVICE>
sudo cgpt add -b 34 -s 32768 -P 1 -S 1 -t
kernel <MMC BLOCK
DEVICE>
# 16
MB
kernel image partition
sudo cgpt add -b 32802 -s <ROOT PARTITION
SIZE in 512B

sectors>

Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines

-t
rootfs
<MMC BLOCK DEVICE>

cgpt doesn't seem to create a protective MBR.
If one is not
already
in
place, it can be created with:

sudo gdisk <MMC BLOCK DEVICE> # and enter
command w

Copy data to the SD card

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines

sudo dd if=./kernelpart.bin of=<MMC BLOCK
DEVICE>p1
sudo mkfs.ext4 <MMC BLOCK DEVICE>p2
sudo mount <MMC BLOCK DEVICE>p2 /mnt/

How are you actually making it boot? Is this in
dev mode with

USB

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

boot
enabled and pressing Ctrl-U?

Also, as this is a mailing list, please avoid
top-posting.

- Simon

I am using chained boot to test uboot as a FIT
image so I I

don't

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

have to
flash to spl flash.  Does CONFIG_SPL_TEXT_BASE
need to be

adjusted

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

for
chained boot?

I am using instructions to boot Linux for Tegra
from

sdcard/USB in

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

developer
mode.  I can boot L4T fine with kernel v3.10.

What mainline branch should I try?

Quoted 3 lines

On Mon, May 1, 2017 at 11:14 AM, Simon Glass
<

sjg at chromium.org>

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

wrote:

Hi Matthew,

On 1 May 2017 at 08:43, Matthew Gorski <

matt.gorski at gmail.com>

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

wrote:
I am porting u-boot to nyan_big and need
some input.  I

have

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

been
searching
high and low and found this thread here:
[U-Boot] [PATCH

0/20]

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

tegra:
Expand
Nyan-big support

 https://lists.denx.de/pipermail/u-boot/2
015-March/209530.

html

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

I have tried to build u-boot with the
branch here:

https://git.collabora.com/cgit

/user/tomeu/u-boot.git/commit/?h=nyan-big

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines

and also the official chromium next
branch

Have you tried mainline U-Boot? It already
supports nyan-big.
I'm
not
sure about the situation with the
downstream trees.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

I followed building instructions here:

https://www.chromium.org/chrom

ium-os/firmware-porting-guide/using-nv-u-boot-on-the-samsung -arm-chromebook

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines

I build with these commands:

mkimage -e 0x81000100 -a 0x81000100 -f
kernel-big.its
kernel-u-boot

(with and without the load address
setting)

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

vbutil_kernel --arch arm --pack
kernel.bin --keyblock
/usr/share/vboot/devkeys/kernel.keyblock
--signprivate
/usr/share/vboot/devkeys/kernel_data_key.
vbprivk

--version 1

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

--config
dummy.txt --vmlinuz kernel-u-boot --
bootloader dummy.txt

I have had numerous failed attempts to
boot uboot from

sdcard

Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines

mmcblk1p1

Any help is appreciated I have only
gotten a blank screen
after
weeks
of
flashing.  I can boot custom v3.10
kernels so I assume I am
using
the
correct building procedure.  Thanks in
advance for help

from

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

the
u-boot
community.

It is possible that it needs a particular
address due to
limitations
in the FIT support on Nyan. I'm not sure
what it is but

might be

Quoted 21 lines
Quoted 19 lines
Quoted 19 lines
Quoted 17 lines
Quoted 17 lines
Quoted 15 lines
Quoted 15 lines
Quoted 12 lines

able
to take a look at some point.

How are you building your SD card? Are you
following some
instructions
from somewhere?

Regards,
Simon

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

Signature · 2 lines
Sjoerd Simons
Collabora Ltd.