找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 210294|回复: 669

[N1盒子] [2018-09-08更新5.60版本4.18.7内核]给N1/T1装上原生Armbian_4.18内核

 火... [复制链接]
发表于 2018-8-27 07:50 | 显示全部楼层 |阅读模式
本帖最后由 nml 于 2019-1-3 13:35 编辑

4.x内核终于迎来了好消息,我们可以将armbian完全移植到N1上了。

==========分割线被我吃了=============

0. 线刷恢复到w大的2.19官改版本。此步骤非必须,推荐系统乱了的玩家,根据个人情况选择操作。但如果是其他情况,也必须先降级和线刷到2.19的w大版本,前期流程与刷3.x内核大致一样。传送门

1. 下载0823以后日期编译的4.18内核的5.59版本armbian镜像,解压缩后自己用合适的工具写入U盘,复制dtb文件夹内的meson-gxl-s905d-p230.dtb到根目录为dtb.img。
国外源
国内镜像
密码:n4n3

deb升级文件使用方法(免去重装系统烦恼):下载目录180829/deb下的文件,解压(用winscp或scp)导入armbian后,在相应目录执行:
  1. apt remove -y armbian-firmware
  2. dpkg -i *.deb
复制代码

重启即可像往常一样使用WiFi。

2. N1关机,插入U盘到那个神奇的接口,接通电源,冷启动。
更新:不插U盘,N1进入安卓。执行"adb connect $ip"后,执行"adb shell reboot update"。黑屏关机后,插入U盘。
如果已经进入过一次U盘系统了,在之后,当你自己没有重新改写U盘与N1数据内容的情况下,可以直接冷启动进入U盘系统。

3. 登陆root账户。还会让你创建一个普通账户,不要退出,走完流程,反正后面可以干净地删除。
(如果你没有这个提示,说明你需要从第一部开始重新走一遍,没那么多凭什么)

下面示范中的“haodong”换成你自己的用户名,后面的不用填,最后一个填y。

  1. Creating a new user account. Press <Ctrl-C> to abort

  2. Please provide a username (eg. your forename): haodong
  3. Trying to add user haodong
  4. perl: warning: Setting locale failed.
  5. perl: warning: Please check that your locale settings:
  6.         LANGUAGE = "en_US.UTF-8",
  7.         LC_ALL = (unset),
  8.         LC_CTYPE = "UTF-8",
  9.         LC_MESSAGES = "en_US.UTF-8",
  10.         LANG = "en_US.UTF-8"
  11.     are supported and installed on your system.
  12. perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
  13. Adding user `haodong' ...
  14. Adding new group `haodong' (1000) ...
  15. Adding new user `haodong' (1000) with group `haodong' ...
  16. Creating home directory `/home/haodong' ...
  17. Copying files from `/etc/skel' ...
  18. Enter new UNIX password:
  19. Retype new UNIX password:
  20. passwd: password updated successfully
  21. Changing the user information for haodong
  22. Enter the new value, or press ENTER for the default
  23.         Full Name []:
  24.         Room Number []:
  25.         Work Phone []:
  26.         Home Phone []:
  27.         Other []:
  28. Is the information correct? [Y/n] y

  29. Dear haodong, your account haodong has been created and is sudo enabled.
  30. Please use this account for your daily work from now on.
复制代码

4. 如果需要保留原emmc内的电视盒子/linux系统数据,输入“ddbr”后根据提示操作备份。
(第四步是可省略步骤,以下是必须步骤。)


5. 输入“/boot/create-mbr-linux.sh”,回车运行脚本。
  1. root@aml:~# /boot/create-mbr-linux.sh
  2. Start script create MBR and filesystem
  3. Start backup u-boot default
  4. 4+0 records in
  5. 4+0 records out
  6. 4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.114559 s, 36.6 MB/s
  7. Start create MBR and partittion
  8. Start restore u-boot
  9. 442+0 records in
  10. 442+0 records out
  11. 442 bytes copied, 0.00242346 s, 182 kB/s
  12. 8191+0 records in
  13. 8191+0 records out
  14. 4193792 bytes (4.2 MB, 4.0 MiB) copied, 0.269637 s, 15.6 MB/s
  15. Done
复制代码

6.  输入“/root/install.sh”,回车运行脚本。

  1. root@aml:~# /root/install.sh
  2. Start copy system for eMMC.
  3. Formatting BOOT partition...mkfs.fat 4.1 (2017-01-24)
  4. done.
  5. Cppying kernel image...done.
  6. Cppying initrd...done.
  7. Writing script eMMC...done.
  8. Writing script eMMC_AML...done.
  9. Writing init ENV...done.
  10. Writing device tree image...done.
  11. Formatting ROOT partition...
  12. /dev/mmcblk1p2 contains a ext4 file system labelled 'ROOT_EMMC'
  13. last mounted on / on Thu Jan 1 00:00:04 1970
  14. e2fsck 1.43.4 (31-Jan-2017)
  15. ROOT_EMMC: clean, 11/427392 files, 50723/1706240 blocks
  16. done.
  17. Copying ROOTFS.
  18. Copy BIN
  19. Create DEV
  20. Copy ETC
  21. Copy HOME
  22. Copy LIB
  23. Create MEDIA
  24. Create MNT
  25. Copy OPT
  26. Create PROC
  27. Copy ROOT
  28. Create RUN
  29. Copy SBIN
  30. Copy SELINUX
  31. Copy SRV
  32. Create SYS
  33. Create TMP
  34. Copy USR
  35. Copy VAR
  36. Copy fstab
  37. cp: cannot stat '/root/fstab4': No such file or directory
  38. rm: cannot remove '/ddbr/install/usr/bin/kvim_full': No such file or directory
  39. rm: cannot remove '/ddbr/install/usr/bin/kvim_update': No such file or directory
  40. rm: cannot remove '/ddbr/install/usr/bin/kvim2_full': No such file or directory
  41. rm: cannot remove '/ddbr/install/usr/bin/kvim2_update': No such file or directory
  42. *******************************************
  43. Done copy ROOTFS
  44. *******************************************
  45. *******************************************
  46. Complete copy OS to eMMC
  47. *******************************************
复制代码


7. 重启。关机后拔掉U盘,登陆验证权限。

需要提醒注意的是,图中可以看到,容量扩大成了6.x多个G,这是因为安装脚本格式化掉了三个安卓分区。
不过不用担心,w大的线刷教程随时可以刷回盒子系统,此提示谨防小白。

福利国内镜像源:
食用方法:替换"/etc/apt/sources.list"内容。
  1. #deb http://httpredir.debian.org/debian stretch main contrib non-free
  2. #deb-src http://httpredir.debian.org/debian stretch main contrib non-free
  3. #deb http://httpredir.debian.org/debian stretch-updates main contrib non-free
  4. #deb-src http://httpredir.debian.org/debian stretch-updates main contrib non-free
  5. #deb http://httpredir.debian.org/debian stretch-backports main contrib non-free
  6. #deb-src http://httpredir.debian.org/debian stretch-backports main contrib non-free
  7. #deb http://security.debian.org/ stretch/updates main contrib non-free
  8. #deb-src http://security.debian.org/ stretch/updates main contrib non-free

  9. # add test repo
  10. #deb http://ftp.de.debian.org/debian testing main contrib non-free

  11. deb [ arch=arm64,armhf ] https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free
  12. #deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free
  13. deb [ arch=arm64,armhf ] https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free
  14. #deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free
  15. deb [ arch=arm64,armhf ] https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free
  16. #deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free
  17. deb [ arch=arm64,armhf ] https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main contrib non-free
  18. #deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main contrib non-free
  19. #deb [ arch=arm64,armhf ] https://mirrors.tuna.tsinghua.edu.cn/debian/ sid main contrib non-free
复制代码



总结:

1. 注意,4.x内核到8月27日为止并没有WiFi模块,蓝牙可以识别但据说不能正常工作。有需求的可以等作者下次完善。更新,29日的升级补丁已经加入了WiFi支持。

2. 有些人刷机出现的权限问题,症结就在于我步骤中的第二步——新做U盘的ext4主分区不能被暴露。因为有些错误的教程让大家在Android里就插入U盘,但是这样会导致主分区被污染,所以会导致权限紊乱。解决办法是严格按照我所给的第二步,从第一步开始正确地重走一遍。

3. 有个别小朋友,使用本教程后,无法引导进入linux系统,便迁怒与此。我只能问,你刷机时候"擦除flash“的钩打了吗?

4. 按照步骤来,结果还是不能进入系统。这是由于在第一步,复制dtb.img文件的时候,产生了东八区的时间戳,而镜像系统默认是格林威治时间。于是就造成了系统不识别“来自未来的8个小时之后的”文件,所以引导失败。

解决办法:在第三步进入系统之后,第四步操作写入eMMC之前,执行以下命令修复时间:
  1. cp /boot/dtb.img /boot/dtb.img.bak
  2. mv /boot/dtb.img.bak /boot/dtb.img
复制代码


5. 关于断流问题,经过调研发现,不是某一系统或某一设备的单独现象,网上的案例非常非常多。故我自己写了一个脚本,可以无人值守维持有线网络,传送门
2018-09-06更新:

经过观察系统日志发现,断流问题是由于NetworkManger模块的错误引起的,证据如下:

  1. 4713 Sep  6 00:41:45 nice NetworkManager[7788]: <info>  [1536165705.4667] caught SIGTERM, shutting down normally.
  2. 4714 Sep  6 00:41:45 nice NetworkManager[7788]: <info>  [1536165705.4771] device (wlan0): state change: disconnected -> unmanaged (reason 'unmanaged') [30 10 3]
  3. 4715 Sep  6 00:41:46 nice NetworkManager[7788]: <info>  [1536165706.0429] exiting (success)
复制代码
解决办法:彻底清除该模块。(不推荐在ssh环境中进行该操作)

  1. apt-get remove --purge network-manager -y
复制代码


已在我的机器上测试成功,至今没有任何断流问题。
且卸载重启后,对原网络配置完全不影响。
如果你的网络有问题,请手动配置,教程:自己百度。


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

评分

参与人数 16恩山币 +15 收起 理由
如疯*** + 1 面对这种帖子,我内心复杂,真不知道说什么好……
wanghu*** -1 所有的版本输入/boot/create-mbr-linux.sh都提示无法找到
righ*** + 1 强大的恩山!(以下重复1万次)
By*** + 1 t1 5.62 版本的ubuntu识别不了 rootfs,慎刷
a54*** + 1 率全体恩山路由党以及党魁向你学习!
陆*** + 1 网络大神的力量甚至已经超过了各种专业的pi
xing*** + 1 强大的恩山!(以下重复1万次)
Sex*** + 1 3种固件在T1上用好像都不能关机和重启
jyp*** + 1 率全体恩山路由党以及党魁向你学习!
io*** + 1 写的不错!
sa*** + 1 非常强大,两台n1都完美刷入,强烈推荐!!
L-v*** + 1 每次重启mac地址都会变
ph*** + 2 率全体恩山路由党以及党魁向你学习!
com*** + 1 &amp;lt;font style=&amp;quot;vertical-align: inh
潜*** + 1 强大的恩山!(以下重复1万次)
wsz*** + 1 目前没有无线网卡支持,请没网线的注意

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2018-8-27 08:26 | 显示全部楼层
wszgrcy 发表于 2018-8-27 08:21
大佬又骗我刷机,问下分区能不能预先分好?我是把android的system挂载了,这次能不能直接抹掉合并成一个呢?
...

感谢反馈
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-27 11:24 | 显示全部楼层
cccc_magicboy 发表于 2018-8-27 11:11
百度云的密码是多少?

电脑网页自动打开没有密码
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-27 11:25 | 显示全部楼层
wangmucha 发表于 2018-8-27 10:24
你这个和4.16版本一样吧,还是不能完全脱离U盘,因为只有3.14的有找到有效的dtb.img文件,4.16不行,4.18应 ...

仔细看完了再说。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-27 11:26 | 显示全部楼层
wszgrcy 发表于 2018-8-27 10:35
反馈:最新的4.18有问题.我安装后modprobe dhd无法开启无线模块这个在3.14内核中是正常的modprobe wifi_dumm ...

wifi模块在4.x中都没有,暂时用千兆网口吧。
后面会有的。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-27 16:30 | 显示全部楼层
永恒印记 发表于 2018-8-27 09:11
Armbian可以实现什么功能?远程下载 共享 游戏 ?有没有人科普一下!

基于n1的soc本身超强的解码能力,做nas家庭影院这个就不用说了。
装上了资源丰富的armbian之后,下载、共享都没问题。
游戏我不玩,不过理论上是可以的。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-27 16:31 | 显示全部楼层
哈哈哈哈哈1 发表于 2018-8-27 09:45
之前3.14内核跑的配置怎么备份啊

第四步是全盘备份。
因为linux系统不是安卓那种可定制的终端机,无法单独备份你所谓的“配置”。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-27 16:35 | 显示全部楼层
64139303 发表于 2018-8-27 12:40
官方版本 可以不用刷W大的系统 直接刷你这个吗

不行。前面的刷机流程和3.x一样。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-27 17:04 | 显示全部楼层
fhxu 发表于 2018-8-27 16:56
大佬教我装kodi,还有pt的工具,也就这点需求了,现在用coreelec,cpu的占用好像有点高

kodi,pt都是可以的。
这里有个教程,你看看transmission部分就是可以做pt的。

点评

感谢回复,那我是刷服务器版,还是桌面版的?主要就是上面说的kodi+pt,谢谢!  详情 回复 发表于 2018-8-27 18:03
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-27 18:07 | 显示全部楼层
fhxu 发表于 2018-8-27 18:03
感谢回复,那我是刷服务器版,还是桌面版的?主要就是上面说的kodi+pt,谢谢!

熟悉linux命令的直接刷服务器就行。
不熟悉的可以先来桌面版熟悉走起。
两个都一样的,都能实现你的功能,服务器版系统效能更高,但对熟练度也要求高。
总之,根据个人情况和喜好了。

点评

好的,再问一下,kodi是硬解,还是软解  详情 回复 发表于 2018-8-27 18:10
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-27 18:15 | 显示全部楼层
fhxu 发表于 2018-8-27 18:10
好的,再问一下,kodi是硬解,还是软解

首先我没用过。
但是n1本身自带硬件解码,这一点既然硬件支持了,软件应该也可以。

点评

昨天折腾到了一点钟。。。结果就是kodi无法启动。。。凉凉  详情 回复 发表于 2018-8-28 08:37
好的,明白,我看看能不能折腾上  详情 回复 发表于 2018-8-27 18:24
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-28 13:35 | 显示全部楼层
fhxu 发表于 2018-8-28 08:37
昨天折腾到了一点钟。。。结果就是kodi无法启动。。。凉凉

错误提示是什么?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-28 19:08 | 显示全部楼层
永恒印记 发表于 2018-8-28 14:31
感谢科普,另外再咨询一下,是不是可以远程访问,有没有控制台界面?

smb功能等我过几天硬盘到了测试
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-30 21:43 | 显示全部楼层
黑口袋 发表于 2018-8-30 20:03
刷不进去啊,别的都可以,拔掉U盘后N1就不能开机了,我也是醉了

已更新解决该问题的办法,在最后第四点注意
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-8-31 15:12 | 显示全部楼层
wmslecz 发表于 2018-8-31 14:00
楼主,你好,我刷了过后遇到两个问题: 1.启动的时候报了某个system module没有加载成功 2.zram服务无法启 ...

都遇到了,都不影响正常使用。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-26 01:04

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表