Here we go again - the "classic" vsa patch is being resubmitted, along with the openVSA patch and a FILO bug fix just for funsies.
You should now be able to build a openVSA blob into your v2 code and shoot for the moon (even when it is eclipsed). v3 love is still needed, but it should be pretty straight forward from this point on.
Enjoy, Jordan
Fix an annoying dependency problem with the FILO output and move the SVN revision to latest.
Signed-off-by: Jordan Crouse jordan.crouse@amd.com Index: buildrom-devel/packages/filo/filo.mk =================================================================== --- buildrom-devel.orig/packages/filo/filo.mk 2008-02-20 16:24:45.000000000 -0700 +++ buildrom-devel/packages/filo/filo.mk 2008-02-20 16:24:50.000000000 -0700 @@ -1,5 +1,5 @@ -FILO_URL=svn://80.190.231.112/filo/trunk/filo-0.5 -FILO_TAG=34 +FILO_URL=svn://coreboot.org/filo/trunk/filo-0.5 +FILO_TAG=42
FILO_DIR=$(BUILD_DIR)/filo FILO_SRC_DIR=$(FILO_DIR)/svn @@ -59,16 +59,20 @@ @ mkdir -p $(OUTPUT_DIR)/config/filo @ cp $(FILO_SRC_DIR)/Config $(OUTPUT_DIR)/config/filo/
+$(FILO_STAMP_DIR)/.copied: $(FILO_SRC_DIR)/filo.elf + @ mkdir -p $(shell dirname $(PAYLOAD_ELF)) + @ cp $(FILO_SRC_DIR)/filo.elf $(PAYLOAD_ELF) + @ touch $@ + $(FILO_STAMP_DIR) $(FILO_LOG_DIR): @ mkdir -p $@
-filo: $(FILO_STAMP_DIR) $(FILO_LOG_DIR) $(FILO_SRC_DIR)/filo.elf - @ mkdir -p $(OUTPUT_DIR) - @ cp $(FILO_SRC_DIR)/filo.elf $(PAYLOAD_ELF) +filo: $(FILO_STAMP_DIR) $(FILO_LOG_DIR) $(FILO_STAMP_DIR)/.copied
filo-clean: @ echo "Cleaning filo..." @ $(MAKE) -C $(FILO_SRC_DIR) clean > /dev/null 2>&1 + @ rm -f $(FILO_STAMP_DIR)/.copied
filo-distclean: @ rm -rf $(FILO_DIR)/*
On Wed, Feb 20, 2008 at 04:28:57PM -0700, jordan.crouse@amd.com wrote:
Fix an annoying dependency problem with the FILO output and move the SVN revision to latest.
I did not realize we were still using such an old FILO version in buildrom, nor that we were using a hardcoded IP.
Build-tested ok for alix1c (v2).
Signed-off-by: Jordan Crouse jordan.crouse@amd.com
Acked-by: Ward Vandewege ward@gnu.org
Thanks, Ward.
In preparation for v3 and the upcoming openvsa changes, rearrange the VSA fetching code. We now fetch an uncompressed blob, and do the compressing within buildrom. I'm mainly concentrating on v2 right now (this is not quite v3 friendly), but it will be.
Also, work around a hopefully temporary bug on the AMD servers.
Signed-off-by: Jordan Crouse jordan.crouse@amd.com Index: buildrom-devel/packages/coreboot-v2/geodelx.mk =================================================================== --- buildrom-devel.orig/packages/coreboot-v2/geodelx.mk 2008-02-20 15:20:45.000000000 -0700 +++ buildrom-devel/packages/coreboot-v2/geodelx.mk 2008-02-20 16:10:05.000000000 -0700 @@ -10,16 +10,11 @@ CBV2_URL=svn://coreboot.org/repos/trunk/coreboot-v2 CBV2_TARBALL=coreboot-svn-$(CBV2_TAG).tar.gz CBV2_PAYLOAD_TARGET=$(CBV2_BUILD_DIR)/payload.$(CBV2_PAYLOAD_FILE_EXT) -VSA_URL=http://www.amd.com/files/connectivitysolutions/geode/geode_lx/ -CBV2_VSA=lx_vsa.36k.bin + TARGET_ROM = $(COREBOOT_VENDOR)-$(COREBOOT_BOARD).rom
include $(PACKAGE_DIR)/coreboot-v2/coreboot.inc
-$(SOURCE_DIR)/$(CBV2_VSA): - @ echo "Fetching the VSA blob..." - wget -P $(SOURCE_DIR) $(VSA_URL)/$(CBV2_VSA).gz -O $@ - $(SOURCE_DIR)/$(CBV2_TARBALL): @ echo "Fetching the coreboot rev $(CBV2_TAG) code..." @ mkdir -p $(SOURCE_DIR)/coreboot @@ -27,12 +22,10 @@ $(CBV2_TAG) $(SOURCE_DIR)/$(CBV2_TARBALL) \ > $(CBV2_FETCH_LOG) 2>&1
-# Special rule - append the VSA - -$(OUTPUT_DIR)/$(TARGET_ROM): $(CBV2_OUTPUT) $(SOURCE_DIR)/$(CBV2_VSA) +$(OUTPUT_DIR)/$(TARGET_ROM): $(CBV2_OUTPUT) $(GEODE_PADDED_VSA) @ mkdir -p $(OUTPUT_DIR) - @ cat $(SOURCE_DIR)/$(CBV2_VSA) $(CBV2_OUTPUT) > $@ + @ cat $(GEODE_PADDED_VSA) $(CBV2_OUTPUT) > $@
-coreboot: $(OUTPUT_DIR)/$(TARGET_ROM) -coreboot-clean: generic-coreboot-clean -coreboot-distclean: generic-coreboot-distclean +coreboot: geodevsa $(OUTPUT_DIR)/$(TARGET_ROM) +coreboot-clean: geodevsa-clean generic-coreboot-clean +coreboot-distclean: geodevsa-distclean generic-coreboot-distclean Index: buildrom-devel/packages/utils/nrv2b.mk =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ buildrom-devel/packages/utils/nrv2b.mk 2008-02-20 16:10:05.000000000 -0700 @@ -0,0 +1,47 @@ +NRV2B_URL=svn://coreboot.org/repos/trunk/coreboot-v2/util/nrv2b +NRV2B_TAG=3086 + +NRV2B_DIR=$(BUILD_DIR)/nrv2b +NRV2B_SRC_DIR=$(NRV2B_DIR)/svn +NRV2B_STAMP_DIR=$(NRV2B_DIR)/stamps +NRV2B_LOG_DIR=$(NRV2B_DIR)/logs +NRV2B_TARBALL=nrv2b-svn-$(NRV2B_TAG).tar.gz + +ifeq ($(CONFIG_VERBOSE),y) +NRV2B_BUILD_LOG=/dev/stdout +NRV2B_FETCH_LOG=/dev/stdout +else +NRV2B_BUILD_LOG=$(NRV2B_LOG_DIR)/build.log +NRV2B_FETCH_LOG=$(NRV2B_LOG_DIR)/fetch.log +endif + +$(SOURCE_DIR)/$(NRV2B_TARBALL): + mkdir -p $(SOURCE_DIR)/nrv2b + @ $(BIN_DIR)/fetchsvn.sh $(NRV2B_URL) $(SOURCE_DIR)/nrv2b \ + $(NRV2B_TAG) $@ > $(NRV2B_FETCH_LOG) 2>&1 + +$(NRV2B_STAMP_DIR)/.unpacked: $(SOURCE_DIR)/$(NRV2B_TARBALL) + @ tar -C $(NRV2B_DIR) -zxf $(SOURCE_DIR)/$(NRV2B_TARBALL) + @ touch $@ + +$(NRV2B_SRC_DIR)/nrv2b: $(NRV2B_STAMP_DIR)/.unpacked + @ (unset CFLAGS; unset LDFLAGS; \ + $(MAKE) -C $(NRV2B_SRC_DIR) \ + > $(NRV2B_BUILD_LOG) 2>&1) + +$(STAGING_DIR)/bin/nrv2b: $(NRV2B_SRC_DIR)/nrv2b + mkdir -p $(STAGING_DIR)/bin + cp $< $@ + +$(NRV2B_STAMP_DIR) $(NRV2B_LOG_DIR): + @ mkdir -p $@ + +nrv2b: $(NRV2B_STAMP_DIR) $(NRV2B_LOG_DIR) $(STAGING_DIR)/bin/nrv2b + +nrv2b-clean: + @ echo "Cleaning nrv2b..." + @ $(MAKE) -C $(NRV2B_SRC_DIR) clean > /dev/null 2>&1 + +nrv2b-distclean: + @ rm -r $(NRV2B_DIR) + Index: buildrom-devel/packages/geodevsa/amdvsa.inc =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ buildrom-devel/packages/geodevsa/amdvsa.inc 2008-02-20 16:10:05.000000000 -0700 @@ -0,0 +1,21 @@ +# Target file for the AMD VSA binary - included from geodevsa.mk + +AMDVSA_URL=http://www.amd.com/files/connectivitysolutions/geode/geode_lx/ +AMDVSA_BIN=amd_vsa_lx_1.01.bin + +# 2008-02-19 - the AMD URL above is broken, when trying to wget +# amd_vsa_lx_1.01.bin.gz it arrives uncompressed instead. This +# breakage is expected to be fixed; but to properly +# handle this temporary situation without breakage down the line, +# we do the unsual check of the file type below: +# Jordan + +$(SOURCE_DIR)/$(AMDVSA_BIN): + @ echo "Fetching the AMD VSA binary..." + wget -P $(SOURCE_DIR) $(AMDVSA_URL)/$(AMDVSA_BIN).gz -O $@.gz + @ if file $@.gz | grep -q "COM executable"; then \ + mv $@.gz $@; else gunzip -q $@.gz; fi + +$(GEODE_UNCOMPRESSED_VSA): $(SOURCE_DIR)/$(AMDVSA_BIN) + @ mkdir -p $(shell dirname $(GEODE_UNCOMPRESSED_VSA)) + @ cp $< $@ Index: buildrom-devel/packages/geodevsa/geodevsa.mk =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ buildrom-devel/packages/geodevsa/geodevsa.mk 2008-02-20 16:10:05.000000000 -0700 @@ -0,0 +1,33 @@ +# Master targets for VSA manipulation + +GEODE_UNCOMPRESSED_VSA=$(OUTPUT_DIR)/vsa/geodevsa.bin +GEODE_COMPRESSED_VSA=$(OUTPUT_DIR)/vsa/geodevsa.bin.nrv +GEODE_PADDED_VSA=$(OUTPUT_DIR)/vsa/geodevsa.bin.nrv.pad + +GEODE_VSA_SIZE=36864 + +ifeq ($(CONFIG_COREBOOT_V2),y) +VSA_BUILD_TARGET = $(GEODE_PADDED_VSA) +else +VSA_BUILD_TARGET = $(GEODE_UNCOMPRESSED_VSA) +endif + +include $(PACKAGE_DIR)/geodevsa/amdvsa.inc + +$(GEODE_COMPRESSED_VSA): $(GEODE_UNCOMPRESSED_VSA) + @ $(STAGING_DIR)/bin/nrv2b e $(GEODE_UNCOMPRESSED_VSA) $@ \ + > /dev/null 2>&1 + +$(GEODE_PADDED_VSA): $(GEODE_COMPRESSED_VSA) + @ cp $< $@ + @ (size=`stat -c %s $<`; count=`expr $(GEODE_VSA_SIZE) - $$size`; \ + dd if=/dev/zero bs=1 count=$$count >> $@ 2> /dev/null) + +geodevsa: $(VSA_BUILD_TARGET) + +geodevsa-clean: + @ rm -f $(GEODE_UNCOMPRESSED_VSA) $(GEODE_COMPRESSED_VSA) + @ rm -f $(GEODE_PADDED_VSA) + +geodevsa-distclean: + @ rm -rf $(OUTPUT_DIR)/vsa Index: buildrom-devel/Config.in =================================================================== --- buildrom-devel.orig/Config.in 2008-02-20 15:20:45.000000000 -0700 +++ buildrom-devel/Config.in 2008-02-20 16:10:05.000000000 -0700 @@ -124,6 +124,10 @@ bool default n
+config PLATFORM_GEODE + bool + default n + config PAYLOAD_64BIT bool default n @@ -137,5 +141,13 @@ bool default n
+# This config option will only be set by platforms that need it +# (geode + coreboot v2) + +config USE_NRV2B + bool + depends PLATFORM_GEODE && COREBOOT_V2 + default y + source config/platforms/Config.in source config/payloads/Config.in Index: buildrom-devel/config/payloads/payloads.conf =================================================================== --- buildrom-devel.orig/config/payloads/payloads.conf 2008-02-20 15:20:45.000000000 -0700 +++ buildrom-devel/config/payloads/payloads.conf 2008-02-20 16:10:05.000000000 -0700 @@ -33,6 +33,7 @@ endif
HOSTTOOLS-$(CONFIG_BUILD_QEMU) += qemu +HOSTTOOLS-$(CONFIG_USE_NRV2B) += nrv2b
# Sanity check
Index: buildrom-devel/config/platforms/Config.in =================================================================== --- buildrom-devel.orig/config/platforms/Config.in 2008-02-20 15:20:45.000000000 -0700 +++ buildrom-devel/config/platforms/Config.in 2008-02-20 16:11:52.000000000 -0700 @@ -45,27 +45,32 @@ bool "AMD Geode LX 'Norwich'" depends VENDOR_AMD select PLATFORM + select PLATFORM_GEODE
config PLATFORM_DBE61 bool "Artec Group DBE61" depends VENDOR_ARTEC_GROUP select PLATFORM + select PLATFORM_GEODE
config PLATFORM_ALIX1C bool "PC Engines ALIX1.C" depends VENDOR_PC_ENGINES select PLATFORM + select PLATFORM_GEODE
config PLATFORM_MSM800SEV bool "Advanced Digital Logic MSM800SEV" depends VENDOR_ADVANCED_DIGITAL_LOGIC select PLATFORM + select PLATFORM_GEODE
config PLATFORM_DB800 bool "AMD DB800" depends VENDOR_AMD depends COREBOOT_V2 select PLATFORM + select PLATFORM_GEODE
config PLATFORM_GA_M57SLI_S4 bool "GIGABYTE GA-M57SLI-S4"
On Wed, Feb 20, 2008 at 04:28:58PM -0700, jordan.crouse@amd.com wrote:
+config PLATFORM_GEODE
- bool
- default n
..
@@ -45,27 +45,32 @@ bool "AMD Geode LX 'Norwich'" depends VENDOR_AMD select PLATFORM
select PLATFORM_GEODE
config PLATFORM_DBE61 bool "Artec Group DBE61" depends VENDOR_ARTEC_GROUP select PLATFORM
select PLATFORM_GEODE
Should PLATFORM_GEODE select PLATFORM?
//Peter
On Wed, Feb 20, 2008 at 04:28:58PM -0700, jordan.crouse@amd.com wrote:
In preparation for v3 and the upcoming openvsa changes, rearrange the VSA fetching code. We now fetch an uncompressed blob, and do the compressing within buildrom. I'm mainly concentrating on v2 right now (this is not quite v3 friendly), but it will be.
Also, work around a hopefully temporary bug on the AMD servers.
That workaround did not work for me, see a modified version below that fixes the build.
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ buildrom-devel/packages/geodevsa/amdvsa.inc 2008-02-20 16:10:05.000000000 -0700 @@ -0,0 +1,21 @@ +# Target file for the AMD VSA binary - included from geodevsa.mk
+AMDVSA_URL=http://www.amd.com/files/connectivitysolutions/geode/geode_lx/ +AMDVSA_BIN=amd_vsa_lx_1.01.bin
+# 2008-02-19 - the AMD URL above is broken, when trying to wget +# amd_vsa_lx_1.01.bin.gz it arrives uncompressed instead. This +# breakage is expected to be fixed; but to properly +# handle this temporary situation without breakage down the line, +# we do the unsual check of the file type below: +# Jordan
+$(SOURCE_DIR)/$(AMDVSA_BIN):
- @ echo "Fetching the AMD VSA binary..."
- wget -P $(SOURCE_DIR) $(AMDVSA_URL)/$(AMDVSA_BIN).gz -O $@.gz
- @ if file $@.gz | grep -q "COM executable"; then \
- mv $@.gz $@; else gunzip -q $@.gz; fi
The above did not work for me (I just got 'data' as output from 'file'). I think this is perhaps a more reliable:
@ if file $@.gz | grep -q "gzip"; then \ gunzip -q $@.gz; else mv $@.gz $@; fi
It fixes the build for me.
Thanks, Ward.
Add OpenVSA as an option for Geode platform rather the AMD or "classic" VSA.
Signed-off-by: Jordan Crouse jordan.crouse@amd.com Index: buildrom-devel/packages/geodevsa/geodevsa.mk =================================================================== --- buildrom-devel.orig/packages/geodevsa/geodevsa.mk 2008-02-20 16:10:05.000000000 -0700 +++ buildrom-devel/packages/geodevsa/geodevsa.mk 2008-02-20 16:12:15.000000000 -0700 @@ -12,7 +12,17 @@ VSA_BUILD_TARGET = $(GEODE_UNCOMPRESSED_VSA) endif
+VSA_CLEAN_TARGET= +VSA_DISTCLEAN_TARGET= + +ifeq ($(CONFIG_VSA_LEGACY),y) include $(PACKAGE_DIR)/geodevsa/amdvsa.inc +else +include $(PACKAGE_DIR)/geodevsa/openvsa.inc + +VSA_CLEAN_TARGET=openvsa-clean +VSA_DISTCLEAN_TARGET=openvsa-distclean +endif
$(GEODE_COMPRESSED_VSA): $(GEODE_UNCOMPRESSED_VSA) @ $(STAGING_DIR)/bin/nrv2b e $(GEODE_UNCOMPRESSED_VSA) $@ \ @@ -25,9 +35,9 @@
geodevsa: $(VSA_BUILD_TARGET)
-geodevsa-clean: +geodevsa-clean: $(VSA_CLEAN_TARGET) @ rm -f $(GEODE_UNCOMPRESSED_VSA) $(GEODE_COMPRESSED_VSA) @ rm -f $(GEODE_PADDED_VSA)
-geodevsa-distclean: +geodevsa-distclean: $(VSA_DISTCLEAN_TARGET) @ rm -rf $(OUTPUT_DIR)/vsa Index: buildrom-devel/packages/geodevsa/openvsa.inc =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ buildrom-devel/packages/geodevsa/openvsa.inc 2008-02-20 16:12:15.000000000 -0700 @@ -0,0 +1,53 @@ +# Build target for openVSA - included from geodevsa.mk + +OPENVSA_URL=svn://openbios.org/openvsa/trunk/openvsa +OPENVSA_TAG=6 + +OPENVSA_DIR=$(BUILD_DIR)/openvsa +OPENVSA_SRC_DIR=$(OPENVSA_DIR)/svn +OPENVSA_STAMP_DIR=$(OPENVSA_DIR)/stamps +OPENVSA_LOG_DIR=$(OPENVSA_DIR)/logs +OPENVSA_TARBALL=openvsa-svn-$(OPENVSA_TAG).tar.gz + +ifeq ($(CONFIG_VERBOSE),y) +OPENVSA_BUILD_LOG=/dev/stdout +OPENVSA_FETCH_LOG=/dev/stdout +else +OPENVSA_BUILD_LOG=$(OPENVSA_LOG_DIR)/build.log +OPENVSA_FETCH_LOG=$(OPENVSA_LOG_DIR)/fetch.log +endif + +$(SOURCE_DIR)/$(OPENVSA_TARBALL): + @ mkdir -p $(SOURCE_DIR)/openvsa + @ mkdir -p $(OPENVSA_LOG_DIR) + @ echo "Fetching openvsa..." + @ $(BIN_DIR)/fetchsvn.sh $(OPENVSA_URL) $(SOURCE_DIR)/openvsa \ + $(OPENVSA_TAG) $@ > $(OPENVSA_FETCH_LOG) 2>&1 + +$(OPENVSA_STAMP_DIR)/.unpacked: $(SOURCE_DIR)/$(OPENVSA_TARBALL) + @ mkdir -p $(OPENVSA_DIR) + @ tar -C $(OPENVSA_DIR) -zxf $(SOURCE_DIR)/$(OPENVSA_TARBALL) + @ mkdir -p $(OPENVSA_STAMP_DIR) + @ touch $@ + +$(OPENVSA_SRC_DIR)/vsa_lx.bin: $(OPENVSA_STAMP_DIR)/.unpacked + @ mkdir -p $(OPENVSA_LOG_DIR) + @ echo "Building openvsa..." + @(unset LDFLAGS; $(MAKE) -C $(OPENVSA_SRC_DIR) \ + > $(OPENVSA_BUILD_LOG) 2>&1) + +$(GEODE_UNCOMPRESSED_VSA): $(OPENVSA_SRC_DIR)/vsa_lx.bin + @ mkdir -p $(shell dirname $(GEODE_UNCOMPRESSED_VSA)) + @ cp $< $@ + +openvsa: $(OPENVSA_SRC_DIR)/vsa_lx.bin + +openvsa-clean: + @ if [ -d $(OPENVSA_SRC_DIR) ]; then \ + echo "Cleaning openvsa..."; \ + $(MAKE) -C $(OPENVSA_SRC_DIR) clean > /dev/null 2>&1; \ + fi + +openvsa-distclean: + @ rm -rf $(OPENVSA_DIR) + Index: buildrom-devel/config/platforms/Config.in =================================================================== --- buildrom-devel.orig/config/platforms/Config.in 2008-02-20 16:11:52.000000000 -0700 +++ buildrom-devel/config/platforms/Config.in 2008-02-20 16:12:34.000000000 -0700 @@ -125,6 +125,23 @@ select PLATFORM_SUPPORT_64BIT endchoice
+choice + prompt "Geode VSA SMM handler" + depends PLATFORM_GEODE + default VSA_LEGACY + help + Select the SMM handler source to use with Geode platforms + +config VSA_LEGACY + bool "Legacy VSA binary from AMD" + +config VSA_OPENVSA + bool "OpenVSA" + depends EXPERIMENTAL + +endchoice + + config BUILD_QEMU bool "Build QEMU with patches for LinuxBIOS" depends PLATFORM_QEMU-X86
On Wed, Feb 20, 2008 at 04:28:59PM -0700, jordan.crouse@amd.com wrote:
Add OpenVSA as an option for Geode platform rather the AMD or "classic" VSA.
Signed-off-by: Jordan Crouse jordan.crouse@amd.com
This builds for me, but I have not tested it (yet) on real hardware.
Acked-by: Ward Vandewege: ward@gnu.org
Thanks, Ward.
On 21/02/08 17:51 -0500, Ward Vandewege wrote:
On Wed, Feb 20, 2008 at 04:28:59PM -0700, jordan.crouse@amd.com wrote:
Add OpenVSA as an option for Geode platform rather the AMD or "classic" VSA.
Signed-off-by: Jordan Crouse jordan.crouse@amd.com
This builds for me, but I have not tested it (yet) on real hardware.
if you did, you would probably be very sad. I am told it hangs quite early.
Acked-by: Ward Vandewege: ward@gnu.org
Thanks, Ward.
-- Ward Vandewege ward@fsf.org Free Software Foundation - Senior System Administrator
On 21/02/08 17:51 -0500, Ward Vandewege wrote:
On Wed, Feb 20, 2008 at 04:28:59PM -0700, jordan.crouse@amd.com wrote:
Add OpenVSA as an option for Geode platform rather the AMD or "classic" VSA.
Signed-off-by: Jordan Crouse jordan.crouse@amd.com
This builds for me, but I have not tested it (yet) on real hardware.
Acked-by: Ward Vandewege: ward@gnu.org
Thanks, Ward.
r130
-- Ward Vandewege ward@fsf.org Free Software Foundation - Senior System Administrator