Skip to content
Open
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
16 changes: 11 additions & 5 deletions board/aspeed/evb_ast2700/evb_ast2700.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ int get_platform_name( const u8 board_id, const u8 board_rev, char* platname, ch
}
}
if (ret == -1)
{ /* Default device tree */
strlcpy(platname, "sp7", sizeof(platname));
strlcpy(dtsname, "congo", buf_len);
{ /* Default device tree is unknown*/
strlcpy(platname, "unknown", sizeof(platname));
strlcpy(dtsname, "unknown", buf_len);
}
return ret;
}
Expand Down Expand Up @@ -460,7 +460,7 @@ int set_board_info(const u8* scm_eeprom_buf, const u8* hpm_eeprom_buf)
else
printf("HPM EEPROM not programmed\nLoading first DTB config\n");

/* Export dt name, defaults to congo */
/* Export dt name, defaults to unknown */
if(!env_get(ENV_DT_NAME)) {
env_set(ENV_DT_NAME, dts_name);
printf("Saving DT name: %s\n", dts_name);
Expand Down Expand Up @@ -515,7 +515,13 @@ int set_board_info(const u8* scm_eeprom_buf, const u8* hpm_eeprom_buf)
old_bootargs = env_get(ENV_BOOTARGS);
if (old_bootargs && !(strstr(old_bootargs, "systemd.hostname")) ) {
/* Hostname to pass to systemd-networking */
snprintf(new_hostname, sizeof(new_hostname), "systemd.hostname=%s-%s", plat_name, mac_str);

if (strcmp(plat_name, "unknown") == 0) {
snprintf(new_hostname, sizeof(new_hostname),"systemd.hostname=%s", plat_name);
}
else {
snprintf(new_hostname, sizeof(new_hostname),"systemd.hostname=%s-%s", plat_name, mac_str);
}
snprintf(new_bootargs, sizeof(new_bootargs),"%s %s",old_bootargs,new_hostname);
env_set(ENV_BOOTARGS, new_bootargs);
printf("Setting new hostname %s\n", new_hostname);
Expand Down