Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | # Distribution definition for: poky-tiny |
| 2 | # |
| 3 | # Copyright (c) 2011, Intel Corporation. |
| 4 | # All rights reserved. |
| 5 | # |
| 6 | # This file is released under the MIT license as described in |
| 7 | # ../meta/COPYING.MIT. |
| 8 | # |
| 9 | # Poky-tiny is intended to define a tiny Linux system comprised of a |
| 10 | # Linux kernel tailored to support each specific MACHINE and busybox. |
| 11 | # Poky-tiny sets some basic policy to ensure a usable system while still |
| 12 | # keeping the rootfs and kernel image as small as possible. |
| 13 | # |
| 14 | # The policies defined are intended to meet the following goals: |
| 15 | # o Serial consoles only (no framebuffer or VGA console) |
| 16 | # o Basic support for IPV4 networking |
| 17 | # o Single user ash shell |
| 18 | # o Static images (no support for adding packages or libraries later) |
| 19 | # o Read-only or RAMFS root filesystem |
| 20 | # o Combined Linux kernel + rootfs in under 4MB |
| 21 | # o Allow the user to select between eglibc or uclibc with the TCLIBC variable |
| 22 | # |
| 23 | # This is currently a partial definition, the following tasks remain: |
| 24 | # [ ] Integrate linux-yocto-tiny ktype into linux-yocto |
| 25 | # [ ] Define linux-yocto-tiny configs for all supported BSPs |
| 26 | # [ ] Drop ldconfig from the installation |
| 27 | # [ ] Modify the runqemu scripts to work with ext2 parameter: |
| 28 | # runqemu qemux86 qemuparams="-nographic" bootparams="console=ttyS0,115200 root=0800" |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 29 | # [ ] Modify busybox to allow for DISTRO_FEATURES-like configuration |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 30 | |
| 31 | require conf/distro/poky.conf |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 32 | require conf/distro/include/gcsections.inc |
| 33 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 34 | DISTRO = "poky-tiny" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 35 | DISTROOVERRIDES = "poky:poky-tiny" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 36 | TCLIBC = "musl" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 37 | |
| 38 | FULL_OPTIMIZATION="-Os -pipe ${DEBUG_FLAGS}" |
| 39 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 40 | # FIXME: consider adding a new "tiny" feature |
| 41 | #DISTRO_FEATURES_append = " tiny" |
| 42 | |
| 43 | # Distro config is evaluated after the machine config, so we have to explicitly |
| 44 | # set the kernel provider to override a machine config. |
| 45 | PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-tiny" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 46 | PREFERRED_VERSION_linux-yocto-tiny ?= "5.10%" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 47 | |
| 48 | # We can use packagegroup-core-boot, but in the future we may need a new packagegroup-core-tiny |
| 49 | #POKY_DEFAULT_EXTRA_RDEPENDS += "packagegroup-core-boot" |
| 50 | # Drop kernel-module-af-packet from RRECOMMENDS |
| 51 | POKY_DEFAULT_EXTRA_RRECOMMENDS = "" |
| 52 | |
| 53 | # FIXME: what should we do with this? |
| 54 | TCLIBCAPPEND = "" |
| 55 | |
| 56 | # Disable wide char support for ncurses as we don't include it in |
| 57 | # in the LIBC features below. |
| 58 | # Leave native enable to avoid build failures |
| 59 | ENABLE_WIDEC = "false" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 60 | ENABLE_WIDEC:class-native = "true" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 61 | |
| 62 | # Drop native language support. This removes the |
| 63 | # eglibc->bash->gettext->libc-posix-clang-wchar dependency. |
| 64 | USE_NLS="no" |
| 65 | |
| 66 | # Comment out any of the lines below to disable them in the build |
| 67 | # DISTRO_FEATURES options: |
Brad Bishop | 393846f | 2019-05-20 12:24:11 -0400 | [diff] [blame] | 68 | # alsa bluetooth ext2 pcmcia usbgadget usbhost wifi nfs zeroconf pci |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 69 | DISTRO_FEATURES_TINY = "pci" |
| 70 | DISTRO_FEATURES_NET = "ipv4 ipv6" |
| 71 | DISTRO_FEATURES_USB = "usbhost" |
| 72 | #DISTRO_FEATURES_USBGADGET = "usbgadget" |
| 73 | #DISTRO_FEATURES_WIFI = "wifi" |
| 74 | |
| 75 | DISTRO_FEATURES = "${DISTRO_FEATURES_TINY} \ |
| 76 | ${DISTRO_FEATURES_NET} \ |
| 77 | ${DISTRO_FEATURES_USB} \ |
| 78 | ${DISTRO_FEATURES_USBGADGET} \ |
| 79 | ${DISTRO_FEATURES_WIFI} \ |
| 80 | " |
| 81 | |
| 82 | # Enable LFS - see bug YOCTO #5865 |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 83 | DISTRO_FEATURES:append:libc-musl = " largefile" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 84 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 85 | DISTRO_FEATURES:class-native = "${DISTRO_FEATURES_DEFAULT} ${POKY_DEFAULT_DISTRO_FEATURES}" |
| 86 | DISTRO_FEATURES:class-nativesdk = "${DISTRO_FEATURES_DEFAULT} ${POKY_DEFAULT_DISTRO_FEATURES}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 87 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 88 | # enable mdev/busybox for init |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 89 | INIT_MANAGER ?= "mdev-busybox" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 90 | |
| 91 | # FIXME: Consider adding "modules" to MACHINE_FEATURES and using that in |
| 92 | # packagegroup-core-base to select modutils-initscripts or not. Similar with "net" and |
| 93 | # netbase. |
| 94 | |
| 95 | # By default we only support initramfs. We don't build live as that |
| 96 | # pulls in a lot of dependencies for the live image and the installer, like |
| 97 | # udev, grub, etc. These pull in gettext, which fails to build with wide |
| 98 | # character support. |
| 99 | IMAGE_FSTYPES = "cpio.gz" |
| 100 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 101 | QB_DEFAULT_FSTYPE = "${IMAGE_FSTYPES}" |
| 102 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 103 | # Drop v86d from qemu dependency list (we support serial) |
| 104 | # Drop grub from meta-intel BSPs |
| 105 | # FIXME: A different mechanism is needed here. We could define -tiny |
| 106 | # variants of all compatible machines, but that leads to a lot |
| 107 | # more machine configs to maintain long term. |
| 108 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "" |
| 109 | |
| 110 | # The mtrace script included by eglibc is a perl script. This means the system |
| 111 | # will build perl in case this package is installed. Since we don't care about |
| 112 | # this script for the purposes of tiny, remove the dependency from here. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 113 | RDEPENDS:${PN}-mtrace:pn-eglibc = "" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 114 | |
| 115 | PNBLACKLIST[build-appliance-image] = "not buildable with poky-tiny" |
| 116 | PNBLACKLIST[core-image-base] = "not buildable with poky-tiny" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 117 | PNBLACKLIST[core-image-full-cmdline] = "not buildable with poky-tiny" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 118 | PNBLACKLIST[core-image-rt] = "not buildable with poky-tiny" |
| 119 | PNBLACKLIST[core-image-rt-sdk] = "not buildable with poky-tiny" |
| 120 | PNBLACKLIST[core-image-sato] = "not buildable with poky-tiny" |
| 121 | PNBLACKLIST[core-image-sato-dev] = "not buildable with poky-tiny" |
| 122 | PNBLACKLIST[core-image-sato-sdk] = "not buildable with poky-tiny" |
| 123 | PNBLACKLIST[core-image-x11] = "not buildable with poky-tiny" |
| 124 | PNBLACKLIST[core-image-weston] = "not buildable with poky-tiny" |
| 125 | |
| 126 | # Disable python usage in opkg-utils since it won't build with tiny config |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 127 | PACKAGECONFIG:remove:pn-opkg-utils = "python" |