当前位置: 首页 > 工具软件 > xcash-core > 使用案例 >

A20 最小系统改造 为ubuntu-core-14.04-core-armhf.tar.gz

戚翼
2023-12-01

rootfs 下载:

http://cdimage.ubuntu.com/ubuntu-core/releases/14.04/release/ubuntu-core-14.04-core-armhf.tar.gz


$ wget http://cdimage.ubuntu.com/ubuntu-core/releases/14.04/release/ubuntu-core-14.04-core-armhf.tar.gz


$ cd  xxxx_sdk/binaries/     &&   mkdir rootfs

$ cp ubuntu-core-14.04-core-armhf.tar.gz   xxxx_sdk/binaries/rootfs/

$ cd rootfs/

$ sudo tar -zxvpf  ubuntu-core-14.04-core-armhf.tar.gz

sudo vi etc/shadow

root:*:16176:0:99999:7:::    //删除"*"    //删除root密码

$ rm ubuntu-core-14.04-core-armhf.tar.gz


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 ttyS0

exit 0


$ sudo vi /etc/init/ttyS0.conf   //内容如下:

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


start on stopped rc RUNLEVEL=[2345] and container CONTAINER=lxc

stop on runlevel [!2345]

respawn
exec /sbin/getty -L 115200 ttyS0 vt100

###压缩rootfs

$ cd  .. && sudo tar -czvpf   ubuntu1404_server.tar.gz  rootfs


$ vi  products/a20/a20-debian-server/envsetup.sh

export CB_PRODUCT_ROOTFS_IMAGE=${CB_PACKAGES_DIR}/ubuntu1404_server.tar.gz   //此处修改



替换products/a20/a20-debian-server/overlay   文件夹!!!!下载地址:http://download.csdn.net/detail/u010402372/9307531

$ cp overlay_bak.tar.gz  products/a20/a20-debian-server/     &&  cd products/a20/a20-debian-server/ 

$ rm overlay  -rf     //先rm

$ tar -xzvpf overlay_bak.tar.gz


效果:

usb open backing file: /dev/mmcblk0p1, 0xdf1df600
<6>g_mass_storage gadget: Mass Storage Function, version: 2009/09/11
<6>g_mass_storage gadget: Number of LUNs=1
<6> lun0: LUN: removable file: /dev/mmcblk0p1
ep_matches, wrn: endpoint already claimed, ep(0xc0887f34, 0xbf0e72e4, ep1-bulk)
<6>g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
<4>g_mass_storage gadget: userspace failed to provide iSerialNumber
<6>g_mass_storage gadget: g_mass_storage ready
WRN:L2762(/home/dou/lins/linux-sdk-card/linux-sunxi/drivers/usb/sunxi_usb/udc/sw_udc.c):ERR: usb device is not active
 * Stopping System V runlevel compatibility[ OK ]

Ubuntu1404 GNU/Linux a20 3.4.79 wheezy
The default login:
More support plese  by jiangdou


ubuntu login: <7>eth0: no IPv6 routers present

Ubuntu1404 GNU/Linux a20 3.4.79 wheezy
The default login:
More support plese  by jiangdou


ubuntu login: root
Last login: Sat Nov 28 04:38:24 UTC 2015 on ttyS0
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.4.79 armv7l)

 * Documentation:  https://help.ubuntu.com/
root@ubuntu:~# 
root@ubuntu:~# 



# 以下可选可不选择!!

a:在启动命令文件 /etc/rc.local 中插入一行:mount -o remount -o noatime / ,以提升性能同时防止频繁擦写弄坏 SD 卡


b:删除root 密码

另一种是直接编辑/etc/shadow文件,/etc/shadow文件以加密的形式保存了各个用户的密码,如果密码为空则不允许使用密码登录。
用法示例:
$ sudo nano /etc/shadow
删除root那一行第一个与第二个冒号之间的内容



5# 选择开机加载驱动,或者不加载!!!

vi   products/a20/a20-debian-server/overlay/etc/modules

注释掉!!前面加“#”



6# 安装桌面

root@ubuntu # apt-get install lubuntu-desktop





以上只适合此板使用!!!


 类似资料: