24 Commits

Author SHA1 Message Date
Pascal Bach
650d38c708 fix(openwrt-base-files): Specify SRCREV_FORMAT
This fixes an error with Yocto master:
- The SRCREV_FORMAT variable must be set when multiple SCMs are used

It does so by prependending the openwrt files
to the SRCREV_FORMAT.


Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
2024-02-07 07:46:35 -08:00
Sergey Moryakov
bd2bbb4c85 base-files: update to 22.03 version 2022-10-07 18:44:37 -07:00
Khem Raj
6e809c2aab recipes: Use SPDX naming convention for LICENSE field
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-06 08:44:19 -08:00
Khem Raj
4f188f706c layer: Convert to new override syntax
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-09-23 10:36:43 -07:00
Marcus Comstedt
a6a2f962db classes/kmods: assure kernel-abiversion exists
If the deploy and tmp directories were zapped but the sstate-cache
retained, it could happen that openwrt_flatten_modules_hook was run
without ${STAGING_KERNEL_BUILDDIR} ever being populated.  Add an
explicit dependency to fix that.  Also add a check that something
was actually read from the kernel-abiversion file.
2021-03-02 09:57:50 -08:00
Khem Raj
77003e8954 openwrt-distro-defaults.bbclass: Mark VIRTUAL-RUNTIME_init_manager as procd
Remove sysvinit systemd from distro features

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-12-10 22:48:26 -08:00
Khem Raj
032ad86751 openwrt-base-files.bbclass: Use master branch
Define OPENWRT_BASEPATH so recipes can define custom path for openwrt
source checkout

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-12-10 22:48:26 -08:00
Khem Raj
1e9ea6744f openwrt-base-files.bbclass: Make the LIC_FILES_CHKSUM relative to S
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-04-27 07:09:54 +00:00
Khem Raj
3e3a3208b0 openwrt-base-files.bbclass: Refer licence using relative paths
Drop setting protocol to git since its default

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-04-27 05:13:24 +00:00
Jagadeesh Krishnanjanappa
552c3a04c4 openwrt-lua: remove hardcoded 'lib' string to a generic value CMAKE_INSTALL_LIBDIR
This solves a bunch of below errors and warnings when the libdir is /usr/lib64 for
64bit machine or in multilib environment:

The libubox warning:
-- snip --
WARNING: libubox-2.0.0+gitAUTOINC+96305a3caf-r0 do_package: QA Issue: libubox: Files/directories were installed but not shipped in any package: /usr/lib/lua/5.1/uloop.so
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
libubox: 1 installed and not shipped files. [installed-vs-shipped]
-- snip --

The ubox recipe fails with below errors:

-- snip --
.../ubox/git-r0/recipe-sysroot-native/usr/bin/x86_64-montavista-linux/../../libexec/x86_64-montavista-linux/gcc/x86_64-montavista-linux/7.2.0/ld: cannot find -lubus collect2: error: ld returned 1 exit status
-- snip --

-- snip --
| ../ubox/git-r0/recipe-sysroot-native/usr/bin/x86_64-montavista-linux/../../libexec/x86_64-montavista-linux/gcc/x86_64-montavista-linux/7.2.0/ld: cannot find -luci
| collect2: error: ld returned 1 exit status
-- snip --

-- snip --
WARNING: ubox-git-r0 do_package: QA Issue: ubox: Files/directories were installed but not shipped in any package: /usr/lib/libvalidate.so
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or
delete them within do_install.
ubox: 1 installed and not shipped files. [installed-vs-shipped]
ERROR: ubox-git-r0 do_package_qa: QA Issue: /usr/sbin/validate_data contained in package ubox requires libvalidate.so()(64bit), but no providers found in RDEPENDS_ubox? [file-rdeps]
WARNING: ubox-git-r0 do_package_qa: QA Issue: ubox-dbg: found library in wrong location: /usr/lib/.debug/libvalidate.so [libdir]
ERROR: ubox-git-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: ubox-git-r0 do_package_qa: Function failed: do_package_qa
-- snip --

The ubus build fails with below error:
-- snip --
ERROR: ubus-git-r0 do_package_qa: QA Issue: /usr/bin/ubus contained in package ubus requires libubus.so()(64bit), but no providers found in RDEPENDS_ubus? [file-rdeps]
WARNING: ubus-git-r0 do_package_qa: QA Issue: ubus-dbg: found library in wrong location: /usr/lib/.debug/libubus.so [libdir]
ERROR: ubus-git-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: ubus-git-r0 do_package_qa: Function failed: do_package_qa
-- snip --

-- snip --
WARNING: ubus-git-r0 do_package: QA Issue: ubus: Files/directories were installed but not shipped in any package: /usr/lib/lua/5.1/ubus.so
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
ubus: 1 installed and not shipped files. [installed-vs-shipped]
-- snip --

The netifd recipe fails with below error:

-- snip --
| cp: target ‘.../tmp_new/work/corei7-64-montavista-linux/netifd/git-r0/image/lib64/netifd/’ is not a directory
| WARNING: .../tmp_new/work/corei7-64-montavista-linux/netifd/git-r0/temp/run.do_install.27647:1 exit 1 from 'cp -dR --preserve=mode,links .../tmp_new/work/corei7-64-montavista-linux/netifd/git-r0/git/scripts/* .../tmp_new/work/corei7-64-montavista-linux/netifd/git-r0/image/lib64/netifd/'
-- snip --

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
2018-03-02 08:45:30 -08:00
Daniel F. Dickinson
2acdf5e5cd classes: Split lua 5.1 compile options into separate class
We split off the lua compile options into a separate class
so that packages that need them but not workaround for lack
of proper SOVERSION don't inherit a problem.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-02-02 10:03:05 -08:00
Daniel F. Dickinson
07bb9dab81 classes/kmods: replace 'base_read_file' removed from OE-core
An error is thrown because base_read_file no longer exists in OE-core (master),
and it's been deprecated a long time, so use the appropriate replacement, which
is oe.utils.read_file.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-01-30 11:52:36 -08:00
Daniel F. Dickinson
1960ad17c0 classes: Add copyright headers to classes
Every file that can should have a copyright header, so added to classes.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-01-23 23:14:47 -06:00
Daniel F. Dickinson
3e0e8b776d tree-wide: Include Openwrt license when pulling from openwrt repo
Package pulling scripts and configs from openwrt.git were not
indicating the GPL-2.0+ license on that repo.  Therefore add
the LICENSE file from openwrt.git and update LICENSE with an
'&GPL-2.0+'.  Since this is primarily initscripts and such,
while most of the actual software (like procd, ubus) etc is
under an MIT, BSD, or Apache license, it may be desirable to
replace the scripts with MIT, BSD, or Apache scripts.

Closes https://github.com/kraj/meta-openwrt/issues/43

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-01-19 16:20:47 -08:00
Daniel F. Dickinson
1decc6eaa5 classes/openwrt-services: Ensure rc.d exists
Enabling procd scripts without /etc/rc.d won't work, so
make sure it exists.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-01-18 20:49:36 -08:00
Daniel F. Dickinson
4893aa90c1 classes: kmods: Prevent build error due to missing /lib/modules{/<version}
WIth arm by default there are no modules in /lib/modules so the
module 'flattening' fails.  Prevent that by first checking the
module directory exists.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-01-18 20:49:36 -08:00
Daniel F. Dickinson
d5ae060fb3 distro: Be a better distro 'flavour' rather than distro
Drop the conf/nodistro.conf that actually ends up being a distro
and document using INHERHIT += " openwrt-distro-defaults " in local.conf OR
an actual distro's conf.  Also prevent setting DISTRO_FEATURES to include
procd from overriding DISTRO_FEATURES and thereby losing the libc locale
config used with glibc (resulting in locale build failures).

Closes https://github.com/kraj/meta-openwrt/issues/30

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-01-18 20:49:36 -08:00
Daniel F. Dickinson
02a89fb11e classes/openwrt: Update with VIRTUAL-RUNTIME's for openwrt defaults
Openwrt has different defaults for e.g. dev_manager than usual
OE so make it easy to set them by inherting.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-01-17 10:26:15 -08:00
Daniel F. Dickinson
8ec6c07e91 classes: Add class to 'flatten' kernel modules tree for kmodloader
ubox's kmodloader expects that kernel modules will all be in the
main modules directory (/lib/modules/<version>/) rather than in
subdirectories below that.  Allow it to work by recognizing it's
limitations.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-01-17 10:26:15 -08:00
Daniel F. Dickinson
38b91093a5 procd initscripts: Create a class and enable them during rootfs postuninstall
Closes https://github.com/kraj/meta-openwrt/issues/14 by creating
a class and inheriting it in images that have procd initscripts;
we also inherit in each recipe but that doesn't actually affect
the rootfs postuninstall command which is where this hook
runs.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-01-17 10:26:15 -08:00
Daniel F. Dickinson
ea7e7d535c tree-wide: Update to lede-17.01 (latest Openwrt stable as of re-merge)
Updates recipes to use lede-17.01 which is the latest OpenWrt stable
branch as of the remerge of LEDE and Openwrt.  Also refresh, update,
and add patches as necessary to allow to build.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-01-17 10:26:15 -08:00
Aaron Brice
dde912c4df openwrt: Add OPENWRT_SRCREV to openwrt.bbclass
Since multiple recipes are going to be copying files out of openwrt
repository, specify the revision to use for that repo once, in
openwrt.bbclass, to avoid recipes copying files out of different
revisions.

Signed-off-by: Aaron Brice <aaron.brice@datasoft.com>
2017-02-17 17:28:57 -08:00
Theodore A. Roth
7a0d0ab9db openwrt.bbclass: fix LUAPATH
Running the native lua5.1 binary to get the lua module path doesn't play
nice with using SSTATE with multiple build environments:

    $ bitbake -e libubox | grep EXTRA_OECMAKE
    # $EXTRA_OECMAKE [5 operations]
    EXTRA_OECMAKE=" -DLUAPATH=`lua5.1 -e \"for k in string.gmatch(package.cpath .. \
    \\";\\", \\"([^;]+)/..so;\\") do if k:sub(1,1) == \\"/\\" then print(k) \
    break end end\" | \
    sed 's#/home/troth/git/econe-yocto/build-morty-qemux86/tmp/sysroots/x86_64-linux##'` \
    -DBUILD_EXAMPLES=ON -DBUILD_LUA=ON -DCMAKE_SKIP_RPATH=ON \${PACKAGECONFIG_CONFARGS}"

    $ tmp/sysroots/x86_64-linux/usr/bin/lua5.1 -e "for k in string.gmatch(package.cpath .. \
    \";\", \"([^;]+)/..so;\") do if k:sub(1,1) == \"/\" then print(k) break end end"
    /home/troth/git/econe-yocto/build-morty/tmp/sysroots/x86_64-linux/usr/lib/lua/5.1

Just use a fixed string for the path instead of trying to programmatically generate it.

Signed-off-by: Theodore A. Roth <theodore_roth@trimble.com>
2017-01-18 21:49:45 -08:00
Khem Raj
53167b4838 openwrt.bbclass: Move to classes folder
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2016-01-22 00:43:56 +00:00