[ostree] yocto: Move modules to /ostree, other misc fixes
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] yocto: Move modules to /ostree, other misc fixes
- Date: Sat, 11 Feb 2012 14:24:34 +0000 (UTC)
commit dd4982ff292d71ef2a79d4f8b6a12b66add5aec0
Author: Colin Walters <walters verbum org>
Date: Sat Feb 11 09:23:29 2012 -0500
yocto: Move modules to /ostree, other misc fixes
gnomeos/yocto/classes/gnomeos-contents.bbclass | 25 +++++++++++++++--------
gnomeos/yocto/gnomeos-install.sh | 6 +++-
gnomeos/yocto/ostree-setup.sh | 7 ++++++
3 files changed, 27 insertions(+), 11 deletions(-)
---
diff --git a/gnomeos/yocto/classes/gnomeos-contents.bbclass b/gnomeos/yocto/classes/gnomeos-contents.bbclass
index a5b8800..6a38982 100644
--- a/gnomeos/yocto/classes/gnomeos-contents.bbclass
+++ b/gnomeos/yocto/classes/gnomeos-contents.bbclass
@@ -105,21 +105,28 @@ fakeroot do_rootfs () {
rm -f ${IMAGE_ROOTFS}/etc/rcS.d/S03udev
rm -f ${IMAGE_ROOTFS}/etc/rcS.d/*networking
- # The default fstab has /, which we don't want, and we do want /sys and /dev/shm
- cat > ${IMAGE_ROOTFS}/etc/fstab << EOF
-tmpfs /dev/shm tmpfs mode=1777,nosuid,nodev 0 0
-devpts /dev/pts devpts gid=5,mode=620 0 0
-sysfs /sys sysfs defaults 0 0
-proc /proc proc defaults 0 0
-EOF
+ # Clear out the default fstab; everything we need right now is mounted
+ # in the initramfs.
+ cat < /dev/null > ${IMAGE_ROOTFS}/etc/fstab
# Kill the Debian netbase stuff - we use NetworkManager
rm -rf ${IMAGE_ROOTFS}/etc/network
rm -f ${IMAGE_ROOTFS}/etc/init.d/networking
- ln -sf /var/run/resolv.conf ${IMAGE_ROOTFS}/etc/resolv.conf
+ # We deploy kernels via an external mechanism; the modules
+ # directory is just a bind mount to /sysroot.
+ rm -rf ${IMAGE_ROOTFS}/lib/modules
+ mkdir -p ${IMAGE_ROOTFS}/lib/modules
- # The passwd database is stored in /var.
+ # Blow away udev from poky in favor of our own
+ rm ${IMAGE_ROOTFS}/sbin/udevd
+ ln -s /usr/libexec/udevd ${IMAGE_ROOTFS}/sbin/udev
+
+ # Random configuration changes here
+ sed -i -e 's,^DESTINATION=.*,DESTINATION=\"file\",' ${IMAGE_ROOTFS}/etc/syslog.conf
+
+ # Adjustments for /etc -> {/var,/run} here
+ ln -sf /run/resolv.conf ${IMAGE_ROOTFS}/etc/resolv.conf
rm -f ${IMAGE_ROOTFS}/etc/passwd
ln -s /var/passwd ${IMAGE_ROOTFS}/etc/passwd
rm -f ${IMAGE_ROOTFS}/etc/shadow ${IMAGE_ROOTFS}/etc/shadow-
diff --git a/gnomeos/yocto/gnomeos-install.sh b/gnomeos/yocto/gnomeos-install.sh
index 4d4c4e4..85de0d6 100755
--- a/gnomeos/yocto/gnomeos-install.sh
+++ b/gnomeos/yocto/gnomeos-install.sh
@@ -63,7 +63,6 @@ for branch in runtime devel; do
if ! test -d ${BRANCH_PREFIX}${branch}-${rev}; then
ostree --repo=repo checkout ${rev} ${BRANCH_PREFIX}${branch}-${rev}
ostbuild chroot-run-triggers ${BRANCH_PREFIX}${branch}-${rev}
- cp -ar /lib/modules/${uname} ${BRANCH_PREFIX}${branch}-${rev}/lib/modules/${uname}
fi
rm -f ${BRANCH_PREFIX}${branch}-current
ln -s ${BRANCH_PREFIX}${branch}-${rev} ${BRANCH_PREFIX}${branch}-current
@@ -90,6 +89,9 @@ if ! test -f "${kernel}"; then
EOF
exit 1
fi
+
+cp -ar /lib/modules/${uname} /ostree/modules/${uname}
+
initrd_name=initramfs-ostree-${uname}.img
initrd_tmpdir=$(mktemp -d '/tmp/gnomeos-dracut.XXXXXXXXXX')
linux-user-chroot \
@@ -98,7 +100,7 @@ linux-user-chroot \
--mount-bind /dev /dev \
--mount-bind /ostree/var /var \
--mount-bind ${initrd_tmpdir} /tmp \
- --mount-bind /lib/modules/${uname} /lib/modules/${uname} \
+ --mount-bind /ostree/modules /lib/modules \
/ostree/${BRANCH_PREFIX}devel-current \
dracut -f /tmp/${initrd_name} "${uname}"
mv "${initrd_tmpdir}/${initrd_name}" "/boot/${initrd_name}"
diff --git a/gnomeos/yocto/ostree-setup.sh b/gnomeos/yocto/ostree-setup.sh
index 36107e2..c5c9ec2 100755
--- a/gnomeos/yocto/ostree-setup.sh
+++ b/gnomeos/yocto/ostree-setup.sh
@@ -42,6 +42,9 @@ shift
test -n "$OSTREE_DIR_PATH" || usage
cd "$OSTREE_DIR_PATH"
+
+mkdir -p modules
+
mkdir -p -m 0755 ./var/{log,run,tmp,spool}
mkdir -p ./var/lib/dbus
dbus-uuidgen > ./var/lib/dbus/machine-id
@@ -49,6 +52,10 @@ dbus-uuidgen > ./var/lib/dbus/machine-id
mkdir -p ./var/tmp
chmod 1777 ./var/tmp
+if ! test -L run; then
+ ln -s ../run run
+fi
+
mkdir ./var/lib/gdm
chown 2:2 ./var/lib/gdm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]