rk3399 使用 debian ubuntu 固件
android 是非常好用,但是有的时候,需要用到一些 linux 的时候,而 PI 树莓派 性能又太弱,debian 相比 ubuntu 占用资源更少。
开发板:x3399 pc
ubuntu 14.04 x64:
远程仓库地址:https://gitlab.com/9tripod/x3399_linux.git
先安装编译环境:
sudo apt-get update
sudo apt-get -y install libncurses5-dev cpio bc bash make gcc gyp cmake bison pkg-config autoconf autoconf-archive gperf gawk texinfo autopoint intltool libc6-i386 flex libnspr4-dev libnss3-dev gcc-multilib liborc-dev tcl texlive zip libtool wget git
编译:
./mk.sh -a
生成的固件:
output/
update-debian.img
update-ubuntu.img
刷机测试,插入网线,在另外一台电脑,使用 ssh 连接
ssh linaro@192.168.1.100 密码:123456
问题:
1,debian 的固件 apt 更新不了,软件包也无法安装
2,HDMI 连接显示器,底部任务栏显示不出来,需要重新插拔
3,风扇常转
4,声音无法使用
5,桌面显示 卡顿
ubuntu 固件
用户名:ninetripod 密码:123456
ninetripod@X3399:~$ sudo apt-get update
[sudo] password for ninetripod:
Hit:1 http://mirrors.ustc.edu.cn/ubuntu-ports xenial InRelease
Hit:2 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-updates InRelease
Get:3 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security InRelease [99.8 kB]
Get:4 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/main Sources [251 kB]
Get:5 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/restricted Sources [2,976 B]
Get:6 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/main arm64 Packages [894 kB]
Get:7 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/main Translation-en [360 kB]
Get:8 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/main arm64 DEP-11 Metadata [87.8 kB]
Get:9 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/main DEP-11 64x64 Icons [111 kB]
Get:10 http://mirrors.ustc.edu.cn/ubuntu-ports xenial-security/restricted Translation-en [2,152 B]
Fetched 360 kB in 7s (48.0 kB/s)
Reading package lists... Done
ubuntu 固件还不错,apt 也使用正常
插入一张 sd 卡 格式化为 ext4 挂载使用
sudo mkfs.ext4 /dev/mmcblk0p1 [sudo] password for ninetripod: mke2fs 1.42.13 (17-May-2015) /dev/mmcblk0p1 contains a exfat file system labelled '128' Proceed anyway? (y,n) y Discarding device blocks: done Creating filesystem with 31292928 4k blocks and 7823360 inodes Filesystem UUID: 6fffd4e9-aafe-46c5-b1e6-a0d18577346f Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done mkdir /home/ninetripod/sdcard/ sudo mount /dev/mmcblk0p1 /home/ninetripod/sdcard [sudo] password for ninetripod: ninetripod@X3399:~$ ls sdcard/ lost+found sudo vi rc.local mount /dev/mmcblk0p1 /home/ninetripod/sdcard
装上 bt 下载软件
sudo apt-get install qbittorrent-nox 启动 sudo qbittorrent-nox -d 浏览器登录 http://192.168.0.123:8080/ 用户名 admin 密码 adminadmin
安装 vnc server
E: You don't have enough free space in /var/cache/apt/archives/
sudo apt-get autoremove
sudo apt-get clean
安装报错,先清理一下
sudo apt-get install vnc4server
ninetripod@X3399:~$ vncserver
You will require a password to access your desktops.
Password:
Verify:
New 'X3399:1 (ninetripod)' desktop is X3399:1
Creating default startup script /home/ninetripod/.vnc/xstartup
Starting applications specified in /home/ninetripod/.vnc/xstartup
Log file is /home/ninetripod/.vnc/X3399:1.log
使用客户端连接 端口 5901
磁盘重置大小
ninetripod@X3399:/dev$ sudo resize2fs /dev/mmcblk1p9 resize2fs 1.42.13 (17-May-2015) Filesystem at /dev/mmcblk1p9 is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 The filesystem on /dev/mmcblk1p9 is now 3756544 (4k) blocks long. ninetripod@X3399:/dev$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 14727800 3675796 10397436 27% /
安装 samba 共享
sudo apt-get install samba
sudo vi /etc/samba/smb.conf [shared] comment = Users ninetripod path = /home/ninetripod guest ok = yes browseable = yes create mask = 0666 directory mask = 0777
配置不需要用户登录的网络共享
安装 nginx
sudo apt-get install nginx
版本是 1.10.3 配置root 路径
sudo vi /etc/nginx/sites-enabled/default root /home/ninetripod/; #配置主目录 autoindex on; #开启nginx目录浏览功能 autoindex_exact_size off; #文件大小从KB开始显示 autoindex_localtime on; #显示文件修改时间为服务器本地时间
这样配置以后,下载好的电影 就能直接在浏览器上观看。