Skip to content

Commit

Permalink
x86: clean unrequired artifacts
Browse files Browse the repository at this point in the history
Signed-off-by: Mahavir Jain <[email protected]>
  • Loading branch information
mahavirj authored and Mahavir Jain committed Apr 1, 2017
1 parent bdc60a2 commit 2ed2107
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 34 deletions.
File renamed without changes.
2 changes: 2 additions & 0 deletions build/rules-x86.mk
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ all: pre-build $(kernel) $(os_image)
ramfs.obj: $(app_lib) $(app_obj_dir)/init $(app_obj_dir)/shell $(app_obj_dir)/forktest $(app_obj_dir)/memtest
$(V)cd $(app_obj_dir) && find . | cpio -o -H newc > ../ramfs.cpio
$(V)cd $(objdir) && $(OBJCOPY) -I binary -O elf32-i386 -B i386 ramfs.cpio $@
$(V)rm -f $(objdir)/ramfs.cpio $(app_lib)

$(app_lib): $(app_lib_objs) $(app_asm_objs)
$(V)$(AR) cru $@ $^
Expand Down Expand Up @@ -116,6 +117,7 @@ $(kernel): $(LDFILE) $(asm_objs) $(c_objs) ramfs.obj
@echo " LD $@"
$(V)$(CC) $(CFLAGS) $(LDFLAGS) $(LDSCRIPT) $(asm_objs) $(c_objs) $(objdir)/ramfs.obj -o $@
$(V)$(OBJDUMP) -t $@ | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > $(objdir)/kernel.sym
$(V)rm -f $(objdir)/ramfs.obj

$(os_image): $(kernel)
$(V)cp $< iso/boot/
Expand Down
34 changes: 0 additions & 34 deletions kernel/main.c
Original file line number Diff line number Diff line change
@@ -1,41 +1,7 @@
#include <task.h>
//#include <sync.h>
#include <arch.h>
#include <console.h>

#if 0
static int count = 1;
static struct spinlock lock;
static void t1();
static void t2();

static void t2()
{
while (1) {
acquire(&lock);
if (count % 2 != 0)
sleep(t2, &lock);
printk("B. Hello World Iteration %d\n", count++);
wakeup(t1);
release(&lock);
}
}

static void t1()
{
create_task(t2);

while (1) {
acquire(&lock);
if (count % 2 == 0)
sleep(t1, &lock);
printk("A. Hello World Iteration %d\n", count++);
wakeup(t2);
release(&lock);
}
}
#endif

static void print_banner()
{
printk("\n#########################\n");
Expand Down

0 comments on commit 2ed2107

Please sign in to comment.