Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
From 2e6ae7ce5c28acaff9b3e77d7a693b7224a46003 Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com>
Date: Mon, 1 Sep 2025 12:08:53 +0200
Subject: [PATCH] {Makefile,util.c}: fix build on musl / uClibc-ng
vsyslog() is not in POSIX, so only exposed by <syslog.h> on musl and
uclibc-ng if we define _DEFAULT_SOURCE.
https://git.musl-libc.org/cgit/musl/tree/include/syslog.h#n64
https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/tree/include/sys/syslog.h#n200
While we are at it, drop the glibc-implementation-specific __USE_MISC define
in src/util.c to get rid of a double definition:
src/util.c:3: warning: "__USE_MISC" redefined
3 | #define __USE_MISC
|
In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from src/util.c:2:
/usr/include/features.h:395: note: this is the location of the previous definition
395 | # define __USE_MISC 1
On glibc (and uClibc-ng) the internal __USE_MISC symbol gets defined if
_DEFAULT_SOURCE is:
https://github.com/bminor/glibc/blob/master/include/features.h#L417-L419
Upstream: https://github.com/linux-on-mac/mbpfan/pull/271
(cherry picked from commit 25c2a09bd0d74e19c3843ce35ac54b5e288480ab)
[Peter: backport to 2.4.0]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
Makefile | 2 +-
src/util.c | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 41873fa..bb6c913 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ BINFLAG = -o
INCLUDES =
LIBS = -lm
LIBPATH =
-CFLAGS += $(COPT) -g $(INCLUDES) -Wall -Wextra -Wno-unused-function -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500
+CFLAGS += $(COPT) -g $(INCLUDES) -Wall -Wextra -Wno-unused-function -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE
LDFLAGS += $(LIBPATH) -g
OBJS := $(patsubst %.$(C),%.$(OBJ),$(wildcard $(SOURCE_PATH)*.$(C)))
diff --git a/src/util.c b/src/util.c
index c66e6d7..b7fe71e 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1,6 +1,5 @@
#include <stdarg.h>
#include <stdio.h>
-#define __USE_MISC
#include <syslog.h>
#include "global.h"
--
2.39.5

9
package/mbpfan/Config.in Normal file
View File

@@ -0,0 +1,9 @@
config BR2_PACKAGE_MBPFAN
bool "mbpfan"
depends on BR2_USE_MMU
help
Mbpfan is a daemon for MacBook laptops which monitors the
CPU temperature with the coretemp module, and sets the fan
speeds with the applesmc module.
https://github.com/linux-on-mac/mbpfan

View File

@@ -0,0 +1,3 @@
# Locally computed:
sha256 e1cdcffaba52be215ae40a8568949190866d500d6ae2a1e96b71ab5372f3580b mbpfan-2.4.0.tar.gz
sha256 589ed823e9a84c56feb95ac58e7cf384626b9cbf4fda2a907bc36e103de1bad2 COPYING

29
package/mbpfan/mbpfan.mk Normal file
View File

@@ -0,0 +1,29 @@
################################################################################
#
# mbpfan
#
################################################################################
MBPFAN_VERSION = 2.4.0
MBPFAN_SITE = $(call github,linux-on-mac,mbpfan,v$(MBPFAN_VERSION))
MBPFAN_LICENSE = GPL-3.0+
MBPFAN_LICENSE_FILES = COPYING
define MBPFAN_BUILD_CMDS
$(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
$(MAKE) CC="$(TARGET_CC)" -C $(@D)
endef
define MBPFAN_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0644 $(@D)/mbpfan.conf \
$(TARGET_DIR)/etc/mbpfan.conf
$(INSTALL) -m 0755 $(@D)/bin/mbpfan $(TARGET_DIR)/usr/sbin/mbpfan
endef
define MBPFAN_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 $(@D)/mbpfan.service \
$(TARGET_DIR)/usr/lib/systemd/system/mbpfan.service
endef
$(eval $(generic-package))