摘要:本文是參考大量網上資源在結合自己查看源代碼總結出來的,讓自己同時也讓大家加深對Android系統啟動過程有一個更加深入的了解!再次強調,本文的大多數功勞應歸功於那些原創者們,同時一些必要的參考鏈接我會一一附上。
注:由於本人采用Exynos4412開發板學習,所以本文大部分資料都是基於此處理器的
簡介:對於整個Android系統的啟動總的來說分為三個階段:
BootLoader引導即uBoot.bin
linux內核啟動即zImage
Android系統啟動即ramdisk.img與system.img
以上四個文件都是經過自己編譯后生成的且通過燒寫測試,接下來開始說這三大部分的啟動過程。
目錄:一、BootLoader的啟動
1.匯編部分
2.c部分
二、Kernel的啟動
1.zImage解壓縮
2.kernel的匯編啟動階段
3.kernel的c啟動階段
三、Android的啟動
1.init進程
2.init啟動的各種服務
3.android啟動圖示
第一部分:BootLoader的啟動流程
uBoot的第一條指令從cpu/arm920t/start.S文件開始
1. 設置CPU進入SVC模式(系統管理模式),cpsr[4:0]=0xd3。
1 #include <common.h> 2 #include <config.h> 3 4 /* 5 ************************************************************************* 6 * 7 * Jump vector table as in table 3.1 in [1] 8 * 9 ************************************************************************* 10 */ 11 12 13 .globl _start 14 _start: b start_code 15 ldr pc, _undefined_instruction 16 ldr pc, _software_interrupt 17 ldr pc, _prefetch_abort 18 ldr pc, _data_abort 19 ldr pc, _not_used 20 ldr pc, _irq 21 ldr pc, _fiq 22 23 _undefined_instruction: .word undefined_instruction 24 _software_interrupt: .word software_interrupt 25 _prefetch_abort: .word prefetch_abort 26 _data_abort: .word data_abort 27 _not_used: .word not_used 28 _irq: .word irq 29 _fiq: .word fiq 30 31 .balignl 16,0xdeadbeef
接着進入Start_code中:設置CPU進入SVC模式。
1 /* 2 * the actual start code 3 */ 4 5 start_code: 6 /* 7 * set the cpu to SVC32 mode 8 */ 9 mrs r0, cpsr 10 bic r0, r0, #0x1f 11 orr r0, r0, #0xd3 12 msr cpsr, r0 13 14 bl coloured_LED_init 15 bl red_LED_on
2.關看門狗,WTCON=0x0,並設置寄存器地址。
1 /* turn off the watchdog */ 2 3 # if defined(CONFIG_S3C2400) 4 # define pWTCON 0x15300000 5 # define INTMSK 0x14400008 /* Interupt-Controller base addresses */ 6 # define CLKDIVN 0x14800014 /* clock divisor register */ 7 #else 8 # define pWTCON 0x53000000 9 # define INTMSK 0x4A000008 /* Interupt-Controller base addresses */ 10 # define INTSUBMSK 0x4A00001C 11 # define CLKDIVN 0x4C000014 /* clock divisor register */ 12 # endif 13 14 ldr r0, =pWTCON 15 mov r1, #0x0 16 str r1, [r0]
3.關中斷,INTMSK=0xFFFFFFFF, INTSUBMSK=0x3FF。
1 /* 2 * mask all IRQs by setting all bits in the INTMR - default 3 */ 4 mov r1, #0xffffffff 5 ldr r0, =INTMSK 6 str r1, [r0] 7 # if defined(CONFIG_S3C2410) 8 ldr r1, =0x3ff 9 ldr r0, =INTSUBMSK 10 str r1, [r0] 11 # endif
4.時鍾設置CLKDIVN=0x3 , FCLK:HCLK:PCLK = 1:2:4
1 /* FCLK:HCLK:PCLK = 1:2:4 */ 2 /* default FCLK is 120 MHz ! */ 3 ldr r0, =CLKDIVN 4 mov r1, #3 5 str r1, [r0] 6 #endif /* CONFIG_S3C24X0 */
5.詢問是否進行CPU初始化
1 #ifndef CONFIG_SKIP_LOWLEVEL_INIT 2 bl cpu_init_crit 3 #endif
6.relocate函數
1 #ifndef CONFIG_SKIP_RELOCATE_UBOOT 2 relocate: /* relocate U-Boot to RAM */ 3 adr r0, _start /* r0 <- current position of code */ 4 ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ 5 cmp r0, r1 /* don't reloc during debug */ 6 beq stack_setup 7 8 ldr r2, _armboot_start 9 ldr r3, _bss_start 10 sub r2, r3, r2 /* r2 <- size of armboot */ 11 add r2, r0, r2 /* r2 <- source end address */ 12 13 copy_loop: 14 ldmia r0!, {r3-r10} /* copy from source address [r0] */ 15 stmia r1!, {r3-r10} /* copy to target address [r1] */ 16 cmp r0, r2 /* until source end addreee [r2] */ 17 ble copy_loop 18 #endif /* CONFIG_SKIP_RELOCATE_UBOOT */
7.初始化堆棧
1 /* Set up the stack */ 2 stack_setup: 3 ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ 4 sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ 5 sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ 6 #ifdef CONFIG_USE_IRQ 7 sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) 8 #endif 9 sub sp, r0, #12 /* leave 3 words for abort-stack */ 10 11 clear_bss: 12 ldr r0, _bss_start /* find start of bss segment */ 13 ldr r1, _bss_end /* stop here */ 14 mov r2, #0x00000000 /* clear */ 15 16 clbss_l:str r2, [r0] /* clear loop... */ 17 add r0, r0, #4 18 cmp r0, r1 19 ble clbss_l
8.CPU的初始化,即cpu_init_crit函數,完成以后回到主函數
1 #ifndef CONFIG_SKIP_LOWLEVEL_INIT 2 cpu_init_crit: 3 /* 4 * flush v4 I/D caches 5 */ 6 mov r0, #0 7 mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */ 8 mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */ 9 10 /* 11 * disable MMU stuff and caches 12 */ 13 mrc p15, 0, r0, c1, c0, 0 14 bic r0, r0, #0x00002300 @ clear bits 13, 9:8 (--V- --RS) 15 bic r0, r0, #0x00000087 @ clear bits 7, 2:0 (B--- -CAM) 16 orr r0, r0, #0x00000002 @ set bit 2 (A) Align 17 orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache 18 mcr p15, 0, r0, c1, c0, 0 19 20 /* 21 * before relocating, we have to setup RAM timing 22 * because memory timing is board-dependend, you will 23 * find a lowlevel_init.S in your board directory. 24 */ 25 mov ip, lr 26 27 bl lowlevel_init 28 29 mov lr, ip 30 mov pc, lr 31 #endif /* CONFIG_SKIP_LOWLEVEL_INIT */
9.從這里跳轉到第二階段C代碼中去
1 ldr pc, _start_armboot 2 3 _start_armboot: .word start_armboot
C部分從文件/lib_arm/board.c的start_armboot()函數開始
1.定義一個struct global_data結構體指針gd,struct global_data結構體對象gd_data,
定義一個struct bd_info結構體對象bd_data,定義一個指向函數的二級指針init_fnc_ptr,定義的全局結構體對象都是放在堆棧中的,gd是放在寄存器中的。
2. gd=&gd_data,gd->bd = &bd_data,並且全部空間清0。
3.init_fnc_ptr = init_sequence(一個初始化函數指針數組)。將會在接下來的for循環中提取出每一個函數來依次執行完。
4.配置可用的flash空間,並且打印出相關信息,flash_init()和display_flash_config()。
5.mem_malloc_init()函數,分配堆空間.
6.env_relocate該函數的作用是將0x33ef0000開始16K的環境參數拷貝到堆空間中去。
7.gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr")通過這中方式獲得環境變量列表中的ipaddr參數(開發板ip),獲得環境變量中的MAC地址,設置到gd->bd->bi_enetaddr[reg]中。
8.devices_init函數,創建了devlist,但是只有一個串口設備注冊在內。
9.console_init_r函數:控制台完全初始化,此后可以使用函數serial_getc和serial_putc或者putc和getc來輸出log。
10.使能中斷,如果有網卡設備,設置網卡MAC和IP地址。
11.main_loop ();定義於common/main.c。到此所有的初始化工作已經完成,main_loop在標准輸入設備中接受命令,然后分析,查找和執行。
12.在上面的main_loop函數中,通常在開發完成的階段都會設置一個bootcmd的環境變量,然后將延時bootdelay設置成0,這樣當u-boot跑到這里的時候就不會因為用戶按下了任意鍵就進入了命令行模式,
可以直接運行bootcmd的命令來直接加載kernel的Image然后移交控制權。如果進入了命令行模式,我們也可以手動輸入命令來啟動系統,輸入的命令也是基本和bootcmd一樣
1 #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) 2 s = getenv ("bootdelay"); 3 bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY; 4 5 debug ("### main_loop entered: bootdelay=%d\n\n", bootdelay);
這個地方時設置bootdelay的地方,即在引導kernel時等待用戶命令,進入命令行模式,進行分區,格式化等操作。
13.uBoot 引導內核啟動的最后一步是:通過一個函數指針 thekernel()帶三個參數跳轉到內核( zImage )入口點開始執行,此時, u-boot 的任務已經完成,控制權完全交給內核( zImage )。
在 uBoot 的文件lib_arm\bootm.c中定義了 thekernel, 並在 do_bootm_linux 的最后執行 thekernel。
定義thekernel函數指針,獲取bootargs參數給commandline指針。
theKernel (0, machid, bd->bi_boot_params);第一個參數必須為0,第二個參數為機器類型ID,第三個參數為傳遞給內核參數的起始地址0x30000100
1 int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) 2 { 3 bd_t *bd = gd->bd; 4 char *s; 5 int machid = bd->bi_arch_number; 6 void (*theKernel)(int zero, int arch, uint params); 7 int ret; 8 9 #ifdef CONFIG_CMDLINE_TAG 10 char *commandline = getenv ("bootargs"); 11 #endif 12 13 if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) 14 return 1; 15 16 theKernel = (void (*)(int, int, uint))images->ep; 17 18 s = getenv ("machid"); 19 if (s) { 20 machid = simple_strtoul (s, NULL, 16); 21 printf ("Using machid 0x%x from environment\n", machid); 22 } 23 24 ret = boot_get_ramdisk(argc, argv, images, IH_ARCH_ARM, 25 &(images->rd_start), &(images->rd_end)); 26 if(ret) 27 printf("[err] boot_get_ramdisk\n"); 28 29 show_boot_progress (15); 30 31 debug ("## Transferring control to Linux (at address %08lx) ...\n", 32 (ulong) theKernel); 33 34 #if defined (CONFIG_SETUP_MEMORY_TAGS) || \ 35 defined (CONFIG_CMDLINE_TAG) || \ 36 defined (CONFIG_INITRD_TAG) || \ 37 defined (CONFIG_SERIAL_TAG) || \ 38 defined (CONFIG_REVISION_TAG) || \ 39 defined (CONFIG_LCD) || \ 40 defined (CONFIG_VFD) 41 setup_start_tag (bd); 42 #ifdef CONFIG_SERIAL_TAG 43 setup_serial_tag (¶ms); 44 #endif 45 #ifdef CONFIG_REVISION_TAG 46 setup_revision_tag (¶ms); 47 #endif 48 #ifdef CONFIG_SETUP_MEMORY_TAGS 49 setup_memory_tags (bd); 50 #endif 51 #ifdef CONFIG_CMDLINE_TAG 52 setup_commandline_tag (bd, commandline); 53 #endif 54 #ifdef CONFIG_INITRD_TAG 55 if (images->rd_start && images->rd_end) 56 setup_initrd_tag (bd, images->rd_start, images->rd_end); 57 #endif 58 #if defined (CONFIG_VFD) || defined (CONFIG_LCD) 59 setup_videolfb_tag ((gd_t *) gd); 60 #endif 61 setup_end_tag (bd); 62 #endif 63 64 /* we assume that the kernel is in place */ 65 printf ("\nStarting kernel ...\n\n"); 66 67 #ifdef CONFIG_USB_DEVICE 68 { 69 extern void udc_disconnect (void); 70 udc_disconnect (); 71 } 72 #endif 73 74 cleanup_before_linux (); 75 76 theKernel (0, machid, bd->bi_boot_params); 77 /* does not return */ 78 79 return 1; 80 }
附上BootLoader啟動時的調試信息
OK U-Boot 2010.03 (Jul 14 2015 - 00:08:57) for iTOP-4412 Android CPU: SMDK4412-AP1.1 [e4412211] APLL = 1000MHz, MPLL = 800MHz ARM_CLOCK = 1000MHz PMIC: S5M8767(VER5.0) Board: iTOP-4412-Quad POP type: POP for C220 DRAM: 1023 MB MMC: Count: 100 max_emmc_clock:40 MHZ Set CLK to 400 KHz EMMC CLOCK OUTPUT:: 400KHz -[div:50] response timeout error : 00000104 cmd 8 response timeout error : 00000104 cmd 55 max_emmc_clock:40 MHZ Input CLK [ 50 MHz] is higher than limit [40 MHZ] Set CLK to 40000 KHz EMMC clock output: 40000 KHz max_emmc_clock:40 MHZ Input CLK [ 50 MHz] is higher than limit [40 MHZ] Set CLK to 40000 KHz EMMC clock output: 40000 KHz MMC0: 3728 MB SD sclk_mmc is 400K HZ raise: Signal # 8 caught raise: Signal # 8 caught MMC1: 0 MB 0 MB *** Warning - using default environment In: serial Out: serial Err: serial eMMC OPEN Success.!! !!!Notice!!! !You must close eMMC boot Partition after all image writing! !eMMC boot partition has continuity at image writing time.! !So, Do not close boot partition, Before, all images is written.! MMC read: dev # 0, block # 48, count 16 ...16 blocks read: OK eMMC CLOSE Success.!! Checking Boot Mode ... EMMC4.41 SYSTEM ENTER NORMAL BOOT MODE Hit any key to stop autoboot: 0 reading kernel.. 1120, 12288 MMC read: dev # 0, block # 1120, count 12288 ...12288 blocks read: OK completed reading RFS.. 13408, 2048 MMC read: dev # 0, block # 13408, count 2048 ...2048 blocks read: OK completed Boot with zImage ## Loading init Ramdisk from Legacy Image at 40df0000 ... Image Name: ramdisk Image Type: ARM Linux RAMDisk Image (uncompressed) Data Size: 921950 Bytes = 900.3 kB Load Address: 40800000 Entry Point: 40800000 Starting kernel ...
C部分我沒有仔細去研究了,參考鏈接:http://blog.sina.com.cn/s/blog_533074eb0101ew0s.html
匯編代碼分析:http://blog.csdn.net/hygzxf/article/details/7477609
總結:BootLoader就是為操作系統啟動之前做的准備,初始化硬件設備以及給內核傳遞必要的數據。
二、Linux內核的啟動
通用寄存器的作用
r0 :在函數開始時使用
r1 :存放堆棧指針,相當於ia32架構中的esp寄存器
r2 :存放當前進程的描述符的地址
r3 :存放第一個參數和返回地址
r4-r10 :存放函數的參數
r11 :用在指針的調用和當前一些語言的環境指針
r12 :用於存放異常處理
r13 :保留做為系統線程ID
r14-r31 :作為本地變量,具有非易失性
1.zImage解壓縮
內核啟動引導地址由bootp.lds決定。 (arch/arm/boot/bootp)
1 ENTRY(_start) 2 SECTIONS 3 { 4 . = 0; 5 .text : { 6 _stext = .; 7 *(.start) 8 *(.text) 9 initrd_size = initrd_end - initrd_start; 10 _etext = .; 11 }
.= 0可以確定解壓代碼運行的開始地址在0x0的位置。
內核啟動的執行的第一條的代碼:arch/arm/boot/compressed /head.S文件中,Head.S文件主要功能是實現壓縮內核的解壓和跳轉到內核vmlinux內核的入口。
這里不做具體介紹了,可參考:http://blog.chinaunix.net/uid-25909619-id-3380535.html
2.Kernel的匯編啟動階段
第二階段的代碼是從\arch\arm\kernel\head.S開始的
內核啟動第二階段主要完成的工作有,cpu ID檢查,machine ID(也就是開發板ID)檢查,創建初始化頁表,設置C代碼運行環境,跳轉到內核第一個真正的C函數startkernel開始執行。
這一階段涉及到兩個重要的結構體:
(1) 一個是struct proc_info_list 主要描述CPU相關的信息,定義在文件arch\arm\include\asm\procinfo.h中,與其相關的函數及變量在文件arch/arm/mm/proc_arm920.S中被定義和賦值。
(2) 另一個結構體是描述開發板或者說機器信息的結構體struct machine_desc,定義在\arch\arm\include\asm\mach\arch.h文件中。
其函數的定義和變量的賦值在板極相關文件arch/arm/mach-s3c2410/mach-smdk2410.c中實現,這也是內核移植非常重要的一個文件。
具體分析請參考:http://blog.chinaunix.net/uid-25909619-id-3380544.html
http://www.cnblogs.com/innost/archive/2011/11/08/2241653.html
http://blog.163.com/sxc_1985921@126/blog/static/50073349200822733247214/
3.Kernel的C啟動階段(Linux version 3.0.15)
經過解壓縮和匯編啟動兩個階段,將會進入init/Main.c中的start_kernel()函數去繼續執行
1 asmlinkage void __init start_kernel(void) 2 { 3 char * command_line; 4 extern const struct kernel_param __start___param[], __stop___param[]; 5 6 smp_setup_processor_id(); 7 8 /* 9 * Need to run as early as possible, to initialize the 10 * lockdep hash: 11 */ 12 lockdep_init(); 13 debug_objects_early_init(); 14 15 /* 16 * Set up the the initial canary ASAP: 17 */ 18 boot_init_stack_canary(); 19 20 cgroup_init_early(); 21 22 local_irq_disable(); 23 early_boot_irqs_disabled = true; 24 25 /* 26 * Interrupts are still disabled. Do necessary setups, then 27 * enable them 28 */ 29 tick_init(); 30 boot_cpu_init(); 31 page_address_init(); 32 printk(KERN_NOTICE "%s", linux_banner); 33 setup_arch(&command_line); 34 mm_init_owner(&init_mm, &init_task); 35 mm_init_cpumask(&init_mm); 36 setup_command_line(command_line); 37 setup_nr_cpu_ids(); 38 setup_per_cpu_areas(); 39 smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */ 40 41 build_all_zonelists(NULL); 42 page_alloc_init(); 43 44 printk(KERN_NOTICE "Kernel command line: %s\n", boot_command_line); 45 parse_early_param(); 46 parse_args("Booting kernel", static_command_line, __start___param, 47 __stop___param - __start___param, 48 &unknown_bootoption); 49 /* 50 * These use large bootmem allocations and must precede 51 * kmem_cache_init() 52 */ 53 setup_log_buf(0); 54 pidhash_init(); 55 vfs_caches_init_early(); 56 sort_main_extable(); 57 trap_init(); 58 59 60 //memblock_reserve((phys_addr_t)0x50000000,(phys_addr_t)0x100000); 61 62 mm_init(); 63 64 /* 65 * Set up the scheduler prior starting any interrupts (such as the 66 * timer interrupt). Full topology setup happens at smp_init() 67 * time - but meanwhile we still have a functioning scheduler. 68 */ 69 sched_init(); 70 /* 71 * Disable preemption - early bootup scheduling is extremely 72 * fragile until we cpu_idle() for the first time. 73 */ 74 preempt_disable(); 75 if (!irqs_disabled()) { 76 printk(KERN_WARNING "start_kernel(): bug: interrupts were " 77 "enabled *very* early, fixing it\n"); 78 local_irq_disable(); 79 } 80 idr_init_cache(); 81 perf_event_init(); 82 rcu_init(); 83 radix_tree_init(); 84 /* init some links before init_ISA_irqs() */ 85 early_irq_init(); 86 init_IRQ(); 87 prio_tree_init(); 88 init_timers(); 89 hrtimers_init(); 90 softirq_init(); 91 timekeeping_init(); 92 time_init(); 93 profile_init(); 94 call_function_init(); 95 if (!irqs_disabled()) 96 printk(KERN_CRIT "start_kernel(): bug: interrupts were " 97 "enabled early\n"); 98 early_boot_irqs_disabled = false; 99 local_irq_enable(); 100 101 /* Interrupts are enabled now so all GFP allocations are safe. */ 102 gfp_allowed_mask = __GFP_BITS_MASK; 103 104 kmem_cache_init_late(); 105 106 /* 107 * HACK ALERT! This is early. We're enabling the console before 108 * we've done PCI setups etc, and console_init() must be aware of 109 * this. But we do want output early, in case something goes wrong. 110 */ 111 console_init(); 112 if (panic_later) 113 panic(panic_later, panic_param); 114 115 lockdep_info(); 116 117 /* 118 * Need to run this when irqs are enabled, because it wants 119 * to self-test [hard/soft]-irqs on/off lock inversion bugs 120 * too: 121 */ 122 locking_selftest(); 123 124 #ifdef CONFIG_BLK_DEV_INITRD 125 if (initrd_start && !initrd_below_start_ok && 126 page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) { 127 printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - " 128 "disabling it.\n", 129 page_to_pfn(virt_to_page((void *)initrd_start)), 130 min_low_pfn); 131 initrd_start = 0; 132 } 133 #endif 134 page_cgroup_init(); 135 enable_debug_pagealloc(); 136 debug_objects_mem_init(); 137 kmemleak_init(); 138 setup_per_cpu_pageset(); 139 numa_policy_init(); 140 if (late_time_init) 141 late_time_init(); 142 sched_clock_init(); 143 calibrate_delay(); 144 pidmap_init(); 145 anon_vma_init(); 146 #ifdef CONFIG_X86 147 if (efi_enabled) 148 efi_enter_virtual_mode(); 149 #endif 150 thread_info_cache_init(); 151 cred_init(); 152 fork_init(totalram_pages); 153 proc_caches_init(); 154 buffer_init(); 155 key_init(); 156 security_init(); 157 dbg_late_init(); 158 vfs_caches_init(totalram_pages); 159 signals_init(); 160 /* rootfs populating might need page-writeback */ 161 page_writeback_init(); 162 #ifdef CONFIG_PROC_FS 163 proc_root_init(); 164 #endif 165 cgroup_init(); 166 cpuset_init(); 167 taskstats_init_early(); 168 delayacct_init(); 169 170 check_bugs(); 171 172 acpi_early_init(); /* before LAPIC and SMP init */ 173 sfi_init_late(); 174 175 ftrace_init(); 176 177 /* Do the rest non-__init'ed, we're now alive */ 178 //printk(KERN_INFO "[mjdbg]MEM Check4:0x%x : 0x%x.\n", (int *)(phys_to_virt(0x50000000)),*(int *)(phys_to_virt(0x50000000))); 179 rest_init(); 180 }
1.打印版本信息,如內核、編譯器、作者、日期。
2.setup_arch()主要做一些板級初始化,cpu初始化,tag參數解析,u-boot傳遞的cmdline解析,建立mmu工作頁表(memtable_init),初始化內存布局,
調用mmap_io建立GPIO,IRQ,MEMCTRL,UART,及其他外設的靜態映射表,對時鍾,定時器,uart進行初始化,
cpu_init():打印一些關於cpu的信息,比如cpu id,cache 大小等。另外重要的是設置了IRQ、ABT、UND三種模式的stack空間,分別都是12個字節。最后將系統切換到svc模式。
3.build_all_zonelists():建立系統內存頁區(zone)鏈表
4.printk(KERN_NOTICE "Kernel command line: %s\n", saved_command_line);打印出從uboot傳遞過來的command_line字符串,在setup_arch函數中獲得的。
5.parse_early_param():這里分析的是系統能夠辨別的一些早期參數(這個函數甚至可以去掉,__setup的形式的參數),
而且在分析的時候並不是以setup_arch(&command_line)傳出來的command_line為基礎,而是以最原生態的saved_command_line為基礎的。
6.parse_args("Booting kernel", command_line, __start___param, __stop___param - __start___param,&unknown_bootoption);
對於比較新的版本真正起作用的函數,與parse_early_param()相比,此處對解析列表的處理范圍加大了,解析列表中除了包括系統以setup定義的啟動參數,
還包括模塊中定義的param參數以及系統不能辨別的參數。
__start___param是param參數的起始地址,在System.map文件中能看到
__stop___param - __start___param是參數個數
unknown_bootoption是對應與啟動參數不是param的相應處理函數(查看parse_one()就知道怎么回事)。
7.sched_init():初始化每個處理器的可運行隊列,設置系統初始化進程即0號進程。
8.init_IRQ():初始化系統中所有的中斷描述結構數組:irq_desc[NR_IRQS]。接着執行init_arch_irq函數,
該函數是在setup_arch函數最后初始化的一個全局函數指針,指向了smdk2410_init_irq函數(in mach-smdk2410.c),
實際上是調用了s3c24xx_init_irq函數。在該函數中,首先清除所有的中斷未決標志,之后就初始化中斷的觸發方式和屏蔽位,還有中斷句柄初始化,
這里不是最終用戶的中斷函數,而是do_level_IRQ或者do_edge_IRQ函數,在這兩個函數中都使用過__do_irq函數來找到真正最終驅動程序注冊在系統中的中斷處理函數。
9.softirq_init():內核的軟中斷機制初始化函數。
10.console_init():初始化系統的控制台結構,該函數執行后調用printk函數將log_buf中所有符合打印級別的系統信息打印到控制台上。
11.profile_init():
profile是用來對系統剖析的,在系統調試的時候有用
需要打開內核選項,並且在bootargs中有profile這一項才能開啟這個功能
.phys_io = S3C2410_PA_UART, .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, .boot_params = S3C2410_SDRAM_PA + 0x100, .map_io = smdk2410_map_io, .init_irq = s3c24xx_init_irq, .init_machine = smdk2410_init, .timer = &s3c24xx_timer, MACHINE_END
所有devices的注冊都是在smdk2410_init()函數中調用函數:platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));來完成,
所以drivers的注冊就放在后面了。不過這樣注冊是有一個壞處的,就是不能准確地控制driver代碼中probe的執行先后順序。
現在mtk平台上的devices和drivers注冊順序想法,也就是先注冊上drivers,然后再注冊devices,這樣的話,就可以控制probe函數的執行先后。
include/linux/init.h文件中有這些優先級的定義。
稍后介紹怎么修改設備初始化順序:http://www.cnblogs.com/pngcui/p/4666707.html
12.rest_init():
調用kernel_thread()創建1號內核線程。
調用kernel_thread()創建kthreadd內核線程。尚不明作用。
init_idle_bootup_task():當前0號進程init_task最終會退化成idle進程,所以這里調用init_idle_bootup_task()函數,讓init_task進程隸屬到idle調度類中。即選擇idle的調度相關函數。
調用schedule()函數切換當前進程,在調用該函數之前,Linux系統中只有兩個進程,即0號進程init_task和1號進程kernel_init,其中kernel_init進程也是剛剛被創建的。
調用該函數后,1號進程kernel_init將會運行!
調用cpu_idle(),0號線程進入idle函數的循環,在該循環中會周期性地檢查。
1 static noinline void __init_refok rest_init(void) 2 { 3 int pid; 4 //printk("**********************************************************\n"); 5 //printk(" rest_init: 0x%x!!!\n",(*(int *)phys_to_virt(0x50000000))); 6 //printk("**********************************************************\n"); 7 8 #ifdef CONFIG_KERNEL_PANIC_DUMP 9 panic_dump_test(); 10 #endif 11 12 13 rcu_scheduler_starting(); 14 /* 15 * We need to spawn init first so that it obtains pid 1, however 16 * the init task will end up wanting to create kthreads, which, if 17 * we schedule it before we create kthreadd, will OOPS. 18 */ 19 kernel_thread(kernel_init, NULL, CLONE_FS | CLONE_SIGHAND); 20 numa_default_policy(); 21 pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); 22 rcu_read_lock(); 23 kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns); 24 rcu_read_unlock(); 25 complete(&kthreadd_done); 26 27 /* 28 * The boot idle thread must execute schedule() 29 * at least once to get things moving: 30 */ 31 init_idle_bootup_task(current); 32 preempt_enable_no_resched(); 33 schedule(); 34 preempt_disable(); 35 36 /* Call into cpu_idle with preempt disabled */ 37 cpu_idle(); 38 }
13. kernel_init 1號線程初始化
最后對Linux應用程序進行初始化。
1號kernel_init進程完成linux的各項配置(包括啟動AP)后,就會在/sbin,/etc,/bin尋找init程序來運行。
該init程序會替換kernel_init進程(注意:並不是創建一個新的進程來運行init程序,而是一次變身,使用sys_execve函數改變核心進程的正文段,將核心進程kernel_init轉換成用戶進程init),
此時處於內核態的1號kernel_init進程將會轉換為用戶空間內的1號進程init。
父進程init將根據/etc/inittab中提供的信息完成應用程序的初始化調用。
然后init進程會執行/bin/sh產生shell界面提供給用戶來與Linux系統進行交互。
調用init_post()創建用戶模式1號進程。
在init_post()中最終調用下面的任何一個入口(按順序,第一個執行成功后將不返回)
1 static noinline int init_post(void) 2 { 3 /* need to finish all async __init code before freeing the memory */ 4 async_synchronize_full(); 5 free_initmem(); 6 mark_rodata_ro(); 7 system_state = SYSTEM_RUNNING; 8 numa_default_policy(); 9 10 current->signal->flags |= SIGNAL_UNKILLABLE; 11 12 if (ramdisk_execute_command) { 13 run_init_process(ramdisk_execute_command); 14 printk(KERN_WARNING "Failed to execute %s\n", 15 ramdisk_execute_command); 16 } 17 18 /* 19 * We try each of these until one succeeds. 20 * 21 * The Bourne shell can be used instead of init if we are 22 * trying to recover a really broken machine. 23 */ 24 if (execute_command) { 25 run_init_process(execute_command); 26 printk(KERN_WARNING "Failed to execute %s. Attempting " 27 "defaults...\n", execute_command); 28 } 29 run_init_process("/sbin/init"); 30 run_init_process("/etc/init"); 31 run_init_process("/bin/init"); 32 run_init_process("/bin/sh"); 33 34 panic("No init found. Try passing init= option to kernel. " 35 "See Linux Documentation/init.txt for guidance."); 36 }
關於更多函數解釋可以參考:http://blog.chinaunix.net/uid-27052262-id-3404074.html
至此Linux內核初始化完成,終於開始加載Android系統了。。
Linux啟動串口調試信息
Starting kernel ... Uncompressing Linux... done, booting the kernel. [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 3.0.15 (root@ubuntu) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #33 SMP PREEMPT Mon Jul 20 20:44:16 PDT 2015 [ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d [ 0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine: SMDK4X12 [ 0.000000] ************************** [ 0.000000] reserve_panic_dump_area!! [ 0.000000] ************************** [ 0.000000] Memory policy: ECC disabled, Data cache writealloc [ 0.000000] CPU EXYNOS4412 (id 0xe4412211) [ 0.000000] S3C24XX Clocks, Copyright 2004 Simtec Electronics [ 0.000000] s3c_register_clksrc: clock audiocdclk has no registers set [ 0.000000] audiocdclk: no parent clock specified [ 0.000000] s3c_register_clksrc: clock armclk has no registers set [ 0.000000] EXYNOS4: PLL settings, A=1000000000, M=800000000, E=96000000 V=350000000 [ 0.000000] EXYNOS4: ARMCLK=1000000000, DMC=400000000, ACLK200=24000000 [ 0.000000] ACLK160=160000000, ACLK133=133333333, ACLK100=100000000 [ 0.000000] EXYNOS4: ACLK400=24000000 ACLK266=800000000 [ 0.000000] uclk1: source is mout_mpll_user (6), rate is 100000000 [ 0.000000] uclk1: source is mout_mpll_user (6), rate is 100000000 [ 0.000000] uclk1: source is mout_mpll_user (6), rate is 100000000 [ 0.000000] uclk1: source is mout_mpll_user (6), rate is 100000000 [ 0.000000] sclk_csis: source is xusbxti (1), rate is 1500000 [ 0.000000] sclk_csis: source is xusbxti (1), rate is 1500000 [ 0.000000] sclk_cam0: source is xusbxti (1), rate is 1500000 [ 0.000000] sclk_cam1: source is xusbxti (1), rate is 1500000 [ 0.000000] sclk_fimc: source is xusbxti (1), rate is 1500000 [ 0.000000] sclk_fimc: source is xusbxti (1), rate is 1500000 [ 0.000000] sclk_fimc: source is xusbxti (1), rate is 1500000 [ 0.000000] sclk_fimc: source is xusbxti (1), rate is 1500000 [ 0.000000] sclk_fimd: source is xusbxti (1), rate is 1500000 [ 0.000000] sclk_fimd: source is xusbxti (1), rate is 1500000 [ 0.000000] sclk_mfc: source is mout_mfc0 (0), rate is 200000000 [ 0.000000] sclk_g3d: source is mout_g3d0 (0), rate is 41666666 [ 0.000000] sclk_pwi: source is xusbxti (1), rate is 1500000 [ 0.000000] PERCPU: Embedded 7 pages/cpu @c0dc8000 s6752 r8192 d13728 u32768 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 259842 [ 0.000000] Kernel command line: console=ttySAC2,115200 //-------------------------------------------------------- [ 0.000000] log_buf_len: 524288 [ 0.000000] early log buf free: 127784(97%) [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Memory: 1023MB = 1023MB total [ 0.000000] Memory: 645528k/645528k available, 402024k reserved, 293888K highmem [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) [ 0.000000] DMA : 0xfea00000 - 0xffe00000 ( 20 MB) [ 0.000000] vmalloc : 0xee800000 - 0xf6000000 ( 120 MB) [ 0.000000] lowmem : 0xc0000000 - 0xee000000 ( 736 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .init : 0xc0008000 - 0xc003f000 ( 220 kB) [ 0.000000] .text : 0xc003f000 - 0xc08db000 (8816 kB) [ 0.000000] .data : 0xc08dc000 - 0xc0981a40 ( 663 kB) [ 0.000000] .bss : 0xc0981d30 - 0xc09beff0 ( 245 kB) [ 0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] NR_IRQS:456 [ 0.000000] Calibrating delay loop... 1992.29 BogoMIPS (lpj=4980736) [ 0.045000] pid_max: default: 32768 minimum: 301 [ 0.045000] Mount-cache hash table entries: 512 [ 0.045000] Initializing cgroup subsys debug [ 0.045000] Initializing cgroup subsys cpuacct [ 0.045000] Initializing cgroup subsys freezer [ 0.045000] CPU: Testing write buffer coherency: ok [ 0.045000] **********panic_dump_test**************** [ 0.045000] There is no valid panic information in memory [ 0.045000] ************************** [ 0.045000] L310 cache controller enabled [ 0.045000] l2x0: 16 ways, CACHE_ID 0x4100c4c8, AUX_CTRL 0x7e470001, Cache size: 1048576 B [ 0.075000] CPU1: Booted secondary processor [ 0.095000] CPU2: Booted secondary processor [ 0.115000] CPU3: Booted secondary processor [ 0.115000] Brought up 4 CPUs [ 0.115000] SMP: Total of 4 processors activated (7969.17 BogoMIPS). [ 0.120000] print_constraints: dummy: [ 0.120000] NET: Registered protocol family 16 [ 0.120000] value1 = 0, value2 = 1, type = 0x1 [ 0.120000] value1 = 0, value2 = 1, type = 0x1 [ 0.135000] exynos4_pmu_init: PMU supports 4412(96) [ 0.135000] S3C Power Management, Copyright 2004 Simtec Electronics [ 0.135000] EXYNOS4: Initializing architecture [ 0.135000] panic_file create OK !! [ 0.135000] s3c-adc exynos4412-adc: attached adc driver [ 0.135000] samsung-pd samsung-pd.0: power domain registered [ 0.135000] samsung-pd samsung-pd.1: power domain registered [ 0.135000] samsung-pd samsung-pd.2: power domain registered [ 0.135000] samsung-pd samsung-pd.5: power domain registered [ 0.135000] samsung-pd samsung-pd.4: power domain registered [ 0.135000] samsung-pd samsung-pd.6: power domain registered [ 0.135000] samsung-pd samsung-pd.7: power domain registered [ 0.135000] s3c24xx-pwm s3c24xx-pwm.1: tin at 100000000, tdiv at 100000000, tin=divclk, base 8 [ 0.135000] UMP: UMP device driver loaded [ 0.155000] bio: create slab <bio-0> at 0 [ 0.155000] SCSI subsystem initialized [ 0.155000] s3c64xx_spi_probe(969) [ 0.155000] s3c64xx_spi_probe(1092) [ 0.155000] s3c64xx_spi_probe(1113) [ 0.155000] usbcore: registered new interface driver usbfs [ 0.155000] usbcore: registered new interface driver hub [ 0.155000] usbcore: registered new device driver usb [ 0.155000] i2c-gpio i2c-gpio.0: using pins 42 (SDA) and 43 (SCL) [ 0.160000] +s5m8767_pmic_probe() [ 0.160000] print_constraints: vdd_mif range: 900 <--> 1100 mV at 1100 mV [ 0.160000] print_constraints: vdd_arm range: 850 <--> 1450 mV at 1200 mV [ 0.160000] print_constraints: vdd_int range: 875 <--> 1200 mV at 1000 mV [ 0.160000] print_constraints: vdd_g3d range: 750 <--> 1500 mV at 1100 mV [ 0.165000] print_constraints: vdd_m12 range: 750 <--> 1500 mV at 1200 mV [ 0.165000] print_constraints: vdd12_5m range: 750 <--> 1500 mV at 1200 mV [ 0.165000] print_constraints: vddf28_emmc range: 750 <--> 3000 mV at 2850 mV [ 0.170000] print_constraints: VDDQ_M12: 1200 mV [ 0.170000] print_constraints: VDD18_2M: 1800 mV [ 0.170000] print_constraints: VDD10_MIPI: 1000 mV [ 0.185000] print_constraints: VDD33_LCD: 3300 mV [ 0.185000] print_constraints: VDD18_MIPI: 1800 mV [ 0.195000] print_constraints: VDD33_UOTG: 3300 mV [ 0.200000] print_constraints: VDD10_USH: 1000 mV [ 0.200000] print_constraints: VDD18_HSIC: 1800 mV [ 0.200000] print_constraints: VDDIOPERI_28: 3300 mV [ 0.215000] print_constraints: DC33V_TP: 3300 mV [ 0.215000] print_constraints: VDD28_CAM: 1800 mV [ 0.215000] print_constraints: VDD28_AF: 2800 mV [ 0.215000] print_constraints: VDDA28_2M: 2800 mV [ 0.220000] print_constraints: VDD28_TF: 2800 mV [ 0.230000] print_constraints: VDD33_A31: 3300 mV [ 0.255000] print_constraints: VDD18_CAM: 1800 mV [ 0.255000] print_constraints: VDD18_A31: 1800 mV [ 0.255000] print_constraints: GPS_1V8: 1800 mV [ 0.260000] print_constraints: DVDD12: 1200 mV [ 0.260000] -s5m8767_pmic_probe() [ 0.260000] s5m87xx 1-0066: S5M87xx MFD probe done!!! [ 0.260000] s3c-i2c s3c2440-i2c.1: i2c-1: S3C I2C adapter [ 0.260000] s3c-i2c s3c2440-i2c.3: i2c-3: S3C I2C adapter [ 0.260000] s3c-i2c s3c2440-i2c.4: i2c-4: S3C I2C adapter [ 0.260000] s3c-i2c s3c2440-i2c.5: i2c-5: S3C I2C adapter [ 0.260000] s3c-i2c s3c2440-i2c.7: i2c-7: S3C I2C adapter [ 0.260000] Advanced Linux Sound Architecture Driver Version 1.0.24. [ 0.260000] Bluetooth: Core ver 2.16 [ 0.260000] NET: Registered protocol family 31 [ 0.260000] Bluetooth: HCI device and connection manager initialized [ 0.260000] Bluetooth: HCI socket layer initialized [ 0.260000] Bluetooth: L2CAP socket layer initialized [ 0.260000] Bluetooth: SCO socket layer initialized [ 0.260000] cfg80211: Calling CRDA to update world regulatory domain [ 0.260000] Switching to clocksource mct-frc [ 0.260428] Switched to NOHz mode on CPU #0 [ 0.260640] Switched to NOHz mode on CPU #2 [ 0.260646] Switched to NOHz mode on CPU #3 [ 0.260653] Switched to NOHz mode on CPU #1 [ 0.261840] NET: Registered protocol family 2 [ 0.262015] IP route cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.262642] TCP established hash table entries: 131072 (order: 8, 1048576 bytes) [ 0.264143] TCP bind hash table entries: 65536 (order: 7, 786432 bytes) [ 0.264947] TCP: Hash tables configured (established 131072 bind 65536) [ 0.264963] TCP reno registered [ 0.264978] UDP hash table entries: 512 (order: 2, 16384 bytes) [ 0.265039] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) [ 0.265305] NET: Registered protocol family 1 [ 0.265443] Trying to unpack rootfs image as initramfs... [ 0.316627] Freeing initrd memory: 900K [ 0.316732] PMU: registered new PMU device of type 0 [ 0.316901] Exynos4 : ARM Clock down on idle mode is enabled [ 0.317816] regulator_consumer_probe: loading tc4-regulator-consumer [ 0.317836] Register vdd_consumer_early_suspend done [ 0.318454] Loaded driver for PL330 DMAC-0 s3c-pl330 [ 0.318470] DBUFF-64x8bytes Num_Chans-8 Num_Peri-1 Num_Events-32 [ 0.318767] Loaded driver for PL330 DMAC-1 s3c-pl330 [ 0.318782] DBUFF-32x4bytes Num_Chans-8 Num_Peri-32 Num_Events-32 [ 0.318879] Loaded driver for PL330 DMAC-2 s3c-pl330 [ 0.318894] DBUFF-32x4bytes Num_Chans-8 Num_Peri-32 Num_Events-32 [ 0.326370] highmem bounce pool size: 64 pages [ 0.326563] ashmem: initialized [ 0.334795] fuse init (API version 7.16) [ 0.335137] msgmni has been set to 688 [ 0.335776] io scheduler noop registered [ 0.335789] io scheduler deadline registered [ 0.335845] io scheduler cfq registered (default) [ 0.336711] value1 = 0, value2 = 1, type = 0x1 [ 0.590044] (s3cfb_cfg_gpio, 96): BK_VDD_ON [ 0.695084] (s3cfb_cfg_gpio, 118): LCD_PWDN ON
第三部分:Android部分啟動
Android的啟動過程是從進程init開始的,所以它是后續所有進程的祖先進程。(system/core/init)
1.重新設置子進程終止時信號SIGCHLD的處理函數。
2. 將kernel啟動過程中建立好的文件系統框架mount到相應目錄。
3.open_devnull_stdio(),將init進程的標准輸入、輸出、出錯設備設置為新建的設備節點/dev/__null__。
4.log_init(),創建並打開設備節點/dev/__kmsg__。
5.讀取並解析rc配置文件。
先從文件/sys/class/BOOT/BOOT/boot/boot_mode讀出啟動方式:Factory Mode, '4';ATE Factory Mode, '6'。看是否是facatory模式。
如果是的話,需要讀取並解析兩個文件:init.factory.rc和init.rc。
如果是正常啟動,則暫時先讀取init.rc。
這里在讀取解析文件的時候,是以行為最小可執行單位在解析。關於書寫init.rc文件的初始化腳本語言的規則,可以上網查找。
解析之后並不會馬上執行,而是在init進入服務循環之前統一根據其命令本身所帶的條件來執行。
6.導入kernel的cmdline,也就是u-boot傳遞給kernel的參數
查看其中是否具有androidboot.xxx(androidboot.mode、androidboot.hardware等)參數,
如果有,將其保存在同名字的xxx(mode、hardware)全局變量中。
這里特別說明的是hardware這個參數,從kernel中導出一部分之后,又要從/proc/cpuinfo中導出一部分來組合成完整的hardware參數,因為后面接下來會讀取並解析以特定平台的rc文件。
7.讀取特定平台相關的initrc文件,如:init.mt6516.rc。
對於service,這里會給每個服務建立一個struct service的結構體,全部掛入鏈表service_list之中,在init最后才啟動。
8.檢查解析出來的所有命令行當中是否有屬於early-init的,如果有,將其提出來加入到鏈表action_queue之中,馬上將其執行掉。
9.device_init()函數將會打開uevent的netlink socket,遍歷/sys/class、/sys/block、/sys/devices目錄,
檢查各級目錄的uevent文件,處理在vold服務起來之前由kernel所發出來的device add, remove等事件。
10.property_init(), 顧名思義,是屬性初始化。首先創建一個名字為system_properties的匿名共享內存區域,對並本init進程做mmap讀寫映射,其余共享它的進程只有讀的權限。
然后將這個prop_area結構體通過全局變量__system_property_area__傳遞給property services。
接着調用函數load_properties_from_file(PROP_PATH_RAMDISK_DEFAULT)從/default.prop文件中加載編譯時生成的屬性。
11.如果在root目錄下有initlogo.rle文件存在,這個是兩張android字樣的縷空圖片,將其讀入fb中顯示到LCD上。同時也要往串口上輸出"
12.設置相應的屬性。
13.開始執行以init為trigger的命令行。
14.啟動屬性服務:property_set_fd = start_property_service();
15.創建一對socket,用來做信號方面的處理。
16.執行eraly-boot和boot為trigger的命令。
17.執行init.rc中以property:開頭的屬性設置語句,同時使能屬性觸發方式。
18.利用poll機制監聽前面創建的幾個fd的動態。
19.nit中啟動的各種服務
詳細請參考:http://blog.csdn.net/lizhiguo0532/article/details/7028910
Android啟動圖示:
Android啟動時串口調試信息如下:
[ 0.700601] CPU type: [ 0.700612] Exynos 4412 [ 0.700623] value1 = 0, value2 = 1, type = 0x1 [ 0.710886] parent clock: 800000000, vclk: 62496000, vclk div: 13 [ 0.960563] (s3cfb_backlight_on, 361): LCD_PWM_ON [ 0.965577] (s3cfb_backlight_on, 430): VGA_EN_ON [ 0.965596] s3cfb s3cfb.0: registered successfully [ 0.966251] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 1.290258] s5pv210-uart.0: ttySAC0 at MMIO 0x13800000 (irq = 16) is a S3C6400/10 [ 1.370063] s5pv210-uart.1: ttySAC1 at MMIO 0x13810000 (irq = 20) is a S3C6400/10 [ 1.450061] s5pv210-uart.2: ttySAC2 at MMIO 0x13820000 (irq = 24) is a S3C6400/10 [ 2.465477] console [ttySAC2] enabled [ 2.510061] s5pv210-uart.3: ttySAC3 at MMIO 0x13830000 (irq = 28) is a S3C6400/10 [ 2.591003] SI GPS Initialize [ 2.592759] max485_ctl Initialize [ 2.596064] leds Initialize [ 2.598692] leds:register device success! [ 2.602577] leds_test_delay_run [ 4.203173] leds_test_delay_over [ 4.205188] buzzer_ctl initialized [ 4.208437] exynos_adc_probe, 124 [ 4.211617] exynos_adc_probe, 134 [ 4.215024] exynos_adc_probe, 136 [ 4.218198] adc initialized [ 4.221242] relay_ctl initialized [ 4.230393] brd: module loaded [ 4.235021] loop: module loaded [ 4.236723] pmem: 0 init [ 4.239498] pmem_gpu1: 0 init [ 4.248745] CAN device driver interface [ 4.251129] PPP generic driver version 2.4.2 [ 4.255735] usbcore: registered new interface driver dm9601 [ 4.261062] usbcore: registered new interface driver dm9620 [ 4.266636] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 4.273105] [ 4.273108] [ 4.273111] [usb_host_phy_init]++++++++++++++ [ 4.280546] s5p-ehci s5p-ehci: S5P EHCI Host Controller [ 4.285597] s5p-ehci s5p-ehci: new USB bus registered, assigned bus number 1 [ 4.292721] s5p-ehci s5p-ehci: irq 134, io mem 0x12580000 [ 4.305040] s5p-ehci s5p-ehci: USB 0.0 started, EHCI 1.00 [ 4.309067] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice=0300 [ 4.317143] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 4.324344] usb usb1: New USB device Class: Class=9, SubClass=0, Protocol=0 [ 4.331287] usb usb1: Product: S5P EHCI Host Controller [ 4.336494] usb usb1: Manufacturer: Linux 3.0.15 ehci_hcd [ 4.341874] usb usb1: SerialNumber: s5p-ehci [ 4.346608] hub 1-0:1.0: USB hub found [ 4.349858] hub 1-0:1.0: 3 ports detected [ 4.354415] usbcore: registered new interface driver cdc_acm [ 4.359496] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters [ 4.367480] Initializing USB Mass Storage driver... [ 4.372471] usbcore: registered new interface driver usb-storage [ 4.378331] USB Mass Storage support registered. [ 4.383157] usbcore: registered new interface driver usbserial [ 4.388747] usbserial: USB Serial Driver core [ 4.393181] USB Serial support registered for GSM modem (1-port) [ 4.399222] usbcore: registered new interface driver option [ 4.404632] option: v0.7.2:USB Driver for GSM modems [ 4.409779] s3c-udc : S3C HS USB OTG Device Driver,(c) 2008-2009 Samsung Electronics [ 4.409785] s3c-udc : version 15 March 2009 [ 4.423369] android_usb gadget: Mass Storage Function, version: 2009/09/11 [ 4.428783] android_usb gadget: Number of LUNs=3 [ 4.433381] lun0: LUN: removable file: (no medium) [ 4.438241] lun1: LUN: removable file: (no medium) [ 4.443101] lun2: LUN: removable file: (no medium) [ 4.448211] android_usb gadget: android_usb ready [ 4.452833] mousedev: could not register psaux device, error: -16 [ 4.458726] mousedev: PS/2 mouse device common for all mice [ 4.464915] input: gpio-keys as /devices/platform/gpio-keys/input/input0 [ 4.471583] input: samsung-keypad as /devices/platform/samsung-keypad/input/input1 [ 4.478872] usbcore: registered new interface driver xpad [ 4.484008] usbcore: registered new interface driver usb_acecad [ 4.489800] acecad: v3.2:USB Acecad Flair tablet driver [ 4.495119] usbcore: registered new interface driver aiptek [ 4.500564] aiptek: v2.3 (May 2, 2007):Aiptek HyperPen USB Tablet Driver (Linux 2.6.x) [ 4.508460] aiptek: Bryan W. Headley/Chris Atenasio/Cedric Brun/Rene van Paassen [ 4.515943] usbcore: registered new interface driver gtco [ 4.521238] GTCO usb driver version: 2.00.0006 [ 4.525580] usbcore: registered new interface driver hanwang [ 4.531397] usbcore: registered new interface driver kbtab [ 4.536759] kbtab: v0.0.2:USB KB Gear JamStudio Tablet driver [ 4.542593] usbcore: registered new interface driver wacom [ 4.547960] wacom: v1.52:USB Wacom tablet driver [ 4.552801] tsc2007 7-0048: i2c io error: -6 [ 4.556950] tsc2007 7-0048: i2c io error: -6 [ 4.561192] tsc2007 7-0048: i2c io error: -6 [ 4.565445] tsc2007 7-0048: i2c io error: -6 [ 4.569685] tsc2007 7-0048: i2c io error: -6 [ 4.573952] tsc2007 7-0048: i2c io error: -6 [ 4.578984] S3C24XX RTC, (c) 2004,2006 Simtec Electronics [ 4.583514] s3c-rtc s3c64xx-rtc: rtc disabled, re-enabling [ 4.588958] Begin gettime................... [ 4.593183] s3c_rtc_gettime() 2064-25-44 45:85:59 [ 4.598222] using rtc device, s3c, for alarms [ 4.602053] s3c-rtc s3c64xx-rtc: rtc core: registered s3c as rtc0 [ 4.608466] I found You!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [ 7.613770] -----time:s5m_rtc_read_time: 2018/2/20 4:44:44(2) [ 8.617588] Alrm-----------------s5m_rtc_read_alarm: 2000/0/1 0:0:0(-1) [ 8.624267] -----time:s5m_rtc_read_time: 2018/2/20 4:44:45(2) [ 9.627158] s5m-rtc s5m-rtc: rtc core: registered s5m-rtc as rtc1 [ 9.632180] s5m-rtc s5m-rtc: RTC CHIP NAME: s5m-rtc [ 9.636650] The Over------------------------------------------------------------------------------------- [ 10.644544] i2c /dev entries driver [ 10.647643] Linux media interface: v0.10 [ 10.650947] lirc_dev: IR Remote Control driver registered, major 251 [ 10.657063] IR NEC protocol handler initialized [ 10.661573] IR RC5(x) protocol handler initialized [ 10.666347] IR RC6 protocol handler initialized [ 10.670860] IR JVC protocol handler initialized [ 10.675373] IR Sony protocol handler initialized [ 10.679964] IR RC5 (streamzap) protocol handler initialized [ 10.685531] IR LIRC bridge handler initialized [ 10.689946] Linux video capture interface: v2.00 [ 10.694645] ov5640_module_init [ 10.698359] s3c-csis: Samsung MIPI-CSIS0 driver probed successfully [ 10.703872] s3c-csis: Samsung MIPI-CSIS1 driver probed successfully [ 10.710206] Initialize JPEG driver [ 10.713717] s5p-jpeg s5p-jpeg: JPEG driver is registered to /dev/video12 [ 10.720302] s5p-jpeg s5p-jpeg: JPEG driver is registered to /dev/video11 [ 10.727039] i2c i2c-0: attached s5p_ddc into i2c adapter successfully [ 10.733369] i2c-core: driver [s5p_ddc] using legacy suspend method [ 10.739435] i2c-core: driver [s5p_ddc] using legacy resume method [ 10.745514] S5P HPD Driver, (c) 2009 Samsung Electronics [ 10.751176] S5P CEC Driver, (c) 2009 Samsung Electronics [ 10.756939] MFC(Multi Function Codec - FIMV v5.x) registered successfully [ 10.763337] Samsung Graphics 2D driver, (c) 2011 Samsung Electronics [ 10.769689] Mali: init_mali_clock mali_clock c08f6cc4 [ 10.777020] Mali: failed to get cpufreq level for 1200MHzMali: Mali device driver loaded [ 10.794227] usbcore: registered new interface driver uvcvideo [ 10.799744] USB Video Class driver (v1.1.0) [ 10.804024] S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics [ 10.810135] s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled [ 10.818121] device-mapper: uevent: version 1.0.3 [ 10.822360] device-mapper: ioctl: 4.20.0-ioctl (2011-02-02) initialised: dm-devel@redhat.com [ 10.830495] Bluetooth: HCI UART driver ver 2.2 [ 10.834886] Bluetooth: HCI H4 protocol initialized [ 10.839672] Bluetooth: HCI BCSP protocol initialized [ 10.844618] Bluetooth: HCILL protocol initialized [ 10.849305] Bluetooth: HCIATH3K protocol initialized [ 10.854881] cpuidle: using governor ladder [ 10.859233] cpuidle: using governor menu [ 10.862337] mshci: Mobile Storage Host Controller Interface driver [ 10.868402] mshci: Copyright (c) 2011 Samsung Electronics Co., Ltd [ 10.874644] clock source 0: sclk_dwmci (160000000 Hz) [ 10.879605] dw_mmc dw_mmc: clock source 0: sclk_dwmci (160000000 Hz) [ 10.886164] mmc0: Version ID 0x5342240a. [ 10.889830] mjdbg: cmu_max_clcok:800000000 [ 10.893921] mjdbg: host->max_clk: 800000000 [ 10.898303] mmc0: FIFO WMARK FOR RX 0x11 WX 0x1. ########### [ 10.906124] mmc0: MSHCI controller on samsung-mshci [dw_mmc] using IDMA [ 10.911462] sdhci: Secure Digital Host Controller Interface driver [ 10.917435] sdhci: Copyright(c) Pierre Ossman [ 10.922782] mmc0:mshci_set_clock, 400000@ration:4,11[mjdbg] cmu_set_clock: 400000 [ 10.929332] s3c-sdhci s3c-sdhci.2: clock source 0: sclk_mmc (10666666 Hz) [ 10.936047] mmc1: no vmmc regulator found [ 10.940037] *******mmc0: inserted!!!!!****** [ 10.940190] mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.2] using ADMA [ 10.940203] wake enabled for irq 359 [ 10.940446] s3c-sdhci s3c-sdhci.3: clock source 0: sclk_mmc (10666666 Hz) [ 10.940471] sdhci_s3c_probe: set MMC_PM_IGNORE_PM_NOTIFY for mmc2 pm_flags [ 10.940478] sdhci_s3c_probe: set MMC_PM_KEEP_POWER | MMC_PM_WAKE_SDIO_IRQ for mmc2 pm_caps [ 10.940498] mmc2: no vmmc regulator found [ 10.940689] mmc2: SDHCI controller on samsung-hsmmc [s3c-sdhci.3] using ADMA [ 10.946509] usbcore: registered new interface driver usbhid [ 10.946516] usbhid: USB HID core driver [ 10.947321] logger: created 256K log 'log_main' [ 10.947461] logger: created 256K log 'log_events' [ 10.947606] logger: created 256K log 'log_radio' [ 10.947753] logger: created 256K log 'log_system' [ 10.948354] GPS: mt3326_gps_power: Switching GPS device on [ 10.948362] GPS: mt3326_gps_power: ignore power control: 1 [ 10.948369] GPS: mt3326_gps_probe: Registering chardev [ 10.948376] GPS: mt3326_gps_probe: major: 249, minor: 0 [ 10.948631] GPS: mt3326_gps_probe: Done [ 10.949893] Samsung Audio Subsystem Driver, (c) 2011 Samsung Electronics [ 10.949953] audss_init: RCLK SRC[busclk] [ 11.053233] mmc0: cmd 52 response timeout error [ 11.059167] mmc0: cmd 52 response timeout error [ 11.074324] mmc0: cmd 8 response timeout error [ 11.079400] asoc: wm8960-hifi <-> samsung-i2s.0 mapping ok [ 11.083424] mmc0: cmd 5 response timeout error [ 11.089454] Samsung SRP driver, (c) 2010 Samsung Electronics [ 11.093650] mmc0: cmd 5 response timeout error [ 11.099873] mmc0: cmd 5 response timeout error [ 11.104647] mmc0: cmd 5 response timeout error [ 11.109435] mmc0: cmd 55 response timeout error [ 11.114312] mmc0: cmd 55 response timeout error [ 11.119184] mmc0: cmd 55 response timeout error [ 11.124052] mmc0: cmd 55 response timeout error [ 11.132033] SRP: Driver successfully probed [ 11.134928] ALSA device list: [ 11.137710] #0: TOPEET-WM8960 [ 11.140947] GACT probability NOT on [ 11.144297] Mirror/redirect action on [ 11.147953] u32 classifier [ 11.150639] Actions configured [ 11.154016] Netfilter messages via NETLINK v0.30. [ 11.158777] nf_conntrack version 0.5.0 (10100 buckets, 40400 max) [ 11.165613] ctnetlink v0.93: registering with nfnetlink. [ 11.170138] NF_TPROXY: Transparent proxy support initialized, version 4.1.0 [ 11.177066] NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd. [ 11.183099] xt_time: kernel timezone is -0000 [ 11.188633] ip_tables: (C) 2000-2006 Netfilter Core Team [ 11.192655] arp_tables: (C) 2002 David S. Miller [ 11.197162] TCP cubic registered [ 11.201199] NET: Registered protocol family 10 [ 11.203347] mmc0:mshci_set_clock, 50000000@ration:4,11[mjdbg] cmu_set_clock: 50000000 [ 11.215858] Mobile IPv6 [ 11.216850] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 11.222463] IPv6 over IPv4 tunneling driver [ 11.230913] NET: Registered protocol family 17 [ 11.231511] mmc0: new high speed DDR MMC card at address 0001 [ 11.239693] NET: Registered protocol family 15 [ 11.244078] can: controller area network core (rev 20090105 abi 8) [ 11.244112] mmcblk0: mmc0:0001 4YMD3R 3.64 GiB [ 11.254848] NET: Registered protocol family 29 [ 11.259204] can: raw protocol (rev 20090105) [ 11.259226] mmcblk0: p1 p2 p3 p4 [ 11.266785] Bluetooth: RFCOMM TTY layer initialized [ 11.271605] Bluetooth: RFCOMM socket layer initialized [ 11.276685] Bluetooth: RFCOMM ver 1.11 [ 11.280417] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 11.285710] Bluetooth: BNEP filters: protocol multicast [ 11.290944] NET: Registered protocol family 35 [ 11.295062] *******mmc2: inserted!!!!!****** [ 11.300641] EXYNOS4X12: Adaptive Support Voltage init [ 11.304623] EXYNOS4X12: IDS : 9 HPM : 16 RESULT : 2 [ 11.309501] ************ exynos4x12_set_abb:0x0, 0x0, 0x0, 0x0, 0x80000088 [ 11.316355] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 [ 11.323999] Registering SWP/SWPB emulation handler [ 11.328769] DVFS : VDD_ARM Voltage table set with 2 Group [ 11.334145] exynos4x12_cpufreq_init:topeet pop [ 11.338949] DVFS : VDD_INT Voltage table set with 2 Group [ 11.340080] *******mmc2: inserted!!!!!****** [ 11.385093] *******mmc2: inserted!!!!!****** [ 11.410199] exynos4_integrated_dvfs_hotplug_init, max(1400000),min(200000) [ 11.419158] regulator_init_complete: VDD18_MIPI: incomplete constraints, leaving on [ 11.427135] regulator_init_complete: VDD10_MIPI: incomplete constraints, leaving on [ 11.433795] regulator_init_complete: VDD18_2M: incomplete constraints, leaving on [ 11.435150] *******mmc2: inserted!!!!!****** [ 11.451794] regulator_init_complete: vdd_int range: incomplete constraints, leaving on [ 11.458720] regulator_init_complete: vdd_arm range: incomplete constraints, leaving on [ 11.466619] regulator_init_complete: vdd_mif range: incomplete constraints, leaving on [ 11.474585] USB_DEVICE_ATTACHED [ 11.478484] exynos_usb_Device: Exynos USB Device Driver [ 11.482408] value1 = 0, value2 = 1, type = 0x1 [ 11.491830] ==ft5x0x_ts_init: reset== [ 11.820044] usb 1-3: new high speed USB device number 2 using s5p-ehci [ 11.955411] usb 1-3: New USB device found, idVendor=0424, idProduct=3503, bcdDevice=a1a0 [ 11.962042] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0 [ 11.969160] usb 1-3: New USB device Class: Class=9, SubClass=0, Protocol=2 [ 11.976587] hub 1-3:1.0: USB hub found [ 11.979889] hub 1-3:1.0: 3 ports detected [ 12.025303] input: ft5x0x_ts as /devices/virtual/input/input2 [ 12.035634] ft5x0x_ts 3-0038: Firmware version 0x06 [ 12.039038] ft5x0x_ts 3-0038: FocalTech ft5x0x TouchScreen initialized [ 12.046790] -----time:s5m_rtc_read_time: 2018/2/20 4:44:48(2) [ 12.265183] usb 1-3.2: new high speed USB device number 3 using s5p-ehci [ 12.375383] usb 1-3.2: config 1 interface 0 altsetting 0 endpoint 0x83 has an invalid bInterval 0, changing to 9 [ 12.467776] usb 1-3.2: New USB device found, idVendor=0a46, idProduct=9621, bcdDevice=0101 [ 12.474586] usb 1-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 12.495019] usb 1-3.2: New USB device Class: Class=0, SubClass=0, Protocol=0 [ 12.505883] dm962x: dm_read_reg() 0x29 0x0a [ 12.508757] dm962x: dm_read_reg() 0x28 0x46 [ 12.512884] dm962x: dm_read_reg() 0x2b 0x96 [ 12.517008] dm962x: dm_read_reg() 0x2a 0x21 [ 12.521260] dm962x: dm_read_reg() 0xF2 0x00 [ 12.525266] dm962x: [Analysis.2] 0xF2, D[7] 0 OK [ 12.529941] dm962x: [Analysis.2] 0xF2, D[6] 0 OK [ 12.534639] dm962x: [Analysis.2] 0xF2, D[5] 0 EP1: Empty [ 12.540022] dm962x: [Analysis.2] 0xF2, D[3] 0 OK [ 12.544697] dm962x: [Analysis.2] 0xF2, D[2] 0 OK [ 12.549395] dm962x: [Analysis.2] 0xF2, D[1] 0 OK [ 12.554082] dm962x: [Analysis.2] 0xF2, D[0] 0 Status: TX buffer 0 pkts [ 12.566384] dm962x: ethernet MAC address 00:00:ff:ff:00:00 (chip) [ 12.571383] dm962x: 9620 Mode = 128 [ 12.588122] dm9620 1-3.2:1.0: eth0: register 'dm9620' at usb-s5p-ehci-3.2, Davicom DM9620 USB Ethernet, 00:00:ff:ff:00:00 [ 13.087605] Begin settime....................................................................... [ 13.094937] s3c_rtc_settime() 2018-2-20 4:44:48 [ 13.099450] writeb is Over................. [ 13.103447] settime---------s5m_rtc_set_time: 2018/2/20 4:44:48(2) [ 13.135058] s5m-rtc s5m-rtc: setting system clock to 2018-02-20 04:44:48 UTC (1519101888) [ 13.142183] FIMC0 registered successfully [ 13.146186] FIMC1 registered successfully [ 13.150028] FIMC2 registered successfully [ 13.154005] FIMC3 registered successfully [ 13.157928] S5P TVOUT Driver v3.0 (c) 2010 Samsung Electronics [ 13.189955] Freeing init memory: 220K [ 13.201285] init: init.wireless.rc: 136: invalid option 'chmod' [ 13.205801] init: init.wireless.rc: 172: ignored duplicate definition of service 'hfag' [ 13.213739] init: init.wireless.rc: 178: ignored duplicate definition of service 'hsag' [ 13.221725] init: init.wireless.rc: 184: ignored duplicate definition of service 'opush' [ 13.229797] init: init.wireless.rc: 190: ignored duplicate definition of service 'pbap' [ 13.237890] init: /init.smdk4x12.rc: 16: ignored duplicate definition of service 'console' [ 13.246148] init (1): /proc/1/oom_adj is deprecated, please use /proc/1/oom_score_adj instead. [ 13.264185] MFC F/W loaded successfully (size: 360008) [ 13.411506] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) [ 13.591579] EXT4-fs (mmcblk0p3): warning: checktime reached, running e2fsck is recommended [ 13.600903] EXT4-fs (mmcblk0p3): recovery complete [ 13.606571] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: discard,noauto_da_alloc,nodelalloc [ 13.645873] EXT4-fs (mmcblk0p4): warning: checktime reached, running e2fsck is recommended [ 13.655171] EXT4-fs (mmcblk0p4): recovery complete [ 13.660863] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: nomblk_io_submit [ 13.698460] [HIF-SDIO][I]hif_sdio_init:start! [ 13.701609] [HIF-SDIO][I]hif_sdio_init:sdio_register_driver() ret=0 [ 13.738137] mtk_stp_wmt: module license 'Proprietary' taints kernel. [ 13.743099] Disabling lock debugging due to kernel taint [ 13.766663] [WMT-DEV][I]WMT_init:WMT Version= Combo WMT Driver - v4.0 DATE=2012/08/16 [ 13.773093] [PSM][I]stp_psm_init: psm init (0xbf0330e4, 5128) [ 13.778931] [PSM][I]_stp_psm_init_monitor: init monitor [ 13.784188] [STPDbg]stp_dbg_init: stp-dbg init [ 13.788474] [STP-C][I]mtk_wcn_stp_dbg_enable:STP dbg mode is turned on [ 13.794958] [WMT-DEV][I]WMT_init:driver(major 190) installed [ 13.800682] [WMT-DEV][I]wmt_dev_read_file:open (/system/etc/firmware/WMT.cfg) O_RDONLY, 0 [ 13.814102] [WMT-CONF][I]wmt_conf_read_file:get full file name(/system/etc/firmware/WMT.cfg) buf(0xefec3000) size(673) [ 13.823821] [WMT-CONF][I]wmt_conf_read_file:&gDevWmt.rWmtGenConf=bf02f9bc [ 13.830275] [WMT-LIB][I]wmt_lib_init:set pwr on seq par to hw conf [ 13.836332] [WMT-LIB][I]wmt_lib_init:ldo(0)rst(0)on(0)off(0)rtc(0) [ 13.842506] [WMT-CMB-HW][I]mtk_wcn_cmb_hw_init:use default hw init sequence parameters [ 13.850382] [WMT-CMB-HW][I]mtk_wcn_cmb_hw_dmp_seq:combo chip power on sequence time, RTC (100), LDO (100), RST(30), OFF(10), ON(30) [ 13.862180] [WMT-PLAT][I]wmt_plat_init:set g_bgf_irq(372) [ 13.867554] [WMT-LIB][I]wmtd_thread:wmtd thread starts [ 13.872695] [WMT-DEV][I]WMT_init:success [ 13.882238] [STP-U][I]mtk_wcn_stp_uart_init:MTK STP UART driver [ 13.891842] mtk_stp_GPS_chrdev driver(major 191) installed. [ 13.905334] [HCI-STP][I]hci_stp_init:HCI STP driver ver 2.0, hdev(0xd485c800), init done [ 13.930665] [D_INIT]mt_fm_probe() [ 13.932515] [D_MAIN]alloc fm:193:0 [ 13.936064] [D_INIT]create_proc_entry success [ 13.940255] [D_INIT]create_config_entry success [ 13.944747] [D_INIT]******fm config info****** [ 13.949188] [D_INIT]***chip: MT6620 [ 13.952747] [D_INIT]***band: 1 [ 13.955871] [D_INIT]***freq_min: 875 [ 13.959503] [D_INIT]***freq_max: 1080 [ 13.963248] [D_INIT]***scan_tbl: 40 [ 13.966806] [D_INIT]***space: 1 [ 13.970022] [D_INIT]***rssi_long: 0x0301 [ 13.973999] [D_INIT]***rssi_short: 0x02e0 [ 13.978091] [D_INIT]***CQI: 0x00e9 [ 13.981562] [D_INIT]******fm config end****** [ 13.990254] [D_INIT]mtk_fm_probe, FM probe ... [ 13.993229] [D_INIT]fm_priv_register(), [pri=0xd6041ed8][op=0xbf0afd84] [ 13.999852] [D_INIT]init, FM init ok [ 14.003396] [D_INIT]mtk_fm_probe, FM probe ok [ 14.012069] [MTK-WIFI] WIFI_init: mtk_wmt_WIFI_chrdev driver(major 194) installed. [ 14.239239] [HIF-SDIO][I]mtk_wcn_hif_sdio_client_reg:start! [ 14.258310] init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery' [ 14.267461] adb_bind_config [ 14.270339] adb_open [ 14.271089] ADB open:/system/bin/sh: No controlling tty (open /dev/tty: No such device or [ 14.396445] [WMT-DEV][I]WMT_open:major 190 minor 0 (pid 1257) [ 14.402289] [WMT-DEV][I]WMT_open:1st call (400) [ 14.407010] [mtk_wcn_stp_set_if_tx_type] set STP_IF_TX to UART. address) /syst[ 14.413789] [WMT-LIB][I]wmt_lib_set_hif:new hifType:0, fcCtrl:0, baud:921600, fm:2 [ 14.422109] [WMT-C][I]opfunc_hif_conf:WMT HIF info added em/bin/sh: warning: won't have full job control [ 14.516143] warning: `rild' uses 32-bit capabilities (legacy support in use) root@android:/ # [ 15.041107] s3c-fimc3: FIMC3 1 opened. [ 15.673835] s3cfb s3cfb.0: [fb0] dma: 0x690c4000, cpu: 0xf0cff000, size: 0x007d0000 [ 15.686073] s3cfb s3cfb.0: [fb1] dma: 0x69894000, cpu: 0xf14d0000, size: 0x007d0000 [ 15.699196] s3c-fimc3: FIMC3 2 opened. [ 16.775048] Mali: :::exynos_result_of_asv : 2 [ 16.777929] Mali: mali_dvfs[0].vol = 900000 [ 16.782265] Mali: :::exynos_result_of_asv : 2 [ 16.787742] Mali: mali_dvfs[1].vol = 925000 [ 16.790639] Mali: :::exynos_result_of_asv : 2 [ 16.794945] Mali: mali_dvfs[2].vol = 1000000 [ 16.794954] Mali: :::exynos_result_of_asv : 2 [ 16.794960] Mali: mali_dvfs[3].vol = 1050000 [ 23.461949] request_suspend_state: wakeup (3->0) at 23461915637 (2018-02-20 04:44:58.817585256 UTC) [ 23.723250] acc_open [ 23.723969] acc_release [ 28.460143] CPU1: shutdown [ 28.958936] CPU2: shutdown [ 31.157062] CPU3: shutdown
至此Android已成功啟動,可以說Android系統是跑在Linux內核上的巨大的一個應用程序!