El jue., 13 feb. 2020 a las 16:27, Ahmad Fatoum (<[email protected]>) escribió: > > On 2/13/20 4:24 PM, Guillermo Rodriguez Garcia wrote: > > El jue., 13 feb. 2020 a las 16:08, Ahmad Fatoum > > (<[email protected]>) escribió: > >> > >> On 2/13/20 4:05 PM, Guillermo Rodriguez Garcia wrote: > >> > >>>>>>> > >>>>>>>>>>> +# > >>>>>>>>>>> ---------------------------------------------------------------------------- > >>>>>>>>>>> +# Install > >>>>>>>>>>> +# > >>>>>>>>>>> ---------------------------------------------------------------------------- > >>>>>>>>>>> + > >>>>>>>>>>> +$(STATEDIR)/tf-a.install: > >>>>>>>>>>> + @$(call targetinfo) > >>>>>>>>>>> +ifeq ($(TF_A_ARTIFACTS_SRC),) > >>>>>>>>>>> + $(warning TF_A_ARTIFACTS is empty. nothing to install.) > >>>>>>>>>>> +else > >>>>>>>>>>> + @install -m644 -D \ > >>>>>>>>>>> + > >>>>>>>>>>> --target-directory=$(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware \ > >>>>>>>>>> > >> > >>> OK this makes sense. > >>> > >>> But, you should at least make sure > >>> $(PTXCONF_SYSROOT_TARGET)/usr/lib/firmware exists before trying to > >>> copy anything into it. > >> > >> That's why -D is there. From man install(1): > >> > >> -D create all leading components of DEST except the last, or all > >> components of > >> --target-directory, then copy SOURCE to DEST > > > > Yes but the effect of -D combined with --target-directory does not > > seem to be standard; my version of install does not support it. > > The man page for my version says: > > > > -D create all leading components of DEST except the last, then > > copy SOURCE to DEST > > > > And a quick test yields the following: > > > > $ touch test > > $ install -D --target-directory a/b/c test > > install: failed to access 'a/b/c': No such file or director > > > > I guess it's better to avoid relying on that behaviour and create the > > directory explicitly instead. > > I see. Will replace with separate install -d in a v3 then.
You might also want to update the targetinstall stage: - If IMAGEDIR is guaranteed to exist when the targetinstall rule runs, then the -D option can be dropped - If IMAGEDIR is not guaranteed to exist, then -D will not create the directory properly in the way the command is currently written, and you probably want also explicitly create the directory Thx, Guillermo > > > > > BR, > > > > Guillermo Rodriguez Garcia > > [email protected] > > > > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | https://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- Guillermo Rodriguez Garcia [email protected] _______________________________________________ ptxdist mailing list [email protected]
