rk3288_lubuntu_img制作步骤

本文详细介绍了如何在RK3288平台上定制安装Ubuntu 14.04,包括刷入特定的img文件、建立TF分区、网络设置、下载并安装软件包、设置网络、安装桌面环境等步骤,并解决了一系列可能遇到的问题。

1#刷Firefly-RK3288_Android4.4_201412290906.img

启动后刷linux-boot-miniroot.img 写到 recovery 分区,misc.img 写到 misc 分区。

2#建立TF

a,插TF到rk3288,  fdisk  -l

b,fdisk /dev/mmcblk1

       d (选择d,w删除所有分区)

       选择n   新建一个分区,


         fdisk   /dev/mmcblk1  -l

         mkfs.ext4 -E nodiscard /dev/mmcblk1p1     //格式化此分区

mount /dev/mmcblk1   /mnt


3#设置网络

miniroot#  udhcpc



4#下载ubuntu-core-armf.tar.gz

wget -P /mnt http://cdimage.ubuntu.com/ubuntu-core/releases/14.04/rele
ase/ubuntu-core-14.04-core-armhf.tar.gz


5#指定ttyFIQ0

2# 添加ubuntu1404-core  串口登录问题

$ sudo vi etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
start ttyFIQ0

exit 0


6#$ sudo vi /etc/init/ttyFIQ0.conf   //内容如下:

# console - getty
#
# This service maintains a getty on console from the point the system is
# started until it is shut down again.

#add "-a root" for console root
start on stopped rc RUNLEVEL=[2345] and container CONTAINER=lxc

stop on runlevel [!2345]

respawn
exec /sbin/getty -a root -L 115200 ttyFIQ0 vt100 


7##设置ubuntu_root  网络

root@rk3288:~# echo auto eth0 > /etc/network/interfaces.d/eth0
root@rk3288:~# echo iface eth0 inet dhcp >> /etc/network/interfaces.d/eth0
root@rk3288:~# ln -fs ../run/resolvconf/resolv.conf /etc/resolv.conf
root@rk3288:~# ifup eth0


8##安装lunbuntu-desktop

#apt-get install lubuntu-desktop

ERROR!

失败,修改vi /etc/apt/souces.list

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ports.ubuntu.com/ubuntu-ports/ trusty universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty universe
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ports.ubuntu.com/ubuntu-ports/ trusty multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://ports.ubuntu.com/ubuntu-ports/ trusty-backports multiverse universe restricted main
# deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-backports multiverse universe restricted main

deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security universe
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security multiverse


9#ubuntu 自动进入desktop ,

 要使用root自动登录,需要修改三个地方:

  • 1.sudo passwd root
  • 2.sudo passwd root --unlock
  • 3.修改脚本

vi /etc/lightdm/lightdm.conf.d/20-lubuntu.conf


[SeatDefaults]
autologin-user=root
autologin-user-timeout=0
user-session=Lubuntu


10#Ubuntu14.04 root登陆错误“Error found when loading /root/.profile

vi /root/.profile

/*最后一行modify to*/
msg n

modify to

tty -s && mesg n


ubuntu修改用户名


正确的命令为:


id user_old


usermod -m -d /home/user_new -u 1001 user_old;

usermod -d /home/user_new -m -u 1001 user_old;
最后,再改变用户名和组名为user2:
usermod -l user_new user_old;


groupmod -n user_new user_old




id dou
root@rk3288:~# id dou
uid=1000(dou) gid=1000(dou) groups=1000(dou),27(sudo)



11#


12#

### 导出RK3288设备的固件文件 #### 使用SSH和rsync备份根文件系统 为了安全有效地将RK3288开发板上的Lubuntu系统根文件系统导出并打包成img文件,可以按照如下方法操作: 确保RK3288上的Lubuntu系统已经安装了`ssh`和`rsync`服务[^1]。 在PC端同样需要有`ssh`和`rsync`工具以便于远程同步数据。打开终端窗口,在PC上执行命令连接至RK3288并将根目录下的所有内容复制过来: ```bash sudo rsync -avz --progress root@<RK3288_IP>:/ /path/to/backup/folder/ ``` 这里替换`<RK3288_IP>`为实际IP地址,并指定本地保存位置作为目标路径。 #### 创建IMG镜像文件 完成文件传输后,下一步是在Linux环境中创建一个磁盘映像文件(img),这可以通过dd命令实现: 假设之前的数据被存储到了`/mnt/rk3288-rootfs-backup`下,则可运行以下指令来生成名为`rootfs.img`的映像文件: ```bash cd /mnt/rk3288-rootfs-backup find . | cpio -o -H newc | gzip > ../rootfs.cpio.gz losetup -fP $(pwd)/rootfs.img mkfs.ext4 /dev/loop0p1 mount /dev/loop0p1 /mnt/tmp_mount_point cp -ax * /mnt/tmp_mount_point/ umount /mnt/tmp_mount_point losetup -d /dev/loop0 ``` 以上过程会先压缩现有文件结构形成`.cpio.gz`格式档案,接着利用循环设备模拟硬盘分区,最后把解压后的文件放入新建立好的ext4文件系统内。 #### 验证与烧录返回开发板 一旦成功构建好所需的img文件,就可以考虑将其重新部署回到RK3288开发板上去验证其功能正常与否。对于Windows环境而言,推荐使用官方提供的AndroidTool软件来进行这一环节的操作,具体步骤包括启动程序、选择对应的固件选项以及上传先前准备完毕的映像文件等动作[^2]。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值