mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
added possibilty to import openwsn stack as external module
This commit is contained in:
parent
6b41f88fdf
commit
c6de59cb28
44
pkg/openwsn/Makefile
Normal file
44
pkg/openwsn/Makefile
Normal file
@ -0,0 +1,44 @@
|
||||
PKG_NAME=RB
|
||||
PKG_URL=https://github.com/openwsn-berkeley/openwsn-fw/archive
|
||||
PKG_VERSION=1.4
|
||||
PKG_EXT=zip
|
||||
|
||||
FETCH=$(shell which wget &> /dev/null && echo "wget" || echo "curl")
|
||||
#UNPACK=tar -xvf
|
||||
UNPACK=unzip
|
||||
|
||||
ifneq ($(RIOTBOARD),)
|
||||
#include $(RIOTBOARD)/Makefile.base
|
||||
include $(RIOTBOARD)/$(BOARD)/Makefile.include
|
||||
endif
|
||||
|
||||
.PHONY: all clean patch reset
|
||||
|
||||
all: patch
|
||||
make -C $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
patch: $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/Makefile
|
||||
# Dependancy might be changed accordingly though we think the Makefile
|
||||
# will be the first thing you want to change
|
||||
#
|
||||
# Here might not happen anything besides dependancy checks
|
||||
|
||||
$(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/Makefile: $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/
|
||||
# Here you apply your patch.
|
||||
cd $< && sh ../structure_changes.sh
|
||||
cd $< && patch -p0 -i ../patch.txt
|
||||
|
||||
$(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/: $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
|
||||
$(UNPACK) $< -d $(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
$(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT):
|
||||
# Get PKG_VERSION of package from PKG_URL
|
||||
@$(FETCH) -O $@ $(PKG_URL)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT) || true
|
||||
|
||||
clean::
|
||||
# Reset package to checkout state.
|
||||
rm -rf $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION) && \
|
||||
make $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION)/Makefile
|
||||
|
||||
clean::
|
||||
rm -rf $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION) $(CURDIR)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
|
9
pkg/openwsn/Makefile.in
Normal file
9
pkg/openwsn/Makefile.in
Normal file
@ -0,0 +1,9 @@
|
||||
DIRS =
|
||||
DIRS += openwsn
|
||||
|
||||
all: $(BINDIR)$(MODULE)
|
||||
@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;
|
||||
|
||||
# remove compilation products
|
||||
clean::
|
||||
@for i in $(DIRS) ; do "$(MAKE)" -C $$i clean ; done ;
|
38412
pkg/openwsn/patch.txt
Normal file
38412
pkg/openwsn/patch.txt
Normal file
File diff suppressed because it is too large
Load Diff
67
pkg/openwsn/structure_changes.sh
Executable file
67
pkg/openwsn/structure_changes.sh
Executable file
@ -0,0 +1,67 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
# move openwsn stack directory up
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/openwsn/ ./
|
||||
|
||||
# and all needed hw dependent files too
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/telosb/spi.c openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/telosb/uart.c openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/telosb/leds.c openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/telosb/board openwsn/board_ow.c
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/telosb/board.c openwsn/board_ow.c
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/telosb/board_info.h openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/telosb/radiotimer.c openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/telosb/eui64.c openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/telosb/debugpins.c openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/board.h openwsn/board_ow.h
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/debugpins.h openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/eui64.h openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/leds.h openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/radio.h openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/radiotimer.h openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/boards/uart.h openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/chips/spi.h openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/chips/cc2420/radio.c openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/bsp/chips/cc2420/cc2420.h openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/drivers/common/openhdlc.* openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/drivers/common/opentimers.* openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/drivers/common/openserial.{c,h} openwsn
|
||||
mv openwsn-fw-RB-1.4/firmware/openos/kernel/openos/scheduler.{c,h} openwsn
|
||||
|
||||
# remove all *dox files
|
||||
for i in `find ./openwsn -name "*.dox"`; do
|
||||
rm -f $i
|
||||
done
|
||||
|
||||
rm -f openwsn/SConscript
|
||||
rm -rf openwsn/02.5-MPLS
|
||||
|
||||
# create empty Makefiles
|
||||
touch openwsn/Makefile
|
||||
|
||||
for i in `find ./openwsn -type d`; do
|
||||
touch $i/Makefile
|
||||
done
|
||||
|
||||
# meta Makefile
|
||||
cp ../Makefile.in ./
|
||||
mv ./Makefile.in ./Makefile
|
||||
|
||||
# oops too many Makefiles
|
||||
rm -f openwsn/07-App/rxl1/Makefile \
|
||||
openwsn/07-App/rt/Makefile \
|
||||
openwsn/07-App/rrube/Makefile \
|
||||
openwsn/07-App/rreg/Makefile \
|
||||
openwsn/07-App/rleds/Makefile \
|
||||
openwsn/07-App/rheli/Makefile \
|
||||
openwsn/07-App/rex/Makefile \
|
||||
openwsn/07-App/layerdebug/Makefile \
|
||||
openwsn/07-App/imu/Makefile \
|
||||
openwsn/07-App/heli/Makefile
|
||||
|
||||
mkdir openwsn/07-App/r6tus
|
||||
touch openwsn/07-App/r6tus/r6tus.c
|
||||
touch openwsn/07-App/r6tus/r6tus.h
|
||||
|
||||
# clean not need files
|
||||
rm -rf openwsn-fw-RB-1.4
|
Loading…
Reference in New Issue
Block a user