Coder Social home page Coder Social logo

Build issue on the mips platform about snoopy HOT 3 OPEN

bostjan avatar bostjan commented on June 26, 2024
Build issue on the mips platform

from snoopy.

Comments (3)

bostjan avatar bostjan commented on June 26, 2024 1

Much appreciated, @condemil. I'll give it a go in the coming days/weeks/months.

from snoopy.

bostjan avatar bostjan commented on June 26, 2024

@condemil, can you think of a way where I can test out this build variation myself? I.e. is there a hosting service where I can rent a mips system for a few hours?

from snoopy.

condemil avatar condemil commented on June 26, 2024

I am using OpenWRT SDK to cross-compile the sources. You can follow these steps to do the same:

sudo apt install gawk
mkdir -p $HOME/openwrt
cd $HOME/openwrt
git clone https://github.com/a2o/snoopy
wget https://downloads.openwrt.org/releases/22.03.2/targets/ath79/nand/openwrt-sdk-22.03.2-ath79-nand_gcc-11.2.0_musl.Linux-x86_64.tar.xz -O openwrt.tar.xz
tar xf openwrt.tar.xz
export SDK=$HOME/openwrt/openwrt-sdk-22.03.2-ath79-nand_gcc-11.2.0_musl.Linux-x86_64
export PATH=$SDK/staging_dir/host/bin:$PATH
mkdir -p mypackages/snoopy
ln -s $HOME/openwrt/snoopy/.git $HOME/openwrt/mypackages/snoopy/git-src

create file mypackages/snoopy/Makefile with the following contents:

include $(TOPDIR)/rules.mk

PKG_NAME:=snoopy
PKG_VERSION:=2.5.1
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/snoopy-$(PKG_VERSION)

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/a2o/snoopy.git
PKG_SOURCE_VERSION:=snoopy-$(PKG_VERSION)

PKG_FIXUP:=autoreconf

include $(INCLUDE_DIR)/package.mk

define Package/snoopy
	SECTION:=base
	CATEGORY:=Utilities
	TITLE:=Snoopy Command Logger
	URL:=https://github.com/a2o/snoopy
endef

define Package/snoopy/description
	Snoopy Command Logger is a small library that logs all program
	executions on your system.
endef

define Build/Configure
	$(call Build/Configure/Default,--with-linux-headers=$(LINUX_DIR))
endef

define Package/snoopy/install
	$(INSTALL_DIR) $(1)/usr/local/lib
	$(INSTALL_DATA) $(PKG_BUILD_DIR)/libsnoopy.so $(1)/usr/local/lib/libsnoopy.so
endef

$(eval $(call BuildPackage,snoopy))

call these commands:

cd $SDK
echo "src-link mypackages $HOME/openwrt/mypackages" > $SDK/feeds.conf
./scripts/feeds update mypackages
./scripts/feeds install -a -p mypackages
make package/snoopy/compile -j1 V=s

In menuconfig make sure these are enabled:

Advanced configuration options (for developers) -> Enable package source tree override (NEW)
Utilities -> snoopy

Once you do changes in the code under $HOME/openwrt/snoopy git repo you need to commit those changes as OpenWRT build system takes sources from git HEAD for package source tree override mode.

More info about package build can be found here:
https://openwrt.org/docs/guide-developer/packages

Your linux distro may have some dependencies missing, all required dependencies specified in here:
https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem

from snoopy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.