+5
-1
@@ -12,7 +12,11 @@
|
|||||||
include mk/sys.mk
|
include mk/sys.mk
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: sp1 boot
|
all: lib sp1 boot
|
||||||
|
|
||||||
|
.PHONY: lib
|
||||||
|
lib:
|
||||||
|
cd lib/; $(MAKE)
|
||||||
|
|
||||||
.PHONY: boot
|
.PHONY: boot
|
||||||
boot:
|
boot:
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
# property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
# use, distrubution or modification of this file, in whole
|
||||||
|
# and in part, is strictly prohibited without the prior written
|
||||||
|
# consent from Mirocom Laboratories.
|
||||||
|
#
|
||||||
|
|
||||||
|
include ../mk/sys.mk
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: libstr
|
||||||
|
|
||||||
|
.PHONY: libstr
|
||||||
|
libstr:
|
||||||
|
cd libstr/; $(MAKE) $(PASSDOWN_ARGS)
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
# property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
# use, distrubution or modification of this file, in whole
|
||||||
|
# and in part, is strictly prohibited without the prior written
|
||||||
|
# consent from Mirocom Laboratories.
|
||||||
|
#
|
||||||
|
|
||||||
|
CFILES = $(shell find . -name "*.c")
|
||||||
|
OFILES = $(CFILES:.c=.o)
|
||||||
|
|
||||||
|
CC = ../../../../$(SYS_CC)
|
||||||
|
CFLAGS = $(SYS_CFLAGS) -I../../head -D_SP1_SOURCE
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: $(OFILES)
|
||||||
|
|
||||||
|
%.o: %.c
|
||||||
|
$(CC) -c $< $(CFLAGS) -o $@
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
* property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
* use, distribution or modification of this file, in whole
|
||||||
|
* and in part, is strictly prohibited without the prior written
|
||||||
|
* consent from Mirocom Laboratories.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
memcmp(const void *s1, const void *s2, __size_t n)
|
||||||
|
{
|
||||||
|
if (n != 0) {
|
||||||
|
const unsigned char *p1 = s1, *p2 = s2;
|
||||||
|
|
||||||
|
do {
|
||||||
|
if (*p1++ != *p2++) {
|
||||||
|
return (*--p1 - *--p2);
|
||||||
|
}
|
||||||
|
} while (--n != 0);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
* property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
* use, distribution or modification of this file, in whole
|
||||||
|
* and in part, is strictly prohibited without the prior written
|
||||||
|
* consent from Mirocom Laboratories.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
void *
|
||||||
|
memcpy(void *dest, const void *src, size_t count)
|
||||||
|
{
|
||||||
|
if (dest == NULL || src == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (size_t i = 0; i < count; ++i) {
|
||||||
|
((char *)dest)[i] = ((char *)src)[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return dest;
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2026, Mirocom Laboratories
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* The following sources are CONFIDENTIAL and PROPRIETARY
|
||||||
|
* property of Mirocom Laboratories. Unauthorized copying,
|
||||||
|
* use, distribution or modification of this file, in whole
|
||||||
|
* and in part, is strictly prohibited without the prior written
|
||||||
|
* consent from Mirocom Laboratories.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
void *
|
||||||
|
memset(void *s, int c, size_t n)
|
||||||
|
{
|
||||||
|
if (s == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (size_t i = 0; i < n; ++i) {
|
||||||
|
((uint8_t *)s)[i] = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
return s;
|
||||||
|
}
|
||||||
@@ -11,7 +11,9 @@
|
|||||||
|
|
||||||
ASMFILES = $(shell find . -name "*.S")
|
ASMFILES = $(shell find . -name "*.S")
|
||||||
ASMOFILES = $(ASMFILES:.S=.S.o)
|
ASMOFILES = $(ASMFILES:.S=.S.o)
|
||||||
MISC_OFILES = $(shell find ../common -name "*.o")
|
|
||||||
|
MISC_OFILES = $(shell find ../ -name "*.o")
|
||||||
|
LIB_OFILES = $(shell find ../../lib/ -name "*.o")
|
||||||
|
|
||||||
CC = \
|
CC = \
|
||||||
../../../../$(SYS_CC)
|
../../../../$(SYS_CC)
|
||||||
@@ -27,7 +29,7 @@ all: $(ASMOFILES)
|
|||||||
$(LD) \
|
$(LD) \
|
||||||
-Tconf/link.ld \
|
-Tconf/link.ld \
|
||||||
$(MISC_OFILES) \
|
$(MISC_OFILES) \
|
||||||
$(ASMOFILES) \
|
$(LIB_OFILES) \
|
||||||
-o ../../../../sp1.sys
|
-o ../../../../sp1.sys
|
||||||
|
|
||||||
%.S.o: %.S
|
%.S.o: %.S
|
||||||
|
|||||||
Reference in New Issue
Block a user