[Solved] N00b Question - Missing tools for kernel module, request them?

Hello all,

A while ago, I opened this bug report:

It was regarding a kernel module used for Internationally-Licensed Amateur Radio communications. I'm able to install the module, but none of the necessary tools are available.

I finally located the closed bug report and found the following remark:

It sounds like these utilities would need to be added to the package feed. Please open a bug report at https://github.com/openwrt/packages/ or open a pull request adding the packages.

I guess:

  • Please explain what this means
  • And point me in the correct direction

To be honest, I've never contributed this high up the community-developed-software hierarchy.

Open an issue qualified as you see listed there, adding @maintainer in the description might help get the right attention, depends if it is still actively maintained. Going to the project website might be more direct.

Adding a PR means pick up the SW where things were left off, get it working and submit for inclusion in the codebase. This might be the only viable option in getting it active depending on interest level.

Still a little over my head...

  • Who is @maintainer?
  • What is the project website (do you mean where the code is stored)?
  • If what is actively maintained...the software??? I just need it in binary form...why does it have to be "maintained." It's the only software that works worldwide to connect an Amateur Radio to a networked computer...so I'm sure there's interest.
  • If I understand a PR...that just means place the code into OpenWRT's build bot, correct? (this is what I seem to need, the code already exists)
  • The code exists, it just need to be compiled and packaged.

(This is a software suite where they're really can't be interest until the software works...this is included in every distro of Linux..THEY'RE THE BASIC TOOLS NEEDED FOR CONFIGURATION OF AX.25 INTERFACES...so I'm just a little confused here...)

I would simply copy the files from another distro, but OpenWRT is one of the few full distros built for my target.

@maintainter is maintainer of the package source code.
Project website should be this one
http://www.linux-ax25.org/wiki/Main_Page

It matters if it is maintained,because if something changes and package breaks we would be stuck with a broken package forever.
PR is short for a Pull Request,that is a way to request your code to be merged into OpenWRT on OpenWRT github.

So you basically need to either get maintainers of the software to wrike makefiles and if needed patches specific to OpenWRT for each package and get that merged.

1 Like

OK...so do I make both an "issue" and "pr" now?

I've sent an email to every author listed in the TAR files, I simply provided them your quote stating that something is needed (other than the source code).

I've always been told this software "is available in all Linux distributions," so this seems backwards - going back to the people that provided the software already...I'm also lost about the "broken package forever" issue...perhaps what the software does is not known...these people are university professors, Internet fixtures, etc...I don't understand what they may have left out of the software that's needed...it works on every computer...

Or...perhaps it's only confusing because I'm a N00b to this...or I'm actually becoming @maintainer???

Thanks for your help thus far.

You make an issue on https://bugs.openwrt.org/
PR is made when you have working code that you want to merge.
No, it is not available in all just by itself, it needs to have a maintainer and working makefile which will enable successful compilation.

What is there not to understand that OpenWRT changes all the time and stuff(Including packages can break).
So not having a person who is responsible for keeping that package working is not smart.

I really think the nature of the software stack is not understood. I mentioned:

This is extremely difficult and I assumed that this would be "added" to OpenWRT over 6 years ago...now I have people emailing me in different languages...I want to attmept to write the makefile myself...

  • So, I see a makefile in the TAR...will this file work, or do I have to create a new one???
  • If I make a new one, how does it become a package I can tell other Amateur Radio Operators to type opkg install foo from anywhere in the world (is that the PR)???

Sorry,but have you written any piece of code in recent years?

Code, yes (I edit, debug, and compile other code needed for Amateur Radio Operators and myself on OpenWRT all the time).

Makefiles, NEVER, I honestly don't even understand what they are (but, LEARNING FAST they have something to do with automated compiling).

Ok.
That is good.

Makefiles are basically a recipe for toolchain how to compile and where to put compiled stuff for each package.
You can see them for any package in OpenWRT repository and OpenWRT packages repository.

OK, that's what looses me:

  • I take foo.c
  • I compile foo.c
  • The file a.out is created
  • This is done via cross-compile on an x86_64
  • I copy a.out to the OpenWRT
  • a.out executes!

So...How do I write such a file, COMPILE, AND INSTALL A WHOLE SUITE OF SOFTWARE, INTO VARIOUS DIRECTORIES, if I'm not using the router, and how do I DISTRIBUTE it via opkg install foo?

First of all, those packages look like they are not overly complicated to compile as they don't have some weird dependencies.

So, first take a look at simpler packages like nano in openwrt/packages so you can figure out the logic.

Simplest package is pretty much just a folder and a Makefile inside.
In Makefile you define stuff like name,version and location where to pull source code from.
Off course and all options and dependencies needed for building.

I suggest to you to read through OpenWRT wiki

1 Like

Yes, it seems I understand everything...until, how they become an IPK file. And how I make an IPK for all architectures.

  • So you're refering to a PACKAGE Makefile used in OpenWRT, NOT the gcc makefile?
  • Do I just submit to them a Makefile I create (like under packages/utils/nano/Makefile)?
  • I'll be ready to submit this file soon, do I attach it in the PR?
  • I don't see any source code in the link you provided...So I use filename and directory under http://www.linux-ax25.org of the tar.gz files here:

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/nano

Yes,to the one in openwrt packages.
PR is made after everything is working.

On http://www.linux-ax25.org you can see links for source code under latest versions on the homepage.
Example:http://www.linux-ax25.org/pub/ax25-apps/ax25-apps-0.0.8-rc4.tar.gz
That one is for ax25-apps,you make the package source in the format linux-ax25 releases them.

You need to make ax25-apps,ax25-tools and ax25-library as separate packages.

IPK is made after compiling,you can do that using SDK so you dont have to compile the whole toolchain.
There is a really good wiki page on just that

OK, I have a machine previously configured to crosscompile. So I assume that all I need to create are three makefiles...I then need to "run" them properly in the SDK...

...my machine should download the TAR.GZ files, compile and create 3 IPK files for these packages:

  • ax25-apps
  • ax25-tools
  • libax25

I am following this: https://openwrt.org/docs/guide-developer/using_the_sdk

I previously used this to compile https://openwrt.org/docs/guide-developer/crosscompile ...so I should be OK:

unset SED
export STAGING_DIR=/home/user/lede-sdk-17.01.1-ar71xx-generic_gcc-5.4.0_musl-1.1.16.Linux-x86_64/staging_dir/toolchain-mips_24kc_gcc-5.4.0_musl-1.1.16
export TOOLCHAIN_DIR=$STAGING_DIR
export LDCFLAGS=$TOOLCHAIN_DIR/lib
export LD_LIBRARY_PATH=$TOOLCHAIN_DIR/lib
export PATH=$TOOLCHAIN_DIR/bin:$PATH
cd /home/user/foo-1.0
mips-openwrt-linux-musl-g++ foo.c -v -fpermissive -Wwrite-strings

That toolchain is quite old.
Better that you update it and use one from snapshots instead

  • I upgraded to 17.01.4
  • The Wiki states:

After decompressing the SDK archive, edit the feeds.conf.default file to add your packages, by default it has LEDE feeds, and you can add your own feeds, local or remote.

For example, you can add all packages you have in a local folder by adding this line

So I comment out all others and add the following:

src-link custom /home/user/ax25makefiles

And...in /home/user/ax25make, I simply add the 3 make files???

They need to each be in their folder within that folder you made.

There are no clear instructions where this folder should actually be. It appears it should be located at:

home/user/lede-sdk-17.01.4-ar71xx-generic_gcc-5.4.0_musl-1.1.16.Linux-x86_64/build_dir/libax25-0.0.12-rc4

Makefile:

#
# Copyright (C) 2007-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=libax25
PKG_VERSION:=0.0.12-rc4
PKG_RELEASE:=1

PKG_MAINTAINER:=XXXXX <xxxxx@gmail.com>
PKG_LICENSE:=LGPL-2.1-only

PKG_BUILD_DIR:=$(BUILD_DIR)/libax25-$(PKG_VERSION)
PKG_SOURCE:=http://www.linux-ax25.org/pub/libax25/libax25-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.linux-ax25.org/pub/libax25
PKG_MD5SUM:=9b2e6890ef20dd0cf8ac7fdb22e6a4b6
PKG_CAT:=zcat

include $(INCLUDE_DIR)/package.mk

define Package/libax25
  SECTION:=base
  CATEGORY:=Network
  TITLE:=ax25 library for hamradio applications
  URL:=http://www.linux-ax25.org/
  DEPENDS:=+kmod-ax25
endef

define Package/libax25/description
This library is for ham radio applications that use the ax25
protocol.  Included are routines to do ax25 address parsing, common
ax25 application config file parsing, etc.
endef

I wanted to confirm one thing:

DEPENDS:=+kmod-ax25

This means that if I install libax25, it will install kmod-ax25 - if it is not yet installed?

Testing...

I attempt to run make menuconfig, but i never see libax25 appear...