board: starfive: spl: strip off 'starfive/' prefix
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 21 Feb 2025 09:58:55 +0000 (10:58 +0100)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Tue, 25 Mar 2025 08:25:39 +0000 (16:25 +0800)
The configuration descriptions generated by binman contain the vendor
device-tree directory. Instead of adding it to all match strings just strip
it off.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
board/starfive/visionfive2/spl.c

index 1538d6a..13a4893 100644 (file)
@@ -121,6 +121,10 @@ int board_fit_config_name_match(const char *name)
 
        product_id = get_product_id_from_eeprom();
 
+       /* Strip off prefix */
+       if (strncmp(name, "starfive/", 9))
+               return -EINVAL;
+       name += 9;
        if (!strncmp(product_id, "VF7110", 6)) {
                version = get_pcb_revision_from_eeprom();
                if ((version == 'b' || version == 'B') &&