Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion builds/any/rootfs/jessie/common/amd64-base-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
- smartmontools
- grub2
- onl-upgrade
- hw-management
# Temporary workaround for apt.opennetlinux.org availability issues (#788, #764, #732, #461)
# TODO: Re-enable once apt.opennetlinux.org is updated and hw-management package is available
# - hw-management
- sx-kernel
- onl-kernel-3.16-lts-x86-64-all-modules
- onl-kernel-4.9-lts-x86-64-all-modules
Expand Down
4 changes: 3 additions & 1 deletion builds/any/rootfs/stretch/common/amd64-base-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
- smartmontools
- grub2
- onl-upgrade
- hw-management
# Temporary workaround for apt.opennetlinux.org availability issues (#788, #764, #732, #461)
# TODO: Re-enable once apt.opennetlinux.org is updated and hw-management package is available
# - hw-management
- onl-kernel-4.9-lts-x86-64-all-modules
- onl-kernel-4.14-lts-x86-64-all-modules
- onl-kernel-4.19-lts-x86-64-all-modules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,13 @@ onlp_sysi_platform_info_get(onlp_platform_info_t* pi)
if( rv != ONLP_STATUS_OK ) {
return rv;
}
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s ", cpld_str, version);
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s ", version);
rv = _sysi_version_parsing(INV_HWMON_PREFIX"version", "ver: ", version);
if( rv != ONLP_STATUS_OK ) {
return rv;
}
snprintf(other_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s.%s "
,other_str, "psoc", version);
snprintf(other_str, ONLP_CONFIG_INFO_STR_MAX, "%s.%s "
, "psoc", version);

/*cpld version*/
if(strlen(cpld_str) > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ onlp_sysi_platform_info_get(onlp_platform_info_t* pi)

rv = _sysi_version_parsing(INV_SYSLED_PREFIX"info", "The CPLD version is ", version);
if( rv != ONLP_STATUS_OK ) { return rv; }
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s ", cpld_str, version);
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s ", version);
rv = _sysi_version_parsing(INV_HWMON_PREFIX"version", "ver: ", version);
if( rv != ONLP_STATUS_OK ) { return rv; }
snprintf(other_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s.%s "
,other_str, "psoc", version);
snprintf(other_str, ONLP_CONFIG_INFO_STR_MAX, "%s.%s "
, "psoc", version);

/*cpld version*/
if(strlen(cpld_str) > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ onlp_sysi_platform_info_get(onlp_platform_info_t* pi)
if( rv != ONLP_STATUS_OK ) {
return rv;
}
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s ", cpld_str, version);
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s ", version);
rv = _sysi_version_parsing(INV_PSOC_PREFIX"version", "ver: ", version);
if( rv != ONLP_STATUS_OK ) {
return rv;
}
snprintf(other_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s%s "
,other_str, "\n\t\tpsoc: ", version);
snprintf(other_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s "
, "\n\t\tpsoc: ", version);

/*cpld version*/
if(strlen(cpld_str) > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,11 @@ onlp_sysi_platform_info_get(onlp_platform_info_t* pi)

rv = _sysi_version_parsing(INV_SYSLED_PREFIX"info", "The CPLD version is ", version);
if( rv != ONLP_STATUS_OK ) { return rv; }
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s ", cpld_str, version);
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s ", version);
rv = _sysi_version_parsing(INV_HWMON_PREFIX"version", "ver: ", version);
if( rv != ONLP_STATUS_OK ) { return rv; }
snprintf(other_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s.%s "
,other_str, "psoc", version);
snprintf(other_str, ONLP_CONFIG_INFO_STR_MAX, "%s.%s "
, "psoc", version);

/*cpld version*/
if(strlen(cpld_str) > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ onlp_sysi_platform_info_get(onlp_platform_info_t* pi)

rv = _sysi_version_parsing(INV_SYSLED_PREFIX"info", "The CPLD version is ", version);
if( rv != ONLP_STATUS_OK ) { return rv; }
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s ", cpld_str, version);
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s ", version);
rv = _sysi_version_parsing(INV_HWMON_PREFIX"version", "ver: ", version);
if( rv != ONLP_STATUS_OK ) { return rv; }
snprintf(other_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s.%s "
,other_str, "psoc", version);
snprintf(other_str, ONLP_CONFIG_INFO_STR_MAX, "%s.%s "
, "psoc", version);

/*cpld version*/
if(strlen(cpld_str) > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ static int _sysi_version_parsing(char* file_str, char* str_buf, char* str_buf2,
AIM_LOG_ERROR("[ONLP][SYS] Unable to parse cpld2 version\n");
return ONLP_STATUS_E_INVALID;
}
snprintf(version, ONLP_CONFIG_INFO_STR_MAX, "c1_%s c2_%s", cpld_v1, cpld_v2);
/* Limit input strings to prevent truncation: "c1_" (3) + cpld_v1 + " c2_" (4) + cpld_v2 + null (1) */
snprintf(version, ONLP_CONFIG_INFO_STR_MAX, "c1_%.26s c2_%.26s", cpld_v1, cpld_v2);

return rv;
}
Expand Down Expand Up @@ -198,18 +199,16 @@ int
onlp_sysi_platform_info_get(onlp_platform_info_t* pi)
{
int rv = ONLP_STATUS_OK;
char cpld_str[ONLP_CONFIG_INFO_STR_MAX] = {0};
char version[ONLP_CONFIG_INFO_STR_MAX];
pi->cpld_versions = NULL;

rv = _sysi_version_parsing( INV_INFO_PREFIX"info", "The CPLD version is ", "The CPLD2 version is ",version);
if ( rv != ONLP_STATUS_OK ) {
return rv;
}
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s ", cpld_str, version);
/*cpld version*/
if (strlen(cpld_str) > 0) {
pi->cpld_versions = aim_fstrdup("%s", cpld_str);
if (strlen(version) > 0) {
pi->cpld_versions = aim_fstrdup("%s", version);
}
return rv;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ static int _sysi_version_parsing(char* file_str, char* str_buf, char* str_buf2,
} else {
return ONLP_STATUS_E_INVALID;
}
snprintf(version, ONLP_CONFIG_INFO_STR_MAX, "c1_%s c2_%s", cpld_v1, cpld_v2);
/* Limit input strings to prevent truncation: "c1_" (3) + cpld_v1 + " c2_" (4) + cpld_v2 + null (1) */
snprintf(version, ONLP_CONFIG_INFO_STR_MAX, "c1_%.26s c2_%.26s", cpld_v1, cpld_v2);

return rv;
}
Expand Down Expand Up @@ -190,18 +191,16 @@ int
onlp_sysi_platform_info_get(onlp_platform_info_t* pi)
{
int rv = ONLP_STATUS_OK;
char cpld_str[ONLP_CONFIG_INFO_STR_MAX] = {0};
char version[ONLP_CONFIG_INFO_STR_MAX];
pi->cpld_versions = NULL;

rv = _sysi_version_parsing( INV_INFO_PREFIX"info", "The CPLD version is ", "The CPLD2 version is ", version);
if ( rv != ONLP_STATUS_OK ) {
return rv;
}
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s ", cpld_str, version);
/*cpld version*/
if (strlen(cpld_str) > 0) {
pi->cpld_versions = aim_fstrdup("%s", cpld_str);
if (strlen(version) > 0) {
pi->cpld_versions = aim_fstrdup("%s", version);
}
return rv;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ static int _sysi_version_parsing(char* file_str, char* str_buf, char* version)
} else {
return ONLP_STATUS_E_INVALID;
}
snprintf(version, ONLP_CONFIG_INFO_STR_MAX, "c1_%s c2_%s", cpld_v1, cpld_v2);
/* Limit input strings to prevent truncation: "c1_" (3) + cpld_v1 + " c2_" (4) + cpld_v2 + null (1) */
snprintf(version, ONLP_CONFIG_INFO_STR_MAX, "c1_%.26s c2_%.26s", cpld_v1, cpld_v2);

return rv;
}
Expand Down Expand Up @@ -199,18 +200,16 @@ int
onlp_sysi_platform_info_get(onlp_platform_info_t* pi)
{
int rv = ONLP_STATUS_OK;
char cpld_str[ONLP_CONFIG_INFO_STR_MAX] = {0};
char version[ONLP_CONFIG_INFO_STR_MAX];
pi->cpld_versions = NULL;

rv = _sysi_version_parsing( INV_INFO_PREFIX"info", "The CPLD version is ", version);
if ( rv != ONLP_STATUS_OK ) {
return rv;
}
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s ", cpld_str, version);
/*cpld version*/
if (strlen(cpld_str) > 0) {
pi->cpld_versions = aim_fstrdup("%s", cpld_str);
if (strlen(version) > 0) {
pi->cpld_versions = aim_fstrdup("%s", version);
}
return rv;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ static int _sysi_version_parsing(char* file_str, char* str_buf, char* version)
} else {
return ONLP_STATUS_E_INVALID;
}
snprintf(version, ONLP_CONFIG_INFO_STR_MAX, "c1_%s c2_%s", cpld_v1, cpld_v2);
/* Limit input strings to prevent truncation: "c1_" (3) + cpld_v1 + " c2_" (4) + cpld_v2 + null (1) */
snprintf(version, ONLP_CONFIG_INFO_STR_MAX, "c1_%.26s c2_%.26s", cpld_v1, cpld_v2);

return rv;
}
Expand Down Expand Up @@ -199,18 +200,16 @@ int
onlp_sysi_platform_info_get(onlp_platform_info_t* pi)
{
int rv = ONLP_STATUS_OK;
char cpld_str[ONLP_CONFIG_INFO_STR_MAX] = {0};
char version[ONLP_CONFIG_INFO_STR_MAX];
pi->cpld_versions = NULL;

rv = _sysi_version_parsing( INV_INFO_PREFIX"info", "The CPLD version is ", version);
if ( rv != ONLP_STATUS_OK ) {
return rv;
}
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s ", cpld_str, version);
/*cpld version*/
if (strlen(cpld_str) > 0) {
pi->cpld_versions = aim_fstrdup("%s", cpld_str);
if (strlen(version) > 0) {
pi->cpld_versions = aim_fstrdup("%s", version);
}
return rv;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,13 @@ onlp_sysi_platform_info_get(onlp_platform_info_t* pi)
if( rv != ONLP_STATUS_OK ) {
return rv;
}
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s ", cpld_str, version);
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s ", version);
rv = _sysi_version_parsing(NET_HWMON_PREFIX"version", "ver: ", version);
if( rv != ONLP_STATUS_OK ) {
return rv;
}
snprintf(other_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s.%s "
,other_str, "psoc", version);
snprintf(other_str, ONLP_CONFIG_INFO_STR_MAX, "%s.%s "
, "psoc", version);

/*cpld version*/
if(strlen(cpld_str) > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ static int _sysi_version_parsing(char* file_str, char* str_buf, char* version)
} else {
return ONLP_STATUS_E_INVALID;
}
snprintf(version, ONLP_CONFIG_INFO_STR_MAX, "c1_%s c2_%s", cpld_v1, cpld_v2);
/* Limit input strings to prevent truncation: "c1_" (3) + cpld_v1 + " c2_" (4) + cpld_v2 + null (1) */
snprintf(version, ONLP_CONFIG_INFO_STR_MAX, "c1_%.26s c2_%.26s", cpld_v1, cpld_v2);

return rv;
}
Expand Down Expand Up @@ -196,18 +197,16 @@ int
onlp_sysi_platform_info_get(onlp_platform_info_t* pi)
{
int rv = ONLP_STATUS_OK;
char cpld_str[ONLP_CONFIG_INFO_STR_MAX] = {0};
char version[ONLP_CONFIG_INFO_STR_MAX];
pi->cpld_versions = NULL;

rv = _sysi_version_parsing( NET_INFO_PREFIX"info", "The CPLD version is ", version);
if ( rv != ONLP_STATUS_OK ) {
return rv;
}
snprintf(cpld_str, ONLP_CONFIG_INFO_STR_MAX, "%s%s ", cpld_str, version);
/*cpld version*/
if (strlen(cpld_str) > 0) {
pi->cpld_versions = aim_fstrdup("%s", cpld_str);
if (strlen(version) > 0) {
pi->cpld_versions = aim_fstrdup("%s", version);
}
return rv;
}
Expand Down
2 changes: 1 addition & 1 deletion setup.env
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $ONL/tools/make-versions.py --import-file=$ONL/tools/onlvi --class-name=OnlVersi
#
# buildroot download mirror. We suggest you setup a local repository containing these contents for faster local builds.
#
export BUILDROOTMIRROR=${BUILDROOTMIRROR:-"http://buildroot.opennetlinux.org/dl"}
export BUILDROOTMIRROR=${BUILDROOTMIRROR:-"http://buildroot.onlp.dev/dl"}

# These submodules are required for almost everything.
$ONL/tools/submodules.py $ONL sm/infra
Expand Down