udev: Use udev.inc and add udevadm to udev pacakge instead of udev-utils
PATCH 1/1 udev: Use udev.inc and add udevadm to udev pacakge instead of udev-utils
From: Khem Raj <[email protected]>
* Main purpose of the patch was to fix the problem where udev-utils was needed to be in root file system just to get udevadm binary. So this binary is moved into udev package instead.
* Use INC_PR
* Use udev.inc in all recipes.
* All udev recipes built udev_151 and udev_124 runs fine too.
--- recipes/udev/udev-static_124.bb | 20 ++++++++----- recipes/udev/udev.inc | 28 +++++++++--------- recipes/udev/udev_092.bb | 23 +++++++-------- recipes/udev/udev_097.bb | 15 +++++----- recipes/udev/udev_100.bb | 21 +++++++------- recipes/udev/udev_118.bb | 13 ++++----- recipes/udev/udev_124.bb | 34 +++++++++++----------- recipes/udev/udev_141.bb | 58 +++++++------------------------------- recipes/udev/udev_151.bb | 43 ++++++++--------------------- 9 files changed, 100 insertions(+), 155 deletions(-)
recipes/udev/udev-static_124.bb +12 -8
@@ -1,15 +1,19 @@ DESCRIPTION = "Static version of udev for devices with an old (e.g. <2.6.27) kernel" -SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ - file://noasmlinkage.patch;patch=1 \ - file://flags.patch;patch=1 \ - file://vol_id_ld.patch;patch=1 \ - file://udevtrigger_add_devname_filtering.patch;patch=1 \ - file://libvolume-id-soname.patch;patch=1 \ - file://mtd-exclude-persistent.patch;patch=1 \ +require udev.inc + +SRC_URI += "file://noasmlinkage.patch;patch=1 \ + file://flags.patch;patch=1 \ + file://vol_id_ld.patch;patch=1 \ + file://udevtrigger_add_devname_filtering.patch;patch=1 \ + file://libvolume-id-soname.patch;patch=1 \ + file://mtd-exclude-persistent.patch;patch=1 \ " -require udev.inc + +PR = "${INC_PR}.0" + +LD = "${CC}" S = "${WORKDIR}/udev-${PV}"
recipes/udev/udev.inc +14 -14
@@ -1,8 +1,9 @@ DESCRIPTION ?= "udev is a program which dynamically creates and removes device nodes from \ /dev/. It responds to /sbin/hotplug device events and requires a 2.6 kernel." + LICENSE = "GPLv2+" -SRC_URI += " \ +SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ file://udev.rules \ file://devfs-udev.rules \ file://links.conf \
@@ -12,6 +13,8 @@ SRC_URI += " \ file://local.rules \ file://init" +INC_PR = "r26" + inherit update-rc.d autotools pkgconfig PARALLEL_MAKE = ""
@@ -19,18 +22,19 @@ UDEV_DEVFS_RULES ?= "0" PKG_libvolume-id-dev = "libvolume-id-dev" INITSCRIPT_NAME = "udev" -INITSCRIPT_PARAMS = "start 04 S ." +INITSCRIPT_PARAMS = "start 03 S ." export CROSS = "${TARGET_PREFIX}" export HOSTCC = "${BUILD_CC}" export udevdir ?= "/dev" +# Put stuff in /lib and /sbin +export bindir := "${base_bindir}" +export sbindir := "${base_sbindir}" export usrbindir := "${bindir}" export usrsbindir := "${sbindir}" -export etcdir = "${sysconfdir}" -LD = "${CC}" -bindir = "/bin" -sbindir = "/sbin" +export etcdir := "${sysconfdir}" +TARGET_CC_ARCH += "${LDFLAGS}" UDEV_EXTRAS = "<override me>" EXTRA_OEMAKE = "-e \ 'EXTRAS=${UDEV_EXTRAS}' \
@@ -56,17 +60,13 @@ do_install () { install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts -} - -do_stage () { - autotools_stage_all - install -m 0644 ${S}/extras/volume_id/lib/libvolume_id.h ${STAGING_INCDIR} - oe_libinstall -C extras/volume_id/lib -so libvolume_id ${STAGING_LIBDIR} + install -m 0644 ${S}/extras/volume_id/lib/libvolume_id.h ${D}${includedir} + oe_libinstall -C extras/volume_id/lib -so libvolume_id ${D}${libdir} } PACKAGES =+ "udev-utils libvolume-id libvolume-id-dev" FILES_libvolume-id-dev = "${includedir}/libvolume_id.h ${libdir}/libvolume_id.a ${libdir}/libvolume_id.so ${libdir}/pkgconfig/libvolume_id.pc" -FILES_udev-utils = "${usrbindir}/udevinfo ${sbindir}/udevadm ${usrbindir}/udevtest" +FILES_udev-utils = "${usrbindir}/udevinfo ${usrbindir}/udevtest" FILES_libvolume-id = "${base_libdir}/libvolume_id.so.*" -FILES_${PN} += "${usrbindir}/* ${usrsbindir}/udevd" +FILES_${PN} += "${usrbindir}/* ${usrsbindir}/udevd ${sbindir}/udevadm" FILES_${PN}-dbg += "${usrbindir}/.debug ${usrsbindir}/.debug"
recipes/udev/udev_092.bb +12 -13
@@ -3,21 +3,20 @@ DESCRIPTION = "udev is a daemon which dynamically creates and removes device nod the hotplug package and requires a kernel not older than 2.6.12." RPROVIDES_${PN} = "hotplug" -PR = "r25" - -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ - file://noasmlinkage.patch;patch=1 \ - file://flags.patch;patch=1 \ - file://udevsynthesize.patch;patch=1 \ - file://udevsynthesize.sh \ - file://arm_inotify_fix.patch;patch=1 \ - file://mtd-exclude-persistent.patch;patch=1 \ - file://mount.blacklist \ - " - require udev.inc -INITSCRIPT_PARAMS = "start 03 S ." +LD = "${CC}" + +PR = "${INC_PR}.0" + +SRC_URI += "file://noasmlinkage.patch;patch=1 \ + file://flags.patch;patch=1 \ + file://udevsynthesize.patch;patch=1 \ + file://udevsynthesize.sh \ + file://arm_inotify_fix.patch;patch=1 \ + file://mtd-exclude-persistent.patch;patch=1 \ + file://mount.blacklist \ + " FILES_${PN} += "${base_libdir}/udev/*" FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
recipes/udev/udev_097.bb +7 -8
@@ -8,17 +8,16 @@ used to detect the type of a file system and read its metadata." DESCRIPTION_libvolume-id-dev = "libvolume_id development headers, \ needed to link programs with libvolume_id." -PR = "r13" +require udev.inc -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ - file://noasmlinkage.patch;patch=1 \ - file://flags.patch;patch=1 \ - file://mount.blacklist \ - " +PR = "${INC_PR}.0" -require udev.inc +LD = "${CC}" -INITSCRIPT_PARAMS = "start 03 S ." +SRC_URI += "file://noasmlinkage.patch;patch=1 \ + file://flags.patch;patch=1 \ + file://mount.blacklist \ + " FILES_${PN} += "${base_libdir}/udev/*" FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
recipes/udev/udev_100.bb +10 -11
@@ -9,19 +9,18 @@ used to detect the type of a file system and read its metadata." DESCRIPTION_libvolume-id-dev = "libvolume_id development headers, \ needed to link programs with libvolume_id." -PR = "r16" - -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ - file://noasmlinkage.patch;patch=1 \ - file://flags.patch;patch=1 \ - file://mtd-exclude-persistent.patch;patch=1 \ - file://mount.blacklist \ - file://mount.sh \ - " - require udev.inc -INITSCRIPT_PARAMS = "start 03 S ." +PR = "${INC_PR}.0" + +LD = "${CC}" + +SRC_URI += "file://noasmlinkage.patch;patch=1 \ + file://flags.patch;patch=1 \ + file://mtd-exclude-persistent.patch;patch=1 \ + file://mount.blacklist \ + file://mount.sh \ + " FILES_${PN} += "${base_libdir}/udev/*" FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
recipes/udev/udev_118.bb +6 -7
@@ -3,12 +3,15 @@ DESCRIPTION = "udev is a daemon which dynamically creates and removes device nod the hotplug package and requires a kernel not older than 2.6.12." RPROVIDES_${PN} = "hotplug" -PR = "r6" +require udev.inc + +PR = "${INC_PR}.0" + +LD = "${CC}" DEFAULT_PREFERENCE = "-118" -SRC_URI = "\ - http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ +SRC_URI += "\ file://flags.patch;patch=1 \ file://vol_id_ld.patch;patch=1 \ file://udevtrigger_add_devname_filtering.patch;patch=1 \
@@ -17,10 +20,6 @@ SRC_URI = "\ " TARGET_CC_ARCH += "${LDFLAGS}" -require udev.inc - -INITSCRIPT_PARAMS = "start 03 S ." - FILES_${PN} += "${base_libdir}/udev/*" FILES_${PN}-dbg += "${base_libdir}/udev/.debug" UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/volume_id/"
recipes/udev/udev_124.bb +17 -17
@@ -2,28 +2,28 @@ DESCRIPTION = "udev is a daemon which dynamically creates and removes device nod /dev/, handles hotplug events and loads drivers at boot time. It replaces \ the hotplug package and requires a kernel not older than 2.6.12." RPROVIDES_${PN} = "hotplug" -PR = "r19" - -SRC_URI = "http://kernel.org/pub/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ - file://noasmlinkage.patch;patch=1 \ - file://flags.patch;patch=1 \ - file://vol_id_ld.patch;patch=1 \ - file://udevtrigger_add_devname_filtering.patch;patch=1 \ - file://libvolume-id-soname.patch;patch=1 \ - file://mtd-exclude-persistent.patch;patch=1 \ - file://mount.blacklist \ - file://run.rules \ - file://default \ - file://local.rules \ + +require udev.inc + +PR = "${INC_PR}.0" + +LD = "${CC}" + +SRC_URI += "file://noasmlinkage.patch;patch=1 \ + file://flags.patch;patch=1 \ + file://vol_id_ld.patch;patch=1 \ + file://udevtrigger_add_devname_filtering.patch;patch=1 \ + file://libvolume-id-soname.patch;patch=1 \ + file://mtd-exclude-persistent.patch;patch=1 \ + file://mount.blacklist \ + file://run.rules \ + file://default \ + file://local.rules \ " SRC_URI_append_h2200 = " file://50-hostap_cs.rules " PACKAGE_ARCH_h2200 = "h2200" -require udev.inc - -INITSCRIPT_PARAMS = "start 03 S ." - FILES_${PN} += "${base_libdir}/udev/*" FILES_${PN}-dbg += "${base_libdir}/udev/.debug" UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/volume_id/"
recipes/udev/udev_141.bb +11 -47
95 lines not on this page · raw message
recipes/udev/udev_151.bb +12 -31
81 lines not on this page · raw message
Signature · 1 line
1.7.0.4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 11 lines · On 25-05-10 08:49, [email protected] wrote:
From: Khem Raj <[email protected]>
* Main purpose of the patch was to fix the problem where udev-utils was needed to be in root file system just to get udevadm binary. So this binary is moved into udev package instead.
* Use
INC_PR* Use udev.inc in all recipes.
* All udev recipes built
udev_151andudev_124runs fine too.
I explicitly didn't use udev.inc in udev 151 because it made the recipe very hard to read. It would make more sense to do a udev-1xx.inc based on udev 151 and use that for future recipes.
The udevadm packaging change looks good, but it's only needed for udev
Quoted 1 line
124 if I read the udev changelogs correctly.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFL+3rPMkyGM64RGpERAreVAJ9ONwqKo/pWx9zBQ+v3YAQcFrzTZACglliD Z9mfuLp0SJ+/AuburyQIeaQ=
=h54a
-----END PGP SIGNATURE-----
Quoted 15 lines
Quoted 10 lines
* Main purpose of the patch was to fix the problem where udev-utils was needed to be in root file system just to get udevadm binary. So this binary is moved into udev package instead.
* Use
INC_PR* Use udev.inc in all recipes.
* All udev recipes built
udev_151andudev_124runs fine too.I explicitly didn't use udev.inc in udev 151 because it made the recipe very hard to read. It would make more sense to do a udev-1xx.inc based on udev 151 and use that for future recipes.
Quoted 7 lines
The udevadm packaging change looks good, but it's only needed for udev
Quoted 1 line
124 if I read the udev changelogs correctly.
regards,
Koen
Could you upload this patch to the git respiratory? Or this is just non-official change?
I'm trying now to compile base-image on angstrom distro and I got error from udev_151.bb recipe. May be your patch will help with this...
This is what I got:
Does anyone met with this error? Sorry if it's not a right place to post.
Kind Regards,
Grzegorz
#########################################
| checking for GLIB... configure: error: Package requirements (glib-2.0 >=
2.7.0 gobject-2.0 >= 2.7.0) were not met:
|
| Package file '/home/grzesiek/tele/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/lib/pkgconfig/glib-2.0.pc' appears to be empty
| Package 'glib-2.0' has no Name: field | | Consider adjusting the PKG_CONFIG_PATH environment variable if you | installed software in a non-standard prefix. | | Alternatively, you may set the environment variables GLIB_CFLAGS | and GLIB_LIBS to avoid the need to call pkg-config. | See the pkg-config man page for more details. |
NOTE: Task failed:/home/grzesiek/tele/tmp/work/armv5te-angstrom-linux-gnueabi/udev-151-r9/temp/log.do_configure.18550
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/grzesiek/tele/openembedded/recipes/udev/udev_151.bbdo_configure
failed
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 2 lines · Grzegorz Toporek
'
/home/grzesiek/tele/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/lib/pkgconfig/glib-2.0.pc' appears to be empty
That seems to be the problem, does rebuilding glib-2.0 help?
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFL+5d/MkyGM64RGpERAmBSAJ9bJhUwVftZY/vN8jPmyCVE3TSYUQCfeHcl rCpt16O0fh4CGOv2b50lja8=
=A8Vo
-----END PGP SIGNATURE-----
Quoted 12 lines
Quoted 3 lines
'
/home/grzesiek/tele/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/lib/pkgconfig/glib-2.0.pc'Quoted 1 line
appears to be empty
That seems to be the problem, does rebuilding glib-2.0 help?
regards,
Koen
No, it doesn't. Still the same error.
Kind Regards,
Grzegorz
Quoted 11 lines · Grzegorz Toporek
Could you upload this patch to the git respiratory? Or this is just non-official change?
I'm trying now to compile base-image on angstrom distro and I got error from udev_151.bb recipe. May be your patch will help with this...
This is what I got:
Does anyone met with this error? Sorry if it's not a right place to post.
I've another issue concerning acl and attr that udev-151 requires, and I'm hoping that this patch would help me too. Btw I didn't have this problem with bitbake 1.8.18, but 1.10 with newest oe fails with output:
| make[4]: Entering directory `.../tmp/work/armv5te-angstrom-linux-gnueabi/attr-2.4.44-r3/attr-2.4.44/attr' | ../include/install-sh -o hbragge -g 1002 -m 755 -d /usr/bin | chmod: changing permissions of `//usr/bin': Operation not permitted | make[4]: *** [install] Error 1 | make[4]: Leaving directory `.../tmp/work/armv5te-angstrom-linux-gnueabi/attr-2.4.44-r3/attr-2.4.44/attr' | make[3]: *** [attr-install] Error 2 | make[3]: Leaving directory `.../tmp/work/armv5te-angstrom-linux-gnueabi/attr-2.4.44-r3/attr-2.4.44' | FATAL: oe_runmake failed
NOTE: package attr-2.4.44-r3: task do_install: Failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of .../openembedded/recipes/udev/attr_2.4.44.bb do_install failed
ERROR: Task 1641 (.../openembedded/recipes/udev/attr_2.4.44.bb, do_install) failed with 256
Building acl does the same thing. Something is wrong with environment variables exported by acl/attr recipes, which should point in ${D} but are now pointing into root. I'm executing bitbake from a makefile, which also seems to have and effect on this (starting bitbake directly preserves those variables).
- Henri
Quoted 12 lines · Koen Kooi
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 8 lines · On 25-05-10 08:49, [email protected] wrote:
From: Khem Raj <[email protected]>
* Main purpose of the patch was to fix the problem where udev-utils was needed to be in root file system just to get udevadm binary. So this binary is moved into udev package instead.
* Use
INC_PR
Quoted 7 lines
Quoted 3 lines
* Use udev.inc in all recipes.
* All udev recipes built
udev_151andudev_124runs fine too.I explicitly didn't use udev.inc in udev 151 because it made the recipe very hard to read. It would make more sense to do a udev-1xx.inc based on udev 151 and use that for future recipes.
On the contrary I thought it was more confusing to include udev.inc in some and not in others.I find that the recipes are quite similar. infact do_install function could be also commonized properly and extra bits put into install_append in given recipes. I did not spend time doing that yet.
Then the description field is also weirdly overridden in recipes probably
that needs fixing as well.
Any specific reason to have udev-1xx.inc ?
I will leave udev_151 as it is and only commit the udevadm change for now
-Khem