Files
kernel_common_drivers/drivers/debug/main.c
T
benlong.zhou 2d120bb920 kernel: read boot log same as kernel5.15 [1/1]
PD#SWPL-237927

Problem:
kernel can't get boot log

Solution:
kernel get boot log that they are blx's log
same as below CL
https://scgit.amlogic.com/#/c/527327/
https://scgit.amlogic.com/#/c/568160/
https://scgit.amlogic.com/#/c/580089/

Verify:
s7d_bm201

Change-Id: I786569565b2b5effde66d620e3b9b014ec6f8a2c
Signed-off-by: benlong.zhou <benlong.zhou@amlogic.com>
2025-12-03 21:58:50 -08:00

56 lines
1.3 KiB
C

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
*/
//#define DEBUG
#include <linux/module.h>
#include <linux/amlogic/module_merge.h>
#include "main.h"
static int __init debug_main_init(void)
{
pr_debug("### %s() start\n", __func__);
#if IS_ENABLED(CONFIG_AMLOGIC_UBOOT_LOG)
call_sub_init(meson_uboot_log_init);
#endif
#if IS_MODULE(CONFIG_AMLOGIC_DEBUG_PRINTK)
call_sub_init(printk_vendor_hook_init);
#endif
call_sub_init(debug_lockup_init);
call_sub_init(aml_debug_init);
call_sub_init(cpu_mhz_init);
call_sub_init(meson_atrace_init);
call_sub_init(debug_file_init);
call_sub_init(gki_config_init);
call_sub_init(aml_hld_init);
call_sub_init(aml_sched_init);
call_sub_init(aml_kprobes_init);
call_sub_init(aml_isolcpus_init);
#if IS_ENABLED(CONFIG_ARM64_MTE)
call_sub_init(aml_debug_mte_init);
#endif
pr_debug("### %s() end\n", __func__);
return 0;
}
static void __exit debug_main_exit(void)
{
debug_file_exit();
#if IS_MODULE(CONFIG_AMLOGIC_DEBUG_PRINTK)
printk_vendor_hook_exit();
#endif
#if IS_ENABLED(CONFIG_ARM64_MTE)
aml_debug_mte_exit();
#endif
#if IS_ENABLED(CONFIG_AMLOGIC_UBOOT_LOG)
meson_uboot_log_exit();
#endif
}
module_init(debug_main_init);
module_exit(debug_main_exit);
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(MINIDUMP);