diff options
-rw-r--r-- | src/southbridge/amd/agesa/hudson/Makefile.inc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/southbridge/amd/agesa/hudson/Makefile.inc b/src/southbridge/amd/agesa/hudson/Makefile.inc index 971f731db1..014524dc04 100644 --- a/src/southbridge/amd/agesa/hudson/Makefile.inc +++ b/src/southbridge/amd/agesa/hudson/Makefile.inc @@ -24,7 +24,7 @@ HUDSON_FWM_POSITION=$(shell printf %d $(CONFIG_HUDSON_FWM_POSITION)) #assume the cbfs header is less than 128 bytes. ROMSIG_SIZE=16 ifeq ($(CONFIG_HUDSON_XHCI_FWM), y) -HUDSON_XHCI_POSITION=$(shell expr $(HUDSON_FWM_POSITION) + $(ROMSIG_SIZE) + 128) +HUDSON_XHCI_POSITION=$(shell echo $(HUDSON_FWM_POSITION) $(ROMSIG_SIZE) 128 | awk '{print $$1 + $$2 + $$3}') XHCI_FWM_SIZE=$(word 5,$(shell ls -l $(CONFIG_HUDSON_XHCI_FWM_FILE))) else HUDSON_XHCI_POSITION=0 @@ -32,8 +32,8 @@ XHCI_FWM_SIZE=0 endif ifeq ($(CONFIG_HUDSON_GEC_FWM), y) -HUDSON_GEC_POSITION=$(shell expr $(HUDSON_FWM_POSITION) + $(ROMSIG_SIZE) + 128 \ - + $(XHCI_FWM_SIZE) + 128) +HUDSON_GEC_POSITION=$(shell echo $(HUDSON_FWM_POSITION) $(ROMSIG_SIZE) 128 \ + $(XHCI_FWM_SIZE) 128 | awk '{print $$1 + $$2 + $$3 + $$4 + $$5}') GEC_FWM_SIZE=$(word 5,$(shell ls -l $(CONFIG_HUDSON_GEC_FWM_FILE))) else HUDSON_GEC_POSITION=0 @@ -41,10 +41,10 @@ GEC_FWM_SIZE=0 endif ifeq ($(CONFIG_HUDSON_IMC_FWM), y) -HUDSON_IMC_POSITION_UNALIGN=$(shell expr $(HUDSON_FWM_POSITION) + $(ROMSIG_SIZE) + 128 \ - + $(XHCI_FWM_SIZE) + 128 \ - + $(GEC_FWM_SIZE) + 128 + 65535) -HUDSON_IMC_POSITION=$(shell expr $(HUDSON_IMC_POSITION_UNALIGN) - $(HUDSON_IMC_POSITION_UNALIGN) % 65536) +HUDSON_IMC_POSITION_UNALIGN=$(shell echo $(HUDSON_FWM_POSITION) $(ROMSIG_SIZE) 128 \ + $(XHCI_FWM_SIZE) 128 \ + $(GEC_FWM_SIZE) 128 65535 | awk '{print $$1 + $$2 + $$3 + $$4 + $$5 + $$6 + $$7 + $$8}') +HUDSON_IMC_POSITION=$(shell echo $(HUDSON_IMC_POSITION_UNALIGN) | awk '{print $$1 - $$1 % 65536}') else HUDSON_IMC_POSITION=0 endif @@ -58,7 +58,7 @@ $(obj)/hudson_romsig.bin: $(call strip_quotes, $(CONFIG_HUDSON_XHCI_FWM_FILE)) \ $(HUDSON_IMC_POSITION) \ $(HUDSON_GEC_POSITION) \ $(HUDSON_XHCI_POSITION) ; do \ - echo $$fwm | LC_ALL=C awk '{printf ("%c%c%c%c", $$1 % 0x100, $$1/0x100 % 0x100, $$1/0x10000 % 0x100, $$1/0x1000000);}'; \ + echo $$fwm | LC_ALL=C awk '{printf ("%c%c%c%c", $$1 % 256, $$1/256 % 256, $$1/65536 % 256, $$1/16777216);}'; \ done > $@ ifeq ($(CONFIG_HUDSON_FWM), y) |