[Problem] Custom package does not show up in build

Qemme

Neuer User
Mitglied seit
20 Jul 2012
Beiträge
8
Punkte für Reaktionen
0
Punkte
0
Hello,

I'm creating a custom package "from scratch"
I copied the debootstrap package in the make-dir because this is the only packing with .c src files (all others download them from sites), and called the new dir [barcodereader].
The package shows up in make menuconfig.
The package compiles during make and the folder with all the right contents shows up in: packages\target-mipsel_uClibc-0.9.29\barcodereader-1.0.28
including a dir packages\target-mipsel_uClibc-0.9.29\barcodereader-1.0.28\root\usr\lib\barcodereader
but the directory root\usr\lib\barcodereader wont show in de build directory, and is not available in the image.

What to do? What im a doing wrong.
I also noticed that after my build, there is no barcodereader -entry in the .packes files in de freetz-dir , but there is a debootstrap entry in that file

Here are the contents of package my files:

Config.in:
Code:
config FREETZ_PACKAGE_BARECODEREADER
	bool "Barcodereader 1.0.28"
	default n
	help
		Barcodereader is used to read from a barcode scanner and post its values online
Makefile.in
Code:
ifeq ($(strip $(FREETZ_PACKAGE_BARECODEREADER)),y)
PACKAGES+=barcodereader
endif
barcodereader.mk:
Code:
$(call PKG_INIT_BIN, 1.0.28)

$(PKG)_BINARY_SOURCE:=$($(PKG)_MAKE_DIR)/src/blink2.c
$(PKG)_BINARY:=$($(PKG)_DIR)/blink2
$(PKG)_TARGET_BINARY:=$($(PKG)_DEST_DIR)/usr/lib/barcodereader/blink2

#$(PKG_LOCALSOURCE_PACKAGE)
$(PKG_UNPACKED)
$(PKG_CONFIGURED_NOP)

$($(PKG)_BINARY): $($(PKG)_BINARY_SOURCE) $($(PKG)_DIR)/.configured
	mkdir -p $(BARCODEREADER_DIR)
	echo $(BARCODEREADER_DIR)
	cp -a $< $(BARCODEREADER_DIR)
	cd $(BARCODEREADER_DIR) && $(TARGET_CONFIGURE_ENV) \
		$(TARGET_CC) $(TARGET_CFLAGS) -lusb -o blink2 blink2.c

$($(PKG)_TARGET_BINARY): $($(PKG)_BINARY)
	$(INSTALL_BINARY_STRIP)

$(pkg):

$(pkg)-precompiled: $($(PKG)_TARGET_BINARY)

$(pkg)-clean:
	-$(SUBMAKE) -C $(BARCODEREADER_DIR) clean

$(pkg)-uninstall:
	$(RM) $(BARCODEREADER_TARGET_BINARY)

$(PKG_FINISH)
 
Zuletzt bearbeitet:
Please add CODE-tags to the relevant sections of your post.

The /usr/lib directory is special, it is not copied from the packages directory to the the image.
Maybe the simplest solution would be to add commands to fwmod_custom to copy the files to the desired place.
 
Ok, but if I change:
Code:
$(PKG)_TARGET_BINARY:=$($(PKG)_DEST_DIR)/usr/lib/barcodereader/blink2
Into
Code:
$(PKG)_TARGET_BINARY:=$($(PKG)_DEST_DIR)/usr/bin/blink2
It doesnt work either. So how does it work for all the other packages? And why does it work for the debootstrap package.

(thanxs for the CODE-tag-tip)
 
Zuletzt bearbeitet:
Does not help. But I think you're right: My package must have gone FUBAR somewhere.
I just deleted the barcodereader package and simplye started modifying the debootstrap package until it does what I want it to do, and that works.

So.. Who needs a debootstrapper package anyway?
 
You commented out
Code:
#$(PKG_LOCALSOURCE_PACKAGE)

That's the reason it doesn't work. You partially reimplemented the part needed to compile the package but omitted everything else needed to copy the files into the image. Simply put a proper Makefile along with your .c file under src-directory and rename DEBOOTSTRAP to BARCODEREADER, that is everything you need. Don't add something like $(PKG)_SOURCE_BINARY and don't rewrite the $($(PKG)_BINARY) rule. A proper Makefile means a Makefile which can be used to compile your package also for host (by entering the src-directory and calling make).
 
Ok, that would be strange,
I didnt modify that line, so it would be wrong in the orginal debootstrap to!
It comes from:
http://svn.freetz.org/branches/freetz-stable-1.2/make/debootstrap/debootstrap.mk

Other question then, i have good communications with a USB device, but i'd like to register by C program as a USB-driver, as mentioned here:
http://www.linuxjournal.com/article/7353?page=0,1
Therefor I need to include module.h :
Code:
#include <linux/module.h>
Gives lots and lots of compiler errors.. What to do?
(Or should I start a new topic?)
 
If you want to write a kernel module, you should look for other places that create kernel modules (like fuse or ndas).
You need the kernel compiler and the include path o the kernel modules. The best way is to write a makefile that calls the kernel makefile.
 
Kostenlos!

Statistik des Forums

Themen
248,920
Beiträge
2,305,122
Mitglieder
378,645
Neuestes Mitglied
nikitarajusa