I'am building a new rom but now,I got stuck because of #error "MAX_REBOOT_CNT not defined" in make process of build target even though i defined this in Config.lb Here is a process trace :
####################################################################### if (cd fallback; \ make linuxbios.rom)\ then true; else exit 1; fi; make[1]: Entering directory `/home/root/projet-07042004/freebios/freebios2/build/epia/fallbac k' cp /home/root/projet/freebios/freebios2/src/arch/i386/config/crt0.base crt0.S gcc -no-gcc -x assembler-with-cpp -DASSEMBLY -E -I/home/root/projet/freebios/freebios2/src -D __ROMCC__=0 -D__ROMCC_MINOR__=38 -I/home/root/projet/freebios/freebios2/src/include -I/home/r oot/projet/freebios/freebios2/src/arch/i386/include -I/usr/lib/gcc-lib/i486-linux/egcs-2.91.6 6/include
/home/root/projet/freebios/freebios2/src/mainboard/via/epia/failover.c > ./failover.E gcc: unrecognized option `-no-gcc' In file included from /home/root/projet/freebios/freebios2/src/mainboard/via/epia/failover.c: 7: /home/root/projet/freebios/freebios2/src/pc80/mc146818rtc_early.c:5: #error "MAX_REBOOT_CNT n ot defined" make[1]: *** [failover.E] Error 1 make[1]: Leaving directory `/home/root/projet-07042004/freebios/freebios2/build/epia/fallback ' make: *** [fallback-rom] Error 1 #################################################################
What is that pc80 directory in which it errors ? The parameter MAX_BOOT_CT is the counter that holds the survival of kernel messages after # boots, isn't it ?
I've also joined the Config file on which i haven't made much changes except what it asked for.
Please mail me a clue, just ask if you need moer info on the slab.
Thanks in advance.
################################################################ # Sample config file for EPIA # This will make a target directory of ./epia # # Change for experimentation MD # loadoptions
target epia
uses ARCH uses CONFIG_COMPRESS uses CONFIG_IOAPIC uses CONFIG_ROM_STREAM uses CONFIG_ROM_STREAM_START uses CONFIG_UDELAY_TSC uses CPU_FIXUP uses FALLBACK_SIZE uses HAVE_FALLBACK_BOOT uses HAVE_MP_TABLE uses HAVE_PIRQ_TABLE uses HAVE_HARD_RESET uses i586 uses i686 uses INTEL_PPRO_MTRR uses HEAP_SIZE uses IRQ_SLOT_COUNT uses MAINBOARD_PART_NUMBER uses MAINBOARD_VENDOR uses CONFIG_SMP uses CONFIG_MAX_CPUS uses MEMORY_HOLE uses PAYLOAD_SIZE uses _RAMBASE uses _ROMBASE uses ROM_IMAGE_SIZE uses ROM_SECTION_OFFSET uses ROM_SECTION_SIZE uses ROM_SIZE uses STACK_SIZE uses USE_FALLBACK_IMAGE uses USE_OPTION_TABLE uses HAVE_OPTION_TABLE uses MAXIMUM_CONSOLE_LOGLEVEL uses DEFAULT_CONSOLE_LOGLEVEL
# Sample config file for EPIA # This will make a target directory of ./epia # # Change for experimentation MD # loadoptions
target epia
uses ARCH uses CONFIG_COMPRESS uses CONFIG_IOAPIC uses CONFIG_ROM_STREAM uses CONFIG_ROM_STREAM_START uses CONFIG_UDELAY_TSC uses CPU_FIXUP uses FALLBACK_SIZE uses HAVE_FALLBACK_BOOT uses HAVE_MP_TABLE uses HAVE_PIRQ_TABLE uses HAVE_HARD_RESET uses i586 uses i686 uses INTEL_PPRO_MTRR uses HEAP_SIZE uses IRQ_SLOT_COUNT uses MAINBOARD_PART_NUMBER uses MAINBOARD_VENDOR uses CONFIG_SMP uses CONFIG_MAX_CPUS uses MEMORY_HOLE uses PAYLOAD_SIZE uses _RAMBASE uses _ROMBASE uses ROM_IMAGE_SIZE uses ROM_SECTION_OFFSET uses ROM_SECTION_SIZE uses ROM_SIZE uses STACK_SIZE uses USE_FALLBACK_IMAGE uses USE_OPTION_TABLE uses HAVE_OPTION_TABLE uses MAXIMUM_CONSOLE_LOGLEVEL uses DEFAULT_CONSOLE_LOGLEVE uses CONFIG_CONSOLE_SERIAL8250 uses MAINBOARD uses CONFIG_CHIP_CONFIGURE uses XIP_ROM_SIZE uses XIP_ROM_BASE uses LINUXBIOS_EXTRA_VERSION uses TTYS0_BAUD uses MAX_REBOOT_CNT
option TTYS0_BAUD=19200
option CONFIG_CHIP_CONFIGURE=1
option MAXIMUM_CONSOLE_LOGLEVEL=7 option DEFAULT_CONSOLE_LOGLEVEL=7 option CONFIG_CONSOLE_SERIAL8250=1
option CPU_FIXUP=1 option CONFIG_UDELAY_TSC=0 option i686=1 option i586=1 option INTEL_PPRO_MTRR=1 option ROM_SIZE=256*1024
option HAVE_OPTION_TABLE=1 option CONFIG_ROM_STREAM=1 option HAVE_FALLBACK_BOOT=1
# # More Options # option MAX_REBOOT_CNT=10
### ### Compute the location and size of where this firmware image ### (linuxBIOS plus bootloader) will live in the boot rom chip. ### option FALLBACK_SIZE=131072
## LinuxBIOS C code runs at this location in RAM option _RAMBASE=0x00004000
# ### ### Compute the start location and size size of ### The linuxBIOS bootloader. ###
# # Arima hdama romimage "normal" option USE_FALLBACK_IMAGE=0 option ROM_IMAGE_SIZE=0x10000 option LINUXBIOS_EXTRA_VERSION=".0Normal" mainboard via/epia # payload /usr/share/etherboot/5.1.9pre2-lnxi-lb/tg3--ide_disk.zelf # payload ../../../../tg3--ide_disk.zelf payload ../../../../../lnxieepro100.ebi end
romimage "fallback" option USE_FALLBACK_IMAGE=1 option ROM_IMAGE_SIZE=0x10000 option LINUXBIOS_EXTRA_VERSION=".0Fallback" mainboard via/epia # payload /usr/share/etherboot/5.1.9pre2-lnxi-lb/tg3--ide_disk.zelf # payload ../../../../tg3--ide_disk.zelf payload ../../../../../lnxieepro100.ebi end
buildrom ./linuxbios.rom ROM_SIZE "normal" "fallback"
Check the Makefile.settings in the fallback directory and see if MAX_REBOOT_CNT is defined. If it isn't then there's some problem with the configuration. If it is, then it's not getting passed to the gcc command line.
Greg
On 08/04/2004, at 10:23 AM, Mathieu Deschamps wrote:
I'am building a new rom but now,I got stuck because of #error "MAX_REBOOT_CNT not defined" in make process of build target even though i defined this in Config.lb Here is a process trace :
####################################################################### if (cd fallback; \ make linuxbios.rom)\ then true; else exit 1; fi; make[1]: Entering directory `/home/root/projet-07042004/freebios/freebios2/build/epia/fallbac k' cp /home/root/projet/freebios/freebios2/src/arch/i386/config/crt0.base crt0.S gcc -no-gcc -x assembler-with-cpp -DASSEMBLY -E -I/home/root/projet/freebios/freebios2/src -D __ROMCC__=0 -D__ROMCC_MINOR__=38 -I/home/root/projet/freebios/freebios2/src/include -I/home/r oot/projet/freebios/freebios2/src/arch/i386/include -I/usr/lib/gcc-lib/i486-linux/egcs-2.91.6 6/include
/home/root/projet/freebios/freebios2/src/mainboard/via/epia/failover.c
./failover.E gcc: unrecognized option `-no-gcc' In file included from /home/root/projet/freebios/freebios2/src/mainboard/via/epia/failover.c: 7: /home/root/projet/freebios/freebios2/src/pc80/mc146818rtc_early.c:5: #error "MAX_REBOOT_CNT n ot defined" make[1]: *** [failover.E] Error 1 make[1]: Leaving directory `/home/root/projet-07042004/freebios/freebios2/build/epia/fallback ' make: *** [fallback-rom] Error 1 #################################################################
What is that pc80 directory in which it errors ? The parameter MAX_BOOT_CT is the counter that holds the survival of kernel messages after # boots, isn't it ?
I've also joined the Config file on which i haven't made much changes except what it asked for.
Please mail me a clue, just ask if you need moer info on the slab.
Thanks in advance.
################################################################ # Sample config file for EPIA # This will make a target directory of ./epia # # Change for experimentation MD # loadoptions
target epia
uses ARCH uses CONFIG_COMPRESS uses CONFIG_IOAPIC uses CONFIG_ROM_STREAM uses CONFIG_ROM_STREAM_START uses CONFIG_UDELAY_TSC uses CPU_FIXUP uses FALLBACK_SIZE uses HAVE_FALLBACK_BOOT uses HAVE_MP_TABLE uses HAVE_PIRQ_TABLE uses HAVE_HARD_RESET uses i586 uses i686 uses INTEL_PPRO_MTRR uses HEAP_SIZE uses IRQ_SLOT_COUNT uses MAINBOARD_PART_NUMBER uses MAINBOARD_VENDOR uses CONFIG_SMP uses CONFIG_MAX_CPUS uses MEMORY_HOLE uses PAYLOAD_SIZE uses _RAMBASE uses _ROMBASE uses ROM_IMAGE_SIZE uses ROM_SECTION_OFFSET uses ROM_SECTION_SIZE uses ROM_SIZE uses STACK_SIZE uses USE_FALLBACK_IMAGE uses USE_OPTION_TABLE uses HAVE_OPTION_TABLE uses MAXIMUM_CONSOLE_LOGLEVEL uses DEFAULT_CONSOLE_LOGLEVEL
# Sample config file for EPIA # This will make a target directory of ./epia # # Change for experimentation MD # loadoptions
target epia
uses ARCH uses CONFIG_COMPRESS uses CONFIG_IOAPIC uses CONFIG_ROM_STREAM uses CONFIG_ROM_STREAM_START uses CONFIG_UDELAY_TSC uses CPU_FIXUP uses FALLBACK_SIZE uses HAVE_FALLBACK_BOOT uses HAVE_MP_TABLE uses HAVE_PIRQ_TABLE uses HAVE_HARD_RESET uses i586 uses i686 uses INTEL_PPRO_MTRR uses HEAP_SIZE uses IRQ_SLOT_COUNT uses MAINBOARD_PART_NUMBER uses MAINBOARD_VENDOR uses CONFIG_SMP uses CONFIG_MAX_CPUS uses MEMORY_HOLE uses PAYLOAD_SIZE uses _RAMBASE uses _ROMBASE uses ROM_IMAGE_SIZE uses ROM_SECTION_OFFSET uses ROM_SECTION_SIZE uses ROM_SIZE uses STACK_SIZE uses USE_FALLBACK_IMAGE uses USE_OPTION_TABLE uses HAVE_OPTION_TABLE uses MAXIMUM_CONSOLE_LOGLEVEL uses DEFAULT_CONSOLE_LOGLEVE uses CONFIG_CONSOLE_SERIAL8250 uses MAINBOARD uses CONFIG_CHIP_CONFIGURE uses XIP_ROM_SIZE uses XIP_ROM_BASE uses LINUXBIOS_EXTRA_VERSION uses TTYS0_BAUD uses MAX_REBOOT_CNT
option TTYS0_BAUD=19200
option CONFIG_CHIP_CONFIGURE=1
option MAXIMUM_CONSOLE_LOGLEVEL=7 option DEFAULT_CONSOLE_LOGLEVEL=7 option CONFIG_CONSOLE_SERIAL8250=1
option CPU_FIXUP=1 option CONFIG_UDELAY_TSC=0 option i686=1 option i586=1 option INTEL_PPRO_MTRR=1 option ROM_SIZE=256*1024
option HAVE_OPTION_TABLE=1 option CONFIG_ROM_STREAM=1 option HAVE_FALLBACK_BOOT=1
# # More Options # option MAX_REBOOT_CNT=10
### ### Compute the location and size of where this firmware image ### (linuxBIOS plus bootloader) will live in the boot rom chip. ### option FALLBACK_SIZE=131072
## LinuxBIOS C code runs at this location in RAM option _RAMBASE=0x00004000
# ### ### Compute the start location and size size of ### The linuxBIOS bootloader. ###
# # Arima hdama romimage "normal" option USE_FALLBACK_IMAGE=0 option ROM_IMAGE_SIZE=0x10000 option LINUXBIOS_EXTRA_VERSION=".0Normal" mainboard via/epia # payload /usr/share/etherboot/5.1.9pre2-lnxi-lb/tg3--ide_disk.zelf # payload ../../../../tg3--ide_disk.zelf payload ../../../../../lnxieepro100.ebi end
romimage "fallback" option USE_FALLBACK_IMAGE=1 option ROM_IMAGE_SIZE=0x10000 option LINUXBIOS_EXTRA_VERSION=".0Fallback" mainboard via/epia # payload /usr/share/etherboot/5.1.9pre2-lnxi-lb/tg3--ide_disk.zelf # payload ../../../../tg3--ide_disk.zelf payload ../../../../../lnxieepro100.ebi end
buildrom ./linuxbios.rom ROM_SIZE "normal" "fallback"
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
pffiu ...You were right it's not passed to gcc. You hold one Greg thanks you ! ... I saw that the target echo: and the make echo echoes every variables in makefile.settings (fallback's one)
In makefile, there is D_item function that's called on each VARIABLES from included Makefile.settings. Theses calls are made by CPUFLAGS : it's empty whereas VARIABLES is containing MAX_REBOOT_CNT.
In visu: Added in target echo: @echo CPUFLAGS='$(CPUFLAGS)' @echo VARIABLES='$(VARIABLES)' tried and as a result got this: CPUFLAGS= VARIABLES= ARCH CROSS_COMPILE CC ... ... MAX_REBOOT_CNT .... XIP_ROM_BASE XIP_ROM_SIZE
er .. Well my makefile is corrumpt, buggy, or so ? I used LB 1.1.6 is it knowed to bug somehow like my problem ?
On the "buggy side" here's what i've thought : It could be a D_item malfunction (but i can't point which one) or a bad call in CPUFLAGS (but i'am less confident in this way)
There is the head -20 of it : ------------------------------------------ # File: via/epia/epia/fallback/Makefile # This file was generated by 'via/epia/epia/config.py via/epia/Config.lb /home/root/projet/freebios/freebios2'
# Get the value of TOP, VARIABLES, and several other variables. include Makefile.settings
# Function to create an item like -Di586 or -DCONFIG_MAX_CPUS='1' or -Ui686 D_item = $(if $(subst undefined,,$(origin $1)),-D$1$(if $($1),='$($1)',),-U$1)
# Compute the value of CPUFLAGS here during make's first pass. CPUFLAGS := $(foreach _var_,$(VARIABLES),$(call D_item,$(_var_)))
CPP:= $(CC) -no-gcc -x assembler-with-cpp -DASSEMBLY -E LIBGCC_FILE_NAME := $(shell $(CC) -print-libgcc-file-name) GCC_INC_DIR := $(shell $(CC) -print-search-dirs | sed -ne "s/install: (.*)/\1include/gp") CPPFLAGS := -I$(TOP)/src/include -I$(TOP)/src/arch/$(ARCH)/include -I$(GCC_INC_DIR) $(CPUFLAGS) ROMCCPPFLAGS := -D__ROMCC__=0 -D__ROMCC_MINOR__=38 CFLAGS := $(CPU_OPT) $(CPPFLAGS) -Os -nostdinc -nostdlib -fno-builtin -Wall HOSTCFLAGS:= -Os -Wall LINUXBIOS_PAYLOAD-$(CONFIG_COMPRESS):=linuxbios_payload.nrv2b ---------------------------------------------
What do you think about this ? I also can't help recalling that this makefile has been built by buildtarget,could it be involved ?
mathieu
Le jeu 08/04/2004 à 19:12, Greg Watson a écrit :
Check the Makefile.settings in the fallback directory and see if MAX_REBOOT_CNT is defined. If it isn't then there's some problem with the configuration. If it is, then it's not getting passed to the gcc command line.
Greg
On 08/04/2004, at 10:23 AM, Mathieu Deschamps wrote:
I'am building a new rom but now,I got stuck because of #error "MAX_REBOOT_CNT not defined" in make process of build target even though i defined this in Config.lb
On 9 Apr 2004, Mathieu Deschamps wrote:
# Function to create an item like -Di586 or -DCONFIG_MAX_CPUS='1' or -Ui686 D_item = $(if $(subst undefined,,$(origin $1)),-D$1$(if $($1),='$($1)',),-U$1)
youch. I had not wanted to carry this to V2, how did it get in there?
# Compute the value of CPUFLAGS here during make's first pass. CPUFLAGS := $(foreach _var_,$(VARIABLES),$(call D_item,$(_var_)))
Two pass makefiles? Calls to D_item? Calls to things in a makefile? Yikes, why not just get rid of makefiles and generate C programs? :-)
We made a real effort with the new config tool to avoid this type of thing. This construct is very nonportable to other make systems and it measurably slows down the process of building. The first time I built a bios with the new config system it took < 10 seconds. It has gotten slower since then, not even accounting for romcc overhead.
Plus, still worse, you can't just look at a makefile and see how variables are set. It's confusing. Another major goal of the new config tool was to enable people to just look at Makefile.settings and know exactly what the settings would be. This type of 'GNU make magic' removes our ability to meet that goal. It's a de-facto second or third pass on the config tool which is not visible to people.
The final problem is that this can hide errors in Config.lb files, as we have seen. Rewriting variables in makefiles strikes me as a questionable way to proceed.
Can someone point to a requirement that we have this in there? Why can't correctly structured config files remove the need for this macro?
thanks
ron