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