fail to create cpio image for large rootfs (>2GB)

Description

While building agl-demo-platform-crosssdk, error log is:

Rootfs dir in ...../tmp/work/m3ulcb-agl-linux/agl-demo-platform-crosssdk/1.0-r0/rootfs takes 2.5GB.

Script do_image_cpio fails at second cpio call:

  • first call will create a cpio archive which seems correct (2.5GB)

  • second call fails when trying to append'./init' to the big archive

Strace shows something like this before failure:

First conclusion: cpio doesn't support seeking at the end of an archive with size >2GB ...

cpio version is 2.11, built- as native tool (hosttools). Using cpio 2.11 from Debian 8 leads to the exact same error.

Environment

Build for M3 with EEL.RC1 + Chromium preinstalled inside image. cpio version 2.11 from hosttools dir (native)

Activity

Jan-Simon Moeller 
November 6, 2017 at 8:51 PM

CPIO was probably there for ramdisk-only "core-image-*" . This does not apply to AGL at all as CPIO does not support the XATTR we need for smack.

https://gerrit.automotivelinux.org/gerrit/#/c/11713/

 

 

Stephane Desneux 
November 6, 2017 at 2:10 PM
(edited)

Agreed: I think that unneeded files are installed in the current EE.RC1 image for M3 (and maybe other machines as well):

We see that /usr takes ~1.8GB so adding Chromium make us reach the 2GB limit.

Notably, the 774 MB in /usr/src are questionable Same for /usr/include where boost takes more than 200MB...

Harunobu Kurokawa 
November 6, 2017 at 1:45 PM

Hi

I'll ask internally the reason about "cpio". But the issue we should resolved is the reason why 2.5GB over.

Stephane Desneux 
November 6, 2017 at 1:22 PM

It seems that the cpio.gz images is added by Gen3 BSP for unknown reason:

see meta-renesas-rcar-gen3/meta-rcar-gen3/conf/machine/*.conf

Adding in watchers.

BTW, it's strange because creating an archive bigger than 2GB is not an issue. Only appending to it

Jan-Simon Moeller 
November 6, 2017 at 1:13 PM

Cpio has a limit of 2G . Why is cpio.gz in at all. It is not in the default list.

Fixed

Details

Assignee

Reporter

Fix versions

Labels

Components

Priority

Created November 6, 2017 at 12:23 PM
Updated December 1, 2017 at 10:00 PM
Resolved November 6, 2017 at 8:51 PM