Skip to content

Commit 36a479c

Browse files
authored
Merge pull request #66 from differrari/redlib
Redlib
2 parents 824ef9a + bcd7605 commit 36a479c

134 files changed

Lines changed: 81 additions & 10295 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "shared"]
2+
path = shared
3+
url = ../redlib

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ all: kshared modules kernel shared user utils bins
1616
./createfs
1717

1818
kshared:
19-
$(MAKE) -C shared SH_FLAGS=-DKERNEL BUILD_DIR=./kbuild TARGET=klibshared.a
19+
$(MAKE) -C shared kern
2020

2121
modules: kshared
2222
$(MAKE) -C modules XHCI_CTX_SIZE=$(XHCI_CTX_SIZE) QEMU=$(QEMU) TEST=$(TEST) DRIVER_TARGET=$(MODE)
@@ -52,9 +52,6 @@ clean:
5252
@echo "removing images"
5353
$(RM) kernel.img kernel.elf disk.img dump
5454

55-
cross:
56-
$(MAKE) -C shared ARCH= SH_FLAGS=-DCROSS BUILD_DIR=./cbuild TARGET=clibshared.a
57-
5855
raspi:
5956
$(MAKE) LOAD_ADDR=0x80000 XHCI_CTX_SIZE=64 QEMU=true MODE=raspi all
6057
./run_raspi
@@ -76,7 +73,7 @@ dump:
7673

7774
install:
7875
$(MAKE) clean
79-
$(MAKE) LOAD_ADDR=0x80000 XHCI_CTX_SIZE=64 QEMU=false all
76+
$(MAKE) LOAD_ADDR=0x80000 XHCI_CTX_SIZE=64 QEMU=false MODE=raspi all
8077
cp kernel.img $(BOOTFS)/kernel8.img
8178
cp kernel.img $(BOOTFS)/kernel_2712.img
8279
cp config.txt $(BOOTFS)/config.txt

kernel/bin/ping.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static bool parse_args(int argc, char *argv[], ping_opts_t *o) {
4242
o->src_set = false;
4343
o->host = NULL;
4444

45-
for (int i = 0; i < argc; ++i) {
45+
for (int i = 1; i < argc; ++i) {
4646
const char *a = argv[i];
4747
if (a && a[0] == '-') {
4848
if (strcmp_case(a, "-4",true) == 0) o->ver = IP_VER4;

kernel/bin/shutdown.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int run_shutdown(int argc, char* argv[]){
2727

2828
int mode = -1;
2929

30-
for (int i = 0; i < argc; ++i){
30+
for (int i = 1; i < argc; ++i){
3131
const char *a = argv[i];
3232
if (!a || a[0] == 0) continue;
3333

kernel/bin/tracert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static bool parse_args(int argc, char *argv[], tr_opts_t *o) {
4343
o->src_set = false;
4444
o->host = NULL;
4545

46-
for (int i = 0; i < argc; i++) {
46+
for (int i = 1; i < argc; i++) {
4747
const char *a = argv[i];
4848
if (a && a[0] == '-') {
4949
if (strcmp_case(a, "-4",true) == 0) {

kernel/console/kio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "memory/page_allocator.h"
66
#include "std/memory.h"
77
#include "math/math.h"
8-
#include "data_struct/ring_buffer.h"
8+
#include "data/struct/ring_buffer.h"
99

1010
static bool use_visual = false;
1111

kernel/dev/driver_base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "driver_base.h"
2-
#include "data_struct/hashmap.h"
2+
#include "data/struct/hashmap.h"
33
#include "std/string.h"
44

55
uint64_t fd_id = 256;//First byte reserved

kernel/dev/module_loader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#include "driver_base.h"
4-
#include "data_struct/linked_list.h"
4+
#include "data/struct/linked_list.h"
55

66
#ifdef __cplusplus
77
extern "C" {

kernel/filesystem/fat32.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "types.h"
44
#include "std/string.h"
55
#include "fsdriver.hpp"
6-
#include "data_struct/hashmap.h"
6+
#include "data/struct/hashmap.h"
77

88
typedef struct fat32_mbs {
99
uint8_t jumpboot[3];//3

kernel/filesystem/pipe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include "pipe.h"
22
#include "filesystem.h"
33
#include "memory/page_allocator.h"
4-
#include "data_struct/hashmap.h"
5-
#include "data_struct/linked_list.h"
4+
#include "data/struct/hashmap.h"
5+
#include "data/struct/linked_list.h"
66
#include "process/scheduler.h"
77

88
static void *pipe_page;

0 commit comments

Comments
 (0)