edk2-porting / edk2-rk3588

EDK2 UEFI firmware for Rockchip RK3588 platforms
437 stars 87 forks source link

Native build ? #34

Closed ScarFez closed 1 year ago

ScarFez commented 1 year ago

Is there a way to make a native build ?

ScarFez commented 1 year ago

edk2-rk35xx/misc/tools$ file * mkimage: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b4e844bf7d6ce7d94d0e1671f61db33eaf0532ef, for GNU/Linux 3.2.0, not stripped

ScarFez commented 1 year ago

I tried using mkimage from u-boot, which is native, but the arguments does not seem to match;

Usage: ./misc/tools/mkimage -l image -l ==> list image header information ./misc/tools/mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image -A ==> set architecture to 'arch' -O ==> set operating system to 'os' -T ==> set image type to 'type' -C ==> set compression type 'comp' -a ==> set load address to 'addr' (hex) -e ==> set entry point to 'ep' (hex) -n ==> set image name to 'name' -d ==> use image data from 'datafile' -x ==> set XIP (execute in place) ./misc/tools/mkimage [-D dtc_options] [-f fit-image.its|-f auto|-F] [-b [-b ]] [-E] [-B size] [-i ] fit-image

file is used with -f auto, it may occur multiple times. -D => set all options for device tree compiler -f => input filename for FIT source -i => input filename for ramdisk file -E => place data outside of the FIT structure -B => align size in hex for FIT structure and header Signing / verified boot options: [-k keydir] [-K dtb] [ -c ] [-p addr] [-r] [-N engine] -k => set directory containing private keys -K => write public keys to this .dtb file -G => use this signing key (in lieu of -k) -c => add comment in signature node -F => re-sign existing FIT image -p => place external data at a static position -r => mark keys used as 'required' in dtb -N => openssl engine to use for signing ./misc/tools/mkimage -V ==> print version information and exit Use '-T list' to see a list of available image types
ScarFez commented 1 year ago

It seems like the mkimage (x86-64) can use more images than one

(from build.sh near line 32)

Create idblock.bin

    ${ROOTDIR}/misc/tools/mkimage -n rk3588 -T rksd -d ${ROOTDIR}/misc/rkbin/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.11.bin:${ROOTDIR}/misc/rkbin/bin/rk35/rk3588_spl_v1.12.bin idblock.bin

should I just create a single bin file out of those two (concatinating) ?

ScarFez commented 1 year ago
ScarFez commented 1 year ago

Looks like a dead end