Name Date Size #Lines LOC

..01-Mar-2024-

contrib/H01-Mar-2024-3,7482,778

cross-intercept/H03-Feb-2022-3320

esdk-tools/H26-Nov-2023-3,4512,686

lib/H19-Sep-2023-23,24218,255

native-intercept/H03-Feb-2022-4522

nativesdk-intercept/H19-Sep-2023-6238

postinst-intercepts/H06-Jan-2024-21292

pybootchartgui/H07-Mar-2021-4,0563,054

tiny/H07-Mar-2021-388294

.oe-layers.jsonH A D01-Mar-202490 87

READMEH A D07-Mar-202174 21

autobuilder-worker-prereq-testsH A D09-Sep-20222.8 KiB9471

bblockH A D14-Oct-20235.5 KiB185148

bitbake-prserv-toolH A D30-Jan-20232.5 KiB12197

buildall-qemuH A D07-Mar-20213.2 KiB12181

buildhistory-collect-srcrevsH A D04-Sep-20214 KiB10986

buildhistory-diffH A D03-Feb-20225.1 KiB135100

buildstats-diffH A D20-May-202311.3 KiB303237

buildstats-summaryH A D20-May-20233 KiB12795

combo-layerH A D01-Mar-202460.6 KiB1,3851,001

combo-layer-hook-default.shH A D09-Sep-2022813 2610

combo-layer.conf.exampleH A D07-Mar-20213 KiB9477

cp-noerrorH A D09-Sep-20221.5 KiB5740

create-pull-requestH A D19-Sep-20237.5 KiB280215

crosstapH A D01-Apr-202215.4 KiB459347

devtoolH A D01-Mar-202415 KiB356285

gen-lockedsig-cacheH A D09-Sep-20223.4 KiB12393

gen-site-configH A D07-Mar-2021623 4425

gitH A D09-Sep-2022711 3115

install-buildtoolsH A D03-Nov-202214.8 KiB358281

multilib_header_wrapper.hH A D07-Mar-2021592 3218

oe-build-perf-reportH A D17-Apr-202423.4 KiB616480

oe-build-perf-testH A D07-Mar-20216.9 KiB217158

oe-buildenv-internalH A D19-Sep-20233.8 KiB12080

oe-check-sstateH A D01-Mar-20243.3 KiB10878

oe-debuginfodH A D09-Sep-20221,014 2917

oe-depends-dotH A D19-Sep-20236.3 KiB182149

oe-find-native-sysrootH A D19-Sep-20232.8 KiB9360

oe-git-archiveH A D07-Mar-20214.9 KiB11993

oe-git-proxyH A D07-Mar-20214.6 KiB188123

oe-gnome-terminal-phonehomeH A D09-Sep-2022342 153

oe-pkgdata-browserH A D09-Sep-20229.6 KiB261197

oe-pkgdata-browser.gladeH A D07-Mar-202116.3 KiB338329

oe-pkgdata-utilH A D01-Mar-202427.2 KiB634535

oe-publish-sdkH A D05-Oct-20215.4 KiB150118

oe-pylintH A D09-Sep-2022825 157

oe-run-nativeH A D07-Mar-20211.6 KiB5736

oe-selftestH A D07-Mar-20212 KiB6639

oe-setup-buildH A D17-Apr-20245.5 KiB12398

oe-setup-builddirH A D01-Mar-20244.6 KiB14297

oe-setup-layersH A D01-Mar-20246.4 KiB147107

oe-setup-vscodeH A D01-Mar-20242.6 KiB9480

oe-testH A D07-Mar-20212.6 KiB8458

oe-time-dd-test.shH A D09-Sep-20222.2 KiB10781

oe-trim-schemasH A D09-Sep-20221.7 KiB6446

oepydevshell-internal.pyH A D09-Sep-20223.1 KiB10582

opkg-query-helper.pyH A D01-Mar-20242.1 KiB7355

patchtestH A D02-Mar-20247.8 KiB233166

patchtest-get-branchH A D01-Mar-20242.8 KiB8235

patchtest-get-seriesH A D26-Nov-20232.9 KiB11676

patchtest-send-resultsH A D01-Mar-20244.2 KiB11167

patchtest-setup-sharedirH A D26-Nov-20231.9 KiB8454

patchtest.READMEH A D01-Mar-20246.6 KiB154115

pythondepsH A D09-Sep-20227.6 KiB253190

recipetoolH A D07-Mar-20213.8 KiB11785

relocate_sdk.pyH A D09-Sep-20228.8 KiB269201

resulttoolH A D07-Mar-20212.8 KiB7944

rootfs_rpm-extract-postinst.awkH A D07-Mar-2021158 1210

rpm2cpio.shH A D06-Jul-20231.6 KiB6647

runqemuH A D06-Jan-202473.3 KiB1,7731,428

runqemu-addptable2imageH A D11-Jun-2022776 4023

runqemu-export-rootfsH A D13-Jan-20233.1 KiB12898

runqemu-extract-sdkH A D13-Jan-20232.7 KiB10071

runqemu-gen-tapdevsH A D06-Jul-20232.6 KiB10878

runqemu-ifdownH A D11-Aug-20231.7 KiB7344

runqemu-ifupH A D11-Aug-20232.7 KiB11174

runqemu.READMEH A D09-Sep-20221.6 KiB4329

send-error-reportH A D07-Mar-20216.7 KiB209145

send-pull-requestH A D07-Mar-20214.1 KiB172127

sstate-cache-management.pyH A D01-Mar-20249.7 KiB330219

sstate-diff-machines.shH A D09-Sep-20226.7 KiB179128

sstate-sysroot-cruft.shH A D09-Sep-20225.2 KiB192135

sysroot-relativelinks.pyH A D09-Sep-20221 KiB3821

task-timeH A D09-Sep-20224.2 KiB13897

test-reexecH A D07-Mar-20213 KiB11174

test-remote-imageH A D07-Mar-202113.7 KiB348234

verify-bashismsH A D09-Sep-20226.1 KiB161101

wicH A D20-Jul-202220 KiB552440

yocto-check-layerH A D13-Jan-202310.1 KiB257213

yocto-check-layer-wrapperH A D07-Mar-2021957 4825

yocto_testresults_query.pyH A D26-Nov-20235.6 KiB132105

README

1This directory contains Various useful scripts for working with OE builds
2

patchtest.README

1# Patchtest
2
3## Introduction
4
5Patchtest is a test framework for community patches based on the standard
6unittest python module. As input, it needs tree elements to work properly:
7a patch in mbox format (either created with `git format-patch` or fetched
8from 'patchwork'), a test suite and a target repository.
9
10The first test suite intended to be used with patchtest is found in the
11openembedded-core repository [1] targeted for patches that get into the
12openembedded-core mailing list [2]. This suite is also intended as a
13baseline for development of similar suites for other layers as needed.
14
15Patchtest can either run on a host or a guest machine, depending on which
16environment the execution needs to be done. If you plan to test your own patches
17(a good practice before these are sent to the mailing list), the easiest way is
18to install and execute on your local host; in the other hand, if automatic
19testing is intended, the guest method is strongly recommended. The guest
20method requires the use of the patchtest layer, in addition to the tools
21available in oe-core: https://git.yoctoproject.org/patchtest/
22
23## Installation
24
25As a tool for use with the Yocto Project, the [quick start guide](https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html)
26contains the necessary prerequisites for a basic project. In addition,
27patchtest relies on the following Python modules:
28
29- boto3 (for sending automated results emails only)
30- git-pw>=2.5.0
31- jinja2
32- pylint
33- pyparsing>=3.0.9
34- unidiff
35
36These can be installed by running `pip install -r
37meta/lib/patchtest/requirements.txt`. Note that git-pw is not
38automatically added to the user's PATH; by default, it is installed at
39~/.local/bin/git-pw.
40
41For git-pw (and therefore scripts such as patchtest-get--series) to work, you need
42to provide a Patchwork instance in your user's .gitconfig, like so (the project
43can be specified using the --project argument):
44
45    git config --global pw.server "https://patchwork.yoctoproject.org/api/1.2/"
46
47To work with patchtest, you should have the following repositories cloned:
48
491. https://git.openembedded.org/openembedded-core/ (or https://git.yoctoproject.org/poky/)
502. https://git.openembedded.org/bitbake/ (if not using poky)
513. https://git.yoctoproject.org/patchtest (if using guest mode)
52
53## Usage
54
55### Obtaining Patches
56
57Patch files can be obtained directly from cloned repositories using `git
58format-patch -N` (where N is the number of patches starting from HEAD to
59generate). git-pw can also be used with filters for users, patch/series IDs,
60and timeboxes if specific patches are desired. For more information, see the
61git-pw [documentation](https://patchwork.readthedocs.io/projects/git-pw/en/latest/).
62
63Alternatively, `scripts/patchtest-get-series` can be used to pull mbox files from
64the Patchwork instance configured previously in .gitconfig. It uses a log file
65called ".series_test.log" to store and compare series IDs so that the same
66versions of a patch are not tested multiple times unintentionally. By default,
67it will pull up to five patch series from the last 30 minutes using oe-core as
68the target project, but these parameters can be configured using the `--limit`,
69`--interval`, and `--project` arguments respectively. For more information, run
70`patchtest-get-series -h`.
71
72### Host Mode
73
74To run patchtest on the host, do the following:
75
761. In openembedded-core/poky, do `source oe-init-build-env`
772. Generate patch files from the target repository by doing `git-format patch -N`,
78   where N is the number of patches starting at HEAD, or by using git-pw
79   or patchtest-get-series
803. Run patchtest on a patch file by doing the following:
81
82        patchtest --patch /path/to/patch/file
83
84    or, if you have stored the patch files in a directory, do:
85
86        patchtest --directory /path/to/patch/directory
87
88    For example, to test `master-gcc-Fix--fstack-protector-issue-on-aarch64.patch` against the oe-core test suite:
89
90        patchtest --patch master-gcc-Fix--fstack-protector-issue-on-aarch64.patch
91
92    If you want to use a different test suite or target repository, you can use the --testdir and --repodir flags:
93
94        patchtest --patch /path/to/patch/file --repodir /path/to/repo --testdir /path/to/test/dir
95
96### Guest Mode
97
98Patchtest's guest mode has been refactored to more closely mirror the
99typical Yocto Project image build workflow, but there are still some key
100differences to keep in mind. The primary objective is to provide a level
101of isolation from the host when testing patches pulled automatically
102from the mailing lists. When executed this way, the test process is
103essentially running random code from the internet and could be
104catastrophic if malicious bits or even poorly-handled edge cases aren't
105protected against. In order to use this mode, the
106https://git.yoctoproject.org/patchtest/ repository must be cloned and
107the meta-patchtest layer added to bblayers.conf.
108
109The general flow of guest mode is:
110
1111. Run patchtest-setup-sharedir --directory <dirname> to create a
112   directory for mounting
1132. Collect patches via patchtest-get-series (or other manual step) into the
114   <dirname>/mboxes path
1153. Ensure that a user with ID 1200 has appropriate read/write
116   permissions to <dirname> and <dirname>/mboxes, so that the
117   "patchtest" user in the core-image-patchtest image can function
1184. Build the core-image-patchtest image
1195. Run the core-image-patchtest image with the mounted sharedir, like
120   so:
121   `runqemu kvm nographic qemuparams="-snapshot -fsdev
122   local,id=test_mount,path=/workspace/yocto/poky/build/patchtestdir,security_model=mapped
123   -device virtio-9p-pci,fsdev=test_mount,mount_tag=test_mount -smp 4 -m
124   2048"`
125
126Patchtest runs as an initscript for the core-image-patchtest image and
127shuts down after completion, so there is no input required from a user
128during operation. Unlike in host mode, the guest is designed to
129automatically generate test result files, in the same directory as the
130targeted patch files but with .testresult as an extension. These contain
131the entire output of the patchtest run for each respective pass,
132including the PASS, FAIL, and SKIP indicators for each test run.
133
134## Contributing
135
136The yocto mailing list (openembedded-core@lists.openembedded.org) is used for questions,
137comments and patch review.  It is subscriber only, so please register before
138posting.
139
140When sending single patches, please use something like:
141
142    git send-email -M -1 --to=openembedded-core@lists.openembedded.org --subject-prefix=OE-core][PATCH
143
144## Maintenance
145-----------
146
147Maintainers:
148    Trevor Gamblin <tgamblin@baylibre.com>
149
150## Links
151-----
152[1] https://git.openembedded.org/openembedded-core/
153[2] https://www.yoctoproject.org/community/mailing-lists/
154

runqemu.README

1Using OE images with QEMU
2=========================
3
4OE-Core can generate qemu bootable kernels and images which can be used
5on a desktop system. The scripts currently support booting ARM, MIPS, PowerPC
6and x86 (32 and 64 bit) images. The scripts can be used within the OE build
7system or externally.
8
9The runqemu script is run as:
10
11   runqemu <machine> <zimage> <filesystem>
12
13where:
14
15   <machine> is the machine/architecture to use (qemuarm/qemumips/qemuppc/qemux86/qemux86-64)
16   <zimage> is the path to a kernel (e.g. zimage-qemuarm.bin)
17   <filesystem> is the path to an ext2 image (e.g. filesystem-qemuarm.ext2) or an nfs directory
18
19If <machine> isn't specified, the script will try to detect the machine name
20from the name of the <zimage> file.
21
22If <filesystem> isn't specified, nfs booting will be assumed.
23
24When used within the build system, it will default to qemuarm, ext2 and the last kernel and
25core-image-sato-sdk image built by the build system. If an sdk image isn't present it will look
26for sato and minimal images.
27
28Full usage instructions can be seen by running the command with no options specified.
29
30
31Notes
32=====
33
34 - The scripts run qemu using sudo. Change perms on /dev/net/tun to
35   run as non root. The runqemu-gen-tapdevs script can also be used by
36   root to prepopulate the appropriate network devices.
37 - You can access the host computer at 192.168.7.1 within the image.
38 - Your qemu system will be accessible as 192.168.7.2.
39 - The script extracts the root filesystem specified under pseudo and sets up a userspace
40   NFS server to share the image over by default meaning the filesystem can be accessed by
41   both the host and guest systems.
42
43