No need to erase spi, short-circuit the pins should be ok.
FYI:
Armbian for Rock 3A (unofficial build) with mainline kernel
Doing it, moved the needle a bit so SPL is armbian’s U-Boot SPL 2017.09-armbian (Jun 02 2022 - 11:43:16)
but still the same while trying to boot
U-Boot 2017.09-armbian (Jun 02 2022 - 11:43:16 +0000)
Model: Radxa ROCK 3 Model A
PreSerial: 2, raw, 0xfe660000
DRAM: 7.7 GiB
Sysmem: init
Relocation Offset: ed34a000
Relocation fdt: eb9f7740 - eb9fecd0
CR: M/C/I
Using default environment
PCIe-0 Link Fail
no mmc device at slot 1
dwmmc@fe2b0000: 1 (SD), dwmmc@fe2c0000: 2, sdhci@fe310000: 0
Bootdev(atags): mmc 1
MMC1: Legacy, 52Mhz
PartType: EFI
No misc partition
boot mode: None
FIT: No boot partition
No resource partition
No resource partition
Failed to load DTB, ret=-19
Failed to get kernel dtb, ret=-19
I2c0 speed: 100000Hz
vsel-gpios- not found! Error: -2
vdd_cpu 1025000 uV
PMIC: RK8090 (on=0x40, off=0x00)
vdd_logic init 900000 uV
vdd_gpu init 900000 uV
vdd_npu init 900000 uV
io-domain: OK
Model: Radxa ROCK 3 Model A
rockchip_set_serialno: could not find efuse/otp device
CLK: (sync kernel. arm: enter 816000 KHz, init 816000 KHz, kernel 0N/A)
apll 816000 KHz
dpll 780000 KHz
gpll 1188000 KHz
cpll 1000000 KHz
npll 24000 KHz
vpll 24000 KHz
hpll 24000 KHz
ppll 200000 KHz
armclk 816000 KHz
failed to find reset-gpios property
No ethernet found.
missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/000
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/00
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/0
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm-rockchip
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default-arm
No ethernet found.
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/default
No ethernet found.
Config file not found
failed to find reset-gpios property
No ethernet found.
No ethernet found.
## Booting FIT Image FIT: No boot partition
FIT: No FIT image
MMC error: The cmd index is 0, ret is -110
mmc_init: -110, time 5
Could not get mmc 0
I also tried to follow the recovery instructions from armbian to force and boot on the right mmc but also no luck
=> ext4load mmc 1:1 0x49000000 /boot/dtb/${fdtfile}
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
I don’t know why you get PartType: EFI
. I just flashed my sd card using balenaEtcher 1.4.9 (shoud downloaded from radxa) using this image. I got PartType: DOS
, and the system booted up successfully. Here is the log:
U-Boot SPL board init
U-Boot SPL 2017.09-armbian (Jun 06 2022 - 16:11:31)
unknown raw ID phN
unrecognized JEDEC id bytes: 00, 00, 00
Trying to boot from MMC2
## Verified-boot: 0
## Checking atf-1 0x00040000 ... sha256(2f01bd8955...) + OK
## Checking uboot 0x00a00000 ... sha256(90721ad81d...) + OK
## Checking fdt 0x00b2ea70 ... sha256(c721e0d639...) + OK
## Checking atf-2 0xfdcc9000 ... sha256(f1fecab971...) + OK
## Checking atf-3 0xfdcd0000 ... sha256(d7aa45eb18...) + OK
Jumping to U-Boot(0x00a00000) via ARM Trusted Firmware(0x00040000)
Total: 240.67 ms
INFO: Preloader serial: 2
NOTICE: BL31: v2.3():v2.3-152-g4e725b15f:cl
NOTICE: BL31: Built : 10:51:13, Jul 15 2021
INFO: GICv3 without legacy support detected.
INFO: ARM GICv3 driver initialized in EL3
INFO: pmu v1 is valid
INFO: dfs DDR fsp_param[0].freq_mhz= 1560MHz
INFO: dfs DDR fsp_param[1].freq_mhz= 324MHz
INFO: dfs DDR fsp_param[2].freq_mhz= 528MHz
INFO: dfs DDR fsp_param[3].freq_mhz= 780MHz
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 0
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 = 0xa00000
INFO: SPSR = 0x3c9
U-Boot 2017.09-armbian (Jun 06 2022 - 16:11:31 +0000)
Model: Radxa ROCK 3 Model A
PreSerial: 2, raw, 0xfe660000
DRAM: 7.7 GiB
Sysmem: init
Relocation Offset: ed34a000
Relocation fdt: eb9f7740 - eb9fecd0
CR: M/C/I
Using default environment
PCIe-0 Link Fail
no mmc device at slot 1
dwmmc@fe2b0000: 1 (SD), dwmmc@fe2c0000: 2, sdhci@fe310000: 0
Bootdev(atags): mmc 1
MMC1: Legacy, 52Mhz
PartType: DOS
No misc partition
boot mode: None
FIT: No boot partition
No resource partition
No resource partition
Failed to load DTB, ret=-19
Failed to get kernel dtb, ret=-19
I2c0 speed: 100000Hz
vsel-gpios- not found! Error: -2
vdd_cpu 900000 uV
PMIC: RK8090 (on=0x02, off=0x08)
vdd_logic init 900000 uV
vdd_gpu init 900000 uV
vdd_npu init 900000 uV
io-domain: OK
Model: Radxa ROCK 3 Model A
rockchip_set_serialno: could not find efuse/otp device
CLK: (sync kernel. arm: enter 816000 KHz, init 816000 KHz, kernel 0N/A)
apll 816000 KHz
dpll 780000 KHz
gpll 1188000 KHz
cpll 1000000 KHz
npll 24000 KHz
vpll 24000 KHz
hpll 24000 KHz
ppll 200000 KHz
armclk 816000 KHz
aclk_bus 150000 KHz
pclk_bus 50000 KHz
aclk_top_high 300000 KHz
aclk_top_low 200000 KHz
hclk_top 150000 KHz
pclk_top 50000 KHz
aclk_perimid 300000 KHz
hclk_perimid 150000 KHz
pclk_pmu 100000 KHz
No misc partition
Net: No ethernet found.
Hit key to stop autoboot('CTRL+C'): 0
failed to find reset-gpios property
Device 0: unknown device
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot/boot.scr
3185 bytes read in 16 ms (194.3 KiB/s)
## Executing script at 00c00000
Boot script loaded from mmc 1
244 bytes read in 14 ms (16.6 KiB/s)
18449221 bytes read in 1567 ms (11.2 MiB/s)
30769664 bytes read in 2589 ms (11.3 MiB/s)
112636 bytes read in 99 ms (1.1 MiB/s)
** File not found /boot/dtb/rockchip/overlay/rk35xx-fixup.scr **
Fdt Ramdisk skip relocation
No misc partition
## Loading init Ramdisk from Legacy Image at 0a200000 ...
Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 18449157 Bytes = 17.6 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 0x0a100000
Booting using the fdt blob at 0x0a100000
reserving fdt memory region: addr=a100000 size=81000
Using Device Tree in place at 000000000a100000, end 000000000a183fff
can't found rockchip,drm-logo, use rockchip,fb-logo
WARNING: could not set reg FDT_ERR_BADOFFSET.
failed to reserve fb-loader-logo memory
Adding bank: 0x00200000 - 0xf0000000 (size: 0xefe00000)
Adding bank: 0x100000000 - 0x200000000 (size: 0x100000000)
Total: 5635.799 ms
Starting kernel ...
Armbian 22.08.0-trunk Jammy ttyS2
rock-3a login:
@jaysonsantos Hello, can you boot the image from radxa on this sdcard? Armbian and radxa use the same u-boot.
I had radxa’s image there before.
I will try writing the sdcard from a linux machine (instead of macos) to see how it goes.
balena tested the image and it worked fine
Now that you pointed it out, I just erased the sdcard to make it mbr and it worked.
Strange thing though, I had the feeling that the image itself would override the partition scheme, no?
The image partition type is DOS. It should overwrite the SD card partition type. I’ve made a test:
flash the image to the SD card after changing the partition type by running command like /sbin/parted -s /dev/sdb mklabel gpt
. The SD card partition type will be DOS back. Maybe there’s something special on your SD card.
For that one I used macos to generate the image, that could be the reason
I will add an entry on the wiki to make sure some other people don’t hit this again
@piter75 from armbian has found the root cause: https://forum.armbian.com/topic/12352-orange-pi-4/page/3/#comment-94322
If you use macos to generate the images, make sure you use the gnu utils instead of the macos bsd utils.
brew install coreutils
and add /opt/homebrew/bin
to your PATH.
Update 20220626
Armbian has disabled the pwm patch from legacy kernel: https://github.com/armbian/build/pull/3928. To make our pwm fan overlay work, there should be some modification: https://github.com/armbian/build/pull/3935. We have to replace the active
to default
. So the pwm fan overlay file should be like:
/dts-v1/;
/plugin/;
/ {
compatible = "rockchip,rk3568";
fragment@0 {
target = <&pwm8>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pwm8m0_pins>;
};
};
};
I have been unable to get this working on Armbian 22.08
#!/bin/bash
cat << EOF >> ~/rk3568-pwm8-m0-fan.dts
/dts-v1/;
/plugin/;
/ {
compatible = "rockchip,rk3568";
fragment@0 {
target = <&pwm8>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pwm8m0_pins>;
};
};
};
EOF
armbian-add-overlay rk3568-pwm8-m0-fan.dts
cat > /etc/systemd/system/fan-control.service <<EOF
[Service]
RemainAfterExit=true
ExecStart=bash -exc '\
echo 0 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/export || true; \
echo 10000 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/pwm0/period && \
echo 5000 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/pwm0/duty_cycle && \
echo normal > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/pwm0/polarity && \
echo 1 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/pwm0/enable'
ExecStop=bash -exc 'echo 0 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/pwm0/enable'
[Install]
WantedBy=multi-user.target
EOF
systemctl enable fan-control.service
reboot now
Any ideas?
Which kernel do you use. What’s your output of uname -a
?
Sorry I’ve been away and I don’t have access at the moment:
Linux rock3a 5.18.12-rk35xx #trunk.0071 SMP PREEMPT Fri Jul 15 09:43:22 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
Updated to supported image instead of using one that I compiled to use AX210 card:
https://www.armbian.com/rock-3a/
Linux rock-3a 5.19.5-rk35xx #22.08.1 SMP PREEMPT Tue Aug 30 07:09:39 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
Still getting the same issue.
fan-control service is working:
root@rock-3a:~# systemctl status fan-control ● fan-control.service Loaded: loaded (/etc/systemd/system/fan-control.service; enabled; vendor preset: enabled) Active: active (exited) since Thu 2022-09-15 16:36:43 BST; 6min ago Process: 1478 ExecStart=bash -exc echo 0 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/export || true; echo 10000 > /sys/devices/platform/fe6f0000.pwm/pwm/pwmchip*/pwm0/period && echo 5000 > /sys/devices/platform/fe6f> Main PID: 1478 (code=exited, status=0/SUCCESS) CPU: 10ms Sep 15 16:36:43 rock-3a systemd[1]: Started fan-control.service. Sep 15 16:36:43 rock-3a bash[1478]: + echo 0 Sep 15 16:36:43 rock-3a bash[1478]: + echo 10000 Sep 15 16:36:43 rock-3a bash[1478]: + echo 5000 Sep 15 16:36:43 rock-3a bash[1478]: + echo normal Sep 15 16:36:43 rock-3a bash[1478]: + echo 1
but the fan is not on and even if i manually push the command it stays off
any ideas would be appreciated
I can’t see any problems from your info. Here is what I did to start the fan:
1, install overlay using armbian-add-overlay command just like you did
2, create a shell script /usr/local/bin/start-pwm-fan.sh:
#!/bin/bash
echo 0 > /sys/class/pwm/pwmchip0/export
echo 10000 > /sys/class/pwm/pwmchip0/pwm0/period
echo 3000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle
echo normal > /sys/class/pwm/pwmchip0/pwm0/polarity
echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
sudo chmod +x /usr/local/bin/start-pwm-fan.sh
3, add /usr/local/bin/start-pwm-fan.sh
to /etc/rc.local
yeah the only difference is your fan is working and mine isn’t
it does do the boot spin so its not the fan or power it juts wont work during normal use
rookie error - forgot to attach the cable to the main board
Note: I was seeing the fan run at boot and that was what made me think there was nothing else amiss
all good now though
Thanks for doing this. Armbian still does not support panfrost on 6.0.y kernel. I’m not sure why they are not configuring it in, but they aren’t. This little cpu just isn’t enough to be used with any graphical display without that gpu being used.
Still can’t use this though because wireguard can’t be installed because it requires linux-image-rt-6.0 or something and that won’t install for some reason. Then apt completely breaks because of this, needing to dpkg -r --force-depends wireguard or something. I don’t know, but there are some major incompatibilities with using the apt sources provided.
armbian edge should have panfrost built as module: https://github.com/armbian/build/blob/master/config/kernel/linux-rockchip64-edge.config#L6057