1414/*- endif -*/
1515
1616/*- set vm_address_config = config.get('vm_address_config') -*/
17- /*- set vm_image_config = config.get('vm_image_config') -*/
18- /*- set linux_address_config = config.get('linux_address_config') - */
19- /*- set linux_image_config = config.get('linux_image_config') -*/
17+ /*- if not vm_address_config -*/
18+ /*? raise(Exception('Missing VM address configuration')) ? */
19+ /*- endif -*/
2020
21- /*# For legacy compatibility, a fall back to the standard Linux entry exists. #*/
22- /*- set is_64_bit = (8 == macros.get_word_size(options.architecture)) -*/
23- /*- set entry_offset = 0x80000 if is_64_bit else 0x8000 -*/
21+ /*- set vm_image_config = config.get('vm_image_config') -*/
22+ /*- if not vm_image_config -*/
23+ /*? raise(Exception('Missing VM image configuration')) ?*/
24+ /*- endif -*/
2425
2526const vm_config_t vm_config = {
2627
27- /*- if vm_address_config -*/
28-
2928 .ram = {
3029 .phys_base = /*? vm_address_config.get('ram_paddr_base') ?*/ ,
3130 .base = /*? vm_address_config.get('ram_base') ?*/ ,
@@ -38,29 +37,13 @@ const vm_config_t vm_config = {
3837/*- if vm_address_config.get('kernel_entry_addr') != '-1' -*/
3938 .entry_addr = /*? vm_address_config.get('kernel_entry_addr') ?*/ ,
4039/*- else -*/
40+ /*# For legacy compatibility, a fall back to the standard Linux entry exists. #*/
41+ /*- set is_64_bit = (8 == macros.get_word_size(options.architecture)) -*/
42+ /*- set entry_offset = 0x80000 if is_64_bit else 0x8000 -*/
4143#warning Using standard Linux entry point, please consider setting kernel_entry_addr explicitly.
4244 .entry_addr = /*? vm_address_config.get('ram_base') ?*/ + /*? '0x%x'%entry_offset ?*/ ,
4345/*- endif -*/
4446
45- /*- else -*/
46-
47- #warning You are using the deprecated linux_address_config structure. Please use the vm_address_config structure instead
48-
49- .ram = {
50- .phys_base = /*? linux_address_config.get('linux_ram_paddr_base') ?*/ ,
51- .base = /*? linux_address_config.get('linux_ram_base') ?*/ ,
52- .size = /*? linux_address_config.get('linux_ram_size') ?*/ ,
53- },
54-
55- .dtb_addr = /*? linux_address_config.get('dtb_addr') ?*/ ,
56- .initrd_addr = /*? linux_address_config.get('initrd_addr') ?*/ ,
57- /* Use standard Linux entry point. */
58- .entry_addr = /*? linux_address_config.get('linux_ram_base') ?*/ + /*? '0x%x'%entry_offset ?*/ ,
59-
60- /*- endif -*/
61-
62- /*- if vm_image_config -*/
63-
6447 .provide_initrd = /*? vm_image_config.get('provide_initrd') ?*/ ,
6548 .generate_dtb = /*? vm_image_config.get('generate_dtb') ?*/ ,
6649 .provide_dtb = /*? vm_image_config.get('provide_dtb') ?*/ ,
@@ -77,50 +60,4 @@ const vm_config_t vm_config = {
7760 .kernel_bootcmdline = "/*? vm_image_config.get('kernel_bootcmdline', " ") ?*/" ,
7861 .kernel_stdout = "/*? vm_image_config.get('kernel_stdout', " ") ?*/" ,
7962
80- /*- else -*/
81-
82- #warning "You are using the deprecated linux_image_config structure. The provide_initrd, generate_dtb, provide_dtb, \
83- map_one_to_one, and clean_cache flags are set to replicate previous behavior, which may cause your configuration to break. \
84- Please use the vm_image_config structure instead."
85-
86- #ifdef CONFIG_VM_INITRD_FILE
87- #warning VmInitRdFile is a deprecated setting. Please remove and use vm_image_config.provide_initrd
88- .provide_initrd = 1 ,
89- #else
90- .provide_initrd = 0 ,
91- #endif
92-
93- #ifdef CONFIG_VM_DTB_FILE
94- #warning VmDtbFile is a deprecated setting. Please remove and use vm_image_config.provide_dtb
95- .provide_dtb = 1 ,
96- .generate_dtb = 0 ,
97- #else
98- .provide_dtb = 0 ,
99- .generate_dtb = 1 ,
100- #endif
101-
102- #if defined(CONFIG_PLAT_EXYNOS5 ) || defined(CONFIG_PLAT_QEMU_ARM_VIRT ) || defined(CONFIG_PLAT_TX2 )
103- .map_one_to_one = 1 ,
104- #else
105- .map_one_to_one = 0 ,
106- #endif
107-
108- #if defined(CONFIG_PLAT_TX1 ) || defined(CONFIG_PLAT_TX2 )
109- .clean_cache = 1 ,
110- #else
111- .clean_cache = 0 ,
112- #endif
113-
114- .files = {
115- .kernel = "/*? linux_image_config.get('linux_name') ?*/" ,
116- .initrd = "/*? linux_image_config.get('initrd_name') ?*/" ,
117- .dtb = "/*? linux_image_config.get('dtb_name') ?*/" ,
118- .dtb_base = "/*? linux_image_config.get('dtb_base_name') ?*/" ,
119- },
120-
121- .kernel_bootcmdline = "/*? linux_image_config.get('linux_bootcmdline') ?*/" ,
122- .kernel_stdout = "/*? linux_image_config.get('linux_stdout') ?*/" ,
123-
124- /*- endif -*/
125-
12663};
0 commit comments