The latest (software) Chinesium
1395 ? Ss 0:00 /usr/bin/bash /home/mks/Desktop/myfile/ws/start.sh
1403 ? Sl 0:02 /home/mks/Desktop/myfile/ws/build/mksclient
Todo
Pin | Function |
---|---|
1 | SWDIO |
2 | 3.3V |
3 | SWCLK |
4 | GND? |
5 | RESET |
6 | GND |
PA4 | FAN1 + FAN3 (unpopulated) | Heater Fan “FAN0” | |
Moved to its own page: MainsailOS on Artillery Sidewinder X4.
TODO
Add a 30x30mm fan 5V which will always run and cool the SOC when idling.
/sidewinder_x4/x4_mainboard_fan_plate.3mf
Uboot over USB-C
Serial 1500000 8N1
Set console=ttyS2 to see systemd output
QinHeng Electronics CH340 serial converter
Driver: https://www.wch-ic.com/products/CH340.html
TODO: STrip more unneeded drivers
via host gpio..
lrwxrwxrwx 1 root root 0 May 13 02:58 gpio79 -> ../../devices/platform/pinctrl/ff230000.gpio/gpiochip2/gpio/gpio79
lrwxrwxrwx 1 root root 0 May 13 02:57 gpiochip0 -> ../../devices/platform/pinctrl/ff210000.gpio/gpio/gpiochip0
lrwxrwxrwx 1 root root 0 May 13 02:57 gpiochip32 -> ../../devices/platform/pinctrl/ff220000.gpio/gpio/gpiochip32
lrwxrwxrwx 1 root root 0 May 13 02:58 gpiochip509 -> ../../devices/platform/ff100000.syscon/ff100000.syscon:gpio/gpio/gpiochip509
lrwxrwxrwx 1 root root 0 May 13 02:57 gpiochip510 -> ../../devices/platform/ff160000.i2c/i2c-1/1-0018/rk805-pinctrl/gpio/gpiochip510
lrwxrwxrwx 1 root root 0 May 13 02:57 gpiochip64 -> ../../devices/platform/pinctrl/ff230000.gpio/gpio/gpiochip64
lrwxrwxrwx 1 root root 0 May 13 02:57 gpiochip96 -> ../../devices/platform/pinctrl/ff240000.gpio/gpio/gpiochip96
79 is gantry led according to https://github.com/urtziDV/ArtilleryX4Macros/blob/main/gantryleds_on
GPIO SYSFS needed https://cateee.net/lkddb/web-lkddb/GPIO_SYSFS.html
https://www.klipper3d.org/RPi_microcontroller.html
mks
gpiochip0 - 32 lines:
line 0: unnamed "vcc-host2-5v-regulator" output active-high [used]
line 1: unnamed unused input active-high
line 2: unnamed "vcc-host1-5v-regulator" output active-high [used]
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed "sdmmc-regulator" output active-low [used]
line 31: unnamed unused input active-high
gpiochip1 - 32 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed "reset" output active-low [used]
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed "interrupt" input active-high [used]
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
gpiochip2 - 32 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused output active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused output active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
gpiochip3 - 32 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed "spi0 CS1" output active-low [used]
line 8: unnamed "spi0 CS0" output active-low [used]
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
gpiochip4 - 2 lines:
line 0: unnamed "firefly: yellow: user" output active-low [used]
line 1: unnamed "firefly: blue: power" output active-low [used]
gpiochip5 - 1 lines:
line 0: unnamed "vcc_sdio" output active-high [used]
c
mine:
gpiochip0 - 32 lines:
line 0: unnamed "vcc-host2-5v-regulator" output active-high [used]
line 1: unnamed unused input active-high
line 2: unnamed "vcc-host1-5v-regulator" output active-high [used]
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed "sdmmc-regulator" output active-low [used]
line 31: unnamed unused input active-high
gpiochip1 - 32 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed "reset" output active-low [used]
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed "interrupt" input active-high [used]
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
gpiochip2 - 32 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused output active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed unused input active-high
line 8: unnamed unused input active-high
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused output active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
gpiochip3 - 32 lines:
line 0: unnamed unused input active-high
line 1: unnamed unused input active-high
line 2: unnamed unused input active-high
line 3: unnamed unused input active-high
line 4: unnamed unused input active-high
line 5: unnamed unused input active-high
line 6: unnamed unused input active-high
line 7: unnamed "spi0 CS1" output active-low [used]
line 8: unnamed "spi0 CS0" output active-low [used]
line 9: unnamed unused input active-high
line 10: unnamed unused input active-high
line 11: unnamed unused input active-high
line 12: unnamed unused input active-high
line 13: unnamed unused input active-high
line 14: unnamed unused input active-high
line 15: unnamed unused input active-high
line 16: unnamed unused input active-high
line 17: unnamed unused input active-high
line 18: unnamed unused input active-high
line 19: unnamed unused input active-high
line 20: unnamed unused input active-high
line 21: unnamed unused input active-high
line 22: unnamed unused input active-high
line 23: unnamed unused input active-high
line 24: unnamed unused input active-high
line 25: unnamed unused input active-high
line 26: unnamed unused input active-high
line 27: unnamed unused input active-high
line 28: unnamed unused input active-high
line 29: unnamed unused input active-high
line 30: unnamed unused input active-high
line 31: unnamed unused input active-high
gpiochip4 - 2 lines:
line 0: unnamed "firefly: yellow: user" output active-low [used]
line 1: unnamed "firefly: blue: power" output active-low [used]
gpiochip5 - 1 lines:
line 0: unnamed "vcc_sdio" output active-high [used]
cd ~/klipper/
make menuconfig
sudo service klipper stop
make flash
sudo cp ./scripts/klipper-mcu.service /etc/systemd/system/
sudo systemctl enable klipper-mcu.service
sudo service klipper start
$ sudo /usr/local/bin/klipper_mcu -r -I /tmp/klipper_host_mcu
Got error -1 in sched_setscheduler: (1)Operation not permitted
sched_get_priority_max(SCHED_FIFO) = 99
sched_setscheduler(0, SCHED_FIFO, [49]) = -1 EPERM (Operation not permitted)
write(2, "Got error -1 in sched_setschedul"..., 63Got error -1 in sched_setscheduler: (1)Operation not permitted
) = 63
exit_group(-1) = ?
+++ exited with 255 +++
https://klipper.discourse.group/t/armbian-kernel-klipper-host-mcu-got-error-1-in-sched-setschedule/1193
TODO: Disable RT Scheduling? Fix via sysctl??
Bootloader Log
INFO: PSCI Power Domain Map:
INFO: Domain Node : Level 2, parent_node -1, State ON (0x0)
INFO: Domain Node : Level 1, parent_node 0, State ON (0x0)
INFO: Domain Node : Level 0, parent_node 0, State ON (0x0)
INFO: Domain Node : Level 0, parent_node 0, State ON (0x0)
INFO: CPU Node : MPID 0x0, parent_node 1, State ON (0x0)
INFO: CPU Node : MPID 0x1, parent_node 1, State ON (0x0)
INFO: CPU Node : MPID 0x2, parent_node 1, State ON (0x0)
INFO: CPU Node : MPID 0x3, parent_node 1, State ON (0x0)
DDR version 1.16 20190528
ID:0x805 N
In
SRX
DDR3
333MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
ddrconfig:1
OUT
Boot1 Release Time: May 13 2019 17:34:36, version: 2.50
ChipType = 0x11, 310
mmc2:cmd19,100
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=7456MB
FwPartOffset=2000 , 2000
SdmmcInit=0 NOT PRESENT
StorageInit ok = 11074
Raw SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit ret = 0, SecureMode = 0
atags_set_bootdev: ret:(0)
GPT 0x337a9f0 signature is wrong
recovery gpt...
GPT 0x337a9f0 signature is wrong
recovery gpt fail!
LoadTrust Addr:0x4000
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0xae7a8
RunBL31 0x40000
INFO: Preloader serial: 2
NOTICE: BL31: v1.3(debug):403e0b816
NOTICE: BL31: Built : 14:13:08, Aug 11 2020
NOTICE: BL31:Rockchip release version: v1.3
INFO: ARM GICv2 driver initialized
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 1
INFO: plat_rockchip_pmu_init: pd status 0xe
INFO: BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR: Error initializing runtime service opteed_fast
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
U-Boot 2021.07-armbian (Jul 25 2022 - 01:50:32 +0000)
Model: Makerbase mkspi
DRAM: 1022 MiB
PMIC: RK8050 (on=0x40, off=0x01)
MMC: mmc@ff500000: 1, mmc@ff520000: 0
Loading Environment from MMC... Card did not respond to voltage select! : -110
*** Warning - No block device, using default environment
In: serial@ff130000
Out: serial@ff130000
Err: serial@ff130000
Model: Makerbase mkspi
Net: eth1: ethernet@ff550000
Hit any key to stop autoboot: 0
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
334 bytes read in 3 ms (108.4 KiB/s)
1: Armbian
Retrieving file: /uInitrd
12588254 bytes read in 284 ms (42.3 MiB/s)
Retrieving file: /Image
30327296 bytes read in 683 ms (42.3 MiB/s)
append: root=UUID=5dcae443-0796-4029-ae6c-bf5bd2a37067 console=uart8250,mmio32,0xff130000 console=tty0 rootflags=data=writeback rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 bootsplash.bootfile=bootsplash.armbian
Retrieving file: /dtb/rockchip/rk3328-roc-cc.dtb
65331 bytes read in 7 ms (8.9 MiB/s)
Moving Image from 0x2080000 to 0x2200000, end=3f90000
## Loading init Ramdisk from Legacy Image at 06000000 ...
Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 12588190 Bytes = 12 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01f00000
Booting using the fdt blob at 0x1f00000
Loading Ramdisk to 3d329000, end 3df2a49e ... OK
Loading Device Tree to 000000003d316000, end 000000003d328f32 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.16.20-rockchip64 (root@kenneth) (aarch64-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.3.0, GNU ld (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 2.32.0.20190321) #trunk SMP PREEMPT Mon Jul 25 01:58:45 UTC 2022
[ 0.000000] Machine model: Makerbase mks-pi
[ 0.000000] earlycon: uart8250 at MMIO32 0x00000000ff130000 (options '')
[ 0.000000] printk: bootconsole [uart8250] enabled
[ 0.000000] efi: UEFI not found.
uboot.log
INFO: PSCI Power Domain Map:
INFO: Domain Node : Level 2, parent_node -1, State ON (0x0)
INFO: Domain Node : Level 1, parent_node 0, State ON (0x0)
INFO: Domain Node : Level 0, parent_node 0, State ON (0x0)
INFO: Domain Node : Level 0, parent_node 0, State ON (0x0)
INFO: CPU Node : MPID 0x0, parent_node 1, State ON (0x0)
INFO: CPU Node : MPID 0x1, parent_node 1, State ON (0x0)
INFO: CPU Node : MPID 0x2, parent_node 1, State ON (0x0)
INFO: CPU Node : MPID 0x3, parent_node 1, State ON (0x0)
DDR version 1.16 20190528
ID:0x805 N
In
SRX
DDR3
333MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
ddrconfig:1
OUT
Boot1 Release Time: May 13 2019 17:34:36, version: 2.50
ChipType = 0x11, 310
mmc2:cmd19,100
SdmmcInit=2 0
BootCapSize=2000
UserCapSize=7456MB
FwPartOffset=2000 , 2000
SdmmcInit=0 NOT PRESENT
StorageInit ok = 11051
Raw SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit ret = 0, SecureMode = 0
atags_set_bootdev: ret:(0)
GPT 0x337a9f0 signature is wrong
recovery gpt...
GPT 0x337a9f0 signature is wrong
recovery gpt fail!
LoadTrust Addr:0x4000
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0xae7a8
RunBL31 0x40000
INFO: Preloader serial: 2
NOTICE: BL31: v1.3(debug):403e0b816
NOTICE: BL31: Built : 14:13:08, Aug 11 2020
NOTICE: BL31:Rockchip release version: v1.3
INFO: ARM GICv2 driver initialized
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 1
INFO: plat_rockchip_pmu_init: pd status 0xe
INFO: BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK
ERROR: Error initializing runtime service opteed_fast
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
U-Boot 2021.07-armbian (Jul 25 2022 - 01:50:32 +0000)
Model: Makerbase mkspi
DRAM: 1022 MiB
PMIC: RK8050 (on=0x40, off=0x01)
MMC: mmc@ff500000: 1, mmc@ff520000: 0
Loading Environment from MMC... Card did not respond to voltage select! : -110
*** Warning - No block device, using default environment
In: serial@ff130000
Out: serial@ff130000
Err: serial@ff130000
Model: Makerbase mkspi
Net: eth1: ethernet@ff550000
Hit any key to stop autoboot: 0
=> help
? - alias for 'help'
base - print or set address offset
bdinfo - print Board Info structure
blkcache - block cache diagnostics and control
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootefi - Boots an EFI payload from memory
bootelf - Boot from an ELF image in memory
booti - boot Linux kernel 'Image' format from memory
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
bootvx - Boot vxWorks from an ELF image
bootz - boot Linux zImage image from memory
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dhcp - boot image via network using DHCP/TFTP protocol
dm - Driver model low level access
echo - echo args to console
editenv - edit environment variable
env - environment handling commands
exit - exit script
ext2load - load binary file from a Ext2 filesystem
ext2ls - list files in a directory (default /)
ext4load - load binary file from a Ext4 filesystem
ext4ls - list files in a directory (default /)
ext4size - determine a file's size
false - do nothing, unsuccessfully
fastboot - run as a fastboot usb or udp device
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls - list files in a directory (default /)
fatmkdir - create a directory
fatrm - delete a file
fatsize - determine a file's size
fatwrite - write file into a dos filesystem
fdt - flattened device tree utility commands
fstype - Look up a filesystem type
fstypes - List supported filesystem types
go - start application at address 'addr'
gpt - GUID Partition Table
gzwrite - unzip and write memory to block device
help - print command description/usage
iminfo - print header information for application image
imxtract - extract a part of a multi-image
itest - return true/false on integer compare
ln - Create a symbolic link
load - load binary file from a filesystem
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loadx - load binary file over serial line (xmodem mode)
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
ls - list files in a directory (default /)
lzmadec - lzma uncompress a memory region
md - memory display
mdio - MDIO utility commands
mii - MII utility commands
mm - memory modify (auto-incrementing address)
mmc - MMC sub system
mmcinfo - display MMC info
mw - memory write (fill)
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
panic - Panic with optional message
part - disk partition related commands
ping - send ICMP ECHO_REQUEST to network host
pinmux - show pin-controller muxing
printenv - print environment variables
pxe - commands to get and boot from pxe files
random - fill memory with random pattern
reset - Perform RESET of the CPU
run - run commands in an environment variable
save - save file to a filesystem
saveenv - save environment variables to persistent storage
setenv - set environment variables
sf - SPI flash sub-system
showvar - print local hushshell variables
size - determine a file's size
sleep - delay execution for some time
source - run script from memory
sysboot - command to get and boot from syslinux files
test - minimal test like /bin/sh
tftpboot - boot image via network using TFTP protocol
time - run commands and summarize execution time
true - do nothing, successfully
unlz4 - lz4 uncompress a memory region
unzip - unzip a memory region
usb - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version
=> base
Base Address: 0x00000000
=> printenv
arch=arm
baudrate=1500000
board=evb_rk3328
board_name=evb_rk3328
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_efi_bootmgr=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_syslinux_conf=extlinux/extlinux.conf
boot_targets=mmc1 mmc0 usb0 pxe dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=setenv devtype dhcp; run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00011:UNDI:003000;setenv bootp_arch 0xb;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_mmc0=devnum=0; run mmc_boot
bootcmd_mmc1=devnum=1; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=devnum=0; run usb_boot
bootdelay=0
cpu=armv8
cpuid#=55524b58333230313200000000010d11
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
eth1addr=de:ec:5e:0d:c6:39
ethaddr=de:ec:5e:0d:c6:19
ethernet_phy=rtl8211f
fdt_addr_r=0x01f00000
fdtcontroladdr=3df2e5f0
fdtfile=rockchip/rk3328-roc-cc.dtb
kernel_addr_r=0x02080000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
partitions=uuid_disk=${uuid_gpt_disk};name=loader1,start=32K,size=4000K,uuid=${uuid_gpt_loader1};name=loader2,start=8MB,size=4MB,uuid=${uuid_gpt_loader2};name=trust,size=4M,uuid=${uuid_gpt_atf};name=boot,size=112M,bootable,uuid=${uuid_gpt_boot};name=rootfs,size=-,uuid=B921B045-1DF0-41C3-AF44-4C6F280D3FAE;
pxefile_addr_r=0x00600000
ramdisk_addr_r=0x06000000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x00500000
serial#=9651113ea1617548
soc=rk3328
stderr=serial@ff130000
stdin=serial@ff130000
stdout=serial@ff130000
usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
vendor=rockchip
Environment size: 4120/32764 bytes
=> bdinfo
boot_params = 0x0000000000000000
DRAM bank = 0x0000000000000000
-> start = 0x0000000000200000
-> size = 0x000000003fe00000
flashstart = 0x0000000000000000
flashsize = 0x0000000000000000
flashoffset = 0x0000000000000000
baudrate = 1500000 bps
relocaddr = 0x000000003ff43000
reloc off = 0x000000003fd43000
Build = 64-bit
current eth = ethernet@ff550000
ethaddr = de:ec:5e:0d:c6:19
IP addr = <NULL>
fdt_blob = 0x000000003df2e5f0
new_fdt = 0x000000003df2e5f0
fdt_size = 0x000000000000c800
lmb_dump_all:
memory.cnt = 0x1
memory.reg[0x0].base = 0x200000
.size = 0x3fe00000
reserved.cnt = 0x1
reserved.reg[0x0].base = 0x3df2d210
.size = 0x20d2df0
arch_number = 0x0000000000000000
TLB addr = 0x000000003fff0000
irq_sp = 0x000000003df2e5e0
sp start = 0x000000003df2e5e0
Early malloc usage: 1318 / 2000
=> coninfo
List of available devices:
serial@ff130000 00000007 IO stdin stdout stderr
serial 00000003 IO
=> fdt
fdt - flattened device tree utility commands
Usage:
fdt addr [-c] <addr> [<length>] - Set the [control] fdt location to <addr>
fdt apply <addr> - Apply overlay to the DT
fdt move <fdt> <newaddr> <length> - Copy the fdt to <addr> and make it active
fdt resize [<extrasize>] - Resize fdt to size + padding to 4k addr + some optional <extrasize> if needed
fdt print <path> [<prop>] - Recursive print starting at <path>
fdt list <path> [<prop>] - Print one level starting at <path>
fdt get value <var> <path> <prop> - Get <property> and store in <var>
fdt get name <var> <path> <index> - Get name of node <index> and store in <var>
fdt get addr <var> <path> <prop> - Get start address of <property> and store in <var>
fdt get size <var> <path> [<prop>] - Get size of [<property>] or num nodes and store in <var>
fdt set <path> <prop> [<val>] - Set <property> [to <val>]
fdt mknode <path> <node> - Create a new node after <path>
fdt rm <path> [<prop>] - Delete the node or <property>
fdt header [get <var> <member>] - Display header info
get - get header member <member> and store it in <var>
fdt bootcpu <id> - Set boot cpuid
fdt memory <addr> <size> - Add/Update memory node
fdt rsvmem print - Show current mem reserves
fdt rsvmem add <addr> <size> - Add a mem reserve
fdt rsvmem delete <index> - Delete a mem reserves
fdt chosen [<start> <end>] - Add/update the /chosen branch in the tree
<start>/<end> - initrd start/end addr
NOTE: Dereference aliases by omitting the leading '/', e.g. fdt print ethernet0.
=> fstypes
Supported filesystems: fat, ext4
=> iminfo
## Checking Image at 00800800 ...
Unknown image format!
=> ls
ls - list files in a directory (default /)
Usage:
ls <interface> [<dev[:part]> [directory]]
- List files in directory 'directory' of partition 'part' on
device type 'interface' instance 'dev'.
=> mmcinfo
Device: mmc@ff520000
Manufacturer ID: d6
OEM: 103
Name: 58A39
Bus Speed: 52000000
Mode: MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 7.3 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
=> version
U-Boot 2021.07-armbian (Jul 25 2022 - 01:50:32 +0000)
aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025
GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 2.33.1.20191209
https://www.synacktiv.com/publications/i-hack-u-boot.html
https://voidstarsec.com/blog/uart-uboot-and-usb
That's orcish, right?
~# cat set-time.sh
#!/bin/bash
synced=false
while true; do
# 读取目标时区文件
# target_tz=$(cat /home/mks/target_timezone.txt)
# echo "目标时区是:$target_tz"
# # 使用timedatectl命令获取当前时区
# current_tz=$(timedatectl show --property=Timezone --value)
# echo "当前时区是:$current_tz"
# # 检查当前时区与目标时区是否匹配
# if [ "$current_tz" != "$target_tz" ]; then
# # 检查目标时区是否有效
# if timedatectl list-timezones | grep -q "^$target_tz$"; then
# # 使用timedatectl命令修改系统时区
# sudo timedatectl set-timezone "$target_tz"
# echo "系统时区已成功更改为$target_tz"
# else
# echo "无效的时区: $target_tz"
# fi
# fi
# 验证时间是否正确设置为新时区
current_time=$(date)
echo "当前时间: $current_time"
# 延时5秒
sleep 3
if ! $synced; then
if ping -c 1 -W 3 ntp.aliyun.com &> /dev/null; then
echo "网络连接正常"
# 进行NTP时间同步
/usr/sbin/ntpdate ntp.aliyun.com >/dev/null 2>&1
synced=true
echo "时间已成功同步"
else
echo "无法连接到网络"
fi
fi
if ! $synced; then
if ping -c 1 -W 3 pool.ntp.org &> /dev/null; then
echo "网络连接正常"
# 进行NTP时间同步
/usr/sbin/ntpdate pool.ntp.org >/dev/null 2>&1
synced=true
echo "时间已成功同步"
else
echo "无法连接到网络"
fi
fi
done
# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: cpufreq-dt
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 0 1 2 3
maximum transition latency: 68.0 us.
hardware limits: 408 MHz - 1.30 GHz
available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.30 GHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
current policy: frequency should be within 408 MHz and 1.30 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 600 MHz (asserted by call to hardware).
cpufreq stats: 408 MHz:35.70%, 600 MHz:3.81%, 816 MHz:3.58%, 1.01 GHz:0.60%, 1.20 GHz:0.30%, 1.30 GHz:56.01% (103)
analyzing CPU 1:
driver: cpufreq-dt
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 0 1 2 3
maximum transition latency: 68.0 us.
hardware limits: 408 MHz - 1.30 GHz
available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.30 GHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
current policy: frequency should be within 408 MHz and 1.30 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 600 MHz (asserted by call to hardware).
cpufreq stats: 408 MHz:35.70%, 600 MHz:3.81%, 816 MHz:3.58%, 1.01 GHz:0.60%, 1.20 GHz:0.30%, 1.30 GHz:56.01% (104)
analyzing CPU 2:
driver: cpufreq-dt
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 0 1 2 3
maximum transition latency: 68.0 us.
hardware limits: 408 MHz - 1.30 GHz
available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.30 GHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
current policy: frequency should be within 408 MHz and 1.30 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1.01 GHz (asserted by call to hardware).
cpufreq stats: 408 MHz:35.70%, 600 MHz:3.81%, 816 MHz:3.58%, 1.01 GHz:0.60%, 1.20 GHz:0.30%, 1.30 GHz:56.01% (104)
analyzing CPU 3:
driver: cpufreq-dt
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 0 1 2 3
maximum transition latency: 68.0 us.
hardware limits: 408 MHz - 1.30 GHz
available frequency steps: 408 MHz, 600 MHz, 816 MHz, 1.01 GHz, 1.20 GHz, 1.30 GHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
current policy: frequency should be within 408 MHz and 1.30 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1.01 GHz (asserted by call to hardware).
cpufreq stats: 408 MHz:35.70%, 600 MHz:3.81%, 816 MHz:3.58%, 1.01 GHz:0.60%, 1.20 GHz:0.30%, 1.30 GHz:56.01% (104)
https://opensource.rock-chips.com/wiki_RK3328
https://www.kernel.org/doc/html/next/devicetree/usage-model.html
https://github.com/dockcross/dockcross
https://forum.radxa.com/t/rockpi4-cpu-scaling/1321/4
https://github.com/redrathnure/armbian-mkspi → https://github.com/Phil1988/FreeQIDI
https://docs.u-boot.org/en/stable/develop/bootstd.html
Firefly Wiki: Flashing to the eMMC / Firmware format
中国的人权侵犯问题备受批评。主要问题包括:
压制政治异议:中国政府严格限制政治自由,审查和惩罚批评政府或倡导民主和人权的人。异见者、活动家和记者经常受到骚扰、拘留或监禁。
新疆的镇压:中国政府被指控对新疆的维吾尔族穆斯林和其他少数民族进行严重的人权侵犯,包括大规模监控、强迫劳动、在“再教育营”中的任意拘留和文化抹杀。
西藏:在西藏,中国政府实施旨在压制藏族文化和宗教的政策,限制宗教活动,并拘留倡导更大自治或独立的藏人。
言论自由:言论、新闻和互联网自由受到严重限制。政府通过广泛的审查和监控来控制和限制信息传播。
宗教团体的迫害:某些宗教团体,如法轮功修炼者和未登记的基督教会,面临迫害,包括任意拘留、强迫放弃信仰,甚至有酷刑报告。
劳动权利:工人的权利经常受到侵犯,工作条件差,缺乏独立工会,特别是在技术和纺织等行业中使用强迫劳动。
法律体系:中国的法律体系缺乏独立性,受到共产党控制,导致任意拘留、不公正审判和缺乏被指控犯罪者(尤其是政治犯罪者)的正当程序。
这些问题突显了在中国保护和促进人权方面的重大担忧。