Init git for ASK to apply
This commit is contained in:
@@ -8,8 +8,38 @@ ARCH?= arm64
|
|||||||
GNU_CROSS?= aarch64-linux-gnu-
|
GNU_CROSS?= aarch64-linux-gnu-
|
||||||
MUSL_HOST?= aarch64-linux-musl
|
MUSL_HOST?= aarch64-linux-musl
|
||||||
|
|
||||||
|
STAMPS_DIR := $(ASK_DIR)/sources/.stamps
|
||||||
|
FMLIB_DIR := $(ASK_DIR)/sources/fmlib
|
||||||
|
FMC_BASE := $(ASK_DIR)/sources/fmc
|
||||||
|
FMC_DIR := $(FMC_BASE)/source
|
||||||
|
|
||||||
.PHONY: prepare-kernel build-kernel modules userspace dist
|
.PHONY: prepare-kernel build-kernel modules userspace dist
|
||||||
|
|
||||||
|
prepare-preloaded-sources:
|
||||||
|
@echo "--> Initializing dummy git repos and building preloaded fmlib/fmc..."
|
||||||
|
mkdir -p $(STAMPS_DIR)
|
||||||
|
|
||||||
|
git config --global user.email "monok8s@localhost"
|
||||||
|
git config --global user.name "monok8s authors"
|
||||||
|
|
||||||
|
# Handle fmlib: Initialize dummy repo, patch, and build
|
||||||
|
cd $(FMLIB_DIR) && git init -q && git add -A && git commit -q -m "base"
|
||||||
|
cd $(FMLIB_DIR) && git apply $(ASK_DIR)/patches/fmlib/01-mono-ask-extensions.patch
|
||||||
|
$(MAKE) -C $(FMLIB_DIR) CROSS_COMPILE=$(MUSL_HOST)- KERNEL_SRC=$(KDIR) libfm-arm.a
|
||||||
|
ln -sf libfm-arm.a $(FMLIB_DIR)/libfm.a
|
||||||
|
touch $(STAMPS_DIR)/fmlib
|
||||||
|
|
||||||
|
# Handle fmc: Initialize dummy repo, patch, and build
|
||||||
|
cd $(FMC_BASE) && git init -q && git add -A && git commit -q -m "base"
|
||||||
|
cd $(FMC_BASE) && git apply $(ASK_DIR)/patches/fmc/01-mono-ask-extensions.patch
|
||||||
|
$(MAKE) -C $(FMC_DIR) CC=$(MUSL_HOST)-gcc CXX=$(MUSL_HOST)-g++ AR=$(MUSL_HOST)-ar \
|
||||||
|
MACHINE=ls1046 \
|
||||||
|
FMD_USPACE_HEADER_PATH=$(FMLIB_DIR)/include/fmd \
|
||||||
|
FMD_USPACE_LIB_PATH=$(FMLIB_DIR) \
|
||||||
|
LIBXML2_HEADER_PATH=/usr/include/libxml2 \
|
||||||
|
TCLAP_HEADER_PATH=/usr/include
|
||||||
|
touch $(STAMPS_DIR)/fmc
|
||||||
|
|
||||||
# 1. Patch the kernel and merge our custom Kubernetes configuration
|
# 1. Patch the kernel and merge our custom Kubernetes configuration
|
||||||
prepare-kernel:
|
prepare-kernel:
|
||||||
@echo "--> Patching the Linux kernel with NXP DPAA extensions..."
|
@echo "--> Patching the Linux kernel with NXP DPAA extensions..."
|
||||||
@@ -31,7 +61,7 @@ modules: build-kernel
|
|||||||
$(MAKE) -f Makefile modules KDIR=$(KDIR) CROSS_COMPILE=$(GNU_CROSS) ARCH=$(ARCH)
|
$(MAKE) -f Makefile modules KDIR=$(KDIR) CROSS_COMPILE=$(GNU_CROSS) ARCH=$(ARCH)
|
||||||
|
|
||||||
# 4. Build the ASK userspace daemons using the musl cross-compiler
|
# 4. Build the ASK userspace daemons using the musl cross-compiler
|
||||||
userspace:
|
userspace: prepare-preloaded-sources
|
||||||
@echo "--> Building ASK sources and libraries..."
|
@echo "--> Building ASK sources and libraries..."
|
||||||
$(MAKE) -f Makefile sources KDIR=$(KDIR) CROSS_COMPILE=$(MUSL_HOST)- ARCH=$(ARCH) HOST=$(MUSL_HOST)
|
$(MAKE) -f Makefile sources KDIR=$(KDIR) CROSS_COMPILE=$(MUSL_HOST)- ARCH=$(ARCH) HOST=$(MUSL_HOST)
|
||||||
@echo "--> Building ASK userspace executables statically..."
|
@echo "--> Building ASK userspace executables statically..."
|
||||||
|
|||||||
Reference in New Issue
Block a user