themagpimag / magpi-issue54

3 stars 1 forks source link

U-Boot Compile Issue #1

Open sghazagh opened 7 years ago

sghazagh commented 7 years ago

I try to get Multiboot on RPi explained in MagPi 54. When I add "new_wpl_all.c" file to "cmd/MakeFile" for compile, the u-boot cannot be compiled.

the error says:

root@VM-CC:~/Raspberry/u-boot# make all
  CHK     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CHK     include/generated/generic-asm-offsets.h
  CHK     include/generated/asm-offsets.h
  HOSTCC  tools/mkenvimage.o
  HOSTLD  tools/mkenvimage
  HOSTCC  tools/fit_image.o
  HOSTCC  tools/image-host.o
  HOSTCC  tools/dumpimage.o
  HOSTLD  tools/dumpimage
  HOSTCC  tools/mkimage.o
  HOSTLD  tools/mkimage
  CC      cmd/version.o
  LD      cmd/built-in.o
cmd/new_wpl_all.c: file not recognized: File format not recognised
scripts/Makefile.build:359: recipe for target 'cmd/built-in.o' failed
make[1]: *** [cmd/built-in.o] Error 1
Makefile:1229: recipe for target 'cmd' failed
make: *** [cmd] Error 2

if I remove : 
`obj-y += new_wpl_all.c`
all get OK again!

Any solution?
sghazagh commented 7 years ago

Find the problem myself! Have to add "obj-y += new_wpl_all.o" and not "obj-y += new_wpl_all.c" Note the ".o" and not ".c"

I am wondering for a magazine like MagPi, why there are too many typo and mistakes in articles! I only have found two issues with this particular article!!!