x86: Add a minimal example SoC along with a board
The min86 example SoC code along with the example mainboard should serve as a minimal example how a buildable x86 SoC code base can look like. This can serve, for instance, as a basis to add new SoCs to coreboot. Starting with a buildable commit should help with the review of the actual code, and also avoid any regressions when common coreboot code changes. As the example code itself is build-tested, it should advance with coreboot and can't rot like documentation might. It also serves as a check what APIs need to be implemented with the default Kconfig settings. Change-Id: Id76ab15fe77ae3e405c43f9c8677694f178be112 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45710 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
		
							
								
								
									
										15
									
								
								src/mainboard/example/Kconfig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/mainboard/example/Kconfig
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
if VENDOR_EXAMPLE
 | 
			
		||||
 | 
			
		||||
choice
 | 
			
		||||
	prompt "Mainboard model"
 | 
			
		||||
 | 
			
		||||
source "src/mainboard/example/*/Kconfig.name"
 | 
			
		||||
 | 
			
		||||
endchoice
 | 
			
		||||
 | 
			
		||||
source "src/mainboard/example/*/Kconfig"
 | 
			
		||||
 | 
			
		||||
config MAINBOARD_VENDOR
 | 
			
		||||
	default "Example"
 | 
			
		||||
 | 
			
		||||
endif # VENDOR_EXAMPLE
 | 
			
		||||
							
								
								
									
										2
									
								
								src/mainboard/example/Kconfig.name
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								src/mainboard/example/Kconfig.name
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
config VENDOR_EXAMPLE
 | 
			
		||||
	bool "Example boards"
 | 
			
		||||
							
								
								
									
										14
									
								
								src/mainboard/example/min86/Kconfig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								src/mainboard/example/min86/Kconfig
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
if BOARD_EXAMPLE_MIN86
 | 
			
		||||
 | 
			
		||||
config BOARD_SPECIFIC_OPTIONS
 | 
			
		||||
	def_bool y
 | 
			
		||||
	select SOC_EXAMPLE_MIN86
 | 
			
		||||
	select MISSING_BOARD_RESET
 | 
			
		||||
 | 
			
		||||
config MAINBOARD_DIR
 | 
			
		||||
	default "example/min86"
 | 
			
		||||
 | 
			
		||||
config MAINBOARD_PART_NUMBER
 | 
			
		||||
	default "Min86"
 | 
			
		||||
 | 
			
		||||
endif
 | 
			
		||||
							
								
								
									
										11
									
								
								src/mainboard/example/min86/Kconfig.name
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/mainboard/example/min86/Kconfig.name
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
config BOARD_EXAMPLE_MIN86
 | 
			
		||||
	bool "Minimal x86 fake board"
 | 
			
		||||
	help
 | 
			
		||||
	  This example mainboard code along with the example/min86 SoC
 | 
			
		||||
	  should serve as a minimal example how a buildable x86 SoC code
 | 
			
		||||
	  base can look like.
 | 
			
		||||
 | 
			
		||||
	  This can serve, for instance, as a basis to add new SoCs to
 | 
			
		||||
	  coreboot. Starting with a buildable commit should help with
 | 
			
		||||
	  the review of the actual code, and also avoid any regressions
 | 
			
		||||
	  when common coreboot code changes.
 | 
			
		||||
							
								
								
									
										1
									
								
								src/mainboard/example/min86/board_info.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								src/mainboard/example/min86/board_info.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
Category: misc
 | 
			
		||||
							
								
								
									
										6
									
								
								src/mainboard/example/min86/devicetree.cb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								src/mainboard/example/min86/devicetree.cb
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
chip soc/example/min86
 | 
			
		||||
 | 
			
		||||
	device domain 0 on
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
end
 | 
			
		||||
		Reference in New Issue
	
	Block a user