Rpi64开发日志stage2

概览:

0. Environment &linux kernel & gcc toolchain

host

1
2
3
4
sudo apt install build-essential bison make
sudo apt install axel cmake
sudo apt install kpartx util-linux f2fs-tools
sudo apt install libncurses5-dev libssl-dev

rpi64

  • rpi: RaspberryPi 3b+

  • OS: debian buster

  • kernel: https://github.com/raspberrypi/linux 4.19.73

1
2
3
4
5
sudo apt install build-essential bison make -y
sudo apt install axel cmake -y
sudo apt install kpartx util-linux f2fs-tools -y
sudo apt install debootstrap -y
sudo apt install curl usbutils -y

安装WiringPi

gpio设置权限位,

1
sudo chmod u+s /opt/wiringPi/bin/gpio

设置软连接

1
sudo ln -s /opt/wiringPi/bin/gpio /usr/bin/gpio

设置rsyslog

编辑/etc/rsyslog.conf #GuzalAida daemon log

  • local0.* /var/log/GuzalAida/GuzalAida0

& sudo mkdir /var/log/GuzalAida

安装VC

Source code for ARM side libraries for interfacing to Raspberry Pi GPU.

编辑sudo nano /etc/udev/rules.d/99-input.rules,与一下内容比较

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
SUBSYSTEM=="input", GROUP="input", MODE="0660"
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"
SUBSYSTEM=="argon-*", GROUP="video", MODE="0660"
SUBSYSTEM=="rpivid-*", GROUP="video", MODE="0660"
SUBSYSTEM=="vchiq", GROUP="video", MODE="0660"

SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\
chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\
chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\
chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\
'"

KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
echo 0;\
elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
echo 1; \
else \
exit 1; \
fi\
'", SYMLINK+="serial%c"

KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
echo 0; \
elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
echo 1; \
else \
exit 1; \
fi \
'", SYMLINK+="serial%c"

sudo usermod -a -G video guzal

1
2
3
sudo nano /etc/ld.so.conf.d/guzalaida.conf
++ /opt/vc/lib
sudo ldconfig

软连接

1
2
sudo ln -s /opt/vc/bin/vcgencmd /usr/bin/vcgencmd
sudo ln -s /opt/vc/bin/vchiq_test /usr/bin/vchiq_test

test

1
2
vcgencmd measure_clock arm
#frequency(45)=600000000

vcgencmd选项:**vcgencmd commands**

https://elinux.org/RPI_vcgencmd_usage

连接5GWIF

  • wifi国家设置

查看wifi国家或地区设置

1
2
guzal@GuzalAida:~$ sudo wpa_cli -i wlan0 get country
CN

raspi-config https://raw.githubusercontent.com/RPi-Distro/raspi-config/master/raspi-config (recommend)

请先设置wifi country

1
sudo nmtui -> Activate a connection -> 选择wifi

追加软件

1
2
3
sudo apt install usbutils
sudo apt install bluetooth
sudo apt install ntfs-3g

update fstab

sudo chown -R guzal:guzal /mnt/vfat /mnt/btrfs

1
2
3
4
5
6
guzal@GuzalAida:~$ cat /etc/fstab 
# UNCONFIGURED FSTAB FOR BASE SYSTEM
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / f2fs defaults,noatime 0 1
UUID="DAA9-53E7" /mnt/vfat vfat defaults,rw,noexec,noatime,nofail,user,umask=0000,uid=1000,gid=1000 0 0
UUID="225ddd42-b107-4c01-a9ef-da0b38997305" /mnt/btrfs btrfs defaults,rw,noexec,noatime,user,nofail 0 0
------ 文章已经结束,谢谢你的阅读 ------
------ article has ended,thank you for reading ------
Thanks support Me

---------------- The End ----------------