Thank You for your continued support and contributions!
VERSION.TXTUPDATE.TXTSYSTEM.UBIUIMAGE.BINUBOOT.BIN_GITIGNO
[user@localhost erosq kernel]$ binwalk -e UIMAGE.BINDECIMAL HEXADECIMAL DESCRIPTION--------------------------------------------------------------------------------0 0x0 uImage header, header size: 64 bytes, header CRC: 0xD30BDBEF, created: 2020-03-09 06:41:44, image size: 2612785 bytes, Data Address: 0x80010000, Entry Point: 0x80419300, data CRC: 0xF4F43C27, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: gzip, image name: "Linux-3.10.14"64 0x40 gzip compressed data, maximum compression, from Unix, last modified: 1970-01-01 00:00:00 (null date)[user@localhost erosq kernel]$
/* xImage */00000000 27 05 19 56 ee 20 85 b0 5d c5 14 1d 00 33 b0 00 |'..V. ..]....3..|00000010 80 f0 00 00 80 f0 00 00 2a d2 2d 06 05 05 02 00 |........*.-.....| ^^ startup ^^ and entry address here00000020 4c 69 6e 75 78 2d 33 2e 31 30 2e 31 34 2d 73 76 |Linux-3.10.14-sv|00000030 6e 32 39 36 00 00 00 00 00 00 00 00 00 00 00 00 |n296............|
PTR_ADDIU t0, LONGSIZELONG_S zero, (t0)bne t0, t1, 1bLONG_S a0, fw_arg0LONG_S a1, fw_arg1LONG_S a2, fw_arg2LONG_S a3, fw_arg3MTC0 zero, CP0_CONTEXT.........j start_kernel
LAB_80419340 XREF[1]: 80419348(j) 80419340 04 00 08 25 addiu t0,t0,0x4 80419344 00 00 00 ad sw zero,0x0(t0)=>DAT_80580004 80419348 fd ff 09 15 bne t0,t1,LAB_80419340 8041934c 00 00 00 00 _nop 80419350 5a 80 01 3c lui at,0x805a 80419354 20 23 24 ac sw a0,offset DAT_805a2320(at) --> (matches up with LONG_S a0, fw_arg0) 80419358 5a 80 01 3c lui at,0x805a 8041935c 1c 23 25 ac sw a1,offset DAT_805a231c(at) --> (matches up with LONG_S a1, fw_arg1) 80419360 5a 80 01 3c lui at,0x805a 80419364 18 23 26 ac sw a2,offset DAT_805a2318(at) --> (etc.) 80419368 5a 80 01 3c lui at,0x805a 8041936c 14 23 27 ac sw a3,offset DAT_805a2314(at) --> (etc.) 80419370 00 20 80 40 mtc0 zero,Context,0x0 ... ... ... 804193a0 68 31 15 08 j FUN_8054c5a0 undefined FUN_8054c5a0()
To give you an idea of something you're looking for -- the goal is not to disassemble the entire kernel after all -- check out this file: arch/mips/xburst/soc-x1000/chip-x1000/halley2/common/board_base.c. There's a function in it called board_base_init(). That's a function you want to locate, because it's the only place you can find a reference to platform_devices_array. Most platform_data structs which driver probe() functions will reference, are pointed to by this array, and from the platform_data struct you can learn GPIOs, details of the LCD interface configuration, clock speeds, and other useful stuff. I2C devices will probably be registered by board_base_init too. But some stuff will be hardcoded willy-nilly in the drivers. (I guess for a kernel you never update, maintainability is not a problem...)Since board_base_init is an initcall it can be located in a table. See init/main.c, look for the initcall_levels array. And then look at the initcall_level_names below it. You can easily find the names array because it references a unique string "postcore". Once you find that you can find do_initcall_level() and from that, find initcall_levels. The initcalls are set up in one big table and the first entry of initcall_levels will point at the first one. You can trawl through the init calls one by one until you locate board_base_init(). That may require identifying a few other functions first, but the payoff is worth it because some information simply can't be found any other way.
[initcall array] -> board_base_init() -> platform_device_register() -> platform_device_add()
it didn't seem to rigorously follow the struct pattern of pointer to string, pointer to data, size
Go look at one of the other LCD drivers to get an idea of what you're looking for, mainly you want to figure out bpp, smart_config.bus_width, smart_config.write_gram_command, and smart_config.data_table. There are also the LCD ops for powering on the panel (GPIOs, levels, timings, etc. needed to power it up.)
jzfb_platform_data XREF[1]: 805728e8(*) 80514788 01 00 00 00 uint 1h 8051478c 14 48 51 80 addr fb_videomode = 80514790 00 ?? 00h 80514791 00 ?? 00h 80514792 00 ?? 00h 80514793 00 ?? 00h 80514794 0d ?? 0Dh 80514795 00 ?? 00h 80514796 00 ?? 00h 80514797 80 ?? 80h 80514798 18 ?? 18h 80514799 00 ?? 00h 8051479a 00 ?? 00h 8051479b 00 ?? 00h 8051479c 1f ?? 1Fh 8051479d 00 ?? 00h 8051479e 00 ?? 00h 8051479f 00 ?? 00h 805147a0 1f ?? 1Fh 805147a1 00 ?? 00h 805147a2 00 ?? 00h 805147a3 00 ?? 00h 805147a4 00 ?? 00h 805147a5 00 ?? 00h 805147a6 00 ?? 00h 805147a7 00 ?? 00h 805147a8 00 ?? 00h 805147a9 00 ?? 00h 805147aa 00 ?? 00h 805147ab 00 ?? 00h 805147ac 11 ?? 11h 805147ad 00 ?? 00h 805147ae 00 ?? 00h 805147af 00 ?? 00h 805147b0 01 ?? 01h 805147b1 00 ?? 00h 805147b2 00 ?? 00h 805147b3 00 ?? 00h 805147b4 4c 48 51 80 addr fb_videomode.flag = null 805147b8 08 ?? 08h 805147b9 00 ?? 00h 805147ba 00 ?? 00h 805147bb 00 ?? 00h 805147bc 00 ?? 00h 805147bd 00 ?? 00h 805147be 00 ?? 00h 805147bf 00 ?? 00h 805147c0 38 ?? 38h 8 805147c1 00 ?? 00h 805147c2 00 ?? 00h 805147c3 00 ?? 00h 805147c4 7c 48 51 80 addr LAB_8051487c 805147c8 00 ?? 00h 805147c9 00 ?? 00h 805147ca 00 ?? 00h 805147cb 00 ?? 00h 805147cc 00 ?? 00h 805147cd 00 ?? 00h 805147ce 00 ?? 00h 805147cf 00 ?? 00h 805147d0 00 ?? 00h 805147d1 00 ?? 00h 805147d2 00 ?? 00h 805147d3 00 ?? 00h 805147d4 00 ?? 00h 805147d5 00 ?? 00h 805147d6 00 ?? 00h 805147d7 00 ?? 00h 805147d8 00 ?? 00h 805147d9 00 ?? 00h 805147da 00 ?? 00h 805147db 00 ?? 00h 805147dc 00 ?? 00h 805147dd 00 ?? 00h 805147de 00 ?? 00h 805147df 00 ?? 00h 805147e0 00 ?? 00h 805147e1 00 ?? 00h 805147e2 00 ?? 00h 805147e3 00 ?? 00h 805147e4 00 ?? 00h 805147e5 00 ?? 00h 805147e6 00 ?? 00h 805147e7 00 ?? 00h 805147e8 00 ?? 00h 805147e9 00 ?? 00h 805147ea 00 ?? 00h 805147eb 00 ?? 00h 805147ec 00 ?? 00h 805147ed 00 ?? 00h 805147ee 00 ?? 00h 805147ef 00 ?? 00h 805147f0 a8 94 01 80 addr LAB_800194a8 805147f4 d4 93 01 80 addr FUN_800193d4 805147f8 00 ?? 00h 805147f9 00 ?? 00h 805147fa 00 ?? 00h 805147fb 00 ?? 00h 805147fc 00 ?? 00h 805147fd 00 ?? 00h 805147fe 00 ?? 00h 805147ff 00 ?? 00h 80514800 00 ?? 00h 80514801 00 ?? 00h 80514802 00 ?? 00h 80514803 00 ?? 00h 80514804 00 ?? 00h 80514805 00 ?? 00h 80514806 00 ?? 00h 80514807 00 ?? 00h 80514808 00 ?? 00h 80514809 00 ?? 00h 8051480a 00 ?? 00h 8051480b 00 ?? 00h 8051480c 00 ?? 00h 8051480d 00 ?? 00h 8051480e 00 ?? 00h 8051480f 00 ?? 00h 80514810 00 ?? 00h 80514811 00 ?? 00h 80514812 00 ?? 00h 80514813 00 ?? 00h fb_videomode.flag XREF[1,1]: 8051478c(*), 805147b4(*) fb_videomode 80514814 e0 8d 4b fb_video 80 50 00 00 00 40 80514814 e0 8d 4b 80 addr s_320x240_804b8de0 name = "320x240" XREF[1]: 8051478c(*) 80514818 50 00 00 00 uint 50h refresh 8051481c 40 01 00 00 uint 140h xres 80514820 f0 00 00 00 uint F0h yres 80514824 50 c3 00 00 uint C350h init_pixclock 80514828 00 00 00 00 uint 0h pixclock 8051482c 00 00 00 00 uint 0h left_margin 80514830 00 00 00 00 uint 0h right_margin 80514834 00 00 00 00 uint 0h upper_margin 80514838 00 00 00 00 uint 0h lower_margin 8051483c 00 00 00 00 uint 0h hsync_len 80514840 03 00 00 00 uint 3h vsync_len 80514844 00 00 00 00 uint 0h sync 80514848 00 00 00 00 uint 0h vmode 8051484c 2c 2c 2c 2c uint 2C2C2C2Ch flag XREF[1]: 805147b4(*)
jzmmc_platform_data_80511180 XREF[1]: 8057287c(*) 80511180 02 00 00 jzmmc_pl 00 00 00 30 00 07 80511180 02 00 ushort 2h removal XREF[1]: 8057287c(*) 80511182 00 00 ushort 0h sdio_clk 80511184 00 00 30 00 uint 300000h ocr_avail 80511188 07 00 00 00 uint 7h capacity 8051118c 00 00 00 00 uint 0h pm_flags 80511190 00 6c dc 02 uint 2DC6C00h max_freq 80511194 00 00 00 00 int 0h UNDEFINED 80511198 b0 11 51 80 00 addr PTR_805111b0 *recovery_info = NaP 00 00 00 805111a0 00 00 00 00 00 addr 00000000 *gpio 00 00 00 805111a8 00 00 00 00 uint 0h pio_mode 805111ac 00 00 00 00 int 0h (*private_in PTR_805111b0 XREF[1]: 80511198(*) 805111b0 ff ff ff addr * NaP ff 2b 00 00 00 partition_num 805111b8 2a 00 01 00 uint 1002Ah permission 805111bc ff ff ff ff uint FFFFFFFFh protect_boundary XREF[1]: 80572884(*) 805111c0 1c 76 4b 80 uint * s_bt_power_804b761c = "bt_power" 805111c4 ff ff ff ff int FFFFFFFFh 805111c8 00 ?? 00h 805111c9 00 ?? 00h
struct jzfb_platform_data jzfb_pdata = { .num_modes = 1, .modes = &jzfb0_videomode, .lcd_type = LCD_TYPE_SLCD, .bpp = 24, .width = 31, .height = 31, .pinmd = 0, .smart_config.rsply_cmd_high = 0, .smart_config.csply_active_high = 0, .smart_config.newcfg_fmt_conv = 1, .smart_config.write_gram_cmd = cmd_buf, .smart_config.clkply_active_rising = 1, .smart_config.length_cmd = ARRAY_SIZE(cmd_buf), .smart_config.bus_width = 8, .smart_config.length_data_table = ARRAY_SIZE(ili9342_data_table), .smart_config.data_table = ili9342_data_table, .dither_enable = 0,};
jzfb_platform_data XREF[1]: 805728e8(*) 80514788 01 00 00 jzfb_pla 00 14 48 51 80 00 80514788 01 00 00 00 long 1h num_modes XREF[1]: 805728e8(*) 8051478c 14 48 51 80 addr fb_videomode *modes = 80514790 00 00 00 00 addr 00000000 *dsi_data 80514794 0d 00 00 80 uint 8000000Dh lcd_type 80514798 18 00 00 00 uint 18h bpp 8051479c 1f 00 00 00 uint 1Fh width 805147a0 1f 00 00 00 uint 1Fh height 805147a4 00 uint:1 0h pinmd:1 805147a4 00 uint:1 0h pixclk_falli 805147a4 00 uint:1 0h data_enable_ 805147a5 00 00 00 00 00 smart_co field_0x1d 00 00 11 00 00 00 01 00 00 00 805147a5 00 00 00 00 uint 0h smart_type 805147a9 00 uint:1 0h clkply_activ 805147a9 00 uint:1 0h rsply_cmd_hi 805147a9 00 uint:1 0h csply_active 805147a9 00 uint:1 0h newcfg_6800_ 805147a9 00 uint:1 0h newcfg_fmt_c 805147a9 00 uint:1 0h datatx_type_ 805147a9 00 uint:1 0h newcfg_cmd_9 805147aa 00 00 11 00 ulong 110000h length_cmd 805147ae 00 00 01 00 addr 00010000 write_gram_cmd 805147b2 00 00 4c 48 ulong 484C0000h bus_width 805147b6 51 80 08 00 uint 88051h data_times 805147ba 00 00 00 00 ulong 0h length_data_ 805147be 00 00 38 00 addr 00380000 *data_table 805147c2 00 00 7c 48 addr 487c0000 (*init) 805147c6 51 80 00 00 addr 00008051 (*gpio_for_s 805147ca 00 00 00 00 int 0h te_gpio 805147ce 00 00 00 00 int 0h te_irq_level 805147d2 00 uint:1 0h dither_enabl 805147d3 00 00 00 00 00 dither dither 00 00 00 00 00 00 00 805147d3 00 00 00 00 uint 0h dither_red 805147d7 00 00 00 00 uint 0h dither_green 805147db 00 00 00 00 uint 0h dither_blue 805147df 00 ?? 00h 805147e0 00 ?? 00h 805147e1 00 ?? 00h 805147e2 00 ?? 00h 805147e3 00 ?? 00h
805147ac = bitfield clkply_active_rising=1 newcfg_fmt_conv=1 others=0 (this is standard fare, nothing exotic)805147b8 = smart_config.bus_width805147c0 = smart_config.length_data_table805147c4 = smart_config.data_table
805147a4 00 uint:1 0h pinmd:1 805147a4 00 uint:1 0h pixclk_falli 805147a4 00 uint:1 0h data_enable_ 805147a5 00 00 00 00 00 smart_co field_0x1d
I have a suspicion that the jzfb_platform_data struct is actually the one outlined in arch/mips/xburst/soc-x1000/include/mach/jzfb.h, could this be true?
Page created in 0.07 seconds with 21 queries.