Skip to content

Commit e7c404f

Browse files
lyakhkv2019i
authored andcommitted
xtensa: xtos: remove bootloader support
The bootloader was only used by Intel platforms when building SOF with XTOS. Now that that possibility has been removed, bootloader support can be removed too to eliminate dead code. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent e434232 commit e7c404f

File tree

1 file changed

+6
-73
lines changed

1 file changed

+6
-73
lines changed

src/arch/xtensa/CMakeLists.txt

Lines changed: 6 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,8 @@ endif()
2222

2323
set(fw_name ${CONFIG_RIMAGE_SIGNING_SCHEMA})
2424

25-
if(CONFIG_XT_BOOT_LOADER)
26-
set(build_bootloader y)
27-
set(build_module y)
28-
endif()
29-
3025
set(platform_ld_script ${platform_folder}.x)
3126
set(platform_rom_ld_script rom.x)
32-
set(platform_bootldr_ld_script boot_ldr.x)
3327

3428
if(CONFIG_RENOIR)
3529
set(platform_folder amd/renoir)
@@ -225,11 +219,7 @@ if(CONFIG_XT_INTERRUPT_LEVEL_5)
225219
target_link_libraries(sof_static_libraries INTERFACE xlevel5)
226220
endif()
227221

228-
if(build_bootloader)
229-
add_local_sources(sof main-entry.S)
230-
else()
231-
target_link_libraries(sof_static_libraries INTERFACE reset)
232-
endif()
222+
target_link_libraries(sof_static_libraries INTERFACE reset)
233223

234224
target_link_libraries(sof_ld_flags INTERFACE "-Wl,-Map=sof.map")
235225
target_link_libraries(sof_ld_flags INTERFACE "-T${PROJECT_BINARY_DIR}/${platform_ld_script}")
@@ -251,66 +241,11 @@ add_custom_target(sof_post_process
251241
# contains extra output that should be generated for bin target
252242
add_custom_target(bin_extras)
253243

254-
# bootloader binary
255-
256-
if(build_bootloader)
257-
add_executable(bootloader "")
258-
259-
add_dependencies(bootloader rimage_ep)
260-
# This line should be next to the boot_module
261-
# (resp. base_module) definitions but there are too many of
262-
# them; one per platform. So do it only once here instead.
263-
add_dependencies(boot_module rimage_ep)
264-
add_dependencies(base_module rimage_ep)
265-
266-
target_include_directories(bootloader PRIVATE ${PROJECT_SOURCE_DIR}/rimage/src/include)
267-
target_include_directories(boot_module PRIVATE ${PROJECT_SOURCE_DIR}/rimage/src/include)
268-
target_include_directories(base_module PRIVATE ${PROJECT_SOURCE_DIR}/rimage/src/include)
269-
270-
271-
target_link_libraries(bootloader PRIVATE sof_options)
272-
add_local_sources(bootloader xtos/_vectors.S ${PROJECT_SOURCE_DIR}/src/platform/${family_path}/boot_entry.S ${PROJECT_SOURCE_DIR}/src/platform/${family_path}/boot_loader.c)
273-
target_link_libraries(bootloader PRIVATE reset)
274-
target_link_libraries(bootloader PRIVATE hal)
275-
target_link_libraries(bootloader PRIVATE "-T${PROJECT_BINARY_DIR}/${platform_bootldr_ld_script}")
276-
sof_add_ld_script(bootloader ${platform_bootldr_ld_script})
277-
sof_append_relative_path_definitions(bootloader)
278-
279-
add_custom_target(
280-
bootloader_dump
281-
COMMAND ${CMAKE_COMMAND} -E copy bootloader bootloader-${fw_name}
282-
COMMAND ${CMAKE_OBJCOPY} -O binary -j .data ${PROJECT_BINARY_DIR}/src/platform/${platform_folder}/boot_module mod-boot-${fw_name}.bin
283-
COMMAND ${CMAKE_OBJCOPY} --add-section .module=mod-boot-${fw_name}.bin --set-section-flags .module=load,readonly bootloader-${fw_name}
284-
COMMAND ${CMAKE_OBJCOPY} -O binary bootloader bootloader-${fw_name}.bin
285-
COMMAND ${CMAKE_OBJDUMP} -h -D bootloader > bootloader-${fw_name}.lmap
286-
COMMAND ${CMAKE_OBJDUMP} -S bootloader > bootloader-${fw_name}.lst
287-
COMMAND ${CMAKE_OBJDUMP} -D bootloader > bootloader-${fw_name}.dis
288-
DEPENDS bootloader boot_module
289-
VERBATIM
290-
USES_TERMINAL
291-
)
292-
293-
set(bootloader_binary_path bootloader-${fw_name})
294-
295-
# Add 'base_module' section to sof ELF
296-
add_custom_target(
297-
process_base_module
298-
COMMAND ${CMAKE_OBJCOPY} -O binary -j .data ${PROJECT_BINARY_DIR}/src/platform/${platform_folder}/base_module mod-${fw_name}.bin
299-
COMMAND ${CMAKE_OBJCOPY} --add-section .module=mod-${fw_name}.bin --set-section-flags .module=load,readonly sof-pre sof-${fw_name}
300-
DEPENDS prepare_sof_post_process base_module bootloader_dump
301-
VERBATIM
302-
USES_TERMINAL
303-
)
304-
305-
else()
306-
set(bootloader_binary_path)
307-
308-
# Do nothing / pass-through
309-
add_custom_target(process_base_module
310-
COMMAND ${CMAKE_COMMAND} -E copy sof-pre sof-${fw_name}
311-
DEPENDS prepare_sof_post_process
312-
)
313-
endif()
244+
# Do nothing / pass-through
245+
add_custom_target(process_base_module
246+
COMMAND ${CMAKE_COMMAND} -E copy sof-pre sof-${fw_name}
247+
DEPENDS prepare_sof_post_process
248+
)
314249

315250
if(CONFIG_BUILD_VM_ROM)
316251
add_executable(rom "")
@@ -451,7 +386,6 @@ if(MEU_PATH OR DEFINED MEU_NO_SIGN) # Don't sign with rimage
451386
-f ${SOF_MAJOR}.${SOF_MINOR}.${SOF_MICRO}
452387
-b ${SOF_BUILD}
453388
-e
454-
${bootloader_binary_path}
455389
sof-${fw_name}
456390
DEPENDS sof_post_process rimage_ep
457391
VERBATIM
@@ -492,7 +426,6 @@ else() # sign with rimage
492426
-f ${SOF_MAJOR}.${SOF_MINOR}.${SOF_MICRO}
493427
-b ${SOF_BUILD}
494428
-e
495-
${bootloader_binary_path}
496429
sof-${fw_name}
497430
DEPENDS sof_post_process rimage_ep
498431
VERBATIM

0 commit comments

Comments
 (0)