override shitty odroid check

This commit is contained in:
zuckerberg 2021-02-20 20:24:58 -05:00
parent c914dfcdf2
commit 95850bf772
2 changed files with 100 additions and 0 deletions

View File

@ -10,6 +10,10 @@ let
sha256 = "0xf64d88xvly7w8g2fbvdl4azp79ikxf49i1wlkrb3abfakmqc3p"; sha256 = "0xf64d88xvly7w8g2fbvdl4azp79ikxf49i1wlkrb3abfakmqc3p";
}; };
patches = [
./odroid-c2.patch
];
doChceck = false; doChceck = false;
propagatedBuildInputs = with pkgs.python3Packages; []; propagatedBuildInputs = with pkgs.python3Packages; [];

96
odroid-c2.patch Normal file
View File

@ -0,0 +1,96 @@
diff --git a/source/cpuinfo.c b/source/cpuinfo.c
index 9b080af..eba3487 100644
--- a/source/cpuinfo.c
+++ b/source/cpuinfo.c
@@ -41,20 +41,20 @@ int get_rpi_info(rpi_info *info)
while(!feof(fp)) {
fgets(buffer, sizeof(buffer), fp);
sscanf(buffer, "Hardware : %s", hardware);
- if (strcmp(hardware, "BCM2708") == 0 ||
- strcmp(hardware, "BCM2709") == 0 ||
- strcmp(hardware, "BCM2835") == 0 ||
- strcmp(hardware, "BCM2836") == 0 ||
- strcmp(hardware, "BCM2837") == 0 ) {
- found = 1;
- odroid_found = 0;
- }
- else { //Check for Odroid
- if (strstr(hardware, "ODROID")) {
+ // if (strcmp(hardware, "BCM2708") == 0 ||
+ // strcmp(hardware, "BCM2709") == 0 ||
+ // strcmp(hardware, "BCM2835") == 0 ||
+ // strcmp(hardware, "BCM2836") == 0 ||
+ // strcmp(hardware, "BCM2837") == 0 ) {
+ // found = 1;
+ // odroid_found = 0;
+ // }
+ // else { //Check for Odroid
+ // if (strstr(hardware, "ODROID")) {
odroid_found = found = 1;
setInfoOdroid(hardware, (void *)info);
- }
- }
+ // }
+ // }
sscanf(buffer, "Revision : %s", revision);
}
fclose(fp);
diff --git a/source/odroid.c b/source/odroid.c
index 2445cf0..1de0344 100644
--- a/source/odroid.c
+++ b/source/odroid.c
@@ -722,33 +722,33 @@ void setInfoOdroid(char *hardware, void *vinfo)
{
rpi_info *info = (rpi_info *)vinfo;
- if (strcmp(hardware, "ODROIDC") == 0)
- {
- piModel = PI_MODEL_ODROIDC;
- info->type = "ODROID-C1/C1+";
- info->p1_revision = 3;
- info->ram = "1024M";
- info->manufacturer = "Hardkernel";
- info->processor = "AMLS805";
- }
- else if (strcmp(hardware, "ODROID-C2") == 0)
- {
+ // if (strcmp(hardware, "ODROIDC") == 0)
+ // {
+ // piModel = PI_MODEL_ODROIDC;
+ // info->type = "ODROID-C1/C1+";
+ // info->p1_revision = 3;
+ // info->ram = "1024M";
+ // info->manufacturer = "Hardkernel";
+ // info->processor = "AMLS805";
+ // }
+ // else if (strcmp(hardware, "ODROID-C2") == 0)
+ // {
piModel = PI_MODEL_ODROIDC2;
info->p1_revision = 3;
info->type = "ODROID-C2";
info->ram = "1024M";
info->manufacturer = "Hardkernel";
info->processor = "AMLS905";
- }
- else if (strcmp(hardware, "ODROID-XU4") == 0)
- {
- piModel = PI_MODEL_ODROIDXU_34;
- info->type = "ODROID-XU3/4";
- info->p1_revision = 3;
- info->ram = "2048M";
- info->manufacturer = "Hardkernel";
- info->processor = "EXY5422";
- }
+ // }
+ // else if (strcmp(hardware, "ODROID-XU4") == 0)
+ // {
+ // piModel = PI_MODEL_ODROIDXU_34;
+ // info->type = "ODROID-XU3/4";
+ // info->p1_revision = 3;
+ // info->ram = "2048M";
+ // info->manufacturer = "Hardkernel";
+ // info->processor = "EXY5422";
+ // }
return;
}