diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2016-01-25 00:45:59 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-26 22:31:59 +0000 |
commit | 8a2dfa16917aca821caf1a1d9b53faa3b025656c (patch) | |
tree | d4546ab82f37795e26075c12497365210f93e4b5 /meta/conf/bitbake.conf | |
parent | 962cc37c534cfbd23febe494d1c5f07de2e154ae (diff) | |
download | poky-8a2dfa16917aca821caf1a1d9b53faa3b025656c.tar.gz |
image.bbclass: check INITRAMFS_MAXSIZE
Usually, the initramfs' maxsize can be 1/2 of ram size since modern
kernel uses tmpfs as initramfs by dafault, and tmpfs allocates 1/2 of
ram by default at boot time, which will be used to locate the initramfs.
Set INITRAMFS_MAXSIZE to 131072K (128M) by default (ram 256M), the
initramfs is small usually, for example, core-image-minimal-initramfs is
about 21M (uncompressed, 17M * 1.3) by default, but if the user add a
lot pkgs to initramfs, we can error and stop to let the user know ealier
rather than fail to boot (e.g., OOM-killer) at boot time.
Please see the bug for more info:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=5963
[YOCTO #5963]
(From OE-Core rev: 155ba626b46bf71acde6c24402fce1682da53b90)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf/bitbake.conf')
-rw-r--r-- | meta/conf/bitbake.conf | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 7451eb8287..e80ee18135 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -712,7 +712,13 @@ require conf/sanity.conf | |||
712 | DL_DIR ?= "${TOPDIR}/downloads" | 712 | DL_DIR ?= "${TOPDIR}/downloads" |
713 | SSTATE_DIR ?= "${TOPDIR}/sstate-cache" | 713 | SSTATE_DIR ?= "${TOPDIR}/sstate-cache" |
714 | IMAGE_FSTYPES ?= "tar.gz" | 714 | IMAGE_FSTYPES ?= "tar.gz" |
715 | |||
715 | INITRAMFS_FSTYPES ?= "cpio.gz" | 716 | INITRAMFS_FSTYPES ?= "cpio.gz" |
717 | # The maximum size in Kbytes for the generated initramfs image size. | ||
718 | # Usually, it should be less than 1/2 of ram size, or you may fail to | ||
719 | # boot it. | ||
720 | INITRAMFS_MAXSIZE ??= "131072" | ||
721 | |||
716 | DEFAULT_TASK_PROVIDER ?= "packagegroup-base" | 722 | DEFAULT_TASK_PROVIDER ?= "packagegroup-base" |
717 | MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}" | 723 | MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}" |
718 | 724 | ||