Commit e01b7f9a authored by Adam Wujek's avatar Adam Wujek 💬

build/scripts/wraprootfs: update after buildroot uplift

--Remove file THIS_IS_NOT_YOUR_ROOT_FILESYSTEM. We wrap rootfs ourself, we know
  what we're doing.
--remove symlink /etc/dropbear, before creating such directory
  Creating the symlink was added in the buildroot's commit:
  e7d04dd2 package/dropbear: fix generating keys on RO file systems
--overwrite symlink for var/run->../tmp
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent b4b62a09
......@@ -36,6 +36,11 @@ cp -r $rootfs_vanilla/* $TMPFS
cp -r $WRS_OUTPUT_DIR/images/wr/* $TMPFS/wr
cp -r $WRS_OUTPUT_DIR/images/lib/* $TMPFS/lib
rm -f $TMPFS/etc/init.d/*
rm -f $TMPFS/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
# remove symlink from the buildroot
rm -rf $TMPFS/etc/dropbear
mkdir -p $TMPFS/etc/dropbear; chown -R root:root $TMPFS/etc/dropbear
cp -r $rootfs_override/* $TMPFS
# remove leftovers from on-going edits in rootfs_override
find $TMPFS -name '*~' | xargs rm -f
......@@ -52,7 +57,6 @@ if [ -f $WRS_BASE_DIR/authorized_keys ]; then
fi
chmod g-w $TMPFS/root $TMPFS/root/.ssh
chown -R root:root $TMPFS/root
mkdir -p $TMPFS/etc/dropbear; chown -R root:root $TMPFS/etc/dropbear
chmod a+rx $TMPFS
##### now move stuff to usr (we need usr to be in flash, / remains initramfs)
......@@ -64,6 +68,8 @@ mv $TMPFS/wr $TMPFS/usr; ln -s usr/wr $TMPFS
mv $TMPFS/var $TMPFS/usr; ln -s usr/var $TMPFS
# var/run links to ../tmp, so create /usr/tmp
ln -s ../tmp $TMPFS/usr/tmp
# var/run links to ../run, overwrite it to point to ../tmp
ln -sf ../tmp $TMPFS/var/run
# mv ubi commands to /sbin: they are needed for boot time
mv $TMPFS/usr/sbin/ubi* $TMPFS/sbin
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment