advancedtelematic / meta-updater-raspberrypi

MIT License
10 stars 10 forks source link

WARNING: Data in /mnt directory is not preserved by OSTree. Consider moving it under /usr #34

Open agners opened 5 years ago

agners commented 5 years ago

The bootpart directory created in /mnt/bootpart causes a warning during build:

WARNING: core-image-minimal-1.0-r0 do_image_ostreerootfs: Data in /mnt directory is not preserved by OSTree. Consider moving it under /usr

That might be even harmful and prevent it from getting mounted (since mount typically errors out with mount point does not exist. if the target directory does not exist).

pattivacek commented 5 years ago

@agners I've seen this warning as well, and you are right, we should probably try to avoid it.

@lbonn @OYTIS We don't actually need this to be controlled by OSTree anyway, do we? If we only need it for the .wic, could we just remove it like we remove most of /var?

agners commented 5 years ago

I think commit a1d822b066697e9a9e2ea68b35722566c551a971 broke also qemu if meta-updater-raspberrypi is enabled. I see this line in /etc/fstab in the core-image-minimal-qemux86-64-20181116135907.rootfs.ota-ext4 image:

/dev/mmcblk0p1  /mnt/bootpart   vfat    noatime 0       0

This breaks booting qemu:

[ TIME ] Timed out waiting for device dev-mmcblk0p1.device.
[DEPEND] Dependency failed for /var/rootdirs/mnt/bootpart.
[DEPEND] Dependency failed for Local File Systems.

@patrickvacek I noticed when trying to run oe-selftests. My goal was to use an environment as close as yours... But maybe you are not using rpi layer normally?

repo init -u https://github.com/advancedtelematic/updater-repo.git -m master.xml
repo sync

source meta-updater/scripts/envsetup.sh raspberrypi3

Then setup oe-selftest as described in README.md, and run:

oe-selftest --run-tests updater
agners commented 5 years ago

@OYTIS when customizing recipes which are normally used for multiple machines, PACKAGE_ARCH should be set to MACHINE_ARCH:

PACKAGE_ARCH = "${MACHINE_ARCH}"

This makes sure that OE keeps a separate packages specifically for this machine.

See also PACKAGE_ARCH documentation.

pattivacek commented 5 years ago

But maybe you are not using rpi layer normally?

Yes, typically I run it in with envsetup.sh qemux86-64. That is listed as a requirement in CONTRIBUTING.adoc, but not in the readme. It shouldn't be necessary, but it's a known issue. (I tried to write the oe-selftests to take care of that automatically, but it doesn't work as well as I'd hoped.) However, I regularly switch my MACHINE and my bblayers manually between qemu and rpi. It shouldn't be a problem. Just set MACHINE = "qemux86-64" in local.conf, add BBLAYERS += " ${METADIR}/meta-updater-qemux86-64" to bblayers.conf, and remove meta-python, meta-raspberrypi, and meta-updater-raspberrypi.