uart... uart
authorStricted <info@stricted.net>
Thu, 21 Feb 2019 08:15:47 +0000 (08:15 +0000)
committerStricted <info@stricted.net>
Thu, 21 Feb 2019 08:15:47 +0000 (08:15 +0000)
arch/arm/configs/ttab_debug_defconfig
arch/arm/configs/ttab_defconfig
arch/arm/kernel/atags_parse.c
arch/arm/mach-mt8127/mt_devs.c
drivers/misc/mediatek/mtprof/mt_printk_ctrl.c
kernel/printk.c

index 35249fb96da044d5178e1efe31be24b39124cd0e..cff742b7d88fac9bbc52946a3f314f98dff35c02 100644 (file)
@@ -430,10 +430,10 @@ CONFIG_ATAGS=y
 CONFIG_ZBOOT_ROM_TEXT=0
 CONFIG_ZBOOT_ROM_BSS=0
 # CONFIG_COMPAT_CPUINFO is not set
-CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K"
-CONFIG_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_CMDLINE="console=ttyMT0,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K root=/dev/ram androidboot.selinux=permissive loglevel=8 lcm=1-rm72013_wxga_dsi_vdo fps=6119 vram=27262976 bootprof.pl_t=4169 bootprof.lk_t=2057 boot_reason=2 androidboot.serialno=18E3BC284952295 androidboot.bootreason=rtc"
+# CONFIG_CMDLINE_FROM_BOOTLOADER is not set
 # CONFIG_CMDLINE_EXTEND is not set
-# CONFIG_CMDLINE_FORCE is not set
+CONFIG_CMDLINE_FORCE=y
 # CONFIG_XIP_KERNEL is not set
 # CONFIG_KEXEC is not set
 # CONFIG_CRASH_DUMP is not set
@@ -1374,7 +1374,7 @@ CONFIG_MTK_RTC=y
 CONFIG_MTK_SERIAL=y
 CONFIG_MTK_SERIAL_CONSOLE=y
 # CONFIG_MTK_SERIAL_MODEM_TEST is not set
-# CONFIG_MTK_UART_USB_SWITCH is not set
+CONFIG_MTK_UART_USB_SWITCH=y
 CONFIG_MTK_SIM2=y
 CONFIG_MTK_SOUND=y
 # CONFIG_MTK_AUDIO_EXTCODEC_SUPPORT is not set
@@ -1828,7 +1828,7 @@ CONFIG_CONSOLE_POLL=y
 # CONFIG_SERIAL_ALTERA_UART is not set
 # CONFIG_SERIAL_IFX6X60 is not set
 # CONFIG_SERIAL_ARC is not set
-# CONFIG_TTY_PRINTK is not set
+CONFIG_TTY_PRINTK=y
 # CONFIG_HVC_DCC is not set
 # CONFIG_IPMI_HANDLER is not set
 # CONFIG_HW_RANDOM is not set
index 168234938c17ee11df74336c8af1046f76471995..57c89fbb0e525fdfe7be6497b94243f51e5073be 100644 (file)
@@ -428,14 +428,14 @@ CONFIG_CC_STACKPROTECTOR=y
 # Boot options
 #
 # CONFIG_USE_OF is not set
-CONFIG_ATAGS=y
+# CONFIG_ATAGS is not set
 # CONFIG_DEPRECATED_PARAM_STRUCT is not set
 CONFIG_ZBOOT_ROM_TEXT=0
 CONFIG_ZBOOT_ROM_BSS=0
 # CONFIG_COMPAT_CPUINFO is not set
-CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K"
-CONFIG_CMDLINE_FROM_BOOTLOADER=y
-# CONFIG_CMDLINE_EXTEND is not set
+CONFIG_CMDLINE="console=tty0 console=ttyMT3,921600n1 printk.disable_uart=0 root=/dev/ram vmalloc=496M slub_max_order=0 slub_debug=O coherent_pool=3240K androidboot.selinux=permissive"
+# CONFIG_CMDLINE_FROM_BOOTLOADER is not set
+CONFIG_CMDLINE_EXTEND=y
 # CONFIG_CMDLINE_FORCE is not set
 # CONFIG_XIP_KERNEL is not set
 # CONFIG_KEXEC is not set
@@ -1250,7 +1250,7 @@ CONFIG_MTK_RAM_CONSOLE_DRAM_ADDR=0x83F00000
 # CONFIG_MT_LOCK_DEBUG is not set
 CONFIG_PRINTK_PROCESS_INFO=y
 CONFIG_MT_PRINTK_UART_CONSOLE=y
-# CONFIG_MT_ENG_BUILD is not set
+CONFIG_MT_ENG_BUILD=y
 CONFIG_RAMDISK_OFFSET=0xF00000
 CONFIG_EARLY_LINUX_PORTING=y
 # CONFIG_MTK_MCI is not set
index 883e249eb1e01cfc6e70aba6ee7e36ed688617a3..90d9ebe9d4fd940b08c5778b09f66900eebe84d9 100644 (file)
@@ -232,7 +232,7 @@ struct machine_desc * __init setup_machine_tags(phys_addr_t __atags_pointer,
        }
 
        /* parse_early_param needs a boot_command_line */
-       strlcpy(boot_command_line, from, COMMAND_LINE_SIZE);
+       strlcpy(boot_command_line, default_command_line, COMMAND_LINE_SIZE);
 
        return mdesc;
 }
index 672e22c5e6c26dfdf8215d12cc7322997e8747df..199d604cc7120e8ac468cb4b23e65cba8d5e3177 100644 (file)
@@ -1101,7 +1101,8 @@ static struct platform_device camera_sysram_dev = {
 static void cmdline_filter(struct tag *cmdline_tag, char *default_cmdline)
 {
        const char *undesired_cmds[] = {
-                                    "console=",
+                                     "console=ttyMT1,921600n1"
+                                     "console=tty0"
                                      "root=",
                                      "lk_t=",
                                      "pl_t=",
@@ -1424,7 +1425,7 @@ void mt_fixup(struct tag *tags, char **cmdline, struct meminfo *mi)
 #endif
        char *br_ptr;
         // This function may modify ttyMT3 to ttyMT0 if needed
-        adjust_kernel_cmd_line_setting_for_console(cmdline_tag->u.cmdline.cmdline, *cmdline);
+        //adjust_kernel_cmd_line_setting_for_console(cmdline_tag->u.cmdline.cmdline, *cmdline);
 #ifdef CONFIG_FIQ_DEBUGGER
         if ((console_ptr=strstr(*cmdline, "ttyMT")) != 0)
         {
@@ -1436,7 +1437,7 @@ void mt_fixup(struct tag *tags, char **cmdline, struct meminfo *mi)
         }
 #endif
 
-        cmdline_filter(cmdline_tag, *cmdline);
+        //cmdline_filter(cmdline_tag, *cmdline);
                if ((br_ptr = strstr(*cmdline, "boot_reason=")) != 0) {
                        /* get boot reason */
                        g_boot_reason = br_ptr[12] - '0';
index f2acc302f3f5f4874201486a8436a4709d7f7924..57fd29d3d746f40f483c1cff1584d4e30f07382d 100644 (file)
@@ -75,7 +75,7 @@ static unsigned long nsec_low(unsigned long long nsec)
 /*                     Define Proc entry               */
 /* --------------------------------------------------- */
 MT_DEBUG_ENTRY(printk_ctrl);
-int mt_need_uart_console = 0;
+int mt_need_uart_console = 1;
 extern void mt_enable_uart(void);      /* printk.c */
 extern void mt_disable_uart(void);     /* printk.c */
 extern bool printk_disable_uart;
@@ -119,10 +119,10 @@ static ssize_t mt_printk_ctrl_write(struct file *filp, const char *ubuf, ssize_t
 //auto reboot after power off                                              
 void force_enable_uart_log(void)
 {
-       if(mt_need_uart_console){
-                pr_err("uart log alrady opened!!!!\n");
-               return;
-       }
+       //if(mt_need_uart_console){
+    //            pr_err("uart log alrady opened!!!!\n");
+       //      return;
+       //}
 
        mt_need_uart_console = 1;
        mt_enable_uart();
@@ -134,7 +134,9 @@ void force_enable_uart_log(void)
 static int __init init_mt_printk_ctrl(void)
 {
        struct proc_dir_entry *pe;
-       mt_need_uart_console = 0;       /* defualt, no uart */
+       mt_need_uart_console = 1;       /* defualt, no uart */
+       mt_enable_uart();
+    force_enable_uart_log();
        pe = proc_create("mtprintk", 0664, NULL, &mt_printk_ctrl_fops);
        if (!pe)
                return -ENOMEM;
index e20087156cdb23172a5b4de466544f5b8901c48d..3a6718af9248eae8af4dc6f63f464c2f8c5feffd 100644 (file)
@@ -927,7 +927,7 @@ static bool printk_time = 1;
 static bool printk_time;
 #endif
 module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR);
-module_param_named(disable_uart, printk_disable_uart, bool, S_IRUGO | S_IWUSR);
+//module_param_named(disable_uart, printk_disable_uart, bool, S_IRUGO | S_IWUSR);
 
 static size_t print_time(u64 ts, char *buf)
 {