|
Edited by kovserg at 2015-9-8 11:44
Hello. I am testing my OrangePI board. For 1 day.
I write debian server image into SD card.
I have meet serveral problems
1. hdmi show nothing to dvi monitor. (I suppouse the problem is in HDCP) So I have to buy new monitor or HDMI spliter.
2. no eMMC driver in kernel. So 8Gb flash inaccessable.
3. I can login trough ssh root@board_ip. It works fine until it overheat over 70C. It turns off 1 core. So I make heatsink. When run "openssl speed &" 4 times to load all 4 core. Max temperature riched 54C. I found I can turn on/off cores through /sys directory at a runtime. Very funny.
4. But when I try to create new user or try to login user orangepi it login and exit immediately. Only root can login o_O
5. I read forum and findout there is no opengl support in linux. It present only in android image. I can't test because I have no video output yet.
6. When I try to download kernel and build it from source I found there is very poor documentation for H3 processor. Moreover SunXi linux is not opensource where are a lot of binary blocks hardcoded source files. I try to find out how to enable hdmi output to turn off hdcp.
I found for Allwiner H3 (sun8iw7p1) no code at all. For sun8iw6 I found function Hdmi_hal_hdcp_enable
https://github.com/allwinner-zh/ ... nxi/hdmi/drv_hdmi.c
...
type = script_get_item("hdmi_para", "hdmi_hdcp_enable", &val);
if(SCIRPT_ITEM_VALUE_TYPE_INT == type) {
Hdmi_hal_hdcp_enable(val.val);
}
Hdmi_set_reg_base((__u32)ghdmi.base_hdmi);
Hdmi_hal_init(boot_hdmi);
...
HDMI_MAIN_START (define)
https://github.com/allwinner-zh/ ... /hdmi/aw/hdmi_bsp.h
(use)
https://github.com/allwinner-zh/ ... /hdmi_bsp_sun8iw6.c
#define HDMI_MAIN_START (0xCB110800)
#define HDMI_CODE_HDL (0x1 << 0x09)
...
int (*hdmi_main)(int type, uintptr_t* para) = NULL;
int bsp_hdmi_main(unsigned int type, uintptr_t* para) {
int ret = -1;
if (hdmi_main) ret = hdmi_main(type, para);
return ret;
}
...
void bsp_hdmi_set_addr(unsigned int base_addr) {
uintptr_t para[5];
int ret;
memcpy((void *)HDMI_MAIN_START, (void *)hdmi_mc_table, sizeof(hdmi_mc_table));
hdmi_main = (int (*)(int type, uintptr_t* para))HDMI_MAIN_START; // <<<<< BLACK MAGIC !!!!!!!!!!!
memset(para, 0, 5*sizeof(uintptr_t));
para[0] = (uintptr_t)base_addr;
ret = bsp_hdmi_main(HDMI_CODE_SET_ADDR, para);
}
...
hdmi_mc_table
https://github.com/allwinner-zh/ ... bsp_sun8iw6_table.c
#include "hdmi_bsp.h"
unsigned char hdmi_mc_table[HDMI_MC_TBL_SIZE] = { // binary arm codes
0x00,0xc0,0x51,0xe2,0x04,0xe0,0x2d,0xe5,0x0c,0xd0,0x4d,0xe2,0x09,0x00,0x00,0x0a,
0x20,0x00,0x50,0xe3,0x3c,0x00,0x00,0x0a,0x09,0x00,0x00,0x9a,0x01,0x0c,0x50,0xe3,
0x33,0x00,0x00,0x0a,0x11,0x00,0x00,0x9a,0x02,0x0c,0x50,0xe3,0x29,0x00,0x00,0x0a,
0x01,0x0b,0x50,0xe3,0x1b,0x00,0x00,0x0a,0x00,0x00,0xe0,0xe3,0x0c,0xd0,0x8d,0xe2,
0x04,0xf0,0x9d,0xe4,0x04,0x00,0x50,0xe3,0x2c,0x00,0x00,0x0a,0x0e,0x00,0x00,0x9a,
0x08,0x00,0x50,0xe3,0x17,0x00,0x00,0x0a,0x10,0x00,0x50,0xe3,0xf5,0xff,0xff,0x1a,
...
This block looks like thin in disassembler:
ROM:CB110800 ; Segment type: Pure code
ROM:CB110800 AREA ROM, CODE, READWRITE, ALIGN=0
ROM:CB110800 ; ORG 0xCB110800
ROM:CB110800 CODE32
ROM:CB110800
ROM:CB110800 ; =============== S U B R O U T I N E =======================================
ROM:CB110800
ROM:CB110800
ROM:CB110800 hdmi_main
ROM:CB110800
ROM:CB110800 param = -0x10
ROM:CB110800 type = -4
ROM:CB110800
ROM:CB110800 ; FUNCTION CHUNK AT ROM:CB112224 SIZE 00000490 BYTES
ROM:CB110800 ; FUNCTION CHUNK AT ROM:CB112A88 SIZE 00000050 BYTES
ROM:CB110800
ROM:CB110800 SUBS R12, R1, #0
ROM:CB110804 STR LR, [SP,#type]!
ROM:CB110808 SUB SP, SP, #0xC
ROM:CB11080C BEQ HDMI_CODE_VIDEO
ROM:CB110810 CMP R0, #0x20
ROM:CB110814 BEQ HDMI_CODE_AUDIO
ROM:CB110818 BLS loc_CB110844
ROM:CB11081C CMP R0, #0x100
ROM:CB110820 BEQ HDMI_CODE_HRST
ROM:CB110824 BLS loc_CB110870
ROM:CB110828 CMP R0, #0x200
ROM:CB11082C BEQ HDMI_CODE_HDL
ROM:CB110830 CMP R0, #0x400
ROM:CB110834 BEQ HDMI_CODE_VERSION
ROM:CB110838
ROM:CB110838 HDMI_CODE_VIDEO ; CODE XREF: hdmi_main+C
ROM:CB110838 ; hdmi_main+5C ...
ROM:CB110838 MVN R0, #0
ROM:CB11083C
ROM:CB11083C leave ; CODE XREF: hdmi_main+88
ROM:CB11083C ; hdmi_main+A4 ...
ROM:CB11083C ADD SP, SP, #0xC
ROM:CB110840 LDR PC, [SP+4+type],#4
...
That the F..K. Is it opensource or not. I have to reverse engeener opensource, to improve or modify code? o_O
|
|