diff mbox series

[U-Boot] Enable thumb build to reduce build size of u-boot.kwb.

Message ID 20180603193837.10926-1-vagrant@debian.org
State Accepted
Commit 3789b3dd15e4d522aeda56083e8e5a2ad0e95581
Delegated to: Stefan Roese
Headers show
Series [U-Boot] Enable thumb build to reduce build size of u-boot.kwb. | expand

Commit Message

Vagrant Cascadian June 3, 2018, 7:38 p.m. UTC
Without this, u-boot.kwb overlaps where the u-boot environment is
stored, and updating the environment can break u-boot and vice versa.

  https://bugs.debian.org/897671
  https://lists.denx.de/pipermail/u-boot/2018-May/327497.html

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
---

 configs/sheevaplug_defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Chris Packham June 3, 2018, 9:01 p.m. UTC | #1
Hi,

On Mon, 4 Jun 2018, 7:39 AM Vagrant Cascadian, <vagrant@debian.org> wrote:

> Without this, u-boot.kwb overlaps where the u-boot environment is
> stored, and updating the environment can break u-boot and vice versa.
>
>   https://bugs.debian.org/897671
>   https://lists.denx.de/pipermail/u-boot/2018-May/327497.html
>
> Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
> ---
>
>  configs/sheevaplug_defconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
> index 608e05e64e..d77d198f18 100644
> --- a/configs/sheevaplug_defconfig
> +++ b/configs/sheevaplug_defconfig
> @@ -36,3 +36,4 @@ CONFIG_USB=y
>  CONFIG_USB_EHCI_HCD=y
>  CONFIG_USB_STORAGE=y
>  CONFIG_LZMA=y
> +CONFIG_SYS_THUMB_BUILD=y
> --


Stefan sent a patch to move the environment for openrd is it worth doing
that instead?

Also isn't there an option to enforce a build size limit so that we notice
when we've expanded too far? That's how we noticed the problem for openrd.
Vagrant Cascadian June 3, 2018, 9:23 p.m. UTC | #2
On 2018-06-03, Chris Packham wrote:
> On Mon, 4 Jun 2018, 7:39 AM Vagrant Cascadian, <vagrant@debian.org> wrote:
>
>> Without this, u-boot.kwb overlaps where the u-boot environment is
>> stored, and updating the environment can break u-boot and vice versa.
>>
>>   https://bugs.debian.org/897671
>>   https://lists.denx.de/pipermail/u-boot/2018-May/327497.html
>>
>> Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
>> ---
>>
>>  configs/sheevaplug_defconfig | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
>> index 608e05e64e..d77d198f18 100644
>> --- a/configs/sheevaplug_defconfig
>> +++ b/configs/sheevaplug_defconfig
>> @@ -36,3 +36,4 @@ CONFIG_USB=y
>>  CONFIG_USB_EHCI_HCD=y
>>  CONFIG_USB_STORAGE=y
>>  CONFIG_LZMA=y
>> +CONFIG_SYS_THUMB_BUILD=y
>> --
>
>
> Stefan sent a patch to move the environment for openrd is it worth doing
> that instead?

Moving the environment breaks compatibility with older saved
environments, so seems like something that should be done as a last
resort, in my opinion, since upgrading the bootloader can result in an
unbootable system if they depend on the environment.

Enabling THUMB significantly reduced the size of the image, which should
reduce having to play whack-a-mole every few releases as u-boot
inevitably tends to grow in size over time... at least for a while.


> Also isn't there an option to enforce a build size limit so that we notice
> when we've expanded too far? That's how we noticed the problem for openrd.

There is, and would obviously be a good thing to add.

I also have very limited time to work on support for boards I don't have
the ability to test myself. Essentially, relaying this bug due to a bug
report from a Debian user.


live well,
  vagrant
Chris Packham June 3, 2018, 9:31 p.m. UTC | #3
On Mon, 4 Jun 2018, 9:23 AM Vagrant Cascadian, <vagrant@debian.org> wrote:

> On 2018-06-03, Chris Packham wrote:
> > On Mon, 4 Jun 2018, 7:39 AM Vagrant Cascadian, <vagrant@debian.org>
> wrote:
> >
> >> Without this, u-boot.kwb overlaps where the u-boot environment is
> >> stored, and updating the environment can break u-boot and vice versa.
> >>
> >>   https://bugs.debian.org/897671
> >>   https://lists.denx.de/pipermail/u-boot/2018-May/327497.html
> >>
> >> Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
> >> ---
> >>
> >>  configs/sheevaplug_defconfig | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
> >> index 608e05e64e..d77d198f18 100644
> >> --- a/configs/sheevaplug_defconfig
> >> +++ b/configs/sheevaplug_defconfig
> >> @@ -36,3 +36,4 @@ CONFIG_USB=y
> >>  CONFIG_USB_EHCI_HCD=y
> >>  CONFIG_USB_STORAGE=y
> >>  CONFIG_LZMA=y
> >> +CONFIG_SYS_THUMB_BUILD=y
> >> --
> >
> >
> > Stefan sent a patch to move the environment for openrd is it worth doing
> > that instead?
>
> Moving the environment breaks compatibility with older saved
> environments, so seems like something that should be done as a last
> resort, in my opinion, since upgrading the bootloader can result in an
> unbootable system if they depend on the environment.
>
> Enabling THUMB significantly reduced the size of the image, which should
> reduce having to play whack-a-mole every few releases as u-boot
> inevitably tends to grow in size over time... at least for a while.
>

Agreed. The DM changes will likely increase the size at least until
everything is converted.

> Also isn't there an option to enforce a build size limit so that we notice
> > when we've expanded too far? That's how we noticed the problem for
> openrd.
>
> There is, and would obviously be a good thing to add.
>
> I also have very limited time to work on support for boards I don't have
> the ability to test myself. Essentially, relaying this bug due to a bug
> report from a Debian user.
>

Ok I'll see if i can take a look for kirkwood boards that don't already
have this in place.

>
Stefan Roese June 4, 2018, 5:12 a.m. UTC | #4
On 03.06.2018 23:23, Vagrant Cascadian wrote:
> On 2018-06-03, Chris Packham wrote:
>> On Mon, 4 Jun 2018, 7:39 AM Vagrant Cascadian, <vagrant@debian.org> wrote:
>>
>>> Without this, u-boot.kwb overlaps where the u-boot environment is
>>> stored, and updating the environment can break u-boot and vice versa.
>>>
>>>    https://bugs.debian.org/897671
>>>    https://lists.denx.de/pipermail/u-boot/2018-May/327497.html
>>>
>>> Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
>>> ---
>>>
>>>   configs/sheevaplug_defconfig | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
>>> index 608e05e64e..d77d198f18 100644
>>> --- a/configs/sheevaplug_defconfig
>>> +++ b/configs/sheevaplug_defconfig
>>> @@ -36,3 +36,4 @@ CONFIG_USB=y
>>>   CONFIG_USB_EHCI_HCD=y
>>>   CONFIG_USB_STORAGE=y
>>>   CONFIG_LZMA=y
>>> +CONFIG_SYS_THUMB_BUILD=y
>>> --
>>
>>
>> Stefan sent a patch to move the environment for openrd is it worth doing
>> that instead?
> 
> Moving the environment breaks compatibility with older saved
> environments, so seems like something that should be done as a last
> resort, in my opinion, since upgrading the bootloader can result in an
> unbootable system if they depend on the environment.
> 
> Enabling THUMB significantly reduced the size of the image, which should
> reduce having to play whack-a-mole every few releases as u-boot
> inevitably tends to grow in size over time... at least for a while.

Yes, if THUMB is not enabled for those Kirkwood based boards, please
add support for it. This should give us enough space to add DT and
DM in the releases.

Thanks,
Stefan
Stefan Roese June 4, 2018, 5:22 a.m. UTC | #5
On 04.06.2018 07:12, Stefan Roese wrote:
> On 03.06.2018 23:23, Vagrant Cascadian wrote:
>> On 2018-06-03, Chris Packham wrote:
>>> On Mon, 4 Jun 2018, 7:39 AM Vagrant Cascadian, <vagrant@debian.org> 
>>> wrote:
>>>
>>>> Without this, u-boot.kwb overlaps where the u-boot environment is
>>>> stored, and updating the environment can break u-boot and vice versa.
>>>>
>>>>    https://bugs.debian.org/897671
>>>>    https://lists.denx.de/pipermail/u-boot/2018-May/327497.html
>>>>
>>>> Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
>>>> ---
>>>>
>>>>   configs/sheevaplug_defconfig | 1 +
>>>>   1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/configs/sheevaplug_defconfig 
>>>> b/configs/sheevaplug_defconfig
>>>> index 608e05e64e..d77d198f18 100644
>>>> --- a/configs/sheevaplug_defconfig
>>>> +++ b/configs/sheevaplug_defconfig
>>>> @@ -36,3 +36,4 @@ CONFIG_USB=y
>>>>   CONFIG_USB_EHCI_HCD=y
>>>>   CONFIG_USB_STORAGE=y
>>>>   CONFIG_LZMA=y
>>>> +CONFIG_SYS_THUMB_BUILD=y
>>>> -- 
>>>
>>>
>>> Stefan sent a patch to move the environment for openrd is it worth doing
>>> that instead?
>>
>> Moving the environment breaks compatibility with older saved
>> environments, so seems like something that should be done as a last
>> resort, in my opinion, since upgrading the bootloader can result in an
>> unbootable system if they depend on the environment.
>>
>> Enabling THUMB significantly reduced the size of the image, which should
>> reduce having to play whack-a-mole every few releases as u-boot
>> inevitably tends to grow in size over time... at least for a while.
> 
> Yes, if THUMB is not enabled for those Kirkwood based boards, please
> add support for it. This should give us enough space to add DT and
> DM in the releases.

BTW: Please add a more descriptive patch subject next time, so that
we can better scan the patch content via the subject. Something
like this would be good in this case:

arm: kirkwood: Enable THUMB mode on sheevaplug to reduce the image size

Thanks,
Stefan
Stefan Roese June 5, 2018, 9:26 a.m. UTC | #6
On 03.06.2018 21:38, Vagrant Cascadian wrote:
> Without this, u-boot.kwb overlaps where the u-boot environment is
> stored, and updating the environment can break u-boot and vice versa.
> 
>    https://bugs.debian.org/897671
>    https://lists.denx.de/pipermail/u-boot/2018-May/327497.html
> 
> Signed-off-by: Vagrant Cascadian <vagrant@debian.org>

Applied to u-boot-marvell/master.

Thanks,
Stefan
diff mbox series

Patch

diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
index 608e05e64e..d77d198f18 100644
--- a/configs/sheevaplug_defconfig
+++ b/configs/sheevaplug_defconfig
@@ -36,3 +36,4 @@  CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_LZMA=y
+CONFIG_SYS_THUMB_BUILD=y