找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 207761|回复: 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
复制代码


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


本帖子中包含更多资源

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

×

点评

懂了,去/etc/network里面重新配置了下静态的地址,然后又去/etc/resolv.conf文件配置了dns,就ok了,感谢大佬  发表于 2018-10-17 02:11
最后一步,卸载了那个network manager之后,网络基本处于瘫痪状态了,本地局域网没问题,外网甚至连更新apt get都一直0%不会动  发表于 2018-10-17 02:05
先安装了小钢炮,再安装armbian,不能安进内存呢?只能u盘启动!  发表于 2018-10-11 13:15
遇到一个奇怪的问题 我按同样的步骤刷到N1的EMMC上 但是并不能启动 U盘启动是没问题的  发表于 2018-8-30 20:46

评分

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

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2018-12-5 11:46 | 显示全部楼层
wknlm 发表于 2018-12-5 11:34
输入“/boot/create-mbr-linux.sh”,回车运行脚本。 是干啥用的?

最新版本已经没有这一步了

点评

我的刷了后 配置也没有 在U盘的时候进不去桌面系统,一直黑屏,难道需要双清?  发表于 2019-3-27 15:05
建议加一步 进入刷系统前,先进安卓系统 adb connect [ip],adb reboot recovery ,进入rec 后 双清,再继续安装步骤2,不然会有安装后 没法进入系统现象。  发表于 2018-12-13 17:53
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 07:54 | 显示全部楼层
准备折腾N1,感谢
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 07:54 | 显示全部楼层
看不懂呀看不懂
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 07:56 | 显示全部楼层
            支持一下
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 07:57 来自手机 | 显示全部楼层
前排支持你
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 07:57 | 显示全部楼层
这个关注下
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 07:57 | 显示全部楼层
学习一下了。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 08:09 | 显示全部楼层
不错,没事研究
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 08:11 | 显示全部楼层
本帖最后由 丁豆 于 2018-8-27 08:18 编辑

这个要关注支持一下!总共有六个版本,下载哪一个?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 08:11 | 显示全部楼层
学习一下!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 08:14 来自手机 | 显示全部楼层
不错,露珠起来那么早发帖
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 08:14 | 显示全部楼层
感谢分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 08:15 | 显示全部楼层
感谢大神分享!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 08:16 | 显示全部楼层
测试测试。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-8-27 08:16 | 显示全部楼层
谢谢楼主的研究
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-3-28 18:08

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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