-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while running the command "rpi-source" in terminal #14
Comments
|
I am following the setup for a flow sensor on Raspberry Pi 4B linked here. I followed the steps given in this link, but as they are using the archived repo, I am following the steps given in this repo. I am getting the above error when I run the |
That's not enough information for 2 - what does |
After some experimentation I'm going to guess that you're on 32-bit Raspberry Pi OS with the current apt kernel and firmware. This equates to:
i.e. a 64-bit kernel on a 32-bit userspace. Try this:
Note that you may need to delete the You should find that rpi-source now runs to completion, just leaving you with the problem that the out-of-tree drivers are a bit old/broken. Apply the following patches to get them building: index 87b59ca..c64048d 100644
--- a/crc8.c
+++ b/crc8.c
@@ -71,7 +71,7 @@ EXPORT_SYMBOL(crc8_populate_lsb);
* nbytes: number of bytes in data buffer.
* crc: previous returned crc8 value.
*/
-u8 crc8(const u8 table[CRC8_TABLE_SIZE], u8 *pdata, size_t nbytes, u8 crc)
+u8 crc8(const u8 table[CRC8_TABLE_SIZE], const u8 *pdata, size_t nbytes, u8 crc)
{
/* loop over the buffer data */
while (nbytes-- > 0) diff --git a/sfxx.c b/sfxx.c
index 48e770e..38bfd65 100644
--- a/sfxx.c
+++ b/sfxx.c
@@ -433,14 +433,13 @@ fail_remove_sysfs:
return ret;
}
-static int __exit sfxx_remove(struct i2c_client *client)
+static void __exit sfxx_remove(struct i2c_client *client)
{
struct sfxx_data *data = i2c_get_clientdata(client);
if (data != NULL) {
input_unregister_device(data->dev);
sysfs_remove_group(&client->dev.kobj, &sfxx_attr_group);
}
- return 0;
}
/* device ID table */ |
Thanks a lot for your help. Yes, I am using the 32-bit Raspberry Pi OS with the current apt kernel and firmware and got
After following the steps, I am still getting the same error. I am adding the entire terminal log for your reference.
|
Sorry - I paused writing my instructions to check the compiler string then didn't complete it. I should have said:
|
Thanks a lot for your support, rpi-source compiled after adding the patch. However, the modules are not compatible with the kernel version I am currently running. I am adding the command and error message load the modules and instantiate the driver for your reference:
|
I ran into the same errors, to finally solve it i ended up changing the OS to a headless 64bit instead of a headless 32bit RPi OS. When I did that I didn't need to run rpi-source as the build folder came included when I ran "sudo apt install raspberrypi-kernel-headers". @chinmaydashp, I hope this helps your "Invalid module format" problem! |
The text was updated successfully, but these errors were encountered: