09-06-2021, 02:30 AM
(This post was last modified: 12-01-2021, 04:53 AM by CounterPillow.)
(09-04-2021, 08:21 AM)ryo Wrote: Along with an error, although it seems like compilation went on regardless.
Code: CC net/tftp.o
lib/avb/libavb/avb_slot_verify.c: In function 'load_and_verify_vbmeta':
lib/avb/libavb/avb_slot_verify.c:476:40: error: 'found' may be used uninitialized in this function [-Werror=maybe-uninitialized]
476 | loaded_partition->partition_name = avb_strdup(found);
| ^~~~~~~~~~~~~~~~~
lib/avb/libavb/avb_slot_verify.c:299:15: note: 'found' was declared here
299 | const char* found;
| ^~~~~
CC drivers/video/drm/analogix_dp.o
LD net/built-in.o
CC test/dm/cmd_dm.o
LD test/dm/built-in.o
CC drivers/video/drm/analogix_dp_reg.o
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:280: lib/avb/libavb/avb_slot_verify.o] エラー 1
make[1]: *** [scripts/Makefile.build:425: lib/avb/libavb] エラー 2
make: *** [Makefile:1305: lib] エラー 2
make: *** 未完了のジョブを待っています....
LD drivers/watchdog/built-in.o
CC drivers/video/drm/rockchip_lvds.o
CC drivers/video/drm/rockchip_panel.o
LD drivers/video/drm/built-in.o
LD drivers/video/built-in.o
LD drivers/built-in.o
I ran into this too, and just did this:
Code: diff --git a/lib/avb/libavb/avb_slot_verify.c b/lib/avb/libavb/avb_slot_verify.c
index 123701fc3b..74fc5e7bb2 100644
--- a/lib/avb/libavb/avb_slot_verify.c
+++ b/lib/avb/libavb/avb_slot_verify.c
@@ -296,7 +296,7 @@ static AvbSlotVerifyResult load_and_verify_hash_partition(
bool image_preloaded = false;
uint8_t* digest;
size_t digest_len;
- const char* found;
+ const char* found = "";
uint64_t image_size;
size_t expected_digest_len = 0;
uint8_t expected_digest_buf[AVB_SHA512_DIGEST_SIZE];
(probably dangerous and wrong and bad I am lazy and simply wanted this to build)
Also, I think you should use the ./make.sh script, like the Quartz64 CI does.
If you run into any further issues, the quickest way to get help is probably in the Quartz64 channel of the PINE64 chats. I'm usually quite active there.
complete instructions that I just tried:-
Code: git clone --depth=1 -b next-dev https://github.com/rockchip-linux/u-boot.git u-boot
git clone --depth=1 https://github.com/rockchip-linux/rkbin.git rkbin
cd u-boot
wget https://gitlab.com/sndwvs/images_build_kit/-/raw/arm/patch/u-boot/rk3568/01-add-u-boot-quartz64.patch
patch -p1 < 01-add-u-boot-quartz64.patch
ln -sf ../rkbin/bin/rk35/rk3568_bl31_v1.24.elf bl31.elf
ln -sf ../rkbin/bin/rk35/rk3568_bl32_v1.05.bin tee.bin
make rk3566-quartz64_defconfig
make CROSS_COMPILE=aarch64-linux-gnu- -j4 && make CROSS_COMPILE=aarch64-linux-gnu- -j4 u-boot.itb
tools/mkimage -n rk356x -T rksd -d ../rkbin/bin/rk35/rk3566_ddr_1056MHz_v1.08.bin:spl/u-boot-spl.bin idblock.bin
This worked on my ubuntu virtualbox machine that I use for Armbian builds once I had installed gcc-aarch64-linux-gnu
It wouldn't compile on my Manjaro desktop (even with aarch64-linux-gnu-gcc installed)
I followed the various instructions and put onto a microSD card.
This is the output. Did I compile it right?
Code: U-Boot SPL board init
U-Boot SPL 2017.09-g1372a46 #root (Nov 27 2021 - 16:35:48)
unknown raw ID phN
unrecognized JEDEC id bytes: 00, 00, 00
Trying to boot from MMC2
## Verified-boot: 0
## Checking atf-1 0x00040000 ... sha256+ OK
## Checking uboot 0x00a00000 ... sha256+ OK
## Checking fdt 0x00b22708 ... sha256+ OK
## Checking atf-2 0xfdcc9000 ... sha256+ OK
## Checking atf-3 0xfdcd0000 ... sha256+ OK
## Checking optee 0x08400000 ... sha256+ OK
Jumping to U-Boot(0x00a00000) via ARM Trusted Firmware(0x00040000)
Total: 265.827 ms
INFO: Preloader serial: 2
NOTICE: BL31: v2.3():v2.3-135-gcda1658bc-dirty:xsf
NOTICE: BL31: Built : 14:19:26, Jun 1 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= 1056MHz
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
INFO: BL31: Initializing BL32
I/TC:
I/TC: Start rockchip platform init
I/TC: Rockchip release version: 1.0
I/TC: OP-TEE version: 3.6.0-307-g0b06ae94 #1 Fri May 7 01:52:27 UTC 2021 aarch4
I/TC: Initialized
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0xa00000
INFO: SPSR = 0x3c9
U-Boot 2017.09-g1372a46 #root (Nov 27 2021 - 16:36:25 +0000)
Model: Pine64 RK3566 Quartz64 Board
PreSerial: 2, raw, 0xfe660000
DRAM: 4 GiB
Sysmem: init
Relocation Offset: ed356000, fdt: eb9f93f8
Using default environment
no mmc device at slot 1
dwmmc@fe2b0000: 1 (SD), dwmmc@fe2c0000: 2, sdhci@fe310000: 0
Bootdev(atags): mmc 1
MMC1: Legacy, 50Mhz
PartType: EFI
No misc partition
boot mode: None
FIT: No boot partition
No resource partition
Failed to load DTB
Failed to get kernel dtb, ret=-19
io-domain: OK
Model: Pine64 RK3566 Quartz64 Board
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 528000 KHz
gpll 1188000 KHz
cpll 1000000 KHz
npll 24000 KHz
vpll 24000 KHz
hpll 24000 KHz
ppll 100000 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 50000 KHz
Net: clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -2.
Hit key to stop autoboot('CTRL+C'): 0
## Booting FIT Image FIT: No boot partition
FIT: No FIT image
Could not find misc partition
ANDROID: reboot reason: "(none)"
optee api revision: 2.0
TEEC: Waring: Could not find security partition
Not AVB images, AVB skip
android_image_load_by_partname: Can't find part: boot
Android image load failed
Android boot failed, error -1.
switch to partitions #0, OK
mmc1 is current device
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
MMC error: The cmd index is 0, ret is -110
mmc_init: -110, time 4
starting USB...
Bus dwc3@fcc00000: usb maximum-speed not found
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus dwc3@fd000000: usb maximum-speed not found
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus dwc3@fcc00000 for devices... 1 USB Device(s) found
scanning bus dwc3@fd000000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Device 0: unknown device
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22missind
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22missine
Retrieving file: pxelinux.cfg/00000000
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22missine
Retrieving file: pxelinux.cfg/0000000
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22missine
Retrieving file: pxelinux.cfg/000000
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22missine
Retrieving file: pxelinux.cfg/00000
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22missine
Retrieving file: pxelinux.cfg/0000
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22missine
Retrieving file: pxelinux.cfg/000
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22missine
Retrieving file: pxelinux.cfg/00
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22missine
Retrieving file: pxelinux.cfg/0
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22missine
Retrieving file: pxelinux.cfg/default-arm-rockchip
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22missine
Retrieving file: pxelinux.cfg/default-arm
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22missine
Retrieving file: pxelinux.cfg/default
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22Configd
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22clk_ge.
clk_get_by_name(master_bus) failed: -22eqos_probe_resources() failed: -22=>
11-27-2021, 12:12 PM
(This post was last modified: 11-27-2021, 12:16 PM by mara.)
yes, the bootloader is compiled and loaded.
now we need a correct markup structure
Code: echo -e "\ng\nn\n1\n32768\n+512M\nt\n1\nn\n2\n\n\nw" | fdisk /dev/mmcblk0
I had already done that step.
Before I noticed your reply I tried something else.
I bitwise copied (with dd) partition 2 and 3 from one of your SLARM64 images (so the EFI partition and rootlinux partition) onto the SDCard, but didn't touch the partition table nor partition 1.
It worked fine and booted up so I going say that it works.
I have copied the code here https://github.com/dieselnutjob/u-boot
With a readme here https://github.com/dieselnutjob/u-boot/b...4-a/README
hopefully in a way that's easy for less experienced people
Thanks for your efforts with this board.
Code: CC net/tftp.o
lib/avb/libavb/avb_slot_verify.c: In function 'load_and_verify_vbmeta':
lib/avb/libavb/avb_slot_verify.c:476:40: error: 'found' may be used uninitialized in this function [-Werror=maybe-uninitialized]
476 | loaded_partition->partition_name = avb_strdup(found);
| ^~~~~~~~~~~~~~~~~
lib/avb/libavb/avb_slot_verify.c:299:15: note: 'found' was declared here
299 | const char* found;
| ^~~~~
CC drivers/video/drm/analogix_dp.o
LD net/built-in.o
CC test/dm/cmd_dm.o
LD test/dm/built-in.o
CC drivers/video/drm/analogix_dp_reg.o
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:280: lib/avb/libavb/avb_slot_verify.o] エラー 1
make[1]: *** [scripts/Makefile.build:425: lib/avb/libavb] エラー 2
make: *** [Makefile:1305: lib] エラー 2
make: *** 未完了のジョブを待っています....
LD drivers/watchdog/built-in.o
CC drivers/video/drm/rockchip_lvds.o
CC drivers/video/drm/rockchip_panel.o
LD drivers/video/drm/built-in.o
LD drivers/video/built-in.o
LD drivers/built-in.o
Technically speaking that char *found in lib/avg/libavb/avb_slot_verify.c line 299 is being used without being initialized, at least as far as the compiler is concerned. Combined with the -Werror=maybe-uninitialized flag, what would normally be a warning is being treated as an error.
A quick fix would be to add "= NULL" to the declaration on line 299 so it is always initialized, e.g.
char * found = NULL;
thanks, this problem has already been resolved fixed-gcc11-avb-slot-verify.patch
yeah rk3568_ddr_1560MHz bin works
This is somewhat diffent to the howto at https://pine64.org/documentation/Quartz6...ng_U-Boot/.
If I do it like the official documentation says it is not working. I have a model A.
I used idbloader.img for the "loader" partition.
I get following debug information when compiling u-boot with debugging on:
Code: ...
Bootdev 'mmc@fe2b0000.bootdev' part 4 method 'extflow
check - ret=0
1 extlin 4 mmc@fe2b0000.bootdev.part /extlinux/extlinux.conf
** Booti 'mmc@fe2b0000.bootdev.part_4' with extlinux
Quartz64 Boot Menu
1: Boot Arch Kernel
Enter choice: 1: Boot Arch Kernel
Retrieving file: /Image
count = 128 * 128 start 0x10000, size 0x100000, name efi
FAT read(sect=2080), clust_size=8, read_size=8
count = 128 * 128 = 16384
start 0x10000, size 0x100000, name efi
FAT read(sect=2080), clu=8, read_size=8
Retrieving file: /initramfs-linux.img
count = 128 * 128 = 16384start 0x10000, size 0x100000, name efi
FAT read(sect=2080), clucount = 128 * 128 = 16384
start 0x10000, size 0x100000, name efi
FAT read(sect=2080), clust_size=8, read_size=8
append: earlycon=uart8250,mmio32,0xfe660000 console=ttyS2,1500000n8 root=LABEL=rootfs rw rootwaitrieving file: /dtbs/rockchip/rk3566-quartz64-a.dtb
count = 12884
start 0x10000, size 0x100000, name efi
FAT read(sect=2080), clust_size=8, read_size=8
FAT read(sect=138104), clust_size=8, read_size=8
FAT read(sect=476000), clust_size=8, read_size=8
FAT read(sect=619008), clust_size=8, read_size=8
FAT read(sect=626016), clust_size=8, read_size=8
FAT read(sect=635424), clust_size=8, read_size=8
FAT read(sect=643976), clust_size=8, read_size=8
count = 128 * 128 = 16384
start 0x10000, size 0x100000, name efi
FAT read(sect=2080), clud_size=8
FAT read(sect=138104), clust_size=8, read_size=8
FAT read(sect=476000), clust_size=8, read_size=8
FAT read(sect=619008), clust_size=8, read_size=8
FAT read(sect=626016), clust_size=8, read_size=8
FAT read(sect=635424), clust_size=8, read_size=8
FAT read(sect=643976), clustize=8
using booti
FIT check error -99
## Flattened Device Tree blob at 12000000
Booting using the fdt blob atWorking FDT set to 12000000
Loading Ramdisk to ec154000, end ecbffba1 ... OK
Loading Device Tree to 00000000ece76000, end 00000000ece9 ... OK
Working FDT set to ece76000
Starting kernel ...
Sending event 6/(unknown) to spy 'efi_ddel'
Sending event 6/(unknown) to spy 'efi_disk del'
Sending eown) to spy 'efi_disk del'
io-dgs=4600, drv->flags=0, err=-129
syscon@fdc20000: When removing:, drv->flags=0, err=-129
Sending event 6/(unknown) to spy 'efi_disk del'
syscon@fdc60000: When removing: flags=4600, drv->flagrr=-129
Sending event 6/(unknow
clock-controller@fdd00000: When removing: flags=4600, drv->flag9
Sending event 6/(unknown) to g event 6/(unknown) to spy 'efi_disk del'
reset: When removing:, drv->flags=0, err=-129
clock-controller@fdd20000: When removing: flags=4600, drv->flags=0, err=-129
Sending event 6/(unknownpy 'efi_disk del'
Sending eventdisk del'
Sending event 6/(unknown) to spy 'efi_disk del'
DCDCremoving: flags=4600, drv->flagst 6/(unknown) to spy 'efi_disk del'
DCDC_REG2: When removing: fdrv->flags=0, err=-129
Sending event 6/(unknown) to spy 'efi_disk del'
When I use the u-boot from the documentation https://pine64.org/documentation/Quartz6...ing-u-boot
it works with the following output:
Code: Fdt Ramdisk skip relocation
## Flattened Device Tree blob at 0x0a100000
Booting using the fdt blob at 0x0a100000
'reserved-memory' shmem@10f000: addr=10f000 size=100
Using Device Tree in place at 000000000a100
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 b000 (size: 0x08200000)
Adding bank: 0x09400000 - 0xf0000000 (size: 0xe6c00000)
Adding bank: 0x100000000 - 0x200000000 (size: 00000)
Total: 10011.903 ms
Starting kernel ...
...
and so on with systemd messages
Do I need to disable ramdisk relocation? It isn't working with the current u-boot git tree and the corresponding quartz64-a-rk3566_defconfig.
Just curious of what might has changed.
|