petitboot: add missing file and fix cflags issues
authorFelix Fietkau <nbd@openwrt.org>
Mon, 22 Dec 2008 15:14:16 +0000 (15:14 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 22 Dec 2008 15:14:16 +0000 (15:14 +0000)
SVN-Revision: 13718

utils/petitboot/Makefile
utils/petitboot/files/petitboot-wrapper [new file with mode: 0644]

index eb9024a5e928a8fa4a5db63efe288e4fad9263d8..28d3c0256c6370b422fb0d247928196d7007c482 100644 (file)
@@ -27,14 +27,18 @@ define Package/petitboot
 endef
 
 define Build/Configure
+
 endef
 
+TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)
+
 define Build/Compile
        PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
        PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
        $(MAKE) -C $(PKG_BUILD_DIR) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                $(TARGET_CONFIGURE_OPTS) \
+               CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
                all install
 endef
 
diff --git a/utils/petitboot/files/petitboot-wrapper b/utils/petitboot/files/petitboot-wrapper
new file mode 100644 (file)
index 0000000..607a357
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# wrapper script for petitboot - re-exec as required.
+mkdir -p /var/tmp/mnt
+
+while :
+do
+       /usr/sbin/petitboot -u >/var/log/petitboot.log 2>&1
+
+       # cleanup
+       for dir in /var/tmp/mnt/*
+       do
+               umount "$dir"
+               rmdir "$dir"
+       done
+done