ibox4412 移植ubuntu(kernel3.8.13+13.10 from FriendlyArm and odroid)

成功实现 友善/odroid 3.8.13内核和13.10ubuntu在ibox上移植(SD卡)


实现功能:

无线上网,HDMI1080P(音频同步)输出,视频播放,声卡,触摸屏,lcd等常用驱动完全移植


分享下步骤

1、移植linux内核,参考ibox4412  3.0和3.5内核,友善移植odroid的3.8.13内核,具体内容略过

HDMI相关驱动有三个地方:

\linux-3.8.13\drivers\media\video\s5p-tv (第一处不参加编译,不使用)

\linux-3.8.13\drivers\media\platform\s5p-tv (第二处内核驱动代码完全与第一处相同,可以完全使用,创建3个fb设备节点和3个video设备节点)

驱动需要配置

static struct i2c_board_info hdmiphy_info = {
	I2C_BOARD_INFO("s5p_hdmiphy", 0x38),
//	I2C_BOARD_INFO("hdmiphy-exynos4412", 0x38),
};

	s5p_i2c_hdmiphy_set_platdata(NULL);
	s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0,  EXYNOS4_GPX3(7));
	s5p_hdmi_cec_set_platdata(&hdmi_cec_data);
\\192.168.56.102\workspace\4412\tiny\linux-3.8.13\drivers\gpu\drm\exynos(使用drm方式,只注册了一个技术分享fb5,这个是友善官方默认使用的方式)

驱动需要配置

static struct i2c_board_info hdmiphy_info = {
//	I2C_BOARD_INFO("s5p_hdmiphy", 0x38),
	I2C_BOARD_INFO("hdmiphy-exynos4412", 0x38),
};

	s5p_i2c_hdmiphy_set_platdata(NULL);
	s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0,  EXYNOS4_GPX3(7));
	s5p_hdmi_cec_set_platdata(&hdmi_cec_data);
	
	/* FIXME: hdmiphy i2c adapter has dynamic ID, and setting it to 8 causes
	 * a failure to initialize (can't find clock?). so for now we are relying
	 * on the hdmiphy i2c adapter being dynamically assigned address 8. */
	i2c_register_board_info(8, &hdmiphy_info, 1);


2、从友善官方下载13.10版本ubuntu镜像

ubuntu_sd_nanopc_t1.img

查看镜像分区信息

root@ubuntu:/workspace# fdisk -l ubuntu_sd_nanopc_t1.img

Disk ubuntu_sd_nanopc_t1.img: 6396 MB, 6396313600 bytes
255 heads, 63 sectors/track, 777 cylinders, total 12492800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c4046

                  Device Boot      Start         End      Blocks   Id  System
ubuntu_sd_nanopc_t1.img1          102400      204799       51200    b  W95 FAT32
ubuntu_sd_nanopc_t1.img2          204800    12492799     6144000   83  Linux

ubuntu文件系统在img2里面

挂在文件系统

mount  -o loop,offset=104857600 ubuntu_sd_nanopc_t1.img udisk

然后将udisk里面的内容全部复制到sd卡制定ext4 分区中


3、为了支持hdmi输出,需要设置

etc/X11/xorg.conf

# X.Org X server configuration file for xfree86-video-mali

Section "Device"
	Identifier "Mali-Fbdev"
	Driver	"mali"
	Option	"fbdev"           "/dev/fb5"
	Option	"DRI2"            "true"
	Option	"DRI2_PAGE_FLIP"  "false"
	Option	"DRI2_WAIT_VSYNC" "true"
	Option  "UMP_CACHED"      "true"
	Option  "UMP_LOCK"        "false"
        Option  "G2D_DEVICE" "/dev/video2"
        Option  "G2D_ENABLE" "false"
	Option	"DPMS"	"false"
EndSection

Section "Screen"
	Identifier   "Default Screen"
	Device       "Mali-Fbdev"
	DefaultDepth 24
EndSection

Section "DRI"
	Mode 0666
EndSection
根据节点情况进行设置


4、为了使用户登录使有管理员权限

修改etc/sudoers

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults	env_reset
Defaults	mail_badpass
Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root	ALL=(ALL:ALL) ALL
<pre name="code" class="cpp">t1<span style="white-space:pre">	</span>ALL=(ALL:ALL) ALL
lj<span style="white-space:pre">	</span>ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges%admin ALL=(ALL) ALL# Allow members of group sudo to execute any command%sudo ALL=(ALL:ALL) ALL# See sudoers(5) for more information on "#include" directives:#includedir /etc/sudoers.d



5、出图喽

技术分享

技术分享

技术分享

技术分享

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。