mbox

UBUNTU: [Config] Armada 37x/38x/XP based boards support (e.g. Globalscale Mirabox)

Message ID 20140715085611.GA12565@luxor.wired.org
State New
Headers show

Pull-request

git://kernel.ubuntu.com/ppisati/ubuntu-utopic.git master-next-mirabox

Message

Paolo Pisati July 15, 2014, 8:56 a.m. UTC
The following changes since commit c09c285702ee331f49f7a3be20e4dc280bb83350:

  UBUNTU: [Config] armhf: generic: CC_OPTIMIZE_FOR_SIZE=y (2014-07-14 15:59:18 +0100)

are available in the git repository at:

  git://kernel.ubuntu.com/ppisati/ubuntu-utopic.git master-next-mirabox

for you to fetch changes up to c09c285702ee331f49f7a3be20e4dc280bb83350:

  UBUNTU: [Config] armhf: generic: CC_OPTIMIZE_FOR_SIZE=y (2014-07-14 15:59:18 +0100)

----------------------------------------------------------------

This patch set enable support for boards based on the Marvell Armada 37x/38x
and XP SOCs (e.g. Globalscale Mirabox):

patch 01 - 18 are config changes to enable all the feature of these SOCs

patch 19 build DTBs for every board supported upstream

patch 20 is a fix for the MVEBU PCI driver (already queued for 3.16rc6)

patch 21 enables the serial controller present on the Globalscale Mirabox

patch 22 is a workaround for the buggy Mirabox's bootloader that crashes
when loading a kernel bigger than 6MB (it seems it's triggered around
5.9MB actually)

To enable the Mirabox we either:

a) "fix" the bootloader: unfortunately, Globalscale uses a modified
version of u-boot and there's no support for this board upstream - i
already made the company aware of this bug but i didn't get any answer
so far

b) accept to compile generic armhf with Os (patch 22) - unlikely but
it shrink kernel size to ~5.5MB

c) put the generic kernel on diet (if we ever find something that we can
turn off or compile it as a module)

I'm proposing the entire series for U/master-next except for the last patch, that
was posted just for refence.

Comments

Tim Gardner July 15, 2014, 12:02 p.m. UTC | #1
On 07/15/2014 04:56 AM, Paolo Pisati wrote:
> The following changes since commit c09c285702ee331f49f7a3be20e4dc280bb83350:
> 
>   UBUNTU: [Config] armhf: generic: CC_OPTIMIZE_FOR_SIZE=y (2014-07-14 15:59:18 +0100)
> 
> are available in the git repository at:
> 
>   git://kernel.ubuntu.com/ppisati/ubuntu-utopic.git master-next-mirabox
> 
> for you to fetch changes up to c09c285702ee331f49f7a3be20e4dc280bb83350:
> 
>   UBUNTU: [Config] armhf: generic: CC_OPTIMIZE_FOR_SIZE=y (2014-07-14 15:59:18 +0100)
> 
> ----------------------------------------------------------------
> 
> This patch set enable support for boards based on the Marvell Armada 37x/38x
> and XP SOCs (e.g. Globalscale Mirabox):
> 
> patch 01 - 18 are config changes to enable all the feature of these SOCs
> 
> patch 19 build DTBs for every board supported upstream
> 
> patch 20 is a fix for the MVEBU PCI driver (already queued for 3.16rc6)
> 
> patch 21 enables the serial controller present on the Globalscale Mirabox
> 
> patch 22 is a workaround for the buggy Mirabox's bootloader that crashes
> when loading a kernel bigger than 6MB (it seems it's triggered around
> 5.9MB actually)
> 
> To enable the Mirabox we either:
> 
> a) "fix" the bootloader: unfortunately, Globalscale uses a modified
> version of u-boot and there's no support for this board upstream - i
> already made the company aware of this bug but i didn't get any answer
> so far
> 
> b) accept to compile generic armhf with Os (patch 22) - unlikely but
> it shrink kernel size to ~5.5MB
> 
> c) put the generic kernel on diet (if we ever find something that we can
> turn off or compile it as a module)
> 

We must have _some_ core components built-in that are of little use on
armhf. I'd consider turning them off in order to save some RAM on these
small footprint systems. Also, I'd love to be able to use my Mirabox
with a stock kernel.

I wonder if you could chain from the 1.1 u-boot loader to a newer u-boot
that could actually load a large kernel ? The alternative is to post a
u-boot repository with the size corrections, but that requires a
somewhat harrowing u-boot upgrade (plus its a giant pain in the ass to
build). If you botch the upgrade then you own a brick.

rtg
Paolo Pisati July 16, 2014, 1:57 p.m. UTC | #2
On Tue, Jul 15, 2014 at 08:02:49AM -0400, Tim Gardner wrote:
> 
> We must have _some_ core components built-in that are of little use on
> armhf. I'd consider turning them off in order to save some RAM on these
> small footprint systems. Also, I'd love to be able to use my Mirabox
> with a stock kernel.

ok, it seems some of the latest patches slightly reduced the kernel size
(~5.7MB in U/master-next), so if you cut a release now you will get a working
kernel even withot the -Os patch: to trigger the bug i usually compile in some
network device support, so we might be good for a bit.

> I wonder if you could chain from the 1.1 u-boot loader to a newer u-boot
> that could actually load a large kernel ? The alternative is to post a
> u-boot repository with the size corrections, but that requires a
> somewhat harrowing u-boot upgrade (plus its a giant pain in the ass to
> build). If you botch the upgrade then you own a brick.

unfortunately support for the mirabox is not present in upstream u-boot since it
requires some proprietary blob for the ddr initiliazation - coincidentally,
after i sent the config changes to enable the board, i got a message back from
Globalscale tech support asking what this bug was about, and i sent them all
the details so, cross your finger, and we might get a fixed bootloader soon.
Tim Gardner July 25, 2014, 5:38 p.m. UTC | #3
On 07/16/2014 07:57 AM, Paolo Pisati wrote:
> On Tue, Jul 15, 2014 at 08:02:49AM -0400, Tim Gardner wrote:
>>
>> We must have _some_ core components built-in that are of little use on
>> armhf. I'd consider turning them off in order to save some RAM on these
>> small footprint systems. Also, I'd love to be able to use my Mirabox
>> with a stock kernel.
> 
> ok, it seems some of the latest patches slightly reduced the kernel size
> (~5.7MB in U/master-next), so if you cut a release now you will get a working
> kernel even withot the -Os patch: to trigger the bug i usually compile in some
> network device support, so we might be good for a bit.
> 
>> I wonder if you could chain from the 1.1 u-boot loader to a newer u-boot
>> that could actually load a large kernel ? The alternative is to post a
>> u-boot repository with the size corrections, but that requires a
>> somewhat harrowing u-boot upgrade (plus its a giant pain in the ass to
>> build). If you botch the upgrade then you own a brick.
> 
> unfortunately support for the mirabox is not present in upstream u-boot since it
> requires some proprietary blob for the ddr initiliazation - coincidentally,
> after i sent the config changes to enable the board, i got a message back from
> Globalscale tech support asking what this bug was about, and i sent them all
> the details so, cross your finger, and we might get a fixed bootloader soon.
> 

Paolo - I took a quick pass at this yesterday using
git://kernel.ubunt.com/rtg/mirabox.git and booting from TFTP. The kernel
was about 5.6 MB but I didn't ever get a console. Could you have a look
to see if Utopic master still works for you ?

rtg
Paolo Pisati July 27, 2014, 1:50 p.m. UTC | #4
tip of U/master-next as this morning, it works:

http://pastebin.ubuntu.com/7875171/

Marvell>> printenv bootcmd
bootcmd=run bootcmd_mmc_full

Marvell>> printenv bootcmd_mmc_full
bootcmd_mmc_full=usb start; fatload usb 1 0x6400000 uImage; fatload usb 1
0x7000000 uInitrd; run bootargs_mmc; bootm 0x6400000 0x7000000:$filesize

Marvell>> printenv bootargs_mmc
bootargs_mmc=setenv bootargs console=ttyS0,115200 root=/dev/sdb2 rw
rootwait debug earlyprintk

here's a copy of this kernel:
http://people.canonical.com/~ppisati/linux-image-3.16.0-6-generic_3.16.0-6.11~485c3df_armhf.deb

and here's a flash-kernel patch to support the Mirabox:
https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/1348200

what's the last message that you see on console?



On Fri, Jul 25, 2014 at 7:38 PM, Tim Gardner <tim.gardner@canonical.com>
wrote:

> On 07/16/2014 07:57 AM, Paolo Pisati wrote:
> > On Tue, Jul 15, 2014 at 08:02:49AM -0400, Tim Gardner wrote:
> >>
> >> We must have _some_ core components built-in that are of little use on
> >> armhf. I'd consider turning them off in order to save some RAM on these
> >> small footprint systems. Also, I'd love to be able to use my Mirabox
> >> with a stock kernel.
> >
> > ok, it seems some of the latest patches slightly reduced the kernel size
> > (~5.7MB in U/master-next), so if you cut a release now you will get a
> working
> > kernel even withot the -Os patch: to trigger the bug i usually compile
> in some
> > network device support, so we might be good for a bit.
> >
> >> I wonder if you could chain from the 1.1 u-boot loader to a newer u-boot
> >> that could actually load a large kernel ? The alternative is to post a
> >> u-boot repository with the size corrections, but that requires a
> >> somewhat harrowing u-boot upgrade (plus its a giant pain in the ass to
> >> build). If you botch the upgrade then you own a brick.
> >
> > unfortunately support for the mirabox is not present in upstream u-boot
> since it
> > requires some proprietary blob for the ddr initiliazation -
> coincidentally,
> > after i sent the config changes to enable the board, i got a message
> back from
> > Globalscale tech support asking what this bug was about, and i sent them
> all
> > the details so, cross your finger, and we might get a fixed bootloader
> soon.
> >
>
> Paolo - I took a quick pass at this yesterday using
> git://kernel.ubunt.com/rtg/mirabox.git and booting from TFTP. The kernel
> was about 5.6 MB but I didn't ever get a console. Could you have a look
> to see if Utopic master still works for you ?
>
> rtg
>
> --
> Tim Gardner tim.gardner@canonical.com
>
Tim Gardner July 27, 2014, 3:53 p.m. UTC | #5
The last console message is from u-boot printing the dots as it loads 
the kernel image. I'll get with you about this on Tuesday when I'm back 
home after I try booting from an SD.

rtg

On 07/27/2014 07:50 AM, Paolo Pisati wrote:
> tip of U/master-next as this morning, it works:
>
> http://pastebin.ubuntu.com/7875171/
>
> Marvell>> printenv bootcmd
> bootcmd=run bootcmd_mmc_full
>
> Marvell>> printenv bootcmd_mmc_full
> bootcmd_mmc_full=usb start; fatload usb 1 0x6400000 uImage; fatload usb
> 1 0x7000000 uInitrd; run bootargs_mmc; bootm 0x6400000 0x7000000:$filesize
>
> Marvell>> printenv bootargs_mmc
> bootargs_mmc=setenv bootargs console=ttyS0,115200 root=/dev/sdb2 rw
> rootwait debug earlyprintk
>
> here's a copy of this kernel:
> http://people.canonical.com/~ppisati/linux-image-3.16.0-6-generic_3.16.0-6.11~485c3df_armhf.deb
>
> and here's a flash-kernel patch to support the Mirabox:
> https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/1348200
>
> what's the last message that you see on console?
>
>
>
> On Fri, Jul 25, 2014 at 7:38 PM, Tim Gardner <tim.gardner@canonical.com
> <mailto:tim.gardner@canonical.com>> wrote:
>
>     On 07/16/2014 07:57 AM, Paolo Pisati wrote:
>      > On Tue, Jul 15, 2014 at 08:02:49AM -0400, Tim Gardner wrote:
>      >>
>      >> We must have _some_ core components built-in that are of little
>     use on
>      >> armhf. I'd consider turning them off in order to save some RAM
>     on these
>      >> small footprint systems. Also, I'd love to be able to use my Mirabox
>      >> with a stock kernel.
>      >
>      > ok, it seems some of the latest patches slightly reduced the
>     kernel size
>      > (~5.7MB in U/master-next), so if you cut a release now you will
>     get a working
>      > kernel even withot the -Os patch: to trigger the bug i usually
>     compile in some
>      > network device support, so we might be good for a bit.
>      >
>      >> I wonder if you could chain from the 1.1 u-boot loader to a
>     newer u-boot
>      >> that could actually load a large kernel ? The alternative is to
>     post a
>      >> u-boot repository with the size corrections, but that requires a
>      >> somewhat harrowing u-boot upgrade (plus its a giant pain in the
>     ass to
>      >> build). If you botch the upgrade then you own a brick.
>      >
>      > unfortunately support for the mirabox is not present in upstream
>     u-boot since it
>      > requires some proprietary blob for the ddr initiliazation -
>     coincidentally,
>      > after i sent the config changes to enable the board, i got a
>     message back from
>      > Globalscale tech support asking what this bug was about, and i
>     sent them all
>      > the details so, cross your finger, and we might get a fixed
>     bootloader soon.
>      >
>
>     Paolo - I took a quick pass at this yesterday using
>     git://kernel.ubunt.com/rtg/mirabox.git
>     <http://kernel.ubunt.com/rtg/mirabox.git> and booting from TFTP. The
>     kernel
>     was about 5.6 MB but I didn't ever get a console. Could you have a look
>     to see if Utopic master still works for you ?
>
>     rtg
>
>     --
>     Tim Gardner tim.gardner@canonical.com <mailto:tim.gardner@canonical.com>
>
>
>
>
> --
> bye,
> p.