[U-Boot] [PATCH v5 0/7]
Dalon Westergreen
dwesterg at gmail.com
Thu Jan 26 05:45:50 CET 2017
On Wed, 2017-01-25 at 22:52 +0100, Frank Kunz wrote:
> Am 25.01.2017 um 21:21 schrieb Marek Vasut:
> >
> > On 01/25/2017 06:33 PM, Dalon Westergreen wrote:
> > >
> > > On Wed, 2017-01-25 at 08:39 -0600, Dinh Nguyen wrote:
> > > >
> > > >
> > > > On 01/25/2017 03:48 AM, Marek Vasut wrote:
> > > > >
> > > > >
> > > > > On 01/25/2017 05:13 AM, Dalon Westergreen wrote:
> > > > > >
> > > > > >
> > > > > > From: Dalon Westergreen <dalon.westergreen at intel.com>
> > > > > >
> > > > > > These patches update the boot and os partition numbers in
> > > > > > the
> > > > > > default uboot environment for a number of socfpga
> > > > > > boards. Per
> > > > > > request, common environment configurations have been moved to
> > > > > > a
> > > > > > shared
> > > > > > header.
> > > > > >
> > > > >
> > > > > OK, waiting for Acks from Dinh, just to be sure.
> > > > >
> > > > > btw a nit, please fill the $subject of cover letter next time.
> > > > >
> > > > >
> > > I was just informed of an issue with moving the fat/boot partition
> > > to p2. Windows no longer mounts the fat partition. I'm not sure
> > > who or why CONFIG_SYS_MMCSD_FS_BOOT_PARTITION was changed to 2
> > > but i think in order to allow windows to mount the fat partition
> > > it will need to be the first partition. So i am going to change
> > > CONFIG_SYS_MMCSD_FS_BOOT_PARTITION back to 1, and change the
> > > default env variables appropriately.
> >
> > You mean the layout is now:
> > - p1 0x83
> > - p2 0xa2
> > - ...
> >
> > I think this is really flaky, but I heard somewhere on the list that it
> > is possible to write the u-boot-spl-with-dtb.sfp (without having actual
> > 0xa2 partition) to offset 64 kiB and the machine will still boot. I am
> > starting to consider using this approach as it will also allow distro
> > bootcmd to work and distros to integrate altera boards.
> >
>
> Yes, when
>
> #define CONFIG_SPL_ABORT_ON_RAW_IMAGE
>
> is set then the SPL will search for an u-boot image at the
> CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR location on the MMC after a
> failed scan for a 0xa2 partition. So with that option the uboot image
> can be installed on the MMC by
>
> dd if=u-boot-with-spl.sfp of=<disk> bs=64k seek=1 skip=1
>
> With that the first 64KiB of the MMC are untouched, MBR/GPT for the OS
> is preserved, and u-boot can start without 0xa2 partition.
>
I see, and i understand why this works. I am not sure i can suggest this
as a normal option. The mechanism i believe that allows this is a
fail over in the bootrom code. As i understand it, if no A2 partition
is found the bootrom tries 0x0. the spl image is replicated 4 times
by default, because the bootrom allows for four failures. if the first
image fails for any reason (watchdog timeout, incorrect header,
crc failure), the next image, starting at 64KB is tried. So my belief
is the bootrom code is failing to boot the first time and is trying the
"second" 64KB offset as a second attempt which is where your setup
above is placing it's first image.
That said, my suggestion is still using the a2 partition. Thoughts?
--dalon
> Br,
> Frank
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
More information about the U-Boot
mailing list