Unify Config.lb a bit more.
Targets affected: gigabyte/ga_2761gxdk (comment fix only) gigabyte/m57sli msi/ms9282 tyan/s2891 tyan/s2892 tyan/s2895 tyan/s2912 tyan/s2912_fam10
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: coreboot-v2-cleanup-configlb/src/mainboard/gigabyte/m57sli/Config.lb =================================================================== --- coreboot-v2-cleanup-configlb/src/mainboard/gigabyte/m57sli/Config.lb (revision 4095) +++ coreboot-v2-cleanup-configlb/src/mainboard/gigabyte/m57sli/Config.lb (working copy) @@ -81,15 +81,17 @@ if HAVE_PIRQ_TABLE object irq_tables.o end #object reset.o
+ makedefine CACHE_AS_RAM_AUTO_C:=cache_as_ram_auto.c + if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o - depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h" - action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@" + depends "$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) option_table.h" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@" end else makerule ./cache_as_ram_auto.inc - depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h" - action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@" + depends "$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) option_table.h" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@" action "perl -e 's/.rodata/.rom.data/g' -pi $@" action "perl -e 's/.text/.section .rom.text/g' -pi $@" end @@ -100,7 +102,7 @@ if CONFIG_AP_CODE_IN_CAR makerule ./apc_auto.o depends "$(MAINBOARD)/apc_auto.c option_table.h" - action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/apc_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/apc_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@" end ldscript /arch/i386/init/ldscript_apc.lb end Index: coreboot-v2-cleanup-configlb/src/mainboard/gigabyte/ga_2761gxdk/Config.lb =================================================================== --- coreboot-v2-cleanup-configlb/src/mainboard/gigabyte/ga_2761gxdk/Config.lb (revision 4095) +++ coreboot-v2-cleanup-configlb/src/mainboard/gigabyte/ga_2761gxdk/Config.lb (working copy) @@ -162,7 +162,7 @@ ldscript /southbridge/sis/sis966/id.lds
## -## ROMSTRAP table for MCP55 +## ROMSTRAP table for SiS966 ## if HAVE_FAILOVER_BOOT if USE_FAILOVER_IMAGE Index: coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2912/Config.lb =================================================================== --- coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2912/Config.lb (revision 4095) +++ coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2912/Config.lb (working copy) @@ -72,8 +72,8 @@ ## ## Build the objects we have code for in this directory. ## +driver mainboard.o
-driver mainboard.o #needed by irq_tables and mptable and acpi_tables object get_bus_conf.o
@@ -86,7 +86,7 @@ if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o depends "$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) option_table.h" - action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@" end else makerule ./cache_as_ram_auto.inc Index: coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2891/Config.lb =================================================================== --- coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2891/Config.lb (revision 4095) +++ coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2891/Config.lb (working copy) @@ -1,4 +1,23 @@ ## +## This file is part of the coreboot project. +## +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +## ## Compute the location and size of where this firmware image ## (coreboot plus bootloader) will live in the boot rom chip. ## @@ -35,15 +54,11 @@
arch i386 end
- ## ## Build the objects we have code for in this directory. ## - driver mainboard.o
-#dir /drivers/ati/ragexl - #needed by irq_tables and mptable and acpi_tables object get_bus_conf.o
@@ -63,15 +78,17 @@ #./fadt.o is moved to southbridge/nvidia/ck804/Config.lb end
+ makedefine CACHE_AS_RAM_AUTO_C:=cache_as_ram_auto.c + if CONFIG_USE_INIT - makerule ./auto.o - depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h" - action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o auto.o" + makerule ./cache_as_ram_auto.o + depends "$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) option_table.h" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@" end else - makerule ./auto.inc - depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h" - action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@" + makerule ./cache_as_ram_auto.inc + depends "$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) option_table.h" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@" action "perl -e 's/.rodata/.rom.data/g' -pi $@" action "perl -e 's/.text/.section .rom.text/g' -pi $@" end @@ -142,9 +159,9 @@ ## Setup RAM ## if CONFIG_USE_INIT - initobject auto.o + initobject cache_as_ram_auto.o else - mainboardinit ./auto.inc + mainboardinit ./cache_as_ram_auto.inc end
## Index: coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2892/Config.lb =================================================================== --- coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2892/Config.lb (revision 4095) +++ coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2892/Config.lb (working copy) @@ -1,4 +1,23 @@ ## +## This file is part of the coreboot project. +## +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +## ## Compute the location and size of where this firmware image ## (coreboot plus bootloader) will live in the boot rom chip. ## @@ -35,15 +54,11 @@
arch i386 end
- ## ## Build the objects we have code for in this directory. ## - driver mainboard.o
-#dir /drivers/ati/ragexl - #needed by irq_tables and mptable and acpi_tables object get_bus_conf.o
@@ -63,15 +78,17 @@ #./fadt.o is moved to southbridge/nvidia/ck804/Config.lb end
+ makedefine CACHE_AS_RAM_AUTO_C:=cache_as_ram_auto.c + if CONFIG_USE_INIT - makerule ./auto.o - depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h" - action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o auto.o" + makerule ./cache_as_ram_auto.o + depends "$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) option_table.h" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@" end else - makerule ./auto.inc - depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h" - action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@" + makerule ./cache_as_ram_auto.inc + depends "$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) option_table.h" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@" action "perl -e 's/.rodata/.rom.data/g' -pi $@" action "perl -e 's/.text/.section .rom.text/g' -pi $@" end @@ -142,9 +159,9 @@ ## Setup RAM ## if CONFIG_USE_INIT - initobject auto.o + initobject cache_as_ram_auto.o else - mainboardinit ./auto.inc + mainboardinit ./cache_as_ram_auto.inc end
## Index: coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2895/Config.lb =================================================================== --- coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2895/Config.lb (revision 4095) +++ coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2895/Config.lb (working copy) @@ -1,4 +1,23 @@ ## +## This file is part of the coreboot project. +## +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## + +## ## Compute the location and size of where this firmware image ## (coreboot plus bootloader) will live in the boot rom chip. ## @@ -51,8 +70,8 @@ ## ## Build the objects we have code for in this directory. ## +driver mainboard.o
-driver mainboard.o #needed by irq_tables and mptable and acpi_tables object get_bus_conf.o
@@ -72,15 +91,17 @@ #./fadt.o is moved to southbridge/nvidia/ck804/Config.lb end
+ makedefine CACHE_AS_RAM_AUTO_C:=cache_as_ram_auto.c + if CONFIG_USE_INIT - makerule ./auto.o - depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h" - action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o auto.o" + makerule ./cache_as_ram_auto.o + depends "$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) option_table.h" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@" end else - makerule ./auto.inc - depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h" - action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@" + makerule ./cache_as_ram_auto.inc + depends "$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) option_table.h" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@" action "perl -e 's/.rodata/.rom.data/g' -pi $@" action "perl -e 's/.text/.section .rom.text/g' -pi $@" end @@ -177,9 +198,9 @@ ## Setup RAM ## if CONFIG_USE_INIT - initobject auto.o + initobject cache_as_ram_auto.o else - mainboardinit ./auto.inc + mainboardinit ./cache_as_ram_auto.inc end
## Index: coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2912_fam10/Config.lb =================================================================== --- coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2912_fam10/Config.lb (revision 4095) +++ coreboot-v2-cleanup-configlb/src/mainboard/tyan/s2912_fam10/Config.lb (working copy) @@ -72,8 +72,8 @@ ## ## Build the objects we have code for in this directory. ## +driver mainboard.o
-driver mainboard.o #needed by irq_tables and mptable and acpi_tables object get_bus_conf.o
@@ -86,7 +86,7 @@ if CONFIG_USE_INIT makerule ./cache_as_ram_auto.o depends "$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) option_table.h" - action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@" end else makerule ./cache_as_ram_auto.inc Index: coreboot-v2-cleanup-configlb/src/mainboard/msi/ms9282/Config.lb =================================================================== --- coreboot-v2-cleanup-configlb/src/mainboard/msi/ms9282/Config.lb (revision 4095) +++ coreboot-v2-cleanup-configlb/src/mainboard/msi/ms9282/Config.lb (working copy) @@ -63,30 +63,29 @@ ## ## Build the objects we have code for in this directory. ## - driver mainboard.o
-#dir /drivers/ati/ragexl #needed by irq_tables and mptable and acpi_tables object get_bus_conf.o
- if HAVE_MP_TABLE object mptable.o end if HAVE_PIRQ_TABLE object irq_tables.o end #object reset.o
+ makedefine CACHE_AS_RAM_AUTO_C:=cache_as_ram_auto.c + if CONFIG_USE_INIT
-makerule ./auto.o - depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h" - action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o auto.o" +makerule ./cache_as_ram_auto.o + depends "$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) option_table.h" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -Os -nostdinc -nostdlib -fno-builtin -Wall -c -o $@" end
else
-makerule ./auto.inc - depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h" - action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@" +makerule ./cache_as_ram_auto.inc + depends "$(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) option_table.h" + action "$(CC) $(DISTRO_CFLAGS) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/$(CACHE_AS_RAM_AUTO_C) -Os -nostdinc -nostdlib -fno-builtin -Wall $(DEBUG_CFLAGS) -c -S -o $@" action "perl -e 's/.rodata/.rom.data/g' -pi $@" action "perl -e 's/.text/.section .rom.text/g' -pi $@" end @@ -158,9 +157,9 @@ ## Setup RAM ## if CONFIG_USE_INIT -initobject auto.o +initobject cache_as_ram_auto.o else -mainboardinit ./auto.inc +mainboardinit ./cache_as_ram_auto.inc end
##
Carl-Daniel Hailfinger wrote:
- makedefine CACHE_AS_RAM_AUTO_C:=cache_as_ram_auto.c
Probably a dumb question... What's this good for?
On 11.04.2009 23:13, Peter Stuge wrote:
Stefan Reinauer wrote:
- makedefine CACHE_AS_RAM_AUTO_C:=cache_as_ram_auto.c
Probably a dumb question... What's this good for?
My guess is that it will eventually become a single file, or just a small number of files, reused by many boards.
We have a small inconsistency in file naming. Some (few) CAR boards have auto.c for CAR, other CAR boards have cache_as_ram_auto.c for CAR. And ROMCC boards usually have auto.c. There are two ways out if we want to unify Config.lb: - Rename the few CAR auto.c files to cache_as_ram_auto.c - Handle it as variable in Config.lb
I'm happy with either solution as long as we can decide upon one.
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
On 11.04.2009 23:13, Peter Stuge wrote:
Stefan Reinauer wrote:
- makedefine CACHE_AS_RAM_AUTO_C:=cache_as_ram_auto.c
Probably a dumb question... What's this good for?
My guess is that it will eventually become a single file, or just a small number of files, reused by many boards.
We have a small inconsistency in file naming. Some (few) CAR boards have auto.c for CAR, other CAR boards have cache_as_ram_auto.c for CAR. And ROMCC boards usually have auto.c. There are two ways out if we want to unify Config.lb:
- Rename the few CAR auto.c files to cache_as_ram_auto.c
- Handle it as variable in Config.lb
I still don't get the point. Is the point to remove the auto.c rules from Config.lb?
Stefan Reinauer wrote:
- makedefine CACHE_AS_RAM_AUTO_C:=cache_as_ram_auto.c
Probably a dumb question... What's this good for?
My guess is that it will eventually become a single file, or just a small number of files, reused by many boards.
We have a small inconsistency in file naming.
I still don't get the point.
Consistency and reuse.
//Peter
Peter Stuge wrote:
Stefan Reinauer wrote:
- makedefine CACHE_AS_RAM_AUTO_C:=cache_as_ram_auto.c
Probably a dumb question... What's this good for?
My guess is that it will eventually become a single file, or just a small number of files, reused by many boards.
We have a small inconsistency in file naming.
I still don't get the point.
Consistency and reuse.
But, but,... we don't need to create another variable for that?
On 11.04.2009 23:33, Stefan Reinauer wrote:
Peter Stuge wrote:
Stefan Reinauer wrote:
> + makedefine CACHE_AS_RAM_AUTO_C:=cache_as_ram_auto.c > > Probably a dumb question... What's this good for?
My guess is that it will eventually become a single file, or just a small number of files, reused by many boards.
We have a small inconsistency in file naming.
I still don't get the point.
Consistency and reuse.
But, but,... we don't need to create another variable for that?
Indeed. We could rename the few CAR auto.c and not need any variable. If you prefer that, I'm happy to remove the newly introduced variable. Just tell me.
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
Indeed. We could rename the few CAR auto.c and not need any variable. If you prefer that, I'm happy to remove the newly introduced variable. Just tell me.
We could just live with the fact that different platforms look differently.
But finding a better name for "cache_as_ram_auto.c" is a good idea, and Ron is already working on that.
Stefan
On Sat, Apr 11, 2009 at 2:49 PM, Stefan Reinauer stepan@coresystems.de wrote:
But finding a better name for "cache_as_ram_auto.c" is a good idea, and Ron is already working on that.
let's not do this yet. I'm trying to put together some reasonable naming and other things. Sure, we can rename cache_as_ram_auto.c but that barely touches the real problem. The file will still include .c files (yuck) and still has lots of other legacy romcc artifacts. This fix is not really getting at what really needs fixing IMHO.
I appreciate the idea but let's think about this a bit harder. Anything that introduces a new config variable is instantly suspect, in my view.
Thanks
ron
Carl-Daniel Hailfinger wrote:
Unify Config.lb a bit more.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
btw:
Acked-by: Peter Stuge peter@stuge.se