[coreboot] Broken include paths

Myles Watson mylesgw at gmail.com
Mon Jul 26 18:57:18 CEST 2010


There are a couple of boards that don't compile for me with crossgcc.
Here's a representative error:

src/mainboard/asus/a8v-e_se/mptable.c:23:54: error:
src/include/../../../southbridge/via/vt8237r/vt8237r.h: Permission
denied

The problem is that the compiler is looking for the file
../../../southbridge...  starting from src/include, since it was
specified with <>

There are many ways to fix it, but I'm not sure which one is the
correct (most future-proof) way.

Here are three of the possible fixes:

1. Use "" so the path is relative to the file.

Index: svn/src/mainboard/asus/a8v-e_se/mptable.c
===================================================================
--- svn/src/mainboard/asus/a8v-e_se/mptable.c	(revision 5667)
+++ svn/src/mainboard/asus/a8v-e_se/mptable.c	(working copy)
@@ -20,8 +20,8 @@
 #include <string.h>
 #include <stdint.h>
 #include <arch/smp/mpspec.h>
-#include <../../../southbridge/via/vt8237r/vt8237r.h>
-#include <../../../southbridge/via/k8t890/k8t890.h>
+#include "../../../southbridge/via/vt8237r/vt8237r.h"
+#include "../../../southbridge/via/k8t890/k8t890.h"

 static void *smp_write_config_table(void *v)
 {

2. Make the path valid from src/include

Index: svn/src/mainboard/asus/a8v-e_se/mptable.c
===================================================================
--- svn/src/mainboard/asus/a8v-e_se/mptable.c	(revision 5667)
+++ svn/src/mainboard/asus/a8v-e_se/mptable.c	(working copy)
@@ -20,8 +20,8 @@
 #include <string.h>
 #include <stdint.h>
 #include <arch/smp/mpspec.h>
-#include <../../../southbridge/via/vt8237r/vt8237r.h>
-#include <../../../southbridge/via/k8t890/k8t890.h>
+#include <../southbridge/via/vt8237r/vt8237r.h>
+#include <../southbridge/via/k8t890/k8t890.h>

 static void *smp_write_config_table(void *v)
 {

3. Just use the path

Index: svn/src/mainboard/asus/a8v-e_se/mptable.c
===================================================================
--- svn.orig/src/mainboard/asus/a8v-e_se/mptable.c
+++ svn/src/mainboard/asus/a8v-e_se/mptable.c
@@ -20,8 +20,8 @@
 #include <string.h>
 #include <stdint.h>
 #include <arch/smp/mpspec.h>
-#include <../../../southbridge/via/vt8237r/vt8237r.h>
-#include <../../../southbridge/via/k8t890/k8t890.h>
+#include <southbridge/via/vt8237r/vt8237r.h>
+#include <southbridge/via/k8t890/k8t890.h>

 static void *smp_write_config_table(void *v)
 {

They all compile for me.

Thanks,
Myles




More information about the coreboot mailing list