parent
25b809bdf4
commit
184e394a3f
|
@ -1,19 +1,71 @@
|
||||||
### Git submodules
|
### Adding a submodule
|
||||||
|
### Add submodule
|
||||||
|
|
||||||
#### Add submodules
|
|
||||||
```
|
```
|
||||||
cd spiri-project/
|
# Make the submodule sync to a branch
|
||||||
git submodule add -b cti-jetpack-4.4.1 https://git.spirirobotics.com/dchvs/Jetpack.git source/Jetpack
|
git submodule add -b <branch name> <repository link>
|
||||||
(git config --file=.gitmodules submodule.source/Jetpack.branch cti-jetpack-4.4.1)
|
|
||||||
|
|
||||||
git submodule add -b jetpack-4.4.1 https://git.spirirobotics.com/dchvs/li-mt9m021.git source/drivers/li-mt9m021
|
|
||||||
git submodule add -b 4.4.1/feature/install-script-on-level2-directory https://git.spirirobotics.com/dchvs/CTI-L4T.git
|
|
||||||
git submodule add -b 4.4.1/feature/install-script-on-level2-directory https://git.spirirobotics.com/dchvs/CTI-L4T.git CTI-L4T
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Update submodules
|
|
||||||
```
|
|
||||||
# Update submodules branches after they got updated
|
# Update submodules branches after they got updated
|
||||||
git submodule update --remote
|
git submodule update --remote
|
||||||
|
|
||||||
|
# Fetch and pull from submodules repositories
|
||||||
|
git submodule update --init --recursive --remote
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Adding a Driver
|
||||||
|
### Add Driver
|
||||||
|
|
||||||
|
In order to add a Driver you would follow this procedure, where you add the the dtbs Makefiles to the DTB_LIST and the Driver Makefile to the KERNEL_OVERLAY variable. Refer to the following example:
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
> vi kernel/kernel-4.9/arch/arm64/boot/dts/Makefile
|
||||||
|
|
||||||
|
Add the following content before `DTB_LIST += $(dtb-y)`:
|
||||||
|
|
||||||
|
######### Include RidgeRun #########
|
||||||
|
LI_MT9M021_PATH=$(tegra-rel-dtstree)/../../source/drivers/li-mt9m021/hardware/nvidia-spiri
|
||||||
|
LI_MT9M021_MAKEFILE_PATH=$(tegra-dtstree)/../../../drivers/li-mt9m021/hardware/nvidia-spiri/platform/
|
||||||
|
|
||||||
|
dtb-y :=
|
||||||
|
dts_makefile=$(foreach d,$(wildcard $1*), $(call dts_makefile,$(d)/,$(2)) $(if $(findstring Makefile,$(d)),$(d)))
|
||||||
|
dts_mfiles_d = $(call dts_makefile, $(LI_MT9M021_MAKEFILE_PATH), Makefile)
|
||||||
|
|
||||||
|
ifneq ($(dts_mfiles_d),)
|
||||||
|
dts-include :=
|
||||||
|
include $(dts_mfiles_d)
|
||||||
|
|
||||||
|
dtb-y := $(addprefix $(LI_MT9M021_PATH)/,$(dtb-y))
|
||||||
|
dtbo-y := $(addprefix $(LI_MT9M021_PATH)/,$(dtbo-y))
|
||||||
|
|
||||||
|
ifneq ($(dts-include),)
|
||||||
|
DTC_FLAGS += $(addprefix -i $(LI_MT9M021_PATH)/,$(dts-include))
|
||||||
|
DTCCPP_FLAGS += $(addprefix -I$(LI_MT9M021_PATH)/,$(dts-include))
|
||||||
|
|
||||||
|
DTC_FLAGS += -i $(LI_MT9M021_MAKEFILE_PATH)/../soc/t18x/kernel-include
|
||||||
|
DTC_FLAGS += -i $(LI_MT9M021_MAKEFILE_PATH)/../soc/t18x/kernel-dts
|
||||||
|
DTC_FLAGS += -i $(LI_MT9M021_MAKEFILE_PATH)/t18x/common/kernel-dts
|
||||||
|
DTC_FLAGS += -i $(LI_MT9M021_MAKEFILE_PATH)/t18x/quill/kernel-dts
|
||||||
|
DTCCPP_FLAGS += -I$(LI_MT9M021_MAKEFILE_PATH)/../soc/t18x/kernel-include
|
||||||
|
DTCCPP_FLAGS += -I$(LI_MT9M021_MAKEFILE_PATH)/../soc/t18x/kernel-dts
|
||||||
|
DTCCPP_FLAGS += -I$(LI_MT9M021_MAKEFILE_PATH)/t18x/common/kernel-dts
|
||||||
|
DTCCPP_FLAGS += -I$(LI_MT9M021_MAKEFILE_PATH)/t18x/quill/kernel-dts
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
DTB_LIST += $(dtb-y)
|
||||||
|
DTB_NEW_RULE_LIST += $(dtb-y)
|
||||||
|
DTBO_LIST += $(dtbo-y)
|
||||||
|
DTBO_NEW_RULE_LIST += $(dtbo-y)
|
||||||
|
|
||||||
|
|
||||||
|
> vi kernel/kernel-4.9/Makefile
|
||||||
|
|
||||||
|
LI_MT9M021_KERNEL_PATH=./li-mt9m021/kernel/nvidia-spiri
|
||||||
|
KERNEL_OVERLAYS += $(CURDIR)/../../../drivers/$(LI_MT9M021_KERNEL_PATH)
|
||||||
|
LI_EG25G_KERNEL_PATH=./eg25-g/kernel/kernel-4.9-spiri
|
||||||
|
KERNEL_OVERLAYS += $(CURDIR)/../../../drivers/$(LI_EG25G_KERNEL_PATH)
|
||||||
|
|
||||||
|
> vi kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig
|
||||||
|
CONFIG_VIDEO_I2C_SPIRI_CAM=y
|
||||||
|
```
|
Loading…
Reference in New Issue