summaryrefslogtreecommitdiff
path: root/meta-phosphor/classes
AgeCommit message (Collapse)AuthorFilesLines
2016-07-05Merge pull request #297 from mdmillerii/runtime-updatePatrick Williams2-9/+15
Update flash update to be useable at runtime.
2016-06-30Add skeleton classesBrad Bishop4-0/+26
A number of classes to be used by recipes pointing to the skeleton project. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2016-06-26image-types_uboot: Package a self contained netboot imageMilton Miller1-0/+10
Create a cpio containing the base read-only image, and create a single combined initramfs image consisting of the image-rofs and the existing initramfs. There has been a desire to have a self contained netboot image present for developer testing and experimentation. The init script already supports having the rofs layer sourced from a file packaged into the initramfs, and will use it if found. While this image will not fit in the current flash layout in the initrd space, it will load over the network. This method leaves the squashfs compressed in RAM, decompreses is invoked as needed at runtime, trading boot time and memory space for runtime decompress on demand. This will also give similar file access overheads and performance to reading the data from flash. Because the rofs is already compressed with xz compression, don't try to compress this cpio (the cpio packaging adds about 40 bytes of ascii before and after, plus some alignment padding). Because the kernel requires uncompressed cpios to appear on a 4-byte boundary with 0 byte fill between archives, place this cpio first in the combined image. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
2016-06-24image-overlay: depend on do_image_completePatrick Williams1-2/+2
Per Yocto commit 3341f3fb, we should depend on do_image_complete instead of do_rootfs for the initrd images. Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2016-06-24obmc-phosphor-image: Improper use of DATETIMEPatrick Williams1-0/+2
The use of the DATETIME variable has issues with the sstate cache because of the variable changing values, and therefore the checksum used for sstate calculation also changing. Other existing recipes add DATETIME to the 'vardepsexclude' list. This case is glossed over very rapidly in section 21.3.2 "Checksums" of the Mega Manual. Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2016-06-24meta-phosphor: Make image-overlay an optional featurePatrick Williams1-5/+6
Previously, obmc-bsp-common.inc added "overlay" to the IMAGE_FSTYPES but this only has meaning if the 'image-overlay' class is used. The obmc-phosphor-image class explicitly includes 'image-overlay' when appropriate but no other images (ie. ones that come with yocto) do. Changed obmc-bsp-common to instead enable an obmc-phosphor-image feature by setting OBMC_PHOSPHOR_IMAGE_OVERLAY=1. Then in obmc-phosphor-image we add "overlay" to the IMAGE_FSTYPES only when the feature is enabled. This will fix both non-phosphor images on hardware platforms and all images on simulation platforms. Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2016-06-23initfs: Fix recipe, remove unnecessary classMilton Miller1-4/+0
Because the recipe was named with trailing part init instead of initfs, the package didn't match the package name requiring PROVIDES, RPROVIDES and other bitbake workarounds. Fix the recipe name to match the package removing the overly verbose packaging. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
2016-06-23image_types_uboot: Don't truncate when assembling flashMilton Miller1-5/+5
The generate_flash_image step was creating a file then using dd to fill in the pieces, but missed adding the conv=notrunc flag, so each step was shortening the file to its output. Add the forgotten conversion flag to each dd command. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
2016-06-17Move rest-dbus to development packageAdriana Kobylak1-0/+1
The rest-dbus package is a lightweight REST interface intended for development debug. Classify it as a dev package so that it is easy to remove from production images. Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
2016-06-16Add build time dependencies to python for skeletonBrad Bishop1-0/+2
Skeleton now invokes python setuptools to install its python applications in a top level makefile, so a build time dependency on native-python is required. It should be noted that skeleton invoking python from make is an interim thing until its python applications get their own repository. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2016-06-15Add virtual workbook / config-in-skeleton classesBrad Bishop1-0/+28
This patch introduces a new abstraction 'skeleton-workbook' for representing a system configuration. At present it is pulled in by the skeleton recipe so the requirement on what is implemented by a package providing obmc-phosphor-workbook is something compatible with the existing System.py python modules in skeleton. Additionally this patch adds a new recipe for each system using a configuration file from skeleton today, and a class for common configuration. This enables a couple of things: - No need to patch skeleton.service for each system. - New systems don't have to put their configuration in the skeleton repository. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2016-06-14Add OBMC_IMAGE_EXTRA_INSTALL variableBrad Bishop1-2/+4
Prior to this patch packagegroup-core-boot was not being pulled in. core-boot is what brings in the init_manager (systemd) but somehow systemd was added as a dependency by OE for the skeleton package so the missing core-boot packagegroup went unnoticed. core-boot was not being pulled in because of an assignment to IMAGE_INSTALL in the global configuration. Yocto core provides a mechanism to do the same thing safely - CORE_IMAGE_EXTRA_INSTALL; use this and also adopt a similar approach for adding extra packages to image recipes using obmc-phosphor-image. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2016-06-13Support multiple systemd service filesBrad Bishop1-9/+47
Enhance obmc-phosphor-systemd such that an array of service/template socket files in SYSTEMD_SERVICES_${PN} works. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2016-04-14Enable obmc-console projectJeremy Kerr1-0/+1
The issue that prevented obmc-console from compiling was has been fixed in f5858b5bf, so bump to a recent obmc-console version, and reenable. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2016-04-02obmc-phosphor-image: temporarily disable obmc-consolePatrick Williams1-1/+0
See openbmc/obmc-console#2 for failure details. Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2016-03-24Add obmc-console projectJeremy Kerr1-0/+1
This change introduces obmc-console, a little daemon to handle the UART data and multiplex it to a log and client processes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2016-03-04Add inarp to base imageAdriana Kobylak1-0/+1
Add the inarp package to the base image. If users later want to turn it off and not have it be part of the base image, it can be changed to a distro spec then.
2016-02-29Don't inherit image-overlay by defaultBrad Bishop2-3/+12
This attempts to address a race condition in the build where we attempt to build a complete flash image before all the sub-images are available (specifically the initramfs image). Any classes in IMAGE_CLASSES are inherited by all image recipes, including the initramfs image. OE-Core's live/hddimg recipes address this by pulling in the class configuration in recipe scope, rather than global scope. Copy that behavior here.
2016-02-29Whitespace fixesBrad Bishop1-15/+15
Indent was only seven spaces. No functional changes.
2016-02-24openbmc: Switch RW FS from ext4 to jffs2Andrew Jeffery1-1/+1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2016-02-24openbmc: Lift mkfs opts to variables and use OVERRIDES capabilityAndrew Jeffery1-1/+13
Moves the ext4-specific mkfs options out to configuration variables. OVERLAY_MKFS_OPTS can be overridden using the usual bitbake OVERRIDES mechanism, where the override postfix is 'rwfs-${OVERLAY_BASETYPE}', e.g. rwfs-ext4. Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2016-02-24openbmc: Generate images with empty NOR sections in the erased stateAndrew Jeffery1-2/+9
An erased NOR partition is considered to be a valid JFFS2 filesystem (i.e. can be successfully mounted as JFFS2). As such there's no need to execute mkfs to produce an empty JFFS2 image if the target partition is in the erased state. Thus, when generating the flash-palmetto and image-rwfs image files, start with a base image file in the erased state (with all bits set). The change shifts the common logic to generate the base image files into a shell function. Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2016-02-24oe_mkimage: Use consistent indentationAndrew Jeffery1-3/+3
It was inconsistent with the rest of the file, which seems to use 7 spaces. In particular, vim-sleuth was detecting the indentation style from the first indent(s) in the file, which were in the oe_mkimage function. Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
2016-02-12Recipe update: User management, systemd patch, IPMI net functionsAdriana Kobylak2-0/+7
Create virtual class to include user management in the image Add the systemd patch for network support to the systemd recipe Update the IPMI recipe to pickup the support for network configuration
2016-02-04add image-rwfs to flash tarNorman James1-1/+2
2016-02-01Create tarball of update files with correct namesNorman James1-0/+9
Signed-off-by: Norman James <nkskjames@gmail.com>
2016-01-29Create image class image-overlay and move phosphor to use itMilton D. Miller II2-17/+56
This commit creates a new class image-overlay based on how the image-live class is structured. It takes parameters for the base and overlayed file system types but the initfs only support ext4 over squashfs presently. It then moves invoking the generation of the flash image from a post image creation command to a separate task invoked from the overlay image so that building the initramfs image by itself does not try to create a flash image. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
2016-01-29Create obmc-phosphor-initfs startup and shutdown scriptsMilton D. Miller II1-0/+4
This recipe holds the key scripts for an initramfs image. Written in sh to run with busybox, these three scripts handle mounting, unmounting, and updating a set of mtd partitions to form a read-write overlay on a read-only compressed base. The init script will mount the base sysfs, proc, and devtmpfs as well as run. It copies the filesystem to run/initramfs to create the shutdown and update environment. It then mounts a base read-only and read-write file system and then an overlay of them combined, then continues with chroot into the overlay and execute the normal /sbin/init. The shutdown script will unmount the remaining nodev and root filesystems from oldroot where systemd-shutdown pivots the old file system, then looks for image- files. If any are found it invokes update otherwise it performs the final reboot, powerdown, or kexec, or halt. The update script will attempt to mount the read/write overlay and preserve selected files and directories based on a whitelist. It then unmounts that fs and writes all image files to their named mtd partition using flashcp, mounts and restores the saved files, and finally unmounts the fs and performs the final reboot, shutdown, kexec, or halt. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
2015-11-01Fix mkcimage task dependency in kernel-cuimageBrad Bishop1-1/+1
The cuimage is used in the install task so it must be generated by then.
2015-10-28add screen and i2ctoolsNorman James1-0/+2
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2015-10-19Add host IPMI DBUS to hw provider classBrad Bishop1-0/+4
2015-10-19Add PROVIDES to all provider classesBrad Bishop7-0/+7
When multiple recipes provide a package PREFERRED_PROVIDER is used to pick one. However bitbake doesn't look at RPROVIDES when it figures this out.
2015-10-19Remove S and SRC_URI from c daemon classBrad Bishop1-6/+4
Initially this could be done in one place but as sources move to git repositories this can't be done in a generic manner. Adapted existing recipes to this class change.
2015-10-19Remove S and SRC_URI from python daemon classBrad Bishop1-5/+3
Initially this could be done in one place but as sources move to git repositories this can't be done in a generic manner. Adapted existing recipes to this class change.
2015-10-16-systemd.bbclass incorrect for nativesdk packagesPatrick Williams1-3/+3
We should use the 'bare' package name BPN instead of PN for finding the service file. Otherwise, a -nativesdk package cannot be created because we get a file-not-found error on the service file.
2015-10-16Refactor sdbus-service.bbclassPatrick Williams1-1/+0
sdbus-service.bbclass currently depends on c-daemon.bbclass, which is used for samples that have their code and makefiles in the repository. Removed this inherit to make the sdbus-service class more generally applicable.
2015-10-13Fix initrd load addressBrad Bishop1-1/+1
Using the same address as: http://github.com/facebook/openbmc
2015-10-08Add uboot image type specializationBrad Bishop1-0/+47
Combines all the build artifacts into a single flash image.
2015-10-06Add kernel-cuimage classBrad Bishop1-0/+45
Combined kernel / device tree kernel target emulation. Copied from kernel-uimage.
2015-09-29Open up DBUS permissionsBrad Bishop1-0/+2
Make wide open during prototyping phase. Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2015-09-22Add spaces around SRC_URI in dbus-service classBrad Bishop1-1/+1
Without this, subsequent prepend/appends to SRC_URI don't work.
2015-09-22Added sd-bus service exampleBrad Bishop1-0/+9
Added obmc-phosphor-example-sdbus. Added sdbus-service class for common logic.
2015-09-22Add pydbus-service classBrad Bishop1-0/+6
2015-09-22Check for empty DBUS_SERVICESBrad Bishop1-3/+4
2015-09-21Example D-Bus service implementationBrad Bishop1-0/+17
Provided an example service implementation in obmc-phosphor-qemu
2015-09-16Merge commit 'bd7c9e235facf05eff4493ebaf2c43f90ed34f92' into HEADPatrick Williams1-1/+2
2015-09-15Add 'meta-phosphor/' from commit '93fb535853a24d4c3c42ec425ac92c9d3de13294'Patrick Williams13-0/+125
git-subtree-dir: meta-phosphor git-subtree-mainline: 21f9b84b4b729fbd7acbd465e7a3f726e4d20f91 git-subtree-split: 93fb535853a24d4c3c42ec425ac92c9d3de13294