Galaxy Nexus (I9250) Serial Console¶
See SamsungSerial for the hardware setup.
Without patching the kernel on Replicant 6¶
Adding loglevel=8 fiq_debugger.console_enable=1 fiq_debugger.no_sleep=1
to the kernel command line enables to see some of the boot of the kernel without having to recompile the kernel.
Though it requires to repack a boot.img to add the commandline arguments.
IMAGE ?= boot.img EXTRA_CMDLINE ?= loglevel=8 fiq_debugger.console_enable=1 fiq_debugger.no_sleep=1 .PHONY: $(IMAGE) flash $(IMAGE): unbootimg --kernel kernel \ --ramdisk ramdisk \ -i ../$(IMAGE) mkbootimg \ --kernel kernel \ --ramdisk ramdisk \ --base 0x80000000 \ --cmdline "androidboot.hardware=tuna ${EXTRA_CMDLINE}" \ -o $(IMAGE) flash: fastboot flash boot $(IMAGE) fastboot flash recovery $(IMAGE) fastboot boot $(IMAGE)
At boot we then have the following:
[sbl_board_charger_init_post] : Succeed set model data : 0x78!!!!! ====== VCELL : 402500, SOC : 92, nType : 4 ====== [Charger] nScaledVCELL : 402500000, nDesriedSOC, : 90, nMaxSOC : 110, nMinSOC : 70 [ omap_power_get_reset_source :47] PRM_RSTST : 0x1 [ __omap_usbacc_test_donwload_by_musb :280] nDeviceType : 0x4 [ omap_usbacc_get_reboot_reason :333] nJigStatus = 0x00000001 [ __sbl_board_hw_init_late :706] final reboot mode in cable = 0x20000 [ __sbl_board_hw_init_late :717] Wake up by TA / USB / JIG * FB base addr = 0xbea70000! * PANEL_S6E8AA0_ID_READ : 0x12, 0x8e, 0x9b. [ omap_power_get_reset_source :47] PRM_RSTST : 0x1 message.command = message.status = message.recovery = �<hit enter to activate fiq debugger> [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 3.0.101-replicant (wolfi@machinist) (gcc version 5.4.1 20160919 (15:5.4.1+svn241155-1) ) #1 SMP PREEMPT Sun Dec 10 11:40:22 UTC 2017 [ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d [ 0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine: Tuna [ 0.000000] android_display: setting default resolution 720*1280, bpp=4 [ 0.000000] android_display: tiler1d 29491200 [ 0.000000] android_display: setting fb0.vram to 7864320 [ 0.000000] android_display: setting vram to 7864320 at address 0xbea00000 [ 0.000000] android_display: ion carveouts: 104726528 tiler2d, 0 nonsecure [ 0.000000] omap4_total_ram_size = 0x40000000 [ 0.000000] omap4_smc_size = 0x300000 [ 0.000000] omap4_ion_heap_secure_input_size = 0x900000 [ 0.000000] omap4_ion_heap_secure_output_wfdhdcp_size = 0x0 [ 0.000000] omap4_ducati_heap_size = 0x6900000 [ 0.000000] omap4_ion_heap_tiler_mem_size = 0x0 [ 0.000000] omap4_ion_heap_nonsec_tiler_mem_size = 0x0 [ 0.000000] omap4_smc_addr = 0xbfd00000 [ 0.000000] omap4_ion_heap_secure_input_addr = 0xba300000 [ 0.000000] omap4_ion_heap_secure_output_wfdhdcp_addr = 0xba300000 [ 0.000000] omap4_ducati_heap_addr = 0xb3a00000 [ 0.000000] omap4_ion_heap_tiler_mem_addr = 0xb3a00000 [ 0.000000] omap4_ion_heap_nonsec_tiler_mem_addr = 0xb3a00000 [ 0.000000] Reserving CMA IPU + RPMSG region at address = 0xb3800000 with size = 0x7800000 [ 0.000000] cma: CMA: reserved 120 MiB at b3800000 [ 0.000000] CMA RPMSG region: address = 0xb3a00000, size = 0x8c000 [ 0.000000] CMA IPU region: address = 0xb3a8c000, size = 0x7174000 [ 0.000000] omap_ion_init: secure_input id=2 [ba300000-bac00000] size=900000 [ 0.000000] omap_ion_init: secure_output_wfdhdcp id=5 [ba300000-ba300000] size=0 [ 0.000000] omap_ion_init: tiler id=1 [b3a00000-b3a00000] size=0 [ 0.000000] omap_ion_init: nonsecure_tiler id=3 [b3a00000-b3a00000] size=0 [ 0.000000] omap_ion_init: system id=0 [0-0] size=0 [ 0.000000] omap_ion_init: tiler_reservation id=4 [0-0] size=0 [ 0.000000] Reserving 8388608 bytes SDRAM for VRAM [ 0.000000] Memory policy: ECC disabled, Data cache writealloc [ 0.000000] OMAP4460 ES1.1 [ 0.000000] SRAM: Mapped pa 0x4030d000 to va 0xfe40d000 size: 0x1000 [ 0.000000] On node 0 totalpages: 259584 [ 0.000000] free_area_init_node: node 0, pgdat c09580a0, node_mem_map c09e3000 [ 0.000000] Normal zone: 256 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 32512 pages, LIFO batch:7 [ 0.000000] HighMem zone: 1792 pages used for memmap [ 0.000000] HighMem zone: 225024 pages, LIFO batch:31 [ 0.000000] PERCPU: Embedded 7 pages/cpu @c11ea000 s7744 r8192 d12736 u32768 [ 0.000000] pcpu-alloc: s7744 r8192 d12736 u32768 alloc=8*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 257536 [ 0.000000] Kernel command line: console=ttyFIQ0 androidboot.console=ttyFIQ0 mem=1G vmalloc=768M omap_wdt.timer_margin=30 no_console_suspend androidboot.hardware=tuna loglevel=8 fiq_debugger.console_enable=1 fiq_debugger.no_sleep=1 androidboot.serialno=016B756D14021016 androidboot.bootloader=PRIMELA03 androidboot.baseband=I9250XXLA2 lcd_bootfb=0xbea70000 mms_ts.panel_id=18 androidboot.macaddr= [ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes) [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) [ 0.000000] allocated 4194304 bytes of page_cgroup [ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups [ 0.000000] Memory: 512MB 488MB 14MB = 1014MB total [ 0.000000] Memory: 891864k/891864k available, 156712k reserved, 784384K highmem [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) [ 0.000000] DMA : 0xff000000 - 0xffe00000 ( 14 MB) [ 0.000000] vmalloc : 0xc8800000 - 0xf8000000 ( 760 MB) [ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .init : 0xc0008000 - 0xc0068000 ( 384 kB) [ 0.000000] .text : 0xc0068000 - 0xc08f0000 (8736 kB) [ 0.000000] .data : 0xc08f0000 - 0xc095a400 ( 425 kB) [ 0.000000] .bss : 0xc095a424 - 0xc09e2cf0 ( 547 kB) [ 0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] NR_IRQS:410 [ 0.000000] omap_hwmod: dpll_mpu_m2_ck: missing clockdomain for dpll_mpu_m2_ck. [ 0.000000] OMAP clockevent source: GPTIMER1 at 32768 Hz [ 0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms [ 0.000061] Calibrating delay loop... 1194.24 BogoMIPS (lpj=4665344) [ 0.015686] pid_max: default: 32768 minimum: 301 [ 0.070648] Security Framework initialized [ 0.070648] SELinux: Initializing. [ 0.070648] SELinux: Starting in permissive mode [ 0.070648] Mount-cache hash table entries: 512 [ 0.070648] Initializing cgroup subsys debug [ 0.070648] Initializing cgroup subsys cpuacct [ 0.070648] Initializing cgroup subsys memory [ 0.071960] Initializing cgroup subsys freezer [ 0.071960] Initializing cgroup subsys bfqio [ 0.071990] CPU: Testing write buffer coherency: ok [ 0.071990] ftrace: allocating 23423 entries in 69 pages [ 0.099975] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available [ 0.100128] L310 cache controller enabled [ 0.100128] l2x0: 16 ways, CACHE_ID 0x410000c7, AUX_CTRL 0x5e470000, Cache size: 1048576 B [ 0.178161] CPU1: Booted secondary processor [ 0.209411] Brought up 2 CPUs [ 0.209411] SMP: Total of 2 processors activated (2388.48 BogoMIPS). [ 0.209686] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for emif_fw [ 0.213470] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l3_instr [ 0.213500] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l3_main_1 [ 0.213500] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l3_main_2 [ 0.213531] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l4_abe [ 0.213531] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l4_cfg [ 0.213562] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l4_per [ 0.213562] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l4_wkup [ 0.213592] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for mpu_private [ 0.213592] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for sl2if [ 0.213592] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for thermal_sensor [ 0.213775] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for usbhs_ehci [ 0.213775] omap_hwmod: l3_div_ck: missing clockdomain for l3_div_ck. [ 0.213775] omap_hwmod: l4_div_ck: missing clockdomain for l4_div_ck. [ 0.217193] _omap4_module_wait_ready: Timeout waiting for module enable (mcpdm_fck: clkctrl = 0x30002) [ 0.222106] omap_hwmod: mcpdm: cannot be enabled (3) [ 0.224426] print_constraints: dummy: [ 0.225006] NET: Registered protocol family 16 [ 0.231140] GPMC revision 6.0 [ 0.231140] EMIF0 is enabled with IRQ142 [ 0.231140] EMIF1 is enabled with IRQ143 [ 0.231140] Last reset was cold reset (PRM_RSTST=0x1) [ 0.232452] HSI: device registered as omap_hwmod: hsi [ 0.233001] OMAP GPIO hardware version 0.1 [ 0.233886] omap_mux_init: Add partition: #1: core, flags: 2 [ 0.235565] omap_mux_init: Add partition: #2: wkup, flags: 2 [ 0.235809] Tuna HW revision: 09 (Maguro 8th Sample), cpu OMAP4460 ES1.1 [ 0.237884] Using [ 0.241577] _omap_mux_init_gpio: Multiple gpio paths (2) for gpio102 [ 0.241577] omap_mux_init_gpio: Could not set gpio102 [ 0.242065] _omap_mux_init_gpio: Multiple gpio paths (2) for gpio101 [ 0.242095] omap_mux_init_gpio: Could not set gpio101 [ 0.242248] _omap_mux_init_gpio: Multiple gpio paths (2) for gpio100 [ 0.242309] omap_mux_init_gpio: Could not set gpio100 [ 0.242309] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers. [ 0.242950] hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step. [ 0.242950] hw-breakpoint: maximum watchpoint size is 4 bytes. [ 0.247924] OMAP DMA hardware revision 0.0 [ 0.248443] omap_rproc_get_pool: carveout memory is unavailable: 0x0, 0x0 [ 0.257873] bio: create slab <bio-0> at 0 [ 0.258270] print_constraints: vwl1271: 2000 mV [ 0.258270] i2c-core: driver [twl] using legacy suspend method [ 0.259094] i2c-core: driver [twl] using legacy resume method [ 0.259094] SCSI subsystem initialized [ 0.260345] usbcore: registered new interface driver usbfs [ 0.260833] usbcore: registered new interface driver hub [ 0.260925] usbcore: registered new device driver usb [ 0.261993] i2c-gpio i2c-gpio.5: using pins 98 (SDA) and 99 (SCL) [ 0.262237] omap_i2c omap_i2c.1: bus 1 rev4.0 at 400 kHz [ 0.262237] Skipping twl internal clock init and using bootloader value (unknown osc rate) [ 0.266479] twl6030: PIH (irq 39) chaining IRQs 368..387 [ 0.268676] print_constraints: VUSB: 3300 mV normal standby [ 0.269256] print_constraints: VMMC: 1800 mV normal standby [ 0.270019] print_constraints: VPP: 1800 <--> 2500 mV at 1900 mV normal standby [ 0.270385] print_constraints: VUSIM: 2200 mV normal standby [ 0.270385] print_constraints: VCXIO: 1800 mV normal standby [ 0.270385] print_constraints: VDAC: 1800 mV normal standby [ 0.271881] print_constraints: VAUX1_6030: 3000 mV normal standby [ 0.272674] print_constraints: VAUX2_6030: 1200 <--> 2800 mV at 1800 mV normal standby [ 0.273071] print_constraints: VAUX3_6030: 3100 mV normal standby [ 0.273925] print_constraints: VDD3: [ 0.274627] print_constraints: VMEM: at 1250 mV [ 0.275482] print_constraints: V2V1: 2100 mV normal standby [ 0.276245] print_constraints: VANA: 2100 mV normal standby [ 0.276947] print_constraints: CLK32KG: [ 0.277984] print_constraints: CLK32KAUDIO: [ 0.278198] omap_i2c omap_i2c.2: bus 2 rev4.0 at 400 kHz [ 0.278564] omap_i2c omap_i2c.3: bus 3 rev4.0 at 400 kHz [ 0.278869] omap_i2c omap_i2c.4: bus 4 rev4.0 at 400 kHz [ 0.279815] omap-rproc omap-rproc.0: dsp is available [ 0.280334] omap-rproc omap-rproc.1: ipu is available [ 0.280334] Advanced Linux Sound Architecture Driver Version 1.0.24. [ 0.280334] Bluetooth: Core ver 2.16 [ 0.280334] NET: Registered protocol family 31 [ 0.281280] Bluetooth: HCI device and connection manager initialized [ 0.281280] Bluetooth: HCI socket layer initialized [ 0.281311] Bluetooth: L2CAP socket layer initialized [ 0.281311] Bluetooth: SCO socket layer initialized [ 0.281799] cfg80211: Calling CRDA to update world regulatory domain [ 0.281951] Switching to clocksource 32k_counter [ 0.287506] Switched to NOHz mode on CPU #0 [ 0.287536] Switched to NOHz mode on CPU #1 [ 0.304016] musb-hdrc: version 6.0, musb-dma, otg (peripheral+host) [ 0.304565] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn) [ 0.304626] musb-hdrc: MHDRC RTL version 2.0 [ 0.304656] musb-hdrc: setup fifo_mode 4 [ 0.304656] musb-hdrc: 28/31 max ep, 16384/16384 memory [ 0.304901] musb-hdrc musb-hdrc: USB OTG mode controller at fc0ab000 using DMA, IRQ 124 [ 0.305206] NET: Registered protocol family 2 [ 0.305206] IP route cache hash table entries: 4096 (order: 2, 16384 bytes) [ 0.306427] TCP established hash table entries: 16384 (order: 5, 131072 bytes) [ 0.307037] TCP bind hash table entries: 16384 (order: 5, 196608 bytes) [ 0.307037] TCP: Hash tables configured (established 16384 bind 16384) [ 0.307403] TCP reno registered [ 0.307403] UDP hash table entries: 128 (order: 0, 4096 bytes) [ 0.307403] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes) [ 0.307952] NET: Registered protocol family 1 [ 0.307952] Trying to unpack rootfs image as initramfs... [ 0.388488] Freeing initrd memory: 984K [ 0.854309] PHOENIX_LAST_TURNOFF_STS: 0x01 [ 1.973510] console [ttyFIQ0] enabled [ 1.973510] Registered FIQ tty driver c7908b40 [ 1.982574] ram_console: got buffer at a0000000, size 200000 [ 1.988281] ram_console: uncorrectable error in header [ 1.993713] ram_console: no valid data in buffer (sig = 0xc0c4c0c0) [ 2.024993] console [ram-1] enabled [ 2.036987] omap-iommu omap-iommu.0: ducati registered [ 2.036987] omap-iommu omap-iommu.1: tesla registered [ 2.050048] audit: initializing netlink socket (disabled) [ 2.050048] type=2000 audit(2.023:1): initialized [ 2.061523] highmem bounce pool size: 64 pages [ 2.080383] NTFS driver 2.1.30 [Flags: R/O]. [ 2.088287] fuse init (API version 7.16) [ 2.088287] msgmni has been set to 451 [ 2.097930] SELinux: Registering netfilter hooks [ 2.105377] io scheduler noop registered [ 2.109436] io scheduler deadline registered [ 2.113922] io scheduler cfq registered (default) [ 2.114044] io scheduler bfq registered [ 2.114044] BFQ I/O-scheduler: v7r8 [ 2.127624] OMAP DSS rev 4.0 [ 2.133148] Keyboard driver not present [ 2.137634] dsscomp: initializing. [ 2.137634] misc dsscomp: display0=s6e8aa0 [ 2.145965] misc dsscomp: display1=hdmi_panel [ 2.150177] misc dsscomp: found 2 displays and 4 overlays, WB overlay 1 [ 2.157562] could not allocate slot [ 2.172393] omap-rproc omap-rproc.1: powering up ipu [ 2.178192] virtio_rpmsg_bus virtio0: rpmsg backend virtproc probed successfully [ 2.178192] virtio_rpmsg_bus virtio1: rpmsg backend virtproc probed successfully [ 2.193939] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 104) is a OMAP UART0 [ 2.202362] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1 [ 2.210235] omap_uart.3: ttyO3 at MMIO 0x4806e000 (irq = 102) is a OMAP UART3 [ 2.218048] omap_ion_probe: adding heap secure_input of type 2 with ba300000@900000 [ 2.226226] omap_ion_probe: adding heap secure_output_wfdhdcp of type 2 with ba300000@0 [ 2.234436] omap_ion_probe: adding heap tiler of type 4 with b3a00000@0 [ 2.234466] omap_ion_probe: adding heap nonsecure_tiler of type 4 with b3a00000@0 [ 2.248992] omap_ion_probe: adding heap system of type 0 with 0@0 [ 2.255249] omap_ion_probe: adding heap tiler_reservation of type 5 with 0@0 [ 2.267364] brd: module loaded [ 2.275177] loop: module loaded [ 2.275177] zram: Created 1 device(s) ... [ 2.284790] input: barometer as /devices/virtual/input/input0 [ 2.291107] sec_jack_probe : Registering jack driver [ 2.296752] i2c i2c-4: mpu_probe: 0 [ 2.329528] i2c i2c-4: Installing irq using 205 [ 2.334350] i2c i2c-4: Module Param interface = mpuirq [ 2.339691] i2c-core: driver [mpu3050] using legacy suspend method [ 2.346282] i2c-core: driver [mpu3050] using legacy resume method [ 2.346282] mpu_init: Probe name mpu3050 [ 2.346282] i2c i2c-4: bma250_mod_probe: bma250 [ 2.356781] i2c i2c-4: Installing Accel irq using 282 [ 2.386566] i2c i2c-4: mpu3050: +bma250 [ 2.390594] bma250_mod_init: Probe name bma250_mod [ 2.390594] i2c i2c-4: yas530_mod_probe: yas530 [ 2.400299] i2c i2c-4: Installing Compass irq using 336 [ 2.429687] i2c i2c-4: mpu3050: +yas530 [ 2.429687] yas530_mod_init: Probe name yas530_mod [ 3.376159] asoc: null-codec-dai <-> MultiMedia1 mapping ok [ 3.383300] asoc: null-codec-dai <-> MultiMedia2 mapping ok [ 3.390747] asoc: null-codec-dai <-> Voice mapping ok [ 3.397583] asoc: null-codec-dai <-> Tones mapping ok [ 3.404449] asoc: null-codec-dai <-> Vibra mapping ok [ 3.410614] asoc: null-codec-dai <-> MODEM mapping ok [ 3.416778] asoc: null-codec-dai <-> MultiMedia1 LP mapping ok [ 3.424682] asoc: FM Digital <-> omap-mcbsp-dai.1 mapping ok [ 3.431976] asoc: twl6040-dl1 <-> mcpdm-dl mapping ok [ 3.438537] asoc: dit-hifi <-> omap-mcasp-dai mapping ok [ 3.446563] twl6040-codec twl6040-codec: ASoC: Failed to create Aux/FM Stereo In debugfs file [ 3.456329] asoc: twl6040-dl1 <-> mcpdm-dl1 mapping ok [ 3.462860] asoc: twl6040-ul <-> mcpdm-ul1 mapping ok [ 3.468109] mmc0: new high speed MMC card at address 0001 [ 3.468994] asoc: twl6040-dl2 <-> mcpdm-dl2 mapping ok [ 3.469909] asoc: twl6040-vib <-> mcpdm-vib mapping ok [ 3.470947] asoc: Bluetooth <-> omap-mcbsp-dai.0 mapping ok [ 3.471923] asoc: Bluetooth <-> omap-mcbsp-dai.0 mapping ok [ 3.472900] asoc: FM Digital <-> omap-mcbsp-dai.1 mapping ok [ 3.473907] asoc: MODEM <-> omap-mcbsp-dai.1 mapping ok [ 3.474884] asoc: null-codec-dai <-> omap-abe-vxrec-dai mapping ok [ 3.476959] input: Tuna Headset Jack as /devices/platform/soc-audio/sound/card0/input5 [ 3.521820] mmcblk0: mmc0:0001 VYL00M 14.6 GiB [ 3.523712] asoc: hdmi-audio-codec <-> hdmi-audio-dai mapping ok [ 3.524230] ALSA device list: [ 3.524261] #0: TI OMAP4 Board [ 3.524261] #1: OMAP4HDMI [ 3.524383] GACT probability NOT on [ 3.524414] Mirror/redirect action on [ 3.524414] u32 classifier [ 3.524414] Actions configured [ 3.524444] Netfilter messages via NETLINK v0.30. [ 3.524505] nf_conntrack version 0.5.0 (15870 buckets, 63480 max) [ 3.526245] ctnetlink v0.93: registering with nfnetlink. [ 3.526275] NF_TPROXY: Transparent proxy support initialized, version 4.1.0 [ 3.526306] NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd. [ 3.526794] xt_time: kernel timezone is -0000 [ 3.529449] ip_tables: (C) 2000-2006 Netfilter Core Team [ 3.529632] arp_tables: (C) 2002 David S. Miller [ 3.529693] TCP bic registered [ 3.529724] TCP cubic registered [ 3.529724] TCP westwood registered [ 3.529724] TCP htcp registered [ 3.529754] Initializing XFRM netlink socket [ 3.531097] NET: Registered protocol family 10 [ 3.539703] Mobile IPv6 [ 3.539764] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 3.540130] IPv6 over IPv4 tunneling driver [ 3.547515] NET: Registered protocol family 17 [ 3.547576] NET: Registered protocol family 15 [ 3.547851] Bluetooth: RFCOMM TTY layer initialized [ 3.547882] Bluetooth: RFCOMM socket layer initialized [ 3.547882] Bluetooth: RFCOMM ver 1.11 [ 3.547912] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 3.547912] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 3.548095] NET: Registered protocol family 35 [ 3.548919] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 [ 3.682220] ThumbEE CPU extension supported. [ 3.682250] mmcblk0boot0: mmc0:0001 VYL00M partition 1 512 KiB [ 3.692718] Registering SWP/SWPB emulation handler [ 3.692749] mmcblk0boot1: mmc0:0001 VYL00M partition 2 512 KiB [ 3.703613] Registering SDIV/UDIV emulation handler [ 3.713989] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 [ 3.722625] Reprogramming LPDDR2 timings to 400000000 Hz [ 3.728424] sr_init: No PMIC hook to init smartreflex [ 3.733673] mmcblk0boot1: unknown partition table [ 3.733825] smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver initialized [ 3.734008] smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver initialized [ 3.734191] smartreflex smartreflex.2: omap_sr_probe: SmartReflex driver initialized [ 3.762451] SmartReflex class 1.5 driver: initialized (86400000ms) [ 3.769134] mmcblk0boot0: unknown partition table [ 3.769439] Power Management for TI OMAP4. [ 3.769561] OMAP4 PM: Static dependency added between MPUSS and DUCATI <-> L4_PER/CFG and L3_1. [ 3.787384] HSI DRIVER BUS : hsi_bus_match SUCCESS : ctrl:0 (mask:ffffffff), port:0, ch:0 (mask:ff) [ 3.796844] HSI DRIVER BUS : hsi_bus_match SUCCESS : ctrl:0 (mask:ffffffff), port:0, ch:1 (mask:ff) [ 3.806213] HSI DRIVER BUS : hsi_bus_match SUCCESS : ctrl:0 (mask:ffffffff), port:0, ch:2 (mask:ff) [ 3.815460] sr_class1p5_calib_work: mpu: Calibration complete: Voltage:Nominal=1203000 Calib=990000 margin=0 [ 3.825622] HSI DRIVER BUS : hsi_bus_match SUCCESS : ctrl:0 (mask:ffffffff), port:0, ch:3 (mask:ff) [ 3.835021] sr_class1p5_calib_work: core: Calibration complete: Voltage:Nominal=1127000 Calib=1063480 margin=13000 [ 3.845703] HSI DRIVER BUS : hsi_bus_match SUCCESS : ctrl:0 (mask:ffffffff), port:0, ch:4 (mask:ff) [ 3.855102] HSI DRIVER BUS : hsi_bus_match SUCCESS : ctrl:0 (mask:ffffffff), port:0, ch:5 (mask:ff) [ 3.864379] HSI DRIVER BUS : hsi_bus_match SUCCESS : ctrl:0 (mask:ffffffff), port:0, ch:6 (mask:ff) [ 3.873626] HSI DRIVER BUS : hsi_bus_match SUCCESS : ctrl:0 (mask:ffffffff), port:0, ch:7 (mask:ff) [ 3.884552] sr_class1p5_calib_work: iva Stop sampling: Voltage Nominal=950000 samples=3 [ 3.900268] sr_class1p5_calib_work: iva: Calibration complete: Voltage:Nominal=950000 Calib=860920 margin=13000 [ 3.913970] clock: disabling unused clocks to save power [ 3.920440] cannot apply mgr(lcd) on inactive device [ 3.925598] omapfb omapfb: failed to apply dispc config [ 3.930908] cannot apply mgr(tv) on inactive device [ 3.935974] omapfb omapfb: failed to apply dispc config [ 3.941284] cannot apply mgr(lcd2) on inactive device [ 3.946441] omapfb omapfb: failed to apply dispc config [ 3.954681] regulator_init_complete: VDAC: disabling [ 3.961853] fsa9480 4-0025: cable detect change, from 'unknown/none' to 'jig' AST_POWERON
Unfortunately, it stops there, and we have nothing more on the serial port.
I the kenrel, board-tuna-connector.c does nothing for FSA9480_DETECT_UART so it might be interesting to test FSA9480_DETECT_UART by finding the right resistor value for FSA9480_DETECT_UART in the FSA9480 datasheet that is mentioned in the UART wiki page.
Real serial console by patching the kernel¶
When you connect the cable you get the FIQ debugger, but what if you want kgdb instead:- apply that patch:
diff --git a/arch/arm/mach-omap2/board-tuna.c b/arch/arm/mach-omap2/board-tuna.c index a022a43..7098227 100644 --- a/arch/arm/mach-omap2/board-tuna.c +++ b/arch/arm/mach-omap2/board-tuna.c @@ -1001,6 +1001,8 @@ static inline void __init board_serial_init(void) omap_serial_init_port_pads(0, uart1_pads, uart1_pads_sz, NULL); omap_serial_init_port_pads(1, tuna_uart2_pads, ARRAY_SIZE(tuna_uart2_pads), &tuna_uart2_info); + omap_serial_init_port_pads(2,tuna_uart3_pads, + ARRAY_SIZE(tuna_uart3_pads), NULL); omap_serial_init_port_pads(3, tuna_uart4_pads, ARRAY_SIZE(tuna_uart4_pads), NULL); }
- remove the FIQ debugger in the kernel configuration.
- change the CMDLINE trough the kernel configuration:
Use:CONFIG_CMDLINE="console=ttyO2 androidboot.console=ttyO2 [...]"
Instead of:CONFIG_CMDLINE="console=ttyFIQ0 androidboot.console=ttyFIQ0 [...]"
- Verify that you get the kernel messages.
KGDB¶
- You need to change the cmdline for kgdb
CONFIG_CMDLINE="kgdboc=ttyO2,115200 console=ttyO2 androidboot.console=ttyO2 [...]"
Don't add kgdbwait tough because it result in that:
(gdb) set remotebaud 115200 (gdb) target remote /dev/ttyUSB0 /dev/ttyUSB0: Device or resource busy. (gdb) target remote /dev/ttyUSB0 Remote debugging using /dev/ttyUSB0 kgdb_breakpoint () at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/debug/debug_core.c:954 954 arch_kgdb_breakpoint(); (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. __raw_spin_lock_irqsave (lock=0x288) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/spinlock.c:112 112 BUILD_LOCK_OPS(spin, raw_spinlock); (gdb) bt #0 __raw_spin_lock_irqsave (lock=0x288) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/spinlock.c:112 #1 0xc061aecc in _raw_spin_lock_irqsave (lock=0x288) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/spinlock.c:145 #2 0xc0098620 in try_to_wake_up (p=0x0, state=1611595795, wake_flags=1) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/sched.c:2681 #3 0xc009897c in wake_up_process (p=0x288) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/sched.c:2785 #4 0xc00e2090 in proc_dohung_task_timeout_secs (table=<value optimized out>, write=<value optimized out>, buffer=<value optimized out>, lenp=<value optimized out>, ppos=0xc782bf70) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/hung_task.c:190 #5 0xc0174178 in proc_sys_call_handler (filp=<value optimized out>, buf=0x24808, count=1, ppos=0xc782bf70, write=1) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/fs/proc/proc_sysctl.c:158 #6 0xc01741b0 in proc_sys_write (filp=0x288, buf=0x600f0013 <Address 0x600f0013 out of bounds>, count=1, ppos=0xc782a000) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/fs/proc/proc_sysctl.c:176 #7 0xc0126420 in vfs_write (file=0xc73be500, buf=0x24808 "0", count=<value optimized out>, pos=0xc782bf70) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/fs/read_write.c:377 #8 0xc0126590 in sys_write (fd=<value optimized out>, buf=0x24808 "0", count=1) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/fs/read_write.c:429 #9 0xc0055a00 in ?? () Cannot access memory at address 0x0 #10 0xc0055a00 in ?? () Cannot access memory at address 0x0 Backtrace stopped: previous frame identical to this frame (corrupt stack?)
- disable the watchdog timer in the kernel, and recompile it and reflash the boot.img.
then open a root console and do:
echo g > /proc/sysrq-trigger
gnutoo@gnutoo-laptop:~/embedded/android/replicant-4.0$ . build/envsetup.sh including device/ti/panda/vendorsetup.sh including vendor/replicant/vendorsetup.sh including sdk/bash_completion/adb.bash gnutoo@gnutoo-laptop:~/embedded/android/replicant-4.0$ lunch replicant_maguro-eng ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.0.4 TARGET_PRODUCT=replicant_maguro TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release BUILD_ID=IMM76L ============================================ gnutoo@gnutoo-laptop:~/embedded/android/replicant-4.0$ arm-linux-androideabi-gdb GNU gdb (GDB) 7.1-android-gg2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-linux-gnu --target=arm-elf-linux". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. (gdb) file /home/gnutoo/embedded/android/replicant-4.0/out/target/product/maguro/obj/KERNEL_OBJ/vmlinux Reading symbols from /home/gnutoo/embedded/android/replicant-4.0/out/target/product/maguro/obj/KERNEL_OBJ/vmlinux...done. (gdb) set remotebaud 115200 (gdb) target remote /dev/ttyUSB0 Remote debugging using /dev/ttyUSB0 kgdb_breakpoint () at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/debug/debug_core.c:954 954 arch_kgdb_breakpoint(); (gdb) bt #0 kgdb_breakpoint () at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/debug/debug_core.c:954 #1 0xc00df764 in sysrq_handle_dbg (key=-29306880) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/kernel/debug/debug_core.c:745 #2 0xc02f2e18 in __handle_sysrq (key=103, check_mask=false) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/drivers/tty/sysrq.c:522 #3 0xc02f2ec4 in write_sysrq_trigger (file=<value optimized out>, buf=<value optimized out>, count=2, ppos=0xc4a01f70) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/drivers/tty/sysrq.c:870 #4 0xc016ba88 in proc_reg_write (file=0xc49ea3c0, buf=0x137fc84 "g\n\f@", count=2, ppos=0xc4a01f70) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/fs/proc/inode.c:200 #5 0xc0126420 in vfs_write (file=0xc49ea3c0, buf=0x137fc84 "g\n\f@", count=<value optimized out>, pos=0xc4a01f70) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/fs/read_write.c:377 #6 0xc0126590 in sys_write (fd=<value optimized out>, buf=0x137fc84 "g\n\f@", count=2) at /home/gnutoo/embedded/android/replicant-4.0/kernel/samsung/tuna/fs/read_write.c:429 #7 0xc0055a00 in ?? () Cannot access memory at address 0x0 #8 0xc0055a00 in ?? () Cannot access memory at address 0x0 Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb)
Multiplexing the serial port¶
since we have only 1 serial port, you can also use agent proxy to get kgdb and the console at the same time....
git clone git://git.kernel.org/pub/scm/utils/kernel/kgdb/agent-proxy.git cd agent-proxy ; make
Root on serial port¶
- Modify system/su/su.c:
diff --git a/su.c b/su.c index d36eaed..51137d4 100644 --- a/su.c +++ b/su.c @@ -494,11 +494,13 @@ int main(int argc, char *argv[]) deny(&ctx); } +#if 0 // disallow su in a shell if appropriate if (ctx.from.uid == AID_SHELL && (atoi(enabled) == 1)) { LOGE("Root access is disabled by a system setting - enable it under settings -> developer options"); deny(&ctx); } +#endif } if (ctx.from.uid == AID_ROOT || ctx.from.uid == AID_SHELL)
- adb push it to /system/xbin/su
- remove /system/bin/su
- chmod +s it:
busybox chmod +s /system/xbin/su
TODO¶
- reliable rebugging (right now it breaks on the wrong line)
- phone that doesn't power off screen while debugging...
Updated by Denis 'GNUtoo' Carikli about 5 years ago · 22 revisions