darkxst / ha-operating-system

HAOS for iHost
Apache License 2.0
44 stars 6 forks source link

I want to diy my firmware. but build error (11.3.rc1) #47

Closed HeartInAndr closed 2 days ago

HeartInAndr commented 3 days ago

By https://developers.home-assistant.io/docs/operating-system/getting-started . I run sudo scripts/enter.sh make O= ihost ihost

but got failure.

`Image 'simple-bin' is missing external blobs and is non-functional: tee-os

/binman/simple-bin/fit/images/op-tee/tee-os (tee-os): See the documentation for your board. You may need to build Open Portable Trusted Execution Environment (OP-TEE) and build with TEE=/path/to/tee.bin

Some images are invalid make[2]: [Makefile:1115: .binman_stamp] Error 103 make[2]: Leaving directory '/build/ihost/build/uboot-v2023.10' make[1]: [package/pkg-generic.mk:283: /build/ihost/build/uboot-v2023.10/.stamp_built] Error 2 make[1]: Leaving directory '/build/buildroot' make: *** [Makefile:33: ihost] Error 2`

darkxst commented 3 days ago

make O= ihost ihost

just run make ihost you shouldnt need to override output directory.

`Image 'simple-bin' is missing external blobs and is non-functional: tee-os I havent built any updated builds recently, but perhaps the repo with the blobs has changed? These are downloaded in the rockchip-blobs pages.

buildroot-external/package/rockchip-blobs

HeartInAndr commented 3 days ago

sudo scripts/enter.sh make ihost also cant. same error

HeartInAndr commented 3 days ago

image

darkxst commented 3 days ago

there is no error there... can you provide logs of actual error?

HeartInAndr commented 3 days ago

I exec docker container and cd output , then make TEE=/build/output/images/tee.bin; uboot can compile successfully. is this right?

darkxst commented 3 days ago

uboot should pick up the tee.bin automagically, you should not have to do anything with that. You dont run make from within the output folder however.

However if you want to (re-)build individual modules, then you need the full make command:

./scripts/enter.sh
make -C /build/buildroot O=/build/output BR2_EXTERNAL=/build/buildroot-external uboot-dirclean
make -C /build/buildroot O=/build/output BR2_EXTERNAL=/build/buildroot-external uboot

I usually set an alias for this, for eg:

alias br-make='make -C /build/buildroot O=/build/output BR2_EXTERNAL=/build/buildroot-external'
br-make linux-menuconfig
darkxst commented 3 days ago

I just did a clean build and it worked fine, no errors.

./scripts/enter.sh
make ihost
HeartInAndr commented 3 days ago

which tag or branch you build? I had build 11.3.rc1 tag and ihost branch. both got below error

Image 'simple-bin' is missing external blobs and is non-functional: tee-os

/binman/simple-bin/fit/images/op-tee/tee-os (tee-os):
   See the documentation for your board. You may need to build Open Portable
   Trusted Execution Environment (OP-TEE) and build with TEE=/path/to/tee.bin

Some images are invalid

I can't understand this phenomenon

darkxst commented 3 days ago

I built of the main ihost branch.

Rebuild just uboot and provide the full build logs

HeartInAndr commented 3 days ago

uboot.log

here

darkxst commented 3 days ago

also any reason why you are trying to build old version and not latest?

HeartInAndr commented 3 days ago

whats your buildroot branch or tag?

darkxst commented 3 days ago

it is in .gitmodules

[submodule "buildroot"]
    path = buildroot
    url = https://github.com/darkxst/ha-buildroot.git
    branch = 2023.02.x-haos

You pull it in just with:

git submodule update --init

and yes, it wont work if you were using some other branch

HeartInAndr commented 2 days ago

maybe I know the reason

--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -188,11 +188,16 @@ UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_ATF_FIRMWARE
 endif
 endif

-ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE),y)
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPTEE_OS),y)
 UBOOT_DEPENDENCIES += optee-os
 UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
 endif

+ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPTEE_BIN),y)
+UBOOT_DEPENDENCIES += rockchip-blobs
+UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.bin
+endif
+
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)
 UBOOT_DEPENDENCIES += opensbi
 UBOOT_MAKE_OPTS += OPENSBI=$(BINARIES_DIR)/fw_dynamic.bin

your buildroot had patch the uboot.mk

without this error.I checkout latest. build and got exception latest building.log did it need root permit?

darkxst commented 2 days ago

maybe I know the reason

yes but it should have been installed via git submodules anyway, unless you manually imported some other branch?

not sure about that error, check permissions on this path /var/lib/docker/tmp/docker-import-826930548/repositories. not sure if that is mounted via host or only inside container.

HeartInAndr commented 2 days ago

ok, I build with root. build finish.thank you