Open loewal opened 1 year ago
This appears to occur specifically in the device install script:
47 # find the location to install
48 output_dir=$(find "/lib/modules" -type f -name "bcm2835_smi_dev*" -exec dirname {} \;)
...
63 sudo cp -r ${ROOT_DIR}/$BUILD_DIR/smi_stream_dev.ko.xz ${output_dir}/
When dirname is executed, it picks up the file, however, when line 63 is executed, cp copies directories to other directories. cp does not copy the file from the build to every directory, instead copying directories onto directories. cp does not copy a single source to multiple directories. It may copy multiple sources to a single directory, however.
cp -r /home/XXXX/cariboulite/driver/build/smi_stream_dev.ko.xz /lib/modules/6.1.21+/kernel/drivers/char/broadcom /lib/modules/6.1.21-v7l+/kernel/drivers/char/broadcom /lib/modules/6.1.21-v8+/kernel/drivers/char/broadcom/
cp: cannot create regular file '/lib/modules/6.1.21-v8+/kernel/drivers/char/broadcom/smi_stream_dev.ko.xz': Permission denied
cp: cannot create directory '/lib/modules/6.1.21-v8+/kernel/drivers/char/broadcom/broadcom': Permission denied
cp: cannot create directory '/lib/modules/6.1.21-v8+/kernel/drivers/char/broadcom/broadcom': Permission denied
I've already fixed mine by removing the driver it looks for from previous kernel versions, so that it doesn't detect and try to install under multiple versions since I don't care about them.
Some discussion should be made whether to install under multiple kernel versions, or only the current one.
Hi, When running install.sh for more then once, this is happening:
[ 3 ] Installing into '/lib/modules/5.10.103+/kernel/drivers/char/broadcom /lib/modules/5.10.103-v7l+/kernel/drivers/char/broadcom /lib/modules/5.10.103-v8+/kernel/drivers/char/broadcom /lib/modules/5.10.103-v7+/kernel/drivers/char/broadcom /lib/modules/5.10.103-v7+/kernel/drivers/char/broadcom/broadcom' cp: kan map '/lib/modules/5.10.103-v7+/kernel/drivers/char/broadcom' niet kopiëren naar binnen zichzelf ('/lib/modules/5.10.103-v7+/kernel/drivers/char/broadcom/broadcom/broadcom')
Folder broadcom/broadcom/broadcom....and so on. Gets nested!