added my Recipes
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
From a1c4716ceaed6333f8be01b5d4d971e64babcdd7 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 2 Sep 2022 18:57:42 -0700
|
||||
Subject: [PATCH] Add missing standard headers for str* and exit APIs
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
jail/jail_uml | Bin 19120 -> 19120 bytes
|
||||
jail/jail_uml.c | 1 +
|
||||
port-helper/port-helper.c | 1 +
|
||||
uml_router/port.c | 1 +
|
||||
uml_router/uml_switch.c | 1 +
|
||||
watchdog/uml_watchdog.c | 1 +
|
||||
6 files changed, 5 insertions(+)
|
||||
|
||||
--- a/jail/jail_uml.c
|
||||
+++ b/jail/jail_uml.c
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
+#include <stdlib.h> /* for exit */
|
||||
#include <errno.h>
|
||||
|
||||
static void Usage(void)
|
||||
--- a/port-helper/port-helper.c
|
||||
+++ b/port-helper/port-helper.c
|
||||
@@ -12,6 +12,7 @@ for read and write, and the console is f
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h> /* memset */
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
--- a/uml_router/port.c
|
||||
+++ b/uml_router/port.c
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h> /* memcmp */
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
--- a/uml_router/uml_switch.c
|
||||
+++ b/uml_router/uml_switch.c
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h> /* strcmp */
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdint.h>
|
||||
--- a/watchdog/uml_watchdog.c
|
||||
+++ b/watchdog/uml_watchdog.c
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h> /* strcmp */
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
@@ -0,0 +1,34 @@
|
||||
From c4f85268da6c30b0aec3d9a0e951b2088887cff4 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 22 May 2023 18:35:37 -0700
|
||||
Subject: [PATCH] cow.c: Replace stat64 with stat
|
||||
|
||||
LFS64 is deprecated in latest musl and this fails to build
|
||||
therefore switch to using stat API which is same as stat64 these days
|
||||
|
||||
Upstream-Status: Inappropriate [No upstream]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
moo/cow.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/moo/cow.c
|
||||
+++ b/moo/cow.c
|
||||
@@ -161,7 +161,7 @@ int write_cow_header(char *cow_file, int
|
||||
int sectorsize, int alignment, long long *size)
|
||||
{
|
||||
struct cow_header_v3 *header;
|
||||
- struct stat64 buf;
|
||||
+ struct stat buf;
|
||||
int err;
|
||||
|
||||
err = cow_seek_file(fd, 0);
|
||||
@@ -192,7 +192,7 @@ int write_cow_header(char *cow_file, int
|
||||
backing_file))
|
||||
goto out_free;
|
||||
|
||||
- err = stat64(header->backing_file, &buf);
|
||||
+ err = stat(header->backing_file, &buf);
|
||||
if(err < 0){
|
||||
cow_printf("Stat of backing file '%s' failed, errno = %d\n",
|
||||
header->backing_file, errno);
|
||||
@@ -0,0 +1,41 @@
|
||||
From a8d85949a068ee6cd9a2f923cd039047993f239e Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 3 Apr 2017 17:11:32 -0700
|
||||
Subject: [PATCH] include required system header files for fd_set and makedev
|
||||
|
||||
fd_set comes from sys/select.h
|
||||
makedev macro is defined in sys/sysmacros.h
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
uml_net/ethertap.c | 1 +
|
||||
uml_net/host.c | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/uml_net/ethertap.c b/uml_net/ethertap.c
|
||||
index ddd41f2..57f7119 100644
|
||||
--- a/uml_net/ethertap.c
|
||||
+++ b/uml_net/ethertap.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <sys/signal.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/select.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <net/if.h>
|
||||
#include "host.h"
|
||||
diff --git a/uml_net/host.c b/uml_net/host.c
|
||||
index 65c20df..fc04cd4 100644
|
||||
--- a/uml_net/host.c
|
||||
+++ b/uml_net/host.c
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <ctype.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include "output.h"
|
||||
#include "host.h"
|
||||
|
||||
--
|
||||
2.12.2
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
From ac72fffe639d564f59ec1e1eafde83980acef1b5 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 23 May 2023 14:40:31 -0700
|
||||
Subject: [PATCH] makefiles: Append to CFLAGS instead of re-assign
|
||||
|
||||
This helps in inserting yocto provided CFLAGS from build environment
|
||||
|
||||
Upstream-Status: Inappropriate [No upstream]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
jailtest/Makefile | 2 +-
|
||||
mconsole/Makefile | 2 +-
|
||||
moo/Makefile | 2 +-
|
||||
port-helper/Makefile | 2 +-
|
||||
tunctl/Makefile | 2 +-
|
||||
uml_net/Makefile | 2 +-
|
||||
uml_router/Makefile | 2 +-
|
||||
watchdog/Makefile | 2 +-
|
||||
8 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/jailtest/Makefile b/jailtest/Makefile
|
||||
index 610ca1a..025fca9 100644
|
||||
--- a/jailtest/Makefile
|
||||
+++ b/jailtest/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
OBJS = jailtest.o
|
||||
BIN = jailtest
|
||||
-CFLAGS = -g -Wall
|
||||
+CFLAGS += -g -Wall
|
||||
|
||||
BIN_DIR ?= /usr/bin
|
||||
|
||||
diff --git a/mconsole/Makefile b/mconsole/Makefile
|
||||
index 9818d8a..74a2560 100644
|
||||
--- a/mconsole/Makefile
|
||||
+++ b/mconsole/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
BIN = uml_mconsole
|
||||
OBJS = $(BIN).o
|
||||
-CFLAGS = -g -Wall
|
||||
+CFLAGS += -g -Wall
|
||||
|
||||
BIN_DIR ?= /usr/bin
|
||||
|
||||
diff --git a/moo/Makefile b/moo/Makefile
|
||||
index 6cdb591..60d300d 100644
|
||||
--- a/moo/Makefile
|
||||
+++ b/moo/Makefile
|
||||
@@ -3,7 +3,7 @@ BIN = uml_moo uml_mkcow
|
||||
uml_moo_OBJS = uml_moo.o cow.o
|
||||
uml_mkcow_OBJS = uml_mkcow.o cow.o
|
||||
|
||||
-CFLAGS = -g -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
|
||||
+CFLAGS += -g -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
|
||||
|
||||
BIN_DIR ?= /usr/bin
|
||||
|
||||
diff --git a/port-helper/Makefile b/port-helper/Makefile
|
||||
index 8e33bdf..8b695f3 100644
|
||||
--- a/port-helper/Makefile
|
||||
+++ b/port-helper/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
OBJS = port-helper.o
|
||||
BIN = port-helper
|
||||
-CFLAGS = -g -Wall
|
||||
+CFLAGS += -g -Wall
|
||||
|
||||
LIB_DIR ?= /usr/lib/uml
|
||||
|
||||
diff --git a/tunctl/Makefile b/tunctl/Makefile
|
||||
index 743bfea..a39ad2b 100644
|
||||
--- a/tunctl/Makefile
|
||||
+++ b/tunctl/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
OBJS = tunctl.o
|
||||
BIN = tunctl
|
||||
-CFLAGS = -g -Wall
|
||||
+CFLAGS += -g -Wall
|
||||
|
||||
BIN_DIR ?= /usr/bin
|
||||
|
||||
diff --git a/uml_net/Makefile b/uml_net/Makefile
|
||||
index 36efec6..2e1ad0e 100644
|
||||
--- a/uml_net/Makefile
|
||||
+++ b/uml_net/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
TUNTAP = $(shell [ -e /usr/include/linux/if_tun.h ] && echo -DTUNTAP)
|
||||
|
||||
BIN = uml_net
|
||||
-CFLAGS = -g -Wall $(TUNTAP)
|
||||
+CFLAGS += -g -Wall $(TUNTAP)
|
||||
|
||||
BIN_DIR ?= /usr/bin
|
||||
|
||||
diff --git a/uml_router/Makefile b/uml_router/Makefile
|
||||
index b7b5401..e399ea5 100644
|
||||
--- a/uml_router/Makefile
|
||||
+++ b/uml_router/Makefile
|
||||
@@ -2,7 +2,7 @@ TUNTAP = $(shell [ -e /usr/include/linux/if_tun.h ] && echo -DTUNTAP)
|
||||
|
||||
OBJS = hash.o port.o uml_switch.o
|
||||
BIN = uml_switch
|
||||
-CFLAGS = -g -Wall $(TUNTAP)
|
||||
+CFLAGS += -g -Wall $(TUNTAP)
|
||||
|
||||
BIN_DIR ?= /usr/bin
|
||||
|
||||
diff --git a/watchdog/Makefile b/watchdog/Makefile
|
||||
index c26fd9f..5178cc6 100644
|
||||
--- a/watchdog/Makefile
|
||||
+++ b/watchdog/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
BIN = uml_watchdog
|
||||
OBJS = $(BIN).o
|
||||
-CFLAGS = -g -Wall
|
||||
+CFLAGS += -g -Wall
|
||||
|
||||
BIN_DIR ?= /usr/bin
|
||||
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
|
||||
#
|
||||
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
|
||||
#
|
||||
|
||||
--- tools/mconsole/Makefile~fix-ldflags 2003-02-08 05:10:08.000000000 +0100
|
||||
+++ tools/mconsole/Makefile 2004-04-01 15:37:37.000000000 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
all : $(BIN)
|
||||
|
||||
$(BIN) : $(OBJS)
|
||||
- $(CC) $(CFLAGS) -o $(BIN) $(OBJS) -lreadline -lncurses
|
||||
+ $(CC) $(CFLAGS) -o $(BIN) $(OBJS) $(LDFLAGS) -lreadline -lncurses
|
||||
|
||||
clean :
|
||||
rm -f $(BIN) $(OBJS) *~
|
||||
diff -uNr tools.orig/jailtest/Makefile tools/jailtest/Makefile
|
||||
--- tools.orig/jailtest/Makefile 2017-04-03 15:56:02.068461380 +0200
|
||||
+++ tools/jailtest/Makefile 2017-04-03 16:00:04.857449005 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
all : $(BIN)
|
||||
|
||||
$(BIN) : $(OBJS)
|
||||
- $(CC) $(CFLAGS) -o $(BIN) $(OBJS)
|
||||
+ $(CC) $(CFLAGS) -o $(BIN) $(OBJS) $(LDFLAGS)
|
||||
|
||||
clean :
|
||||
rm -f $(BIN) $(OBJS) *~
|
||||
diff -uNr tools.orig/moo/Makefile tools/moo/Makefile
|
||||
--- tools.orig/moo/Makefile 2017-04-03 15:56:02.068461380 +0200
|
||||
+++ tools/moo/Makefile 2017-04-03 15:59:56.466449432 +0200
|
||||
@@ -10,10 +10,10 @@
|
||||
all : $(BIN)
|
||||
|
||||
uml_moo : $(uml_moo_OBJS)
|
||||
- $(CC) $(CFLAGS) -o $@ $($@_OBJS)
|
||||
+ $(CC) $(CFLAGS) -o $@ $($@_OBJS) $(LDFLAGS)
|
||||
|
||||
uml_mkcow : $(uml_mkcow_OBJS)
|
||||
- $(CC) $(CFLAGS) -o $@ $($@_OBJS)
|
||||
+ $(CC) $(CFLAGS) -o $@ $($@_OBJS) $(LDFLAGS)
|
||||
|
||||
$(uml_moo_OBJS) $(uml_mkcow_OBJS) : cow.h cow_sys.h
|
||||
|
||||
diff -uNr tools.orig/port-helper/Makefile tools/port-helper/Makefile
|
||||
--- tools.orig/port-helper/Makefile 2017-04-03 15:56:02.068461380 +0200
|
||||
+++ tools/port-helper/Makefile 2017-04-03 15:59:41.251450208 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
all : $(BIN)
|
||||
|
||||
$(BIN) : $(OBJS)
|
||||
- $(CC) $(CFLAGS) -o $(BIN) $(OBJS)
|
||||
+ $(CC) $(CFLAGS) -o $(BIN) $(OBJS) $(LDFLAGS)
|
||||
|
||||
clean :
|
||||
rm -f $(BIN) $(OBJS) *~
|
||||
diff -uNr tools.orig/tunctl/Makefile tools/tunctl/Makefile
|
||||
--- tools.orig/tunctl/Makefile 2017-04-03 15:56:02.068461380 +0200
|
||||
+++ tools/tunctl/Makefile 2017-04-03 16:00:01.091449197 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
all : $(BIN)
|
||||
|
||||
$(BIN) : $(OBJS)
|
||||
- $(CC) $(CFLAGS) -o $(BIN) $(OBJS)
|
||||
+ $(CC) $(CFLAGS) -o $(BIN) $(OBJS) $(LDFLAGS)
|
||||
|
||||
clean :
|
||||
rm -f $(BIN) $(OBJS) *~
|
||||
diff -uNr tools.orig/uml_net/Makefile tools/uml_net/Makefile
|
||||
--- tools.orig/uml_net/Makefile 2017-04-03 15:56:02.068461380 +0200
|
||||
+++ tools/uml_net/Makefile 2017-04-03 16:00:12.449448618 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
all : $(BIN)
|
||||
|
||||
$(BIN) : $(OBJS)
|
||||
- $(CC) $(CFLAGS) -o $(BIN) $(OBJS)
|
||||
+ $(CC) $(CFLAGS) -o $(BIN) $(OBJS) $(LDFLAGS)
|
||||
|
||||
clean :
|
||||
rm -f $(BIN) $(OBJS) *~
|
||||
diff -uNr tools.orig/uml_router/Makefile tools/uml_router/Makefile
|
||||
--- tools.orig/uml_router/Makefile 2017-04-03 15:56:02.068461380 +0200
|
||||
+++ tools/uml_router/Makefile 2017-04-03 16:00:46.796446867 +0200
|
||||
@@ -13,7 +13,7 @@
|
||||
all : $(BIN)
|
||||
|
||||
$(BIN) : $(OBJS)
|
||||
- $(CC) $(CFLAGS) -o $(BIN) $(OBJS)
|
||||
+ $(CC) $(CFLAGS) -o $(BIN) $(OBJS) $(LDFLAGS)
|
||||
|
||||
clean :
|
||||
rm -f $(BIN) $(OBJS) *~
|
||||
diff -uNr tools.orig/watchdog/Makefile tools/watchdog/Makefile
|
||||
--- tools.orig/watchdog/Makefile 2017-04-03 15:56:02.068461380 +0200
|
||||
+++ tools/watchdog/Makefile 2017-04-03 15:59:45.216450006 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
all : $(BIN)
|
||||
|
||||
$(BIN) : $(OBJS)
|
||||
- $(CC) $(CFLAGS) -o $(BIN) $(OBJS)
|
||||
+ $(CC) $(CFLAGS) -o $(BIN) $(OBJS) $(LDFLAGS)
|
||||
|
||||
clean :
|
||||
rm -f $(BIN) $(OBJS) *~
|
||||
@@ -0,0 +1,84 @@
|
||||
Dont strip during install let the packaging handle it
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
Index: tools/jailtest/Makefile
|
||||
===================================================================
|
||||
--- tools.orig/jailtest/Makefile 2003-02-07 20:10:27.000000000 -0800
|
||||
+++ tools/jailtest/Makefile 2012-09-05 12:13:56.061615854 -0700
|
||||
@@ -14,4 +14,4 @@
|
||||
|
||||
install : $(BIN)
|
||||
install -d $(DESTDIR)$(BIN_DIR)
|
||||
- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
+ install $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
Index: tools/mconsole/Makefile
|
||||
===================================================================
|
||||
--- tools.orig/mconsole/Makefile 2012-09-05 12:05:09.869607043 -0700
|
||||
+++ tools/mconsole/Makefile 2012-09-05 12:14:07.725607469 -0700
|
||||
@@ -14,4 +14,4 @@
|
||||
|
||||
install : $(BIN)
|
||||
install -d $(DESTDIR)$(BIN_DIR)
|
||||
- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
+ install $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
Index: tools/moo/Makefile
|
||||
===================================================================
|
||||
--- tools.orig/moo/Makefile 2003-06-26 09:27:00.000000000 -0700
|
||||
+++ tools/moo/Makefile 2012-09-05 12:14:20.981604580 -0700
|
||||
@@ -22,4 +22,4 @@
|
||||
|
||||
install : $(BIN)
|
||||
install -d $(DESTDIR)$(BIN_DIR)
|
||||
- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
+ install $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
Index: tools/port-helper/Makefile
|
||||
===================================================================
|
||||
--- tools.orig/port-helper/Makefile 2003-02-07 20:05:31.000000000 -0800
|
||||
+++ tools/port-helper/Makefile 2012-09-05 12:14:39.429609678 -0700
|
||||
@@ -14,4 +14,4 @@
|
||||
|
||||
install : $(BIN)
|
||||
install -d $(DESTDIR)$(LIB_DIR)
|
||||
- install -s $(BIN) $(DESTDIR)$(LIB_DIR)
|
||||
+ install $(BIN) $(DESTDIR)$(LIB_DIR)
|
||||
Index: tools/tunctl/Makefile
|
||||
===================================================================
|
||||
--- tools.orig/tunctl/Makefile 2003-02-07 20:05:04.000000000 -0800
|
||||
+++ tools/tunctl/Makefile 2012-09-05 12:14:49.985606470 -0700
|
||||
@@ -14,4 +14,4 @@
|
||||
|
||||
install : $(BIN)
|
||||
install -d $(DESTDIR)$(BIN_DIR)
|
||||
- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
+ install $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
Index: tools/uml_net/Makefile
|
||||
===================================================================
|
||||
--- tools.orig/uml_net/Makefile 2003-02-07 20:04:55.000000000 -0800
|
||||
+++ tools/uml_net/Makefile 2012-09-05 12:15:00.961607290 -0700
|
||||
@@ -21,4 +21,4 @@
|
||||
|
||||
install : $(BIN)
|
||||
install -d $(DESTDIR)$(BIN_DIR)
|
||||
- install -s -m 04755 $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
+ install -m 04755 $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
Index: tools/uml_router/Makefile
|
||||
===================================================================
|
||||
--- tools.orig/uml_router/Makefile 2003-02-07 20:04:39.000000000 -0800
|
||||
+++ tools/uml_router/Makefile 2012-09-05 12:15:10.649607571 -0700
|
||||
@@ -20,4 +20,4 @@
|
||||
|
||||
install : $(BIN)
|
||||
install -d $(DESTDIR)$(BIN_DIR)
|
||||
- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
+ install $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
Index: tools/watchdog/Makefile
|
||||
===================================================================
|
||||
--- tools.orig/watchdog/Makefile 2003-02-07 20:04:25.000000000 -0800
|
||||
+++ tools/watchdog/Makefile 2012-09-05 12:15:35.561612203 -0700
|
||||
@@ -14,4 +14,4 @@
|
||||
|
||||
install : $(BIN)
|
||||
install -d $(DESTDIR)$(BIN_DIR)
|
||||
- install -s $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
+ install $(BIN) $(DESTDIR)$(BIN_DIR)
|
||||
Reference in New Issue
Block a user