[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#772983: kirkwood kernel image is too big



On Fri, 2014-12-12 at 18:12 +0000, Ben Hutchings wrote:
> Package: src:linux
> Version: 3.16.7-2
> Severity: serious
> 
> The kirkwood and orion5x kernel images generally have to be installed
> in flash partitions with a fixed size.  Currently we check at build
> time that vmlinuz is small enough to fit.  However, these platforms
> now require Device Tree blobs, and the appropriate DTB must be
> appended to the kernel image in flash since the boot loader won't load
> it separately.
> 
> The kirkwood machines with the smallest known kernel partition are
> QNAP TS-119/TS-219, with 2097080 bytes space.  We need to fit:
> 
> -rw-r--r-- 1 ben ben 2094680 Nov  7 03:37 vmlinuz-3.16.0-4-kirkwood
> -rw-r--r-- 1 ben ben   10394 Dec  9 04:57 kirkwood-ts219-6281.dtb

We have not switched to dtb appending for the QNAP TS* platforms in
Jessie. The board support still existed in v3.16 and we still use it.

I had originally planned to switch QNAP over for 3.16 but it wasn't
quite ready upstream (I've forgotten why). The board files went away in
3.17 so in experimental (v3.18) appending is necessary. Once I've worked
out some kinks with kirkwood in v3.18 I was planning to upload a
corresponding flash-kernel which does appending for those platforms.

There are other kirkwood platforms with appending enabled in the flash
kernel db in Jessie. They are:

      * Buffalo Linkstation LS-CHLv2 (kirkwood-lschlv2.dtb)
      * Buffalo Linkstation LS-XHL (kirkwood-lsxhl.dtb)
      * D-Link DNS-320 NAS (Rev A1) (kirkwood-dns320.dtb)
      * LaCie Internet Space v2 (kirkwood-is2.dtb)
      * LaCie Network Space Max v2 (kirkwood-ns2max.dtb)
      * Globalscale Technologies Dreamplug (kirkwood-dreamplug.dtb)
      * Marvell GuruPlug Reference Board
        (kirkwood-guruplug-server-plus.dtb)
              * (AKA Globalscale Technologies Guruplug Server Plus)
      * Marvell SheevaPlug Reference Board (kirkwood-sheevaplug.dtb)
              * (AKA Globalscale Technologies SheevaPlug)
      * Marvell eSATA SheevaPlug Reference Board
        (kirkwood-sheevaplug-esata.dtb)
              * (AKA Globalscale Technologies eSATA SheevaPlug)
      * Plat'Home OpenBlocksA6 (kirkwood-openblocks_a6.dtb)
      * Seagate FreeAgent Dockstar (kirkwood-dockstar.dtb)

Of all those only "D-Link DNS-320 NAS (Rev A1)" has the Mtd-kernel
field, so all the others must boot from a filesystem not an raw MTD
partition.

Sadly the db doesn't record the mtd sizes for platforms, so I don't know
how much space that model has. kirkwood-dns320.dtb is 13199 bytes
though.

>                   2094680 < 2097080
> 2094680 + 10394 = 2105074 > 2097080
> 
> The orion5x machine with the smallest known kernel partition is D-Link
> DNS-323, with 1572792 bytes space.  We currently have less than 1 KB
> to spare here.  Thankfully this machine is still supported by board
> code and doesn't need a DTB.  But if any of the other orion5x machines
> we intend to support have a similarly small kernel partition and
> require a DTB they will not work with this version.

I don't know much about orion5x, but the flash-kernel db tells me that
we don't currently append a dtb on any platform there.

1k is rather tight though, even if appending isn't needed. A security
update adding 1k of binary size wouldn't be totally out of the question
and it would be unfortunate to have to start disabling features in a
security update.

> 
> Ben.
> 
> -- System Information:
> Debian Release: 8.0
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
> Architecture: i386 (x86_64)
> Foreign Architectures: amd64
> 
> Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
> 
> 


Reply to: