Skip to content

Commit

Permalink
Merged SDK + binary blobs for GT-BE98
Browse files Browse the repository at this point in the history
  • Loading branch information
gnuton committed May 26, 2024
1 parent 85994aa commit 8490a25
Show file tree
Hide file tree
Showing 1,325 changed files with 246,606 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
matrix:
cfg:
- { model: "gt-be98_pro", sdk: "src-rt-5.04behnd.4916", ui: "default", skip: false }

- { model: "gt-be98", sdk: "src-rt-5.04behnd.4916", ui: "default", skip: false }
if: "!contains(github.event.commits[0].message, '[SKIP_CI]')"
container:
image: gnuton/asuswrt-merlin-toolchains-docker:latest
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
all:

install:

dynamic:

clean:


Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
LIB = libarcher.so

default: conditional_build


CURR_DIR := $(shell pwd)
BUILD_DIR:=$(HND_SRC)
include $(BUILD_DIR)/make.common

ifneq ($(strip $(BUILD_ARCHERCTL)),)
conditional_build: all
else
conditional_build:
@echo "Skipping $(LIB)"
endif

ARCH=$(PROFILE_ARCH)
LIB_INSTALL_DIR := $(BCM_FSBUILD_DIR)/private/lib
ALLOWED_INCLUDE_PATHS := -I.\
-I$(BUILD_DIR)/userspace/public/include \
-I$(HND_SRC)/userspace/private/include \
-I$(SHARED_DIR)/opensource/include/bcm963xx \
-I$(SHARED_DIR)/private/include/$(OALDIR) \
-I$(INC_BRCMDRIVER_PRIV_PATH)/$(BRCM_BOARD) \
-I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD)



export ARCH CFLAGS LIB_INSTALL_DIR CFLAGS DESKTOP_LINUX BRCM_RELEASETAG

# Final location of LIB for system image. Only the BRCM build system needs to
# know about this.
FINAL_LIB_INSTALL_DIR := $(INSTALL_DIR)/lib$(BCM_INSTALL_SUFFIX_DIR)

all:
mkdir -p $(INSTALL_DIR)/lib/private/
mkdir -p objs
$(MAKE) -C objs -f ../Makefile install
mkdir -p $(FINAL_LIB_INSTALL_DIR)
cp -p $(LIB_INSTALL_DIR)/$(LIB)* $(FINAL_LIB_INSTALL_DIR)

clean:
rm -f $(FINAL_LIB_INSTALL_DIR)/$(LIB)*
-mkdir -p objs
-$(MAKE) -C objs -f ../Makefile clean
rm -rf objs

CONSUMER_RELEASE_BINARYONLY_PREPARE: binaryonly_prepare

binaryonly_prepare:
mkdir -p objs
-$(MAKE) -C objs -f ../Makefile binaryonly_prepare


shell:
bash -i

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

# Set VPATH because we want to compile in a seperate dir than source.
name := $(lastword $(MAKEFILE_LIST))
mdir := $(realpath $(dir $(name)))
VPATH=$(mdir)


LIB = libarcher.so

SAVED = $(LIB)_$(ARCH).shipped

OBJS = archer_api.o

BRCM_RELEASETAG ?= "unknown"
CFLAGS += -Werror -Wfatal-errors -DBRCM_RELEASETAG=\"$(BRCM_RELEASETAG)\" -I$(HND_SRC)/userspace/private/include -Wno-stringop-truncation

$(LIB) :

# from Bcmbuild.mk
LIB_INSTALL_DIR := $(BCM_FSBUILD_DIR)/private/lib

install: $(LIB)
mkdir -p $(LIB_INSTALL_DIR)
install -p -t $(LIB_INSTALL_DIR) $(LIB)
mkdir -p $(INSTALLDIR)/lib
install -p -m 755 -t $(INSTALLDIR)/lib $(LIB)

clean:
rm -f *.o *.d $(LIB)
rm -f $(LIB_INSTALL_DIR)/$(LIB)
rm -f $(INSTALLDIR)/lib/$(LIB)

ifneq ($(wildcard $(mdir)/*.c),)

$(LIB): $(OBJS)
$(CC) -shared $(BCM_LD_FLAGS) -Wl,--whole-archive,-soname,$(notdir $@) -o $@ $(OBJS) -Wl,--no-whole-archive

else

ifneq ($(wildcard prebuilt/libarcher.so),)
$(LIB):
cp prebuilt/libarcher.so libarcher.so
else
$(LIB): $(SAVED)
cat $< > $@
endif

endif

binaryonly_prepare:
-cp $(LIB) $(mdir)/$(SAVED)
-$(MAKE) -f $(name) clean
rm -rf $(mdir)/*.c $(mdir)/*.h


# Generate and use dependencies.
CFLAGS += -MD
-include $(OBJS:%.o=%.d)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
EXE := archerctl
EXEALT := archer

all install: conditional_build


CURR_DIR := $(shell pwd)
BUILD_DIR:=$(HND_SRC)
include $(BUILD_DIR)/make.common


ARCH := $(PROFILE_ARCH)
EXE_INSTALL_DIR := $(BCM_FSBUILD_DIR)/private/bin
ALLOWED_INCLUDE_PATHS := -I. \
-I$(BUILD_DIR)/userspace/public/include \
-I$(BUILD_DIR)/userspace/private/include \
-I$(INC_BRCMDRIVER_PRIV_PATH)/$(BRCM_BOARD) \
-I$(INC_BRCMDRIVER_PUB_PATH)/$(BRCM_BOARD)

ALLOWED_LIB_DIRS := /lib:/lib/private:/lib/public

export ARCH CFLAGS BCM_LD_FLAGS CMS_LIB_PATH CMS_OPTION_RPATH CMS_LIB_RPATH EXE_INSTALL_DIR


# Final location of EXE for system image. Only the BRCM build system needs to
# know about this.
FINAL_EXE_INSTALL_DIR := $(INSTALL_DIR)/bin$(BCM_INSTALL_SUFFIX_DIR)

ifneq ($(strip $(BUILD_ARCHERCTL)),)

conditional_build:
mkdir -p objs
$(MAKE) -C objs -f ../Makefile install
mkdir -p $(FINAL_EXE_INSTALL_DIR)
cp -p $(EXE_INSTALL_DIR)/$(EXE) $(FINAL_EXE_INSTALL_DIR)
(cd $(FINAL_EXE_INSTALL_DIR); ln -sf $(EXE) $(EXEALT))

else

conditional_build:
@echo "Skipping $(EXE) (not configured)"

endif


clean: clean_legacy
rm -f $(FINAL_EXE_INSTALL_DIR)/$(EXE) $(FINAL_EXE_INSTALL_DIR)/$(EXEALT)
-mkdir -p objs
-$(MAKE) -C objs -f ../Makefile clean
rm -rf objs

# delete objects left over from old Makefile. (Not needed for new directory
# which started with split makefiles.)
clean_legacy:
rm -f *.o *.d $(EXE)


CONSUMER_RELEASE_BINARYONLY_PREPARE: binaryonly_prepare

binaryonly_prepare:
-mkdir -p objs
-$(MAKE) -C objs -f ../Makefile binaryonly_prepare
rm -rf objs


shell:
@echo "Entering makefile debug shell (type exit to exit) >>>"
@bash -i
@echo "exiting debug shell."
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

EXE = archerctl

all:
@cp -f prebuilt/$(EXE) .

install: generic_exe_install
mkdir -p $(INSTALL_DIR)/bin
(cd $(INSTALL_DIR)/bin; rm -f archer; ln -s $(EXE) archer)

clean:

dynamic: all install

include $(BUILD_DIR)/make.common
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
OBJS := archer_ctl.o

LIBS := -L$(HND_SRC)/router-sysdep/archer_lib/ -larcher


$(EXE): $(OBJS)
$(CC) $(BCM_LD_FLAGS) -o $@ $(OBJS) \
-Wl,-unresolved-symbols=ignore-in-shared-libs $(CMS_OPTION_RPATH) \
$(CMS_LIB_PATH) $(LIBS)


binaryonly_prepare:
-cp $(EXE) $(mdir)/$(SAVED)
-$(MAKE) -f $(name) clean
rm -f $(mdir)/*.c $(mdir)/*.h $(mdir)/Makefile.fullsrc


# Generate and use dependencies.
CFLAGS += -MD -I$(HND_SRC)/userspace/private/include -Wno-stringop-truncation
-include $(OBJS:%.o=%.d)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

dependson: private/libs/archer
Binary file not shown.
Loading

0 comments on commit 8490a25

Please sign in to comment.