mirror of
				https://github.com/projectacrn/acrn-hypervisor.git
				synced 2025-11-03 19:15:23 +00:00 
			
		
		
		
	acrn-config: add XSLT scripts to transform XMLs to config.[h|mk]
In order to remove Kconfig from the build process, acrn-config shall
transform XML configuration files to config.h and config.mk by itself. This
patch adds XSLT scripts that do the trick.
Unfortunately, the scenario XML file along is not sufficient to generate
config.h and config.mk, though. In addition to resource
allocation (i.e. allocating physical RAM for the hypervisor), the
transformation also need to do the following:
    1. Translate UART info in board XML into several configuration entries
       depending on the UART selected in the scenario XML.
    2. Use the MAX_MSIX_TABLE_NUM value in the board XML if the scenario
       XML does not specify it.
In order to use XSLT to transform both XMLs in one shot, a template is
provided to create another XML that includes (using XInclude) both board
and scenario XMLs as sub-nodes. It will be instantiated once the
transformations are integrated in the following patch.
v2:
 * Add `allocation.xml` to `unified.xml` to include the results from static
   allocation.
 * Use HV_RAM_START and HV_RAM_SIZE in allocation results if they are not
   explicitly specified in the scenario XML.
Tracked-On: #5644
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
			
			
This commit is contained in:
		
							
								
								
									
										17
									
								
								hypervisor/scripts/makefile/unified.xml.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								hypervisor/scripts/makefile/unified.xml.in
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
<?xml version='1.0' encoding='utf-8'?>
 | 
			
		||||
 | 
			
		||||
<!-- Copyright (C) 2021 Intel Corporation. All rights reserved. -->
 | 
			
		||||
<!-- SPDX-License-Identifier: BSD-3-Clause -->
 | 
			
		||||
 | 
			
		||||
<acrn-offline-data
 | 
			
		||||
    xmlns:xi="http://www.w3.org/2003/XInclude">
 | 
			
		||||
  <board-data>
 | 
			
		||||
    <xi:include href="{BOARD_FILE}" parse="xml" />
 | 
			
		||||
  </board-data>
 | 
			
		||||
  <config-data>
 | 
			
		||||
    <xi:include href="{SCENARIO_FILE}" parse="xml" />
 | 
			
		||||
  </config-data>
 | 
			
		||||
  <allocation-data>
 | 
			
		||||
    <xi:include href="{ALLOCATION_FILE}" parse="xml" />
 | 
			
		||||
  </allocation-data>
 | 
			
		||||
</acrn-offline-data>
 | 
			
		||||
		Reference in New Issue
	
	Block a user