Ergebnis 1 bis 8 von 8

Thema: Custom package does not show up in build

  1. #1
    IPPF-Einsteiger
    Registriert seit
    20.07.2012
    Beiträge
    8

    Custom package does not show up in build

    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)
    Geändert von Qemme (04.08.2012 um 23:36 Uhr)

  2. #2
    IPPF-Urgestein
    Registriert seit
    22.04.2007
    Beiträge
    10.995
    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.

  3. #3
    IPPF-Einsteiger
    Registriert seit
    20.07.2012
    Beiträge
    8
    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)
    Geändert von Qemme (04.08.2012 um 23:36 Uhr)

  4. #4
    IPPF-Urgestein
    Registriert seit
    22.04.2007
    Beiträge
    10.995
    Maybe you have to do
    Code:
    make barcodereader-dirclean; make

  5. #5
    IPPF-Einsteiger
    Registriert seit
    20.07.2012
    Beiträge
    8
    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?

  6. #6
    IPPF-Fan
    Registriert seit
    20.12.2005
    Beiträge
    494
    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).

  7. #7
    IPPF-Einsteiger
    Registriert seit
    20.07.2012
    Beiträge
    8
    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/freet...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?)

  8. #8
    IPPF-Urgestein
    Registriert seit
    22.04.2007
    Beiträge
    10.995
    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.

Ähnliche Themen

  1. Antworten: 9
    Letzter Beitrag: 04.07.2011, 10:59
  2. Can't build my custom freetz
    Von SystemR89 im Forum Freetz
    Antworten: 44
    Letzter Beitrag: 01.03.2009, 17:18
  3. Zaptel build ***** FAILED: ***** No zaptel.ko file found after build. Terminating scr
    Von Vincent2004 im Forum FreePBX, TrixBox (Asterisk@Home)
    Antworten: 0
    Letzter Beitrag: 25.04.2008, 08:10
  4. sip show peers
    Von schneemie im Forum FreePBX, TrixBox (Asterisk@Home)
    Antworten: 2
    Letzter Beitrag: 17.09.2006, 22:36

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •