Raspberry Pi: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 208: Line 208:


| valign="top" |
| valign="top" |
* [https://downloads.raspberrypi.org/raspios_lite_arm64/images/ Raspberry PiOS AArch64 Lite]
* [https://downloads.raspberrypi.org/raspios_lite_arm64/images/ Download Raspberry PiOS AArch64 Lite]
* [https://downloads.raspberrypi.org/raspios_arm64/images/ Raspberry PiOS AArch64 Full]
* [https://downloads.raspberrypi.org/raspios_arm64/images/ Download Raspberry PiOS AArch64 Full]
* [https://turingpi.com/turing-pi-2-announcement/ Turing Pi V2 Announcement]
* [https://turingpi.com/turing-pi-2-announcement/ Turing Pi V2 Announcement]
* [[Fedora/Raspberry Pi]]
* [[Fedora/Raspberry Pi]]

Revision as of 10:30, 15 November 2021

Maker pHAT

<pdf page="9">File:Pi_maker_phat_users_manual.pdf</pdf>

touch /Volumes/boot/ssh
screen /dev/tty.wchusbserial14430 115200

WPA Supplicant

cat <<EOF > /Volumes/boot/wpa_supplicant.conf
country=MY
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
scan_ssid=1
ssid="ChorkeOrg_2.4GHz"
psk="p@$$w0rd"
}
EOF
sudo raspi-config
sudo nano /etc/dhcpcd.conf
# Chorke Academia, Inc.
# static domain_name_servers=10.19.83.100 10.19.83.1
static domain_search=dev.shahed.biz
# static host_name=pi3
sudo systemctl restart dhcpcd
sudo systemctl daemon-reload

sudo apt install resolvconf
sudo apt install openresolv
sudo resolvconf -u

# execute in ssh client machine
ssh-copy-id -i ~/.ssh/rpi_chorke_rsa [email protected]
ssh -i ~/.ssh/rpi_chorke_rsa [email protected]
# ~/.ssh/config
Host rpi.bgd.chorke.org
     HostName 10.19.83.203
     PreferredAuthentications publickey
     IdentityFile ~/.ssh/rpi_chorke_rsa
     User pi
ssh rpi.bgd.chorke.org
apt install openjdk-8-jre
apt install openjdk-8-jdk
update-alternatives --config java
update-alternatives --config javac
dpkg-reconfigure phpmyadmin
apt autoremove

Firmware Update

sudo apt update
sudo apt full-upgrade

sudo rpi-update
sudo init 6

sudo rpi-eeprom-update -d -a
sudo init 6

sudo raspi-config

Swap Memory

printf '\nbefore:\n';free -th;\
sed -i "s|CONF_SWAPSIZE=100|CONF_SWAPSIZE=2048|" /etc/dphys-swapfile;\
service dphys-swapfile restart;\
printf '\nupdate:\n';free -th

Operating Voltage

for id in core sdram_c sdram_i sdram_p;do \
    echo -e "$id:\t$(vcgencmd measure_volts $id)";\
done

Dotnet Core

sudo su
mkdir -p /opt/dotnet
chown pi /opt/dotnet
sudo apt udpate
sudo apt install curl libunwind8 gettext apt-transport-https
sudo apt install libicu63 libssl1.1
cd /opt/dotnet
# download from http://cdn.chorke.org/soft/rpix/dotnet/
sudo tar zxf dotnet-sdk-2.2.102-linux-arm.tar.gz -C /opt/dotnet/
sudo tar zxf dotnet-runtime-2.1.9-linux-arm.tar.gz -C /opt/dotnet/
sudo tar zxf aspnetcore-runtime-2.2.1-linux-arm.tar.gz -C /opt/dotnet/
echo 'export DOTNET_ROOT=opt/dotnet' >> ~/.bash_profile
echo 'export PATH=$PATH:$DOTNET_ROOT' >> ~/.bash_profile
printenv
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
dotnet --info
dotnet --help

Core Project

cd ~/Documents
mkdir HelloWorld
cd HelloWorld

dotnet new console
dotnet publish -r linux-arm
bin/Debug/netcoreapp2.2/linux-arm/publish/HelloWorld
# Hello World!

dotnet publish -r win-arm
bin/Debug/netcoreapp2.2/win-arm/publish/HelloWorld
# Hello World!


Knowledge

systemctl list-unit-files
systemctl daemon-reload

References