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

8 篇文章 3 订阅
6 篇文章 0 订阅

成功实现 友善/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、出图喽






 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值