mirror of
				https://gitlab.com/qemu-project/seabios.git
				synced 2025-10-30 07:58:38 +08:00 
			
		
		
		
	Start using Kconfig to configure SeaBIOS settings.
Create autoconf.h during the build. Move a couple of config settings from config.h to Kconfig.
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,2 +1,4 @@ | ||||
| out | ||||
| *.pyc | ||||
| .config | ||||
| .config.old | ||||
|  | ||||
							
								
								
									
										14
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								Makefile
									
									
									
									
									
								
							| @ -115,16 +115,18 @@ $(OUT)%.lds: %.lds.S | ||||
| 	@echo "  Precompiling $@" | ||||
| 	$(Q)$(CPP) -P -D__ASSEMBLY__ $< -o $@ | ||||
|  | ||||
| $(OUT)asm-offsets.s: $(OUT)autoconf.h | ||||
|  | ||||
| $(OUT)asm-offsets.h: $(OUT)asm-offsets.s | ||||
| 	@echo "  Generating offset file $@" | ||||
| 	$(Q)./tools/gen-offsets.sh $< $@ | ||||
|  | ||||
|  | ||||
| $(OUT)ccode.16.s: ; $(call whole-compile, $(CFLAGS16) -S, $(addprefix src/, $(SRC16)),$@) | ||||
| $(OUT)ccode.16.s: $(OUT)autoconf.h ; $(call whole-compile, $(CFLAGS16) -S, $(addprefix src/, $(SRC16)),$@) | ||||
|  | ||||
| $(OUT)code32seg.o: ; $(call whole-compile, $(CFLAGS32SEG), $(addprefix src/, $(SRC32SEG)),$@) | ||||
| $(OUT)code32seg.o: $(OUT)autoconf.h ; $(call whole-compile, $(CFLAGS32SEG), $(addprefix src/, $(SRC32SEG)),$@) | ||||
|  | ||||
| $(OUT)ccode32flat.o: ; $(call whole-compile, $(CFLAGS32FLAT), $(addprefix src/, $(SRC32FLAT)),$@) | ||||
| $(OUT)ccode32flat.o: $(OUT)autoconf.h ; $(call whole-compile, $(CFLAGS32FLAT), $(addprefix src/, $(SRC32FLAT)),$@) | ||||
|  | ||||
| $(OUT)code16.o: romlayout.S $(OUT)ccode.16.s $(OUT)asm-offsets.h | ||||
| 	@echo "  Compiling (16bit) $@" | ||||
| @ -200,6 +202,12 @@ export CONFIG_SHELL       := sh | ||||
| export KCONFIG_AUTOHEADER := autoconf.h | ||||
| export KCONFIG_CONFIG     := $(CURDIR)/.config | ||||
|  | ||||
| $(OUT)autoconf.h : $(KCONFIG_CONFIG) | ||||
| 	$(Q)$(MAKE) silentoldconfig | ||||
|  | ||||
| $(KCONFIG_CONFIG): | ||||
| 	$(Q)$(MAKE) defconfig | ||||
|  | ||||
| %onfig: | ||||
| 	$(Q)mkdir -p $(OUT)/tools/kconfig/lxdialog | ||||
| 	$(Q)mkdir -p $(OUT)/include/config | ||||
|  | ||||
							
								
								
									
										15
									
								
								src/Kconfig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/Kconfig
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| # Kconfig SeaBIOS configuration | ||||
|  | ||||
| mainmenu "SeaBIOS Configuration" | ||||
|     config COREBOOT | ||||
|       bool "Configure as a coreboot payload." | ||||
|       default n | ||||
|     config DEBUG_LEVEL | ||||
|       int "Control how verbose debug output is." | ||||
|       default 1 | ||||
|     config DEBUG_SERIAL | ||||
|       bool "Send debugging information to serial port" | ||||
|       default n | ||||
|     config VGAHOOKS | ||||
|       bool "Support bios callbacks specific to via vgabios." | ||||
|       default n | ||||
							
								
								
									
										11
									
								
								src/config.h
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/config.h
									
									
									
									
									
								
							| @ -1,6 +1,8 @@ | ||||
| #ifndef __CONFIG_H | ||||
| #define __CONFIG_H | ||||
|  | ||||
| #include "../out/autoconf.h" | ||||
|  | ||||
| // Configuration definitions. | ||||
|  | ||||
| //#define CONFIG_APPNAME  "QEMU" | ||||
| @ -12,13 +14,6 @@ | ||||
| #define CONFIG_APPNAME6 "BOCHS " | ||||
| #define CONFIG_APPNAME4 "BXPC" | ||||
|  | ||||
| // Configure as a coreboot payload. | ||||
| #define CONFIG_COREBOOT 0 | ||||
|  | ||||
| // Control how verbose debug output is. | ||||
| #define CONFIG_DEBUG_LEVEL 1 | ||||
| // Send debugging information to serial port | ||||
| #define CONFIG_DEBUG_SERIAL 0 | ||||
| // Screen writes are also sent to debug ports. | ||||
| #define CONFIG_SCREEN_AND_DEBUG 1 | ||||
|  | ||||
| @ -119,8 +114,6 @@ | ||||
| #define CONFIG_UUID_BACKDOOR 1 | ||||
| // Support generation of ACPI tables (for emulators) | ||||
| #define CONFIG_ACPI 1 | ||||
| // Support bios callbacks specific to via vgabios. | ||||
| #define CONFIG_VGAHOOKS 0 | ||||
| // Support S3 resume handler. | ||||
| #define CONFIG_S3_RESUME 1 | ||||
| // Run the vga rom during S3 resume. | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Kevin O'Connor
					Kevin O'Connor