Skip to contentSkip to conversation

package/udev: fix dependency for scsi_id

PATCH New Jeremy Kerr 2 participants 5 messages Dec 8, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 package/udev: fix dependency for scsi_id

According to udev.mk, the scsi_id package depends on the libvolume_id library, so add this dependency to Config.mk

---
 package/udev/Config.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/udev/Config.in +1 -1
index 7ecce0b..b97ff57 100644
@@ -23,7 +23,7 @@ config BR2_PACKAGE_UDEV_VOLUME_ID
 
 config BR2_PACKAGE_UDEV_SCSI_ID
 	bool "udev-scsi_id"
-	depends on BR2_PACKAGE_UDEV
+	depends on BR2_PACKAGE_UDEV_VOLUME_ID
 	help
 	  Build and install SCSI disk identification library.
 
#1 lore raw

PATCH 2/4 package/udev: fix CFLAGS for udev extras

If the udev extras are built without large file support in uClibc, I get the following error:

build_powerpc/staging_dir/usr/bin/powerpc-linux-uclibc-gcc -c -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -Wstrict-prototypes -Wsign-compare -Wshadow -Wchar-subscripts -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wmissing-prototypes -Os ext.c -o ext.o
In file included from build_powerpc/staging_dir/usr/include/stdio.h:28, from ext.c:19:
build_powerpc/staging_dir/usr/include/features.h:382:4: error:
#error It appears you have defined _FILE_OFFSET_BITS=64. Unfortunately, uClibc was built without large file support enabled.

Although the base udev package builds correctly, the extras pacakges don't adjust their CFLAGS depending on BR2_LARGEFILE.

This change adds the required CFLAGS modifications to make the extras build.

---
 package/udev/udev.mk |    3 +++
 1 file changed, 3 insertions(+)
package/udev/udev.mk +3 -0
index 9186853..6005bd1 100644
@@ -81,6 +81,7 @@ ifeq ($(strip $(BR2_PACKAGE_UDEV_VOLUME_ID)),y)
 
 $(STAGING_DIR)/usr/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION):
 	$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
+		CFLAGS="$(BR2_UDEV_CFLAGS)" \
 		USE_LOG=false USE_SELINUX=false \
 		udevdir=$(UDEV_ROOT) EXTRAS="extras/volume_id" -C $(UDEV_DIR)
 	$(INSTALL) -m 0644 -D $(UDEV_DIR)/extras/volume_id/lib/libvolume_id.h $(STAGING_DIR)/usr/include/libvolume_id.h
@@ -125,6 +126,7 @@ ifeq ($(strip $(BR2_PACKAGE_UDEV_SCSI_ID)),y)
 
 $(TARGET_DIR)/lib/udev/scsi_id: $(STAGING_DIR)/usr/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION)
 	$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
+		CFLAGS="$(BR2_UDEV_CFLAGS)" \
 		USE_LOG=false USE_SELINUX=false \
 		udevdir=$(UDEV_ROOT) EXTRAS="extras/scsi_id" -C $(UDEV_DIR)
 	$(INSTALL) -m 0755 -D $(UDEV_DIR)/extras/scsi_id/scsi_id $(TARGET_DIR)/lib/udev/scsi_id
@@ -132,6 +134,7 @@ $(TARGET_DIR)/lib/udev/scsi_id: $(STAGING_DIR)/usr/lib/libvolume_id.so.$(UDEV_VO
 
 $(TARGET_DIR)/lib/udev/usb_id: $(STAGING_DIR)/usr/lib/libvolume_id.so.$(UDEV_VOLUME_ID_VERSION)
 	$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
+		CFLAGS="$(BR2_UDEV_CFLAGS)" \
 		USE_LOG=false USE_SELINUX=false \
 		udevdir=$(UDEV_ROOT) EXTRAS="extras/usb_id" -C $(UDEV_DIR)
 	$(INSTALL) -m 0755 -D $(UDEV_DIR)/extras/usb_id/usb_id $(TARGET_DIR)/lib/udev/usb_id
#2 lore raw

PATCH 3/4 target/initramfs: actually build initramfs target

In reply to Jeremy Kerr

Currently, BR2_TARGET_ROOTFS_INITRAMFS doesn't actually do anything, as it doesn't alter $(TARGETS)

This change hooks up the TARGETS variable to INITRAMFS_TARGET (which is only set if BR2_TARGET_ROOTFS_INITRAMFS=y), so that the initramfs list is built.

---
 target/initramfs/initramfs.mk |    2 ++
 1 file changed, 2 insertions(+)
target/initramfs/initramfs.mk +2 -0
index 07f5ec3..015d879 100644
@@ -12,6 +12,8 @@ else
 INITRAMFS_TARGET:= #nothing
 endif
 
+TARGETS+=$(INITRAMFS_TARGET)
+
 $(INITRAMFS_TARGET) initramfs: host-fakeroot makedevs
 	rm -f $(TARGET_DIR)/init
 	ln -s sbin/init $(TARGET_DIR)/init
#3 lore raw

PATCH 4/4 package/udev: create base device nodes after mounting a new /dev

In reply to Jeremy Kerr

Currently, udev won't start for me, as we've just mounted a new /dev, which is completely empty, and udevd requires a /dev/null.

This change manually creates the three base device nodes (zero, null and console) so that udev can start.

---
 package/udev/S10udev |    3 +++
 1 file changed, 3 insertions(+)
package/udev/S10udev +3 -0
index 5b663a0..6418f63 100755
@@ -58,6 +58,9 @@ case "$1" in
 	exit 1
 
         mkdir $udev_root/pts $udev_root/shm
+        mknod -m 0666 /dev/null c 1 3
+        mknod -m 0666 /dev/zero c 1 5
+        mknod -m 0600 /dev/console c 5 1
 
         # populate /dev (normally)
         echo -n "Populating $udev_root using udev: "
#4 lore raw

PATCH 1/4 package/udev: fix dependency for scsi_id

In reply to Jeremy Kerr
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jeremy" == Jeremy Kerr <[email protected]> writes:

Jeremy> According to udev.mk, the scsi_id package depends on the Jeremy> libvolume_id library, so add this dependency to Config.mk

Thanks, committed all 4 (from r24318 on).

Signature · 1 line
Bye, Peter Korsgaard