diff --git a/groups/211.native_packages_cmdline.group b/groups/211.native_packages_cmdline.group index 76e5312..b1fd48f 100644 --- a/groups/211.native_packages_cmdline.group +++ b/groups/211.native_packages_cmdline.group @@ -31,6 +31,7 @@ the_silver_searcher toilet tree terminally_tetris ubase which zsh")"; : ${PKG_BUSYBOX_INSTALL_FILES_V2:=" :%[_builddir]/_install/bin/%<*>=bin/%[FNAME]"}; : ${PKG_BUSYBOX_PREFIX:=${PREFIX_NATIVE}/busybox}; +: ${PKG_BUSYBOX_ENV_VARS_EXTRA:="LDFLAGS=--sysroot=${PREFIX_NATIVE}"}; : ${PKG_CABEXTRACT_DEPENDS:="libmspack"}; : ${PKG_CABEXTRACT_SHA256SUM:=afc253673c8ef316b4d5c29cc4aa8445844bee14afffbe092ee9469405851ca7}; : ${PKG_CABEXTRACT_VERSION:=1.9.1}; diff --git a/patches/busybox/nativekill.patch b/patches/busybox/nativekill.patch new file mode 100644 index 0000000..691235f --- /dev/null +++ b/patches/busybox/nativekill.patch @@ -0,0 +1,33 @@ +diff -ru busybox-1.35.0.orig/procps/kill.c busybox-1.35.0/procps/kill.c +--- busybox-1.35.0.orig/procps/kill.c 2021-12-26 17:53:21.000000000 +0100 ++++ busybox-1.35.0/procps/kill.c 2022-02-05 22:46:30.981801454 +0100 +@@ -189,6 +189,29 @@ + if (is_killall5 && arg[0] == 'o') + goto do_it_now; + ++#if ENABLE_KILL && defined(__midipix__) ++ extern intptr_t __sys_dbg_kill(int pfd); ++ extern intptr_t __sys_dbg_attach(pid_t pid); ++ ++ /* -n PID (native PID) */ ++ if (arg[0] == 'n') { ++ arg = *++argv; ++ if(!arg) { ++ bb_error_msg("-n requires a PID argument"); ++ return EXIT_FAILURE; ++ } ++ pid = bb_strtoi(arg, NULL, 10); ++ if (errno) { ++ bb_error_msg("invalid number '%s'", arg); ++ return EXIT_FAILURE; ++ } else if ((__sys_dbg_kill(__sys_dbg_attach(pid))) != 0) { ++ bb_perror_msg("can't kill native pid %d", (int)pid); ++ return EXIT_FAILURE; ++ } ++ return EXIT_SUCCESS; ++ } ++#endif ++ + /* "--" separates options from args. Testcase: "kill -- -123" */ + if (!is_killall5 && arg[0] == '-' && arg[1] == '\0') + goto do_it_sooner;