Difference between revisions of "Template:OfficialUbuntuCore"
From FriendlyELEC WiKi
(updated by API) |
(updated by API) |
||
Line 39: | Line 39: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
To change the setting of "eth1" you can add a new file similar to eth0's configuration file under the /etc/network/interfaces.d/ directory. | To change the setting of "eth1" you can add a new file similar to eth0's configuration file under the /etc/network/interfaces.d/ directory. | ||
− | === | + | ===Install the kernel-header package=== |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | + | sudo dpkg -i /opt/linux-headers-*.deb | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | <!-- Build kernel header --> | ||
+ | {{#switch: {{{1}}} | ||
+ | | NanoPi-R4S | ||
+ | ===Build kernel-header deb package=== | ||
+ | Please refre to: https://github.com/friendlyarm/sd-fuse_rk3399/blob/kernel-5.10.y/test/test-build-kernel-header-deb.sh <br /> | ||
+ | | NanoPi-R2S | ||
+ | | NanoPi-R2C = | ||
+ | ===Build kernel-header deb package=== | ||
+ | Please refre to: https://github.com/friendlyarm/sd-fuse_rk3328/blob/master/test/test-build-kernel-header-deb.sh <br /> | ||
+ | | #default = | ||
+ | }} | ||
+ | |||
+ | |||
+ | <!-- LEDs --> | ||
+ | {{#switch: {{{1}}} | ||
+ | | NanoPi-R4S | ||
+ | | NanoPi-R2S | ||
+ | | NanoPi-R2C = | ||
+ | ===Config status LEDs=== | ||
+ | Put the following into the autorun script to associate the status leds with the ethernet interface, and you can configure it to behave in other ways by referring to these content: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | echo netdev > /sys/class/leds/wan_led/trigger | ||
+ | echo eth0 > /sys/class/leds/wan_led/device_name | ||
+ | echo 1 > /sys/class/leds/wan_led/link | ||
+ | |||
+ | echo netdev > /sys/class/leds/lan_led/trigger | ||
+ | echo eth1 > /sys/class/leds/lan_led/device_name | ||
+ | echo 1 > /sys/class/leds/lan_led/link | ||
+ | </syntaxhighlight> | ||
+ | | #default = | ||
+ | }} |
Revision as of 09:32, 18 November 2021
Contents
1 Work with FriendlyCore
1.1 FriendlyCore User Account
- Non-root User:
User Name: pi Password: pi
- Root:
User Name: root Password: fa
1.2 Update Software Packages
$ sudo apt-get update
1.3 Setup Network Configurations
By default "eth0" is assigned an IP address obtained via dhcp. If you want to change the setting you need to change the following file:
vi /etc/network/interfaces.d/eth0
For example if you want to assign a static IP to it you can run the following commands:
auto eth0 iface eth0 inet static address 192.168.1.231 netmask 255.255.255.0 gateway 192.168.1.1
You also need to modify the following file to add the DNS configuration:
vi /etc/systemd/resolved.conf
例如设置为192.168.1.1:
[Resolve] DNS=192.168.1.1
Restart the systemd-resolved service with the following command:
sudo systemctl restart systemd-resolved.service sudo systemctl enable systemd-resolved.service
To change the setting of "eth1" you can add a new file similar to eth0's configuration file under the /etc/network/interfaces.d/ directory.
1.4 Install the kernel-header package
sudo dpkg -i /opt/linux-headers-*.deb