-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
recipes-devtools/dediprog-flasher: add recipe #69
Conversation
The problem im encountering is there seem to be problems with the
The DediProgSW/SF100Linux includes Yet adding either of them to DEPENDS puts out an error: ERROR: dediprog-flasher-1.0+AUTOINC+e691f2d432-r0 do_compile: oe_runmake failed
ERROR: dediprog-flasher-1.0+AUTOINC+e691f2d432-r0 do_compile: Execution of '/build/tmp/work/armv7vet2hf-neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/temp/run.do_compile.
312' failed with exit code 1:
CC dpcmd.o
CC usbdriver.o
CC FlashCommand.o
CC SerialFlash.o
In file included from usbdriver.c:1:
usbdriver.h:6:10: fatal error: libusb-1.0/libusb.h: No such file or directory
6 | #include <libusb-1.0/libusb.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:43: usbdriver.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from dpcmd.c:7:
usbdriver.h:6:10: fatal error: libusb-1.0/libusb.h: No such file or directory
6 | #include <libusb-1.0/libusb.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:43: dpcmd.o] Error 1
In file included from FlashCommand.c:6:
usbdriver.h:6:10: fatal error: libusb-1.0/libusb.h: No such file or directory
6 | #include <libusb-1.0/libusb.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:43: FlashCommand.o] Error 1
In file included from SerialFlash.c:5:
usbdriver.h:6:10: fatal error: libusb-1.0/libusb.h: No such file or directory
6 | #include <libusb-1.0/libusb.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:43: SerialFlash.o] Error 1
WARNING: exit code 1 from a shell command.
ERROR: Logfile of failure stored in: /build/tmp/work/armv7vet2hf-neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/temp/log.do_compile.312
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 16
| CC dpcmd.o
| CC usbdriver.o
| CC FlashCommand.o
| CC SerialFlash.o
| In file included from usbdriver.c:1:
| usbdriver.h:6:10: fatal error: libusb-1.0/libusb.h: No such file or directory
| 6 | #include <libusb-1.0/libusb.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make: *** [Makefile:43: usbdriver.o] Error 1
| make: *** Waiting for unfinished jobs....
| In file included from dpcmd.c:7:
| usbdriver.h:6:10: fatal error: libusb-1.0/libusb.h: No such file or directory
| 6 | #include <libusb-1.0/libusb.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make: *** [Makefile:43: dpcmd.o] Error 1
| In file included from FlashCommand.c:6:
| usbdriver.h:6:10: fatal error: libusb-1.0/libusb.h: No such file or directory
| 6 | #include <libusb-1.0/libusb.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make: *** [Makefile:43: FlashCommand.o] Error 1
| In file included from SerialFlash.c:5:
| usbdriver.h:6:10: fatal error: libusb-1.0/libusb.h: No such file or directory
| 6 | #include <libusb-1.0/libusb.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make: *** [Makefile:43: SerialFlash.o] Error 1
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/build/tmp/work/armv7vet2hf-neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/temp/run.do_compile.312' failed with exit code 1:
| CC dpcmd.o
| CC usbdriver.o
| CC FlashCommand.o
| CC SerialFlash.o
| In file included from usbdriver.c:1:
| usbdriver.h:6:10: fatal error: libusb-1.0/libusb.h: No such file or directory
| 6 | #include <libusb-1.0/libusb.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make: *** [Makefile:43: usbdriver.o] Error 1
| make: *** Waiting for unfinished jobs....
| In file included from dpcmd.c:7:
| usbdriver.h:6:10: fatal error: libusb-1.0/libusb.h: No such file or directory
| 6 | #include <libusb-1.0/libusb.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make: *** [Makefile:43: dpcmd.o] Error 1
| In file included from FlashCommand.c:6:
| usbdriver.h:6:10: fatal error: libusb-1.0/libusb.h: No such file or directory
| 6 | #include <libusb-1.0/libusb.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make: *** [Makefile:43: FlashCommand.o] Error 1
| In file included from SerialFlash.c:5:
| usbdriver.h:6:10: fatal error: libusb-1.0/libusb.h: No such file or directory
| 6 | #include <libusb-1.0/libusb.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make: *** [Makefile:43: SerialFlash.o] Error 1
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/repo/recipes-devtools/dediprog-flasher/dediprog-flasher.bb:do_compile) failed with exit code '1' Inside the $ dpkg --list | grep usb
$ $ echo $PKG_CONFIG_PATH
/build/tmp/work/armv7vet2hf-neon-rte-linux-gnuethe abi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/recipe-sysroot/usr/lib/pkgconfig:
/build/tmp/work/armv7vet2hf-neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/recipe-sysroot/usr/share/pkgconfig
$ ls /build/tmp/work/armv7vet2hf-neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/recipe-sysroot/usr/share/pkgconfig| grep usb
$ ls /build/tmp/work/armv7vet2hf-neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/recipe-sysroot/usr/lib/pkgconfig | grep usb
libusb-1.0.pc
libusb.pc
$ cat libusb.pc
prefix=/usr
exec_prefix=/usr
libdir=/lib
includedir=/usr/include
emulated=1
emulated_by=libusb-1.0
Name: libusb
Description: USB access library (libusb-1.0 compat wrapper)
Version: 0.1.12
Requires.private: libusb-1.0
Libs: -L${libdir} -lusb
Cflags: -I${includedir}
$ cat libusb-1.0.pc
prefix=/usr
exec_prefix=/usr
libdir=/lib
includedir=/usr/include
Name: libusb-1.0
Description: C API for USB device access from Linux, Mac OS X, Windows, OpenBSD/NetBSD and Solaris userspace
Version: 1.0.22
Libs: -L${libdir} -lusb-1.0
Libs.private: -ludev -pthread
Cflags: -I${includedir}/libusb-1.0 Adding the The recipe is a copy of imx-usb-loader_git.bb that also includes <libusb-1.0/libusb.h> |
@tym2k1 I suggest to include following patch in the build - possibly sending a PR to their repo as well:
This Makefile is not suited for cross compilation, which is not surprising at all. Although I must admit, it is high quality overall, we typically deal with much worse when creating recipes. |
I've added the patch and addressed all threads but now the build fails at ERROR: dediprog-flasher-1.0+AUTOINC+e691f2d432-r0 do_install: oe_runmake failed
ERROR: dediprog-flasher-1.0+AUTOINC+e691f2d432-r0 do_install: Execution of '/build/tmp/work/armv7vet2hf-
neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/temp/run.do_install.2499' failed with
exit code 1:
install: creating directory '/build/tmp/work/armv7vet2hf-neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/image/usr'
install: creating directory '/build/tmp/work/armv7vet2hf-neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/image/usr/bin'
install: creating directory '/build/tmp/work/armv7vet2hf-neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/image/usr/share'
install: creating directory '/build/tmp/work/armv7vet2hf-neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/image/usr/share/DediProg'
install: 'dpcmd' -> '/build/tmp/work/armv7vet2hf-neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/image/usr/bin/dpcmd'
strip: Unable to recognise the format of the input file `/build/tmp/work/armv7vet2hf-neon-rte-linux-gnueabi/dediprog-flasher/1.0+AUTOINC+e691f2d432-r0/image/usr/bin/dpcmd'
make: *** [Makefile:61: install] Error 1
WARNING: exit code 1 from a shell command. Working on it |
@tym2k1 Well, the Check if yocto provides path to If more commands than simply |
install -v -o 0 -g 0 -m 755 -d $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/DediProg | ||
echo -n "install: " && install -v -o 0 -g 0 -m 0755 $(PROGRAM) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) | ||
- strip $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) | ||
+ $(STRIP) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tym2k1 I think you should also set the default value of STRIP to strip so you do not break existing functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed by removing strip entirely to leave striping to the do_patch
bitbake task. When i'll try to upstream it a reviewer will for sure note if that's the correct approach
As I stated in the patch I think it's best to leave stripping of binaries to built-in bitbake functionalities. As stated in #64 (comment) I'll try to upstream this recipe when we'll tackle #67 as current version has reached EOL and we need to ensure it builds for currently supported Yocto versions. |
The |
Adds the DediProgSW/SF100Linux utility for cases where dpcmd can provide reliable flashing method, alternative to flashrom.
Addresses #64