Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/misp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1f55938
Choose a base ref
...
head repository: m-labs/misp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a8b967b
Choose a head ref
  • 2 commits
  • 6 files changed
  • 1 contributor

Commits on Jun 2, 2012

  1. Add minimal LuaFileSystem

    Sebastien Bourdeauducq committed Jun 2, 2012
    Copy the full SHA
    09f3d7e View commit details
  2. Lua filesystem demo

    Sebastien Bourdeauducq committed Jun 2, 2012
    Copy the full SHA
    a8b967b View commit details
Showing with 489 additions and 14 deletions.
  1. +2 −2 Makefile
  2. +22 −0 liblfs/Makefile
  3. +14 −0 liblfs/include/lfs.h
  4. +424 −0 liblfs/lfs.c
  5. +8 −12 luainit.c
  6. +19 −0 main.c
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -2,9 +2,9 @@ MISPDIR=.
include $(MISPDIR)/common.mak

OBJECTS=crt0.o isr.o luainit.o main.o
OURLIBS=m mm yaffs2 glue lua
OURLIBS=m mm yaffs2 glue lua lfs

CFLAGS+=-I$(MISPDIR)/libm/include -I$(MISPDIR)/libmm/include -I$(MISPDIR)/libglue/include -I$(LUADIR)/src
CFLAGS+=-I$(MISPDIR)/libm/include -I$(MISPDIR)/libmm/include -I$(MISPDIR)/libglue/include -I$(LUADIR)/src -I$(MISPDIR)/liblfs/include

all: misp.bin

22 changes: 22 additions & 0 deletions liblfs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MISPDIR=..
include $(MISPDIR)/common.mak

CFLAGS+=-I$(MISPDIR)/liblfs/include -I$(YAFFSDIR)/direct -I$(YAFFSDIR) -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_DEFINES_TYPES -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES -I$(LUADIR)/src
OBJECTS=lfs.o

all: liblfs.a

# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)

liblfs.a: $(OBJECTS)
$(AR) clr liblfs.a $(OBJECTS)
$(RANLIB) liblfs.a

%.o: %.c
$(compile-dep)

.PHONY: clean

clean:
rm -f $(OBJECTS) $(OBJECTS:.o=.d) liblfs.a .*~ *~
14 changes: 14 additions & 0 deletions liblfs/include/lfs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
** LuaFileSystem
** Copyright Kepler Project 2003 (http://www.keplerproject.org/luafilesystem)
** Adapted for MISP - Sebastien Bourdeauducq, 2012
**
** $Id: lfs.h,v 1.5 2008/02/19 20:08:23 mascarenhas Exp $
*/

#ifndef __LFS_H
#define __LFS_H

int luaopen_lfs(lua_State *L);

#endif /* __LFS_H */
Loading