WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: My first TCZ bilding.  (Read 696 times)

Offline bonbob

  • Jr. Member
  • **
  • Posts: 59
My first TCZ bilding.
« on: August 07, 2017, 10:26:22 AM »
Hello all. I used old version hostapd 1.0 from repository x86/4.x till now. This version is stable, but it was compiled without N-mode. Only G. So i try to make new Hostapd extension build on latest version 2.6 and with N-mode support. Also it AC-mode, TNC, Hotspot 2.0, MBO, ACS supported now. It woks good on my TCL 8.x 32bit, and it would be good to add this extension to repository. You can take it here http://tinycorelinux.sytes.net/hostapd2.6.zip, check and if it be OK add to repository.  :)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9634
Re: My first TCZ bilding.
« Reply #1 on: August 08, 2017, 12:14:02 AM »
Thanks for the proposed extension.

There are four tcz files in the zip archive, hostapd, hostapd2.6, libnl and libnl1 - which of these are you proposing to submit?

Was hostapd compiled with the tinycore standard of :
Code: [Select]
$ CC="gcc -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" ./configure --blah-blah
The binaries in the hostapd tcz are not stripped as per tinycore guidelines.

Please also see: http://wiki.tinycorelinux.net/wiki:creating_extensions

Offline bonbob

  • Jr. Member
  • **
  • Posts: 59
Re: My first TCZ bilding
« Reply #2 on: August 08, 2017, 01:06:31 AM »
Sorry for garbage in archive. Seems i have packed old files too. hostapd.tcz - is old version 1.0 from repository 4.x wich i used before. My compilation is hostapd2.6.tcz and libnl1.tcz dependence of it. libnl ver 1.0 need for hostapd launch. I wish to compile hostapd with libnl3 wich are present in 8.x repository, but compilation process has failed.  :-\

I will recompile my hostapd lately with
Code: [Select]
$ CC="gcc -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" ./configure --blah-blah
Is it the same as:
Code: [Select]
export CFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe"
export LDFLAGS="-Wl,-O1"

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9634
Re: My first TCZ bilding.
« Reply #3 on: August 08, 2017, 01:35:33 AM »
You can use this in the config to use the existing libnl:
Code: [Select]
# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored)
CONFIG_LIBNL32=y
« Last Edit: August 08, 2017, 01:38:42 AM by Juanito »

Offline bonbob

  • Jr. Member
  • **
  • Posts: 59
Re: My first TCZ
« Reply #4 on: August 08, 2017, 02:15:49 AM »
You can use this in the config to use the existing libnl:
Code: [Select]
# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored)
CONFIG_LIBNL32=y

Oh, if any compilation was so simple... Then I would be the hapiest man in the world.  :)

Maybe i could compile hostapd with libnl3 if you help me. It will be better. Soon i will copy here an error messages appearing during compilation.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9634
Re: My first TCZ bilding.
« Reply #5 on: August 08, 2017, 03:07:01 AM »
This works:
Code: [Select]
$ tce-load -i compiletc libnl-dev openssl-dev

$ cd hostapd-2.6
$ cd hostapd

[edit Makefile]
CFLAGS = -MMD -Wall

[edit defconfig]
CONFIG_LIBNL32=y
$ cp defconfig .config

$ make V=1 CC="gcc -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe"
$ sudo make V=1 CC="gcc -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" install

Offline bonbob

  • Jr. Member
  • **
  • Posts: 59
Re: My first TCZ bilding.
« Reply #6 on: August 08, 2017, 08:07:41 AM »
Code: [Select]
CONFIG_IEEE80211N=yDo you use this option?

It stops making with

Code: [Select]
../src/drivers/driver_nl80211.o: In function `nl80211_handle_destroy':
/home/tc/hostapd-2.6/hostapd/../src/drivers/driver_nl80211.c:80: undefined reference to `nl_handle_destroy'
../src/drivers/driver_nl80211.o: In function `nl80211_handle_alloc':
/home/tc/hostapd-2.6/hostapd/../src/drivers/driver_nl80211.c:58: undefined reference to `nl_handle_alloc_cb'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1063: hostapd] Error 1

With libnl v1 compilation is successful.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9634
Re: My first TCZ bilding.
« Reply #7 on: August 08, 2017, 08:13:00 AM »
Yes, I used that option (and also CONFIG_IEEE80211AC=y) and hostapd compiled without errors with the libnl(3) extension from the repo.

Offline bonbob

  • Jr. Member
  • **
  • Posts: 59
Re: My first TCZ bilding.
« Reply #8 on: August 08, 2017, 08:42:13 AM »
Before this error i've got another one

Code: [Select]
make: *** No rule to make target '/home/tc/hostapd-2.6/src/netlink/genl/genl.h', needed by '../src/drivers/driver_nl80211.o'.  Stop.

But i fixed it by copying directory netlink from libnl-3.2.25 source to hostapd-2.6/src. I make this hostapd for Tinycore v 8.x 32bit.

Did you do the same?

Anyway i have repacked archive for anyone who want to install hostapd v2.6 extension.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9634
Re: My first TCZ bilding.
« Reply #9 on: August 08, 2017, 08:54:32 AM »
No, I didn't need to do that - are you sure that you had libnl and libnl-dev loaded and that you did not have your libnl1 and libnl1-dev loaded?

Offline bonbob

  • Jr. Member
  • **
  • Posts: 59
Re: My first TCZ bilding.
« Reply #10 on: August 08, 2017, 10:31:23 AM »
I have deleted all libnl.tcz, libnl1.tcz files, reboot system and installed libnl-dev again.
I execute all you have posted, step by step. Untill making not stop with
Code: [Select]
make: *** No rule to make target '/home/tc/hostapd-2.6/src/netlink/genl/genl.h', needed by '../src/drivers/driver_nl80211.o'.  Stop.That's all i've got.

Offline bonbob

  • Jr. Member
  • **
  • Posts: 59
Re: My first TCZ bilding.
« Reply #11 on: August 08, 2017, 11:44:25 AM »
Even using this option has no effect:
Code: [Select]
CFLAGS += -I$/usr/local/include/libnl3
LIBS += -L$/usr/local/lib

Compiler still searching /home/tc/hostapd-2.6/src/netlink/genl/genl.h

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9634
Re: My first TCZ bilding.
« Reply #12 on: August 08, 2017, 11:22:53 PM »
I left those lines commented out, but in any case they would be:
Code: [Select]
CFLAGS += -I/usr/local/include/libnl3
LIBS += -L/usr/local/lib

Offline bonbob

  • Jr. Member
  • **
  • Posts: 59
Re: My first TCZ bilding.
« Reply #13 on: August 08, 2017, 11:50:33 PM »
I try this lines too. There is no effect. Mystic.  :o

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9634
Re: My first TCZ bilding.
« Reply #14 on: August 09, 2017, 12:03:32 AM »
you could try my config from here: http://tinycorelinux.net/8.x/x86/tcz/src/hostapd/