Tegra4 support added.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#define KERNEL_CONFIG_TEGRA_MAGIC "CONFIG_ARCH_TEGRA=y"
|
||||
#define KERNEL_CONFIG_TEGRA2_MAGIC "CONFIG_ARCH_TEGRA_2x_SOC=y"
|
||||
#define KERNEL_CONFIG_TEGRA3_MAGIC "CONFIG_ARCH_TEGRA_3x_SOC=y"
|
||||
#define KERNEL_CONFIG_TEGRA4_MAGIC "CONFIG_ARCH_TEGRA_11x_SOC=y"
|
||||
#define MAX_DATA_LEN 4096
|
||||
|
||||
int DetectTegra()
|
||||
@@ -19,9 +20,11 @@ int DetectTegra()
|
||||
const char *tegra_config = KERNEL_CONFIG_TEGRA_MAGIC;
|
||||
const char *tegra2_config = KERNEL_CONFIG_TEGRA2_MAGIC;
|
||||
const char *tegra3_config = KERNEL_CONFIG_TEGRA3_MAGIC;
|
||||
const char *tegra4_config = KERNEL_CONFIG_TEGRA4_MAGIC;
|
||||
int len = strlen(tegra_config);
|
||||
int len2 = strlen(tegra2_config);
|
||||
int len3 = strlen(tegra3_config);
|
||||
int len4 = strlen(tegra4_config);
|
||||
while (0 != gzgets(kernelConfig, tmpbuf, KERNEL_CONFIG_MAX_LINE_WIDTH))
|
||||
{
|
||||
if (0 == strncmp(tmpbuf, tegra_config, len))
|
||||
@@ -41,6 +44,11 @@ int DetectTegra()
|
||||
break;
|
||||
}
|
||||
|
||||
if (0 == strncmp(tmpbuf, tegra4_config, len4))
|
||||
{
|
||||
result = 4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
gzclose(kernelConfig);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user