Step1: build with busybox.

Signed-off-by: Chen Wang <wangchen20@iscas.ac.cn>
This commit is contained in:
2025-11-24 16:22:33 +08:00
committed by Chen Wang
commit d35682f2b7
163 changed files with 15660 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
From b39a62f6682463bcd47480348fac3dcd209a19a5 Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Wed, 22 Jan 2014 01:06:40 -0500
Subject: [PATCH] Add dummy definition of O_CLOEXEC
O_CLOEXEC is introduced from Linux 2.6.23, so old kernel doesn't have
it, we need check before use.
This patch is much more like a workaround, since it may need fcntl() use
FD_CLOEXEC to replace.
This problem was reported by "Ting Liu <b28495@freescale.com>"
[Thomas De Schampheleire <thomas.de.schampheleire@gmail.com:
- move dummy definition from libkmod-internal.h to missing.h
- update commit title]
[Vicente: Adapt this patch to version 19.]
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Upstream-status: rejected, suggests to add in buildroot instead [1]
[1] http://news.gmane.org/find-root.php?message_id=1412062906%2d27378%2d1%2dgit%2dsend%2demail%2dpatrickdepinguin%40gmail.com
---
shared/missing.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/shared/missing.h b/shared/missing.h
index 4c0d136..e123e98 100644
--- a/shared/missing.h
+++ b/shared/missing.h
@@ -19,6 +19,10 @@
# define __NR_finit_module -1
#endif
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0
+#endif
+
#ifndef HAVE_FINIT_MODULE
#include <errno.h>
--
1.7.1

43
package/kmod/make-host.sh Executable file
View File

@@ -0,0 +1,43 @@
#!/usr/bin/bash
source $(dirname "$0")/../common.sh
PKGNAME=kmod
PKGVERSION=33
PKGSOURCE_DIR=kmod
PKGSOURCE=kmod-33.tar.xz
PKGURL=http://mirrors.ustc.edu.cn/kernel.org/linux/utils/kernel/kmod/kmod-33.tar.xz
PKGBUILDNAME=host-${PKGNAME}
PKGBUILD_DIR=${BUILD_DIR}/${PKGBUILDNAME}-${PKGVERSION}
echo "----> Building ${PKGBUILDNAME} ..."
stamp_downloaded
step_start extract
mkdir -p ${PKGBUILD_DIR}
xzcat ${DL_DIR}/${PKGSOURCE_DIR}/${PKGSOURCE} | tar --strip-components=1 -C ${PKGBUILD_DIR} -xf -
chmod -R +rw ${PKGBUILD_DIR}
step_end extract
step_start patch
TAR="tar" PATH=${HOST_DIR}/bin:$PATH ${PROJECT_DIR}/support/scripts/apply-patches.sh ${PKGBUILD_DIR} ${PROJECT_DIR}/package/${PKGNAME} \*.patch
step_end patch autotools
step_start configure
(cd ${PKGBUILD_DIR} && rm -rf config.cache; eval "${HOST_CONFIGURE_OPTS} CONFIG_SITE=/dev/null ./configure --prefix=\"${HOST_DIR}\" --sysconfdir=\"${HOST_DIR}/etc\" --localstatedir=\"${HOST_DIR}/var\" --enable-shared --disable-static --disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --disable-debug --with-xmlto=no --with-fop=no --disable-nls --disable-dependency-tracking --disable-manpages --without-zlib --without-zstd --without-xz")
step_end configure
step_start build
eval "${HOST_MAKE_ENV} /usr/bin/make -j${MAXNUM_CPUS} -C ${PKGBUILD_DIR}"
step_end build
step_start install-host
eval "${HOST_MAKE_ENV} /usr/bin/make -j${MAXNUM_CPUS} install -C ${PKGBUILD_DIR}"
mkdir -p ${HOST_DIR}/sbin/
ln -sf ../bin/kmod ${HOST_DIR}/sbin/depmod
step_end install-host
stamp_installed
echo "<---- ${PKGBUILDNAME} build complete."