Skip to content

Commit

Permalink
lkl-arm: Enable raspi net_device
Browse files Browse the repository at this point in the history
  • Loading branch information
midchildan committed Feb 22, 2019
1 parent 4cc2a7d commit b46ddaf
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ CC="${BINDIR}/${COMPILER}" \
RUMPDIR="${OUTDIR}" \
RUMPOBJ="${RUMPOBJ}" \
BINDIR="${BINDIR}" \
OS="${OS}" \
${MAKE} ${STDJ} -C tests

# test for executable stack
Expand Down
17 changes: 17 additions & 0 deletions franken/init/fdinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,23 @@ franken_lkl_load_json_config(int fd)
struct lkl_config *
franken_lkl_get_json_config(void)
{
int ret;

if (json_cfg) {
return json_cfg;
}

json_cfg = (struct lkl_config *)malloc(sizeof(struct lkl_config));
if (!json_cfg) {
printf("malloc error\n");
return;
}
memset(json_cfg, 0, sizeof(struct lkl_config));

ret = lkl_load_config_env(json_cfg);
if (ret < 0) {
return NULL;
}
return json_cfg;
}
#endif
Expand Down
2 changes: 2 additions & 0 deletions platform/qemu-arm/link.ld
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,7 @@ SECTIONS

*(.bss COMMON)
}
__iomem_start = .;
. = . + 0x100000000;
__kernel_end = .;
}
6 changes: 3 additions & 3 deletions rumpkernel/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ rumpkernel_build_test()
OBJDIR=${RUMPOBJ}/tests

# XXX qemu-arm still has an issue on pthread_self() during setuid
if [ ${OS} != "qemu-arm" ] ;
then
# if [ ${OS} != "qemu-arm" ] ;
# then
${MAKE} -C tests/iputils clean
CC="${BINDIR}/${COMPILER}" ${MAKE} -C tests/iputils ping ping6
cp tests/iputils/ping tests/iputils/ping6 ${OBJDIR}/
${MAKE} -C tests/iputils clean
fi
# fi
}
9 changes: 6 additions & 3 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ CFLAGS+=-g

DEPS=$(LIBDIR)/libc.a

OBJ=$(OBJDIR)/hello $(OBJDIR)/ctor $(OBJDIR)/cat #$(OBJDIR)/hello-pthread
OBJ=$(OBJDIR)/hello $(OBJDIR)/ctor #$(OBJDIR)/hello-pthread
ifneq ($(OS),qemu-arm)
OBJ+=$(OBJDIR)/cat
endif

default: $(OBJ)

Expand All @@ -23,11 +26,11 @@ run: $(OBJ)
mkfs.ext4 -F disk.img
RUMP_VERBOSE=1 ${REXEC} $(OBJDIR)/hello disk.img
${REXEC} $(OBJDIR)/ctor disk.img
ifneq ($(wildcard $(OBJDIR)/cat),)
echo frankenlibc | ${REXEC} $(OBJDIR)/cat disk.img
ifneq ($(wildcard $(OBJDIR)/ping),)
endif
${REXEC} ${OBJDIR}/ping disk.img -- -c 3 127.0.0.1
${REXEC} ${OBJDIR}/ping6 disk.img -- -c 3 ::1
endif
rm -f disk.img

$(OBJDIR)/ctor: ctor.c $(DEPS)
Expand Down

0 comments on commit b46ddaf

Please sign in to comment.