差别
这里会显示出您选择的修订版和当前版本之间的差别。
后一修订版 | 前一修订版 | ||
技术细节:更新linux内核 [2022/04/26 10:46] baolitoumu 创建 |
技术细节:更新linux内核 [2022/04/29 10:37] (当前版本) baolitoumu |
||
---|---|---|---|
行 1: | 行 1: | ||
- | ====== Updating the Linux Kernel ====== | + | 首先值得庆幸的是reMarkable没有锁定设备,用户能轻松获取SSH端口的测试权限。而且他们也没有关闭调试接口,用户可以引导自己的启动器和Linux内核。reMarkable使用OpenEmbedded来构建rootFS,但是如果他们分享出自己的修改并开源的话就更好了。 |
- | First, | + | 此外,reMarkable也公开了他们的u-boot |
- | They also release their u-boot and Linux source code, although they do legally have to. Here they could do a better job of upstreaming their changes, this improves the user experience (as it's easier to update kernels) and helps developers. | + | ===== Linux如何发布工作 |
- | + | ||
- | ===== How Linux releases work ===== | + | |
A new mainline Linux kernel release happens about every 2-3 months. These releases are the major and minor versions, for example 4.14 and 4.15. Some of these releases are marked as long term, the 4.14 release is a long term release. Long term releases continue to receive point releases afterwards. At this time of this writing the latest 4.14 point release is 4.14.218. | A new mainline Linux kernel release happens about every 2-3 months. These releases are the major and minor versions, for example 4.14 and 4.15. Some of these releases are marked as long term, the 4.14 release is a long term release. Long term releases continue to receive point releases afterwards. At this time of this writing the latest 4.14 point release is 4.14.218. | ||
- | It is perfectly acceptable to use a long term release (for example 4.14) it is critical that the point releases are regularly updated. These releases fix critical security vulnerabilities as well as other important bugs. To get an idea of how many CVEs (security vulnerabilities) have been fixed for the 4.14 kernel, have a look here: https:// | + | 大约每2-3个月就会有一个新的主流Linux内核发布。这些版本分别是主要版本和次要版本,例如4.14和4.15。其中一些版本被标记为长期版本,4.14版本就是一个长期版本。长期版本之后继续有若干修正版本。在撰写本文时,最新的4.14修正版本是4.14.218。 |
+ | |||
+ | It is perfectly acceptable to use a long term release (for example 4.14) it is critical that the point releases are regularly updated. These releases fix critical security vulnerabilities as well as other important bugs. To get an idea of how many CVEs (security vulnerabilities) have been fixed for the 4.14 kernel, have a look here: [[https:// | ||
If you are used to Linux on your desktop you might use long term releases then. For example Ubuntu 20.04 shipped with the 5.4 kernel. Ubuntu 20.04 will continue to use the 5.4 release. The key difference here is that Ubuntu continues to update the point releases of their kernel. | If you are used to Linux on your desktop you might use long term releases then. For example Ubuntu 20.04 shipped with the 5.4 kernel. Ubuntu 20.04 will continue to use the 5.4 release. The key difference here is that Ubuntu continues to update the point releases of their kernel. | ||
===== Remarkable 2 ===== | ===== Remarkable 2 ===== | ||
+ | |||
The rM2 shipped and as of this writing continues to use the 4.14.78 kernel. The 4.14 kernel was released in 2017 and the 4.14.78 update was shipped in 2018. The 4.14.78 kernel is unpatched and unsupported, | The rM2 shipped and as of this writing continues to use the 4.14.78 kernel. The 4.14 kernel was released in 2017 and the 4.14.78 update was shipped in 2018. The 4.14.78 kernel is unpatched and unsupported, | ||
- | The rM2 uses a kernel that was forked from this branch: https:// | + | The rM2 uses a kernel that was forked from this branch: |
==== Update to 4.14 kernel ==== | ==== Update to 4.14 kernel ==== | ||
- | It should be pretty easy to rebase the rM2 zero-sugar tree on the latest from the https:// | + | |
+ | It should be pretty easy to rebase the rM2 zero-sugar tree on the latest from the [[https:// | ||
==== Update to 5.4 kernel ==== | ==== Update to 5.4 kernel ==== | ||
- | Currently the work is to rebase it on the i.MX branch from the FSL sources. That is, to rebase the remarkable patches on top of this branch: https:// | ||
- | The latest 5.4 rM2 kernel | + | Currently the work is to rebase it on the i.MX branch from the FSL sources. That is, to rebase the remarkable patches on top of this branch: [[https:// |
- | For a list of issues with the 5.4 build see: https:// | + | The latest 5.4 rM2 kernel is available here: [[https:// |
+ | |||
+ | For a list of issues with the 5.4 build see: [[https:// | ||
=== Build === | === Build === | ||
First build the kernel and modules | First build the kernel and modules | ||
+ | < | ||
- | | + | ARCH=arm CROSS_COMPILE=arm-none-eabi- make imx_v6_v7_defconfig |
- | ARCH=arm CROSS_COMPILE=arm-none-eabi- make -j8 | + | ARCH=arm CROSS_COMPILE=arm-none-eabi- make -j8 |
- | ARCH=arm CROSS_COMPILE=arm-none-eabi- make modules_install INSTALL_MOD_PATH=./ | + | ARCH=arm CROSS_COMPILE=arm-none-eabi- make modules_install INSTALL_MOD_PATH=./ |
- | rm -rf tmp/ | + | rm -rf tmp/ |
+ | |||
+ | </ | ||
Then copy the modules to the rM2 | Then copy the modules to the rM2 | ||
- | | + | < |
- | + | scp -r tmp/ | |
+ | |||
+ | </ | ||
Copy the Linux image and device tree | Copy the Linux image and device tree | ||
- | | + | < |
- | scp -r arch/ | + | scp -r arch/ |
- | + | scp -r arch/ | |
+ | |||
+ | </ | ||
Then SSH to the device. Under / | Then SSH to the device. Under / | ||
行 53: | 行 65: | ||
==== Update to mainline kernel ==== | ==== Update to mainline kernel ==== | ||
- | There is also on going work to run a mainline (official) kernel on the rM2. That effort can be seen here: https:// | + | |
+ | There is also on going work to run a mainline (official) kernel on the rM2. That effort can be seen here: [[https:// | ||
This is a work in progress, so only things that work are listed below | This is a work in progress, so only things that work are listed below | ||
=== What works === | === What works === | ||
- | - Full boot | + | |
- | - UART | + | - Full boot - UART |
+ |