mirror of
https://github.com/ostreedev/ostree.git
synced 2025-03-16 10:50:43 +03:00
gnomeos: More tweaks to install/run scripts
The run script now allows using the current kernel+initrd.
This commit is contained in:
parent
1aaf74651b
commit
4de5a36b24
@ -40,12 +40,21 @@ usage () {
|
||||
ARCH=i686
|
||||
BRANCH_PREFIX="gnomeos-3.4-${ARCH}-"
|
||||
|
||||
if ! test -d /ostree; then
|
||||
mkdir /ostree
|
||||
if ! test -d /ostree/repo/objects; then
|
||||
mkdir -p /ostree
|
||||
|
||||
$SRCDIR/ostree-setup.sh /ostree
|
||||
fi
|
||||
|
||||
#ostree pull http://ostree.gnome.org/3.4/repo gnomeos-3.4-i686-{runtime,devel}
|
||||
if ! test -f /ostree/repo/refs/heads/gnomeos-3.4-i686-runtime; then
|
||||
cat <<EOF
|
||||
You must get a repo from somewhere...e.g.:
|
||||
cd /ostree && rsync --progress -ave ssh master.gnome.org:/home/users/walters/ostree/repo .
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd /ostree
|
||||
for branch in runtime devel; do
|
||||
rev=$(ostree --repo=$(pwd)/repo rev-parse ${BRANCH_PREFIX}${branch});
|
||||
@ -60,5 +69,13 @@ rm -f current
|
||||
ln -s ${BRANCH_PREFIX}runtime-current current
|
||||
|
||||
cp -a ./${BRANCH_PREFIX}${branch}-current/usr/sbin/ostree-init .
|
||||
cd -
|
||||
|
||||
cp $SRCDIR/15_ostree /etc/grub.d/
|
||||
if test -d /etc/grub.d; then
|
||||
cp $SRCDIR/15_ostree /etc/grub.d/
|
||||
else
|
||||
cat <<EOF
|
||||
GRUB 2 not detected; you'll need to edit e.g. /boot/grub/grub.conf manually
|
||||
Kernel has been installed as /boot/bzImage-gnomeos.bin
|
||||
EOF
|
||||
fi
|
||||
|
@ -40,6 +40,8 @@ usage () {
|
||||
OSTREE_REPO=$1
|
||||
shift
|
||||
test -n "$OSTREE_REPO" || usage
|
||||
TYPE=$1
|
||||
shift
|
||||
|
||||
ARCH=i686
|
||||
BRANCH_PREFIX="gnomeos-3.4-${ARCH}-"
|
||||
@ -100,8 +102,12 @@ ostree --repo=${OSTREE_REPO} local-clone repo ${BRANCH_PREFIX}runtime ${BRANCH_P
|
||||
for branch in runtime devel; do
|
||||
rev=$(ostree --repo=repo rev-parse ${BRANCH_PREFIX}${branch});
|
||||
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}
|
||||
ostree --repo=repo checkout ${rev} ${BRANCH_PREFIX}${branch}-${rev}.tmp
|
||||
ostbuild chroot-run-triggers ${BRANCH_PREFIX}${branch}-${rev}.tmp
|
||||
if test x$TYPE = xcurrent; then
|
||||
cp -ar /lib/modules/`uname -r` ${BRANCH_PREFIX}${branch}-${rev}.tmp/lib/modules
|
||||
fi
|
||||
mv ${BRANCH_PREFIX}${branch}-${rev}{.tmp,}
|
||||
fi
|
||||
rm -f ${BRANCH_PREFIX}${branch}-current
|
||||
ln -s ${BRANCH_PREFIX}${branch}-${rev} ${BRANCH_PREFIX}${branch}-current
|
||||
@ -117,15 +123,22 @@ sync
|
||||
umount fs
|
||||
rmdir fs
|
||||
|
||||
ARGS="$@"
|
||||
ARGS="rd.plymouth=0 $@"
|
||||
if ! echo $ARGS | grep -q 'init='; then
|
||||
ARGS="init=/ostree-init $ARGS"
|
||||
fi
|
||||
if ! echo $ARGS | grep -q 'root='; then
|
||||
ARGS="root=/dev/hda $ARGS"
|
||||
fi
|
||||
if ! echo $ARGS | grep -q 'ostree='; then
|
||||
ARGS="ostree=${BRANCH_PREFIX}runtime-current $ARGS"
|
||||
fi
|
||||
if test x$TYPE = xqemu; then
|
||||
ARGS="root=/dev/hda $ARGS"
|
||||
KERNEL=./tmp-eglibc/deploy/images/bzImage-qemux86.bin
|
||||
else
|
||||
if test x$TYPE = xcurrent; then
|
||||
ARGS="root=/dev/sda $ARGS"
|
||||
KERNEL=/boot/vmlinuz-`uname -r`
|
||||
INITRD_ARG="-initrd /boot/initramfs-`uname -r`.img"
|
||||
fi
|
||||
fi
|
||||
|
||||
exec qemu-kvm -kernel ./tmp-eglibc/deploy/images/bzImage-qemux86.bin -hda gnomeos-fs.img -net user -net nic,model=virtio -m 512M -append "$ARGS" -monitor stdio
|
||||
exec qemu-kvm -kernel ${KERNEL} ${INITRD_ARG} -hda gnomeos-fs.img -net user -net nic,model=virtio -m 512M -append "$ARGS" -monitor stdio
|
||||
|
@ -52,9 +52,6 @@ chown 2:2 ./var/lib/gdm
|
||||
touch ./var/shadow
|
||||
chmod 0600 ./var/shadow
|
||||
|
||||
mkdir repo
|
||||
ostree --repo=repo init
|
||||
|
||||
cat >./var/passwd << EOF
|
||||
root::0:0:root:/:/bin/sh
|
||||
dbus:*:1:1:dbus:/:/bin/false
|
||||
@ -65,3 +62,6 @@ root:*:0:root
|
||||
dbus:*:1:
|
||||
gdm:*:2:
|
||||
EOF
|
||||
|
||||
mkdir repo
|
||||
ostree --repo=repo init
|
||||
|
Loading…
x
Reference in New Issue
Block a user