Skip to content

New distribution definition for poky-tiny

Darren Hart openembedded-core yocto 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 12 repliesIn review
  2. v2 RFC9 patches 5 repliesSuperseded
  3. v1 RFC9 patches 20 repliesApplied

Changes in v3 from the cover letter

o Rebase on master
o Dependent on oe-core series "Fixes for tiny distros and linux-yocto-tiny"

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3distro: Add POKY_DEFAULT_EXTRA_R* variablesmeta-yocto/conf/distro/poky.conf+6 -20 replies
2/3distro: Add poky-tiny distro definitionmeta-yocto/conf/distro/poky-tiny.conf+103 -05 replies
3/3image_types: Ensure /init exists for cpio rootfs archivesmeta/classes/image_types.bbclass+8 -217 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH V3 0/3] New distribution definition for poky-tiny

V3:
o Rebase on master
o Dependent on oe-core series "Fixes for tiny distros and linux-yocto-tiny"

RFC V2:
o Use VIRTUAL-RUNTIME_keymaps as suggested by Martin Jansa
o Drop poky-common abstraction as suggested by Richard Purdie in favor of POKY_DEFAULT_EXTRA_R* variables.

Poky-tiny defines a new distro policy for building tiny Linux images. Rather than create new image tasks and recipes, it reuses existing ones, modifying them as necessary. See the poky-tiny commit log for details on the policy goals.

In its current form, poky-tiny builds a qemux86 core-image-minimal image and kernel in 2.6 MB (compressed):

1.2M bzImage-qemux86.bin
1.4M core-image-minimal-qemux86.cpio.gz

After mounting the rootfs:

$ sudo du -hs .
3.4M    .
$ sudo ~/bin/dirsize.py 25000
[sudo] password for dvhart: 
   2927998 .
   1754686 ./lib
   1022080 ./lib/libc-2.13.so
    157124 ./lib/libm-2.13.so
    119036 ./lib/ld-2.13.so
     96128 ./lib/libpthread-2.13.so
     91960 ./lib/libnsl-2.13.so
     83748 ./lib/libresolv-2.13.so
     46656 ./lib/libnss_files-2.13.so
     34588 ./lib/libnss_compat-2.13.so
     30624 ./lib/librt-2.13.so
     26056 ./lib/libcrypt-2.13.so
    549600 ./bin
    549600 ./bin/busybox
    531908 ./sbin
    531908 ./sbin/ldconfig
     71860 ./etc
     28006 ./etc/init.d
Displayed 2789508/2927998 bytes (95.27%)

This image can be tested in qemu with:
qemu-system-i386 -kernel /build/poky/qemux86/tmp/deploy/images/bzImage-qemux86.bin -append "console=ttyS0,115200 root=0800" -nographic /build/poky/qemux86/tmp/deploy/images/core-image-minimal-qemux86.ext2

This results in booting to a busybox shell:
/bin/sh: can't access tty; job control turned off
/ #

While some improvement is still needed, especially with the init scripting and the linux-yocto-tiny integration with the linux-yocto kernel tools, this gets us started and gets the core in place for others to start using it and help to shape the init process, etc.

Thanks,

Darren

The following changes since commit 6cd5faddad3c69e7e81e7f66d87a3ee650ec717e:

task-core-boot: Allow DISTRO to disable keymaps via VIRTUAL-RUNTIME_keymaps (2011-12-28 15:28:20 -0800)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib dvhart/tiny-v3
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/tiny-v3

Darren Hart (3):
distro: Add POKY_DEFAULT_EXTRA_R* variables
distro: Add poky-tiny distro definition
image_types: Ensure /init exists for cpio rootfs archives

 meta-yocto/conf/distro/poky-tiny.conf |  103 +++++++++++++++++++++++++++++++++
 meta-yocto/conf/distro/poky.conf      |    8 ++-
 meta/classes/image_types.bbclass      |   10 +++-
 3 files changed, 117 insertions(+), 4 deletions(-)
 create mode 100644 meta-yocto/conf/distro/poky-tiny.conf
Signature · 1 line
1.7.6.4