30dayMakeOS icon indicating copy to clipboard operation
30dayMakeOS copied to clipboard

02_day 运行make run出错 process_begin: CreateProcess((null), copy helloos.img ..\z_tools\qemu\fdimage0.bin, ...) failed.

Open verifierlife opened this issue 5 years ago • 5 comments

在Day 2的最后运行make run时,报以下错误: D:\makeselfos\tolset\helloos5>..\z_tools\make.exe run ../z_tools/make.exe img make.exe[1]: Entering directory D:/makeselfos/tolset/helloos5' ../z_tools/make.exe -r helloos.img make.exe[2]: Entering directory D:/makeselfos/tolset/helloos5' ../z_tools/nask.exe ipl.nas ipl.bin ipl.lst ../z_tools/edimg.exe imgin:../z_tools/fdimg0at.tek
wbinimg src:ipl.bin len:512 from:0 to:0 imgout:helloos.img make.exe[2]: Leaving directory D:/makeselfos/tolset/helloos5' make.exe[1]: Leaving directory D:/makeselfos/tolset/helloos5' copy helloos.img ..\z_tools\qemu\fdimage0.bin process_begin: CreateProcess((null), copy helloos.img ..\z_tools\qemu\fdimage0.bin, ...) failed. make (e=2): 系统找不到指定的文件。 ..\z_tools\make.exe: *** [run] Error 2

如果只是运行run,就没有出错。请问一下这是什么原因?

PS:我的Makefile文件中run的命令是这样的: run : ../z_tools/make.exe img copy helloos.img ..\z_tools\qemu\fdimage0.bin ../z_tools/make.exe -C ../z_tools/qemu

verifierlife avatar Dec 24 '19 08:12 verifierlife

@yourtion 上边这个问题解决了,我改了makeFile的内容。我把原来的 run : $(MAKE) img $(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin $(MAKE) -C ../z_tools/qemu

中的 $(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin移到了 haribote.img : ipl10.bin haribote.sys Makefile $(EDIMG) imgin:../z_tools/fdimg0at.tek
wbinimg src:ipl10.bin len:512 from:0 to:0
copy from:haribote.sys to:@:
imgout:haribote.img $(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin 中,这样的话就没有问题了。

verifierlife avatar Dec 27 '19 14:12 verifierlife

第二天已经没有问题了。 但是第三天就出来了新的问题: copy /B asmhead.bin+bootpack.hrb haribote.sys process_begin: CreateProcess((null), copy /B asmhead.bin+bootpack.hrb haribote.sys, ...) failed. make (e=2): 系统找不到指定的文件。 make.exe[2]: *** [haribote.sys] Error 2

这次的问题是出现在: haribote.sys : asmhead.bin bootpack.hrb Makefile copy /B asmhead.bin+bootpack.hrb haribote.sys 也是因为copy这个命令。copy /B 是将asmhead.bin与bootpack.hrb合并到haribote.sys。

有谁遇到相同问题的小伙伴一起讨论一下啊。

verifierlife avatar Dec 27 '19 14:12 verifierlife

第二天已经没有问题了。 但是第三天就出来了新的问题: copy /B asmhead.bin+bootpack.hrb haribote.sys process_begin: CreateProcess((null), copy /B asmhead.bin+bootpack.hrb haribote.sys, ...) failed. make (e=2): 系统找不到指定的文件。 make.exe[2]: *** [haribote.sys] Error 2

这次的问题是出现在: haribote.sys : asmhead.bin bootpack.hrb Makefile copy /B asmhead.bin+bootpack.hrb haribote.sys 也是因为copy这个命令。copy /B 是将asmhead.bin与bootpack.hrb合并到haribote.sys。

有谁遇到相同问题的小伙伴一起讨论一下啊。

可以使用cmd终端来运行。或者改成 cmd.exe /C copy ... cmd.exe /C del ....

Raibows avatar Apr 25 '20 02:04 Raibows

可以把copy 命令 改成 cp命令 我尝试了一下成功了

Muzych avatar Apr 16 '21 13:04 Muzych

我在day03也遇到了这个问题,成功解决方案:在copy命令前面加上cmd /c 即可。 run : $(MAKE) img cmd /c $(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin $(MAKE) -C ../z_tools/qemu

yongruifang avatar Dec 29 '22 08:12 yongruifang