BelaPlatform/bela-image-builder

`/usr/xenomai/lib` is not added to the lib cache

Closed this issue · 3 comments

both of these failed (in scripts/chroot.sh)

ldconfig /usr/xenomai/lib

and

echo /usr/xenomai/lib > /etc/ld.so.conf.d/xenomai.conf

I would expect the former to work and I think the latter is probably good practice anyhow, but not enough (requires to do ldconfig once on the board).
I guess we should check how rcn does it ...

I can't find any reference to ldconfig in rcn's scripts, but then he doesn't install xenomai userspace.

I guess we could run ldconfig in bela_init.sh, it should be pretty quick right? Or maybe even create a one-shot self-deleting startup script to do it on just the first boot.

I think rcn does this to regenerate ssh keys on first boot so maybe we should do that too - see https://github.com/RobertCNelson/omap-image-builder/blob/a84307aa68b1dbd6b329bc5bcf2099dd12eb439a/target/init_scripts/generic-debian.sh

Right I guess the right way of doing this is packaging up libxenomai as a proper .deb package and then dpkg -i should take care of this.

Would that get around the problem though? Does dpkg somehow modify the ld cache in a way that ldconfig can't? Because dpkg would still have to be run in the chroot.