Difference between revisions of "Template:RockchipCommonLinuxTips"
(updated by API) |
(updated by API) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
Enable on Startup | Enable on Startup | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | mv /etc/init.d/K50usbdevice /etc/init.d/S50usbdevice | + | mv /etc/init.d/K50usbdevice.sh /etc/init.d/S50usbdevice.sh |
reboot | reboot | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 24: | Line 24: | ||
When using ADB, the port connected to the computer is the same as the USB flashing port. | When using ADB, the port connected to the computer is the same as the USB flashing port. | ||
===Install Kernel Headers=== | ===Install Kernel Headers=== | ||
+ | To install the .deb file located in the /opt/archives directory: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo dpkg -i /opt/archives/linux-headers-*.deb | sudo dpkg -i /opt/archives/linux-headers-*.deb | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | To download and update the kernel header files online: | ||
+ | <div style="border:1px solid #d8d8d8; padding-top:5px; padding-right:10px; padding-bottom:5px; padding-left:10px; background-color:#f8f8f8;"> | ||
+ | wget <nowiki>http://112.124.9.243</nowiki>/archives/{{{1}}}/linux-headers-$(uname -r)-latest.deb<br> | ||
+ | sudo dpkg -i ./linux-headers-latest.deb | ||
+ | </div> | ||
+ | You can visit <nowiki>http://112.124.9.243</nowiki>/archives/{{{1}}} to see which kernel deb packages are available. | ||
+ | {{#switch: {{{1}}} | ||
+ | | rk3566 | ||
+ | | rk3568 | ||
+ | | rk3588 = | ||
===Update Kernel to Latest Version=== | ===Update Kernel to Latest Version=== | ||
This will update the kernel to the latest version and update the kernel and resource partitions, as well as the kernel modules: | This will update the kernel to the latest version and update the kernel and resource partitions, as well as the kernel modules: | ||
− | <div style="border:1px solid | + | <div style="border:1px solid #d8d8d8; padding-top:5px; padding-right:10px; padding-bottom:5px; padding-left:10px; background-color:#f8f8f8;"> |
− | wget http://112.124.9.243/archives/{{{1}}}/linux-image-latest.deb<br> | + | wget <nowiki>http://112.124.9.243</nowiki>/archives/{{{1}}}/linux-image-$(uname -r)-latest.deb<br> |
sudo dpkg -i ./linux-image-latest.deb<br> | sudo dpkg -i ./linux-image-latest.deb<br> | ||
sudo reboot | sudo reboot | ||
</div> | </div> | ||
− | + | | #default = | |
− | < | + | }} |
− | + | === Setting Kernel Boot Parameters (eMMC Only) === | |
− | + | Flash the firmware file XXXX-eflasher-multiple-os-YYYYMMDD-30g.img.gz to a TF card, then insert the TF card into your computer. Windows will usually recognize the TF card partition automatically (formatted as exFAT). For Linux or Mac users, manually mount the first partition of the TF card. Assuming the TF card’s device name is /dev/sdX, mount /dev/sdX1.<br /> | |
− | + | <br /> | |
+ | Edit the info.conf configuration file in the OS directory on the TF card, adding the bootargs-ext parameter. For example: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | bootargs-ext=rockchipdrm.fb_max_sz=2048 | ||
+ | </syntaxhighlight> | ||
+ | To remove a specified parameter, set it to empty. For example, to remove the userdata parameter: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | bootargs-ext=userdata= | ||
+ | </syntaxhighlight> | ||
+ | After editing, use this TF card to flash the system to eMMC.<br /> | ||
+ | <br /> | ||
+ | To set kernel boot parameters during the creation of a mass production card, refer to the following script (example for RK3588): | ||
+ | https://github.com/friendlyarm/sd-fuse_rk3588/blob/kernel-6.1.y/test/test-custom-bootargs.sh |
Latest revision as of 03:52, 30 October 2024
Contents
1 Common Linux-based operating system operations
1.1 Using ADB on Linux Systems
1.1.1 Enabling ADB in Buildroot System
Enable on Startup
mv /etc/init.d/K50usbdevice.sh /etc/init.d/S50usbdevice.sh reboot
Enable Temporarily
usbdevice-wrapper start
1.1.2 Enabling ADB in Ubuntu and Debian Systems
Enable on Startup
sudo systemctl enable usbdevice sudo reboot
Enable Temporarily
usbdevice-wrapper start
1.1.3 How to Connect
When using ADB, the port connected to the computer is the same as the USB flashing port.
1.2 Install Kernel Headers
To install the .deb file located in the /opt/archives directory:
sudo dpkg -i /opt/archives/linux-headers-*.deb
To download and update the kernel header files online:
wget http://112.124.9.243/archives/{{{1}}}/linux-headers-$(uname -r)-latest.deb
sudo dpkg -i ./linux-headers-latest.deb
You can visit http://112.124.9.243/archives/{{{1}}} to see which kernel deb packages are available.
1.3 Setting Kernel Boot Parameters (eMMC Only)
Flash the firmware file XXXX-eflasher-multiple-os-YYYYMMDD-30g.img.gz to a TF card, then insert the TF card into your computer. Windows will usually recognize the TF card partition automatically (formatted as exFAT). For Linux or Mac users, manually mount the first partition of the TF card. Assuming the TF card’s device name is /dev/sdX, mount /dev/sdX1.
Edit the info.conf configuration file in the OS directory on the TF card, adding the bootargs-ext parameter. For example:
bootargs-ext=rockchipdrm.fb_max_sz=2048
To remove a specified parameter, set it to empty. For example, to remove the userdata parameter:
bootargs-ext=userdata=
After editing, use this TF card to flash the system to eMMC.
To set kernel boot parameters during the creation of a mass production card, refer to the following script (example for RK3588):
https://github.com/friendlyarm/sd-fuse_rk3588/blob/kernel-6.1.y/test/test-custom-bootargs.sh