SudoMaker / buildroot-loshark

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Buildroot for LoShark

Version: 2023.02.3

Usage

  • Make sure you have at least 10GB disk space and a good Internet connection
  • Clone this repo
  • Install dependencies for your distro according to buildroot's tutorials
  • Do your customizations: make menuconfig
  • make
  • It will take like 30min-5h depending on your Internet speed and PC performance
  • Run ./user-scripts/generate-rootfs-image.sh to generate the rootfs image

Binary files

The user-overlay directory contains some prebuilt binary files for convenience.

However you can build them by yourself if you absolutely want to do that.

Notes

This folder contains files whose names are starting with a dot and symlinks.

Program source of path-exist-poller:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <fcntl.h>
#include <unistd.h>

int main(int argc, char **argv) {
	if (argc < 4) {
		puts("Usage: $0 <poll every N seconds> <path that should exist> <script or command>");
		puts("Example: $0 2 /sys/bus/gadget/drivers/configfs-gadget.g1 /sbin/usb-gadget.sh");
		exit(1);
	}

	long poll_time = strtol(argv[1], NULL, 10);

	while (1) {
		if (access(argv[2], F_OK)) {
			system(argv[3]);
		}

		sleep(poll_time);
	}
}

About

License:Other


Languages

Language:Makefile 66.4%Language:Python 13.1%Language:C 8.5%Language:Shell 6.1%Language:HTML 3.0%Language:C++ 0.9%Language:Perl 0.8%Language:Yacc 0.3%Language:Batchfile 0.2%Language:Lua 0.2%Language:Tcl 0.2%Language:Lex 0.1%Language:CMake 0.1%Language:Arc 0.1%Language:M4 0.1%Language:Java 0.0%Language:Dockerfile 0.0%Language:Forth 0.0%Language:Gnuplot 0.0%Language:JavaScript 0.0%Language:SMT 0.0%