From: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Adding board support
Date: Mon, 17 Oct 2011 12:26:58 +0200 [thread overview]
Message-ID: <20111017102658.GA12373@avionic-0098.mockup.avionic-design.de> (raw)
In-Reply-To: <20111014232404.GB916-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 4779 bytes --]
* Thierry Reding wrote:
> * Stephen Warren wrote:
> > Thierry Reding wrote at Friday, October 14, 2011 12:59 PM:
> > > * Stephen Warren wrote:
> [...]
> > > U-Boot mainline support is another point on my TODO list. Getting the latest
> > > mainline code with the patches you mention (I assume you are referring to the
> > > patch series by Simon Glass and Tom Warren) to work would be a good step in
> > > that direction.
> >
> > I branched from: git://git.denx.de/u-boot.git master at commit
> > 0841ca90f22d73b0ea4642ef1ce33d879bb2f3ff.
> >
> > I applied the following:
> >
> > http://patchwork.ozlabs.org/patch/115862/
> > http://patchwork.ozlabs.org/patch/115864/
> > http://patchwork.ozlabs.org/patch/115865/
> > http://patchwork.ozlabs.org/patch/115860/
> > http://patchwork.ozlabs.org/patch/115863/
> > http://patchwork.ozlabs.org/patch/115861/
> >
> > http://patchwork.ozlabs.org/patch/119321/
> > http://patchwork.ozlabs.org/patch/119322/
> > http://patchwork.ozlabs.org/patch/119323/
> > http://patchwork.ozlabs.org/patch/119324/
> > http://patchwork.ozlabs.org/patch/119325/
> >
> > http://patchwork.ozlabs.org/patch/118184/
> >
> > I applied the following to hack the default environment so I could boot from
> > SD cards layed out how mine are; you'll probably need to tweak this a bunch:
> >
> > diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h
> > index 07546a4..f30f569 100644
> > --- a/include/configs/tegra2-common.h
> > +++ b/include/configs/tegra2-common.h
> > @@ -104,9 +104,19 @@
> >
> > /* Environment information */
> > #define CONFIG_EXTRA_ENV_SETTINGS \
> > - "console=ttyS0,115200n8\0" \
> > - "mem=" TEGRA2_SYSMEM "\0" \
> > - "smpflag=smp\0" \
> > + "bootcmd=run usb0_boot ; run usb1_boot ; run mmc1_boot ; run mmc0_boot\0" \
> > + "bootdelay=2\0" \
> > + "loadaddr=0x00500000\0" \
> > + "scriptaddr=0x408000\0" \
> > + "script_img=/u-boot/boot.scr.uimg\0" \
> > + "mmc0_boot=setenv devnum 0; run mmc_boot;\0" \
> > + "mmc1_boot=setenv devnum 1; run mmc_boot;\0" \
> > + "usb0_boot=usb start 0; run usb_boot;\0" \
> > + "usb1_boot=usb start 1; run usb_boot;\0" \
> > + "scr_boot=fatload ${devtype} ${devnum}:c ${scriptaddr} ${script_img};source ${scriptaddr};read ${devtype} ${devnum}:${kernelpart} ${scriptaddr} 0 10;source ${scriptaddr};\0" \
> > + "mmc_boot=mmc dev ${devnum};setenv devtype mmc;setenv devname mmcblk${devnum}p;run scr_boot;\0" \
> > + "usb_boot=setenv devtype usb;setenv devnum 0;setenv devname sda;run scr_boot;\0" \
> > + "platform_extras=lp0_vec=0x2000@0x1C406000 kcrashmem=0x100000@0x02000000 mem=384M@0M nvmem=128M@384M mem=511M@512M\0" \
> >
> > #define CONFIG_LOADADDR 0x408000 /* def. location for kernel */
> > #define CONFIG_BOOTDELAY 2 /* -1 to disable auto boot */
> >
> > In order to actually use the resultant u-boot.bin, it's pretty simple if you
> > already have nvflash working with burn fastboot.
> >
> > 1) Edit flash.cfg (or whatever config file you pass to nvflash to define
> > The partitions and their content) and replace the filename entry in the
> > EBT partition with u-boot.bin.
> >
> > 2) I personally remove all the partition entries in flash.cfg except for
> > BCT, PT, EBT. This will avoid nvflash flashing your Android/... filesystem.
> > If you want your filesystem in the same flash, don't do this.
> >
> > Then, run nvflash just like you would normally.
>
> Okay, I've been able to build U-Boot and setup some scripts that should
> automate the nvflash procedure according to your instructions. I'll have to
> wait until I get back to work on Monday to see whether it actually works,
> though.
I'm unable to make this work. I've done as you said, branched from the commit
you mentioned and applied the patches you listed. Then ran:
$ make CROSS_COMPILE=... O=build/harmony harmony_config
$ make CROSS_COMPILE=... O=build/harmony -j8
And flashed the resulting u-boot.bin like you described, by replacing the
fastboot.bin in the configuration with u-boot.bin. When rebooting the device
(I used a Harmony for this testing obviously) there's nothing. No output on
the serial line. Flashing fastboot.bin I can at least see some debugging
output.
I also tried to update the TEXT_BASE, which seems to be 0x00108000 for
fastboot, and 0x00E08000 for U-Boot, but that didn't make a difference. Any
ideas on what could be the problem?
I'm not quite sure where these values come from. Are they hard-coded in the
boot ROM? And how does it know from which NAND partition to load the
bootloader?
Thanks,
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-10-17 10:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 5:49 Adding board support Thierry Reding
[not found] ` <20111014054945.GA32399-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2011-10-14 16:31 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173BE1A290-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-14 18:58 ` Thierry Reding
[not found] ` <20111014185847.GA916-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2011-10-14 19:20 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173BE1A33E-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-14 23:24 ` Thierry Reding
[not found] ` <20111014232404.GB916-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2011-10-17 10:26 ` Thierry Reding [this message]
[not found] ` <20111017102658.GA12373-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2011-10-17 16:15 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173BE1A4C4-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-20 8:08 ` Thierry Reding
[not found] ` <20111020080808.GA5450-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2011-10-20 16:01 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173D51C14B-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-20 19:08 ` Thierry Reding
[not found] ` <20111020190827.GA31480-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2011-10-21 20:13 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173D51C577-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-25 5:57 ` Thierry Reding
[not found] ` <20111025055737.GB30358-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2011-10-27 15:47 ` Stephen Warren
2011-10-27 10:29 ` Thierry Reding
2011-11-09 19:41 ` Stephen Warren
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=20111017102658.GA12373@avionic-0098.mockup.avionic-design.de \
--to=thierry.reding-rm9k5ik7kjkj5m59nbduvrnah6klmebb@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox