From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [BUG] booting on the Tinker Board (tinker-rk3288_defconfig) is broken
Date: Wed, 13 Feb 2019 15:19:35 -0500 [thread overview]
Message-ID: <20190213201935.GR21737@bill-the-cat> (raw)
In-Reply-To: <55280d4f-7f13-a1c6-6eda-4ceb581096f5@gmx.de>
On Wed, Feb 13, 2019 at 09:13:31PM +0100, Heinrich Schuchardt wrote:
>
>
> On 2/13/19 2:24 PM, Tom Rini wrote:
> > On Wed, Feb 13, 2019 at 02:16:12PM +0100, Heinrich Schuchardt wrote:
> >>
> >>
> >> On 2/13/19 1:25 PM, Tom Rini wrote:
> >>> On Wed, Feb 13, 2019 at 11:13:19AM +0100, Philipp Tomsich wrote:
> >>>>
> >>>>
> >>>>> On 13.02.2019, at 11:10, David Wu <david.wu@rock-chips.com> wrote:
> >>>>>
> >>>>> Hi Philipp,
> >>>>>
> >>>>> 在 2019/2/12 下午9:54, Philipp Tomsich 写道:
> >>>>>>> On 12.02.2019, at 13:38, David Wu <david.wu@rock-chips.com> wrote:
> >>>>>>>
> >>>>>>> Hi Philipp,
> >>>>>>>
> >>>>>>> 在 2019/2/10 上午2:24, Philipp Tomsich 写道:
> >>>>>>>> That said, I have been fighting issues from this patchset when trying to read
> >>>>>>>> from devices on the i2c0 bus on a RK3399—which had me add a “simple”
> >>>>>>>> pinctrl device again, as pulling all the dependencies into the SPL is a pain.
> >>>>>>>
> >>>>>>> I think you can also add the simple ops if necessary. Full pinctrl
> >>>>>>> should only be used at the U-boot stage, or the SPL stage where the TPL is available.
> >>>>>>>
> >>>>>>> For most boards about 3288, there is no need to enable pinctrl at SPL
> >>>>>>> stage, such as Tinker board.
> >>>>>> Could you check whether TPL_MAX_SIZE and SPL_MAX_SIZE are correct for
> >>>>>> the RK3288? If not, please submit a patch.
> >>>>>
> >>>>> It is correct, 32KB.
> >>>>
> >>>> Interesting...
> >>>> I wonder why the build did not fail then, if SPL became too big.
> >>>
> >>> This is probably the "we need BOARD_SIZE_CHECK used more widely too"
> >>> issue that's come up in other threads. The linker-only check does not
> >>> catch the CONFIG_OF_SEPARATE dtb exceeds limit problem as it's
> >>> post-link.
> >>>
> >>
> >> This is the error message I currently get for U-Boot 2019.04 when
> >> building for the Tinker Board:
> >>
> >> mkdir -p foo/usr/lib/u-boot/tinker/
> >> denx/tools/mkimage -n rk3288 -T rksd -d denx/spl/u-boot-spl-dtb.bin \
> >> foo/usr/lib/u-boot/tinker/u-boot.img
> >> Warning: SPL image is too large (size 0x8800) and will not boot
> >> Error: image verification failed
> >> cat denx/u-boot-dtb.bin >> foo/usr/lib/u-boot/tinker/u-boot.img
> >> cp sd_fusing.sh foo/usr/lib/u-boot/tinker/
> >>
> >> @Tom
> >> Shouldn't the mkimage step be included in Travis CI testing?
> >
> > No, mkimage fails for almost every aarch64 target as we don't include
> > ATF or the other blobs required to make things bootable.
> > BOARD_SIZE_CHECK is where we can confirm that the U-Boot binary isn't
> > too large.
> >
>
> Hello Tom,
>
> BOARD_SIZE_CHECK seems to be about the U-Boot image not about SPL. I
I was possibly being slightly too literal, sorry. We need to adapt and
use the "check the resulting final binary is OK size-wise" logic to be
available and used everywhere. Given that we're now at I think 3 or 4
different SoCs running into this same exact problem, we really do need
to.
> guess we need to copy this line to rk3288_common.h:
>
> include/configs/rk3188_common.h:31:
> #define CONFIG_SPL_MAX_SIZE (0x8000 - 0x800)
>
> But when I insert this line I get no linker error but the size of
> denx/spl/u-boot-spl-dtb.bin is still too big.
>
> Shouldn't count the DTB size be accounted for when doing the
> CONFIG_SPL_MAX_SIZE check?
>
> CONFIG_SPL_MAX_SIZE 30720 bytes
> spl/u-boot-spl-nodtb.bin 28932 bytes
> spl/u-boot-spl.dtb 4096 bytes
> spl/u-boot-spl-dtb.bin 32986 bytes
SPL_MAX_SIZE is a linker check and as such will not catch post-linking
things, is the problem. We should however make it not be a linker check
and instead leverage it with the logic behind BOARD_SIZE_CHECK, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190213/278b6c25/attachment.sig>
next prev parent reply other threads:[~2019-02-13 20:19 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-09 12:12 [U-Boot] [BUG] booting on the Tinker Board (tinker-rk3288_defconfig) is broken Heinrich Schuchardt
2019-02-09 15:08 ` Philipp Tomsich
2019-02-09 15:24 ` Philipp Tomsich
2019-02-09 16:39 ` Heinrich Schuchardt
2019-02-09 18:24 ` Philipp Tomsich
2019-02-12 12:38 ` David Wu
2019-02-12 13:53 ` Philipp Tomsich
2019-02-13 10:28 ` David Wu
2019-02-13 10:30 ` Philipp Tomsich
2019-02-13 10:42 ` David Wu
2019-02-13 10:47 ` Philipp Tomsich
2019-02-12 13:54 ` Philipp Tomsich
2019-02-13 10:10 ` David Wu
2019-02-13 10:13 ` Philipp Tomsich
2019-02-13 10:33 ` David Wu
2019-02-13 10:47 ` Philipp Tomsich
2019-02-13 10:52 ` David Wu
2019-02-13 10:56 ` Philipp Tomsich
2019-02-16 9:53 ` Heinrich Schuchardt
2019-02-17 8:19 ` David Wu
2019-02-17 12:10 ` Heinrich Schuchardt
2019-02-17 12:18 ` Michael Nazzareno Trimarchi
2019-02-17 12:41 ` Heinrich Schuchardt
2019-02-18 1:05 ` David Wu
2019-02-28 10:50 ` Heiko Stübner
2019-02-28 12:36 ` Philipp Tomsich
2019-02-28 12:46 ` Heiko Stübner
2019-02-28 13:29 ` Heiko Stübner
2019-03-01 12:35 ` David Wu
2019-03-01 12:29 ` David Wu
2019-03-01 12:48 ` Philipp Tomsich
2019-02-13 12:25 ` Tom Rini
2019-02-13 13:16 ` Heinrich Schuchardt
2019-02-13 13:24 ` Tom Rini
2019-02-13 20:13 ` Heinrich Schuchardt
2019-02-13 20:19 ` Tom Rini [this message]
2019-02-12 11:53 ` David Wu
2019-02-11 10:30 ` Jack Mitchell
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=20190213201935.GR21737@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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