Commit 623107c5 authored by Dimitris Lampridis's avatar Dimitris Lampridis

Merge remote-tracking branch 'origin/develop' into proposed_master

parents cbc1c428 e848e4ba
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
---
variables:
KOJI_TARGET: 'ohwr7'
KOJI_DISTTAG: '.el7.cern'
DIST_PATH: distribution
BUILD_PATH: distribution/rpmbuild
SRPM_PATH: distribution/rpmbuild/SRPMS/dkms-${CI_PROJECT_NAME}*src.rpm
stages:
- static-analysis
- build
- srpm
- kscratch
- kbuild
reuse:
stage: static-analysis
image: fsfe/reuse:latest
script:
- reuse lint
allow_failure: true
build:
stage: build
script:
- yum install -y kernel-devel git
- export LINUX=/usr/src/kernels/*/
- make -C software
build-dkms:
stage: build
script:
- yum install -y kernel-devel lua git dkms
- export LINUX=/usr/src/kernels/*/
- export PREFIX=$(mktemp -d)
- make -C software/ -f dkms.mk dkms_install
- make -C ${PREFIX}/usr/src/${CI_PROJECT_NAME}*/
build_srpm:
stage: srpm
script:
- yum-builddep -y ${DIST_PATH}/*.spec
- export LINUX=/usr/src/kernels/*/
- make -C distribution rpmbuild-source
artifacts:
paths:
- ${SRPM_PATH}
expire_in: 1 day
.koji_deps_template: &koji_deps
before_script:
- yum install -y koji krb5-workstation rpm-build
- echo ${OHWR_PASSWORD} | kinit ${OHWR_USER}
kscratch:
<<: *koji_deps
stage: kscratch
script:
- koji --config=.koji build --wait --scratch ${KOJI_TARGET} ${SRPM_PATH}
kbuild-ohwr:
<<: *koji_deps
stage: kbuild
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
except:
- branches
script:
- koji --config=.koji build --wait ${KOJI_TARGET} ${SRPM_PATH}
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
[koji]
server = https://kojihub.cern.ch/kojihub
weburl = https://koji.cern.ch/
topurl = https://koji.cern.ch/kojifiles
krb_canon_host = no
krb_rdns = False
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- VHDL functions to convert characters and strings to upper/lower case.
### Changed
- Rewritten the WB master interface used in simulations.
## [1.0.0] - 2019-10-21
### Added
- First release of general-cores.
[Unreleased]: https://www.ohwr.org/project/general-cores/compare/v1.0.0...proposed_master
[1.0.0]: https://www.ohwr.org/project/general-cores/tags/v1.0.0
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019-2020 CERN
==========
Change Log
==========
Format: `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_
Versioning: `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_
[Unreleased]
============
Added
-----
- [hdl] VHDL functions to convert characters and strings to upper/lower case.
Changed
-------
- [hdl] Rewritten the WB master interface used in simulations.
[1.0.3]_ - 2020-01-15
====================
Changed
-----
- [sw] add more file to .gitignore
[1.0.2]_ - 2019-10-24
====================
Fixed
-----
- [ci] forgot rule to publish RPMs
[1.0.1]_ - 2019-10-24
====================
Added
-----
- [ci] building and publish RPMs automatically on new releases
Changed
-------
- [sw] Makefiles have been changed to better support RPM generation
[1.0.0]_ - 2019-10-21
====================
Added
-----
- First release of general-cores.
.. _[Unreleased]: https://www.ohwr.org/project/general-cores/compare/v1.0.3...proposed_master
.. _[1.0.3]: https://www.ohwr.org/project/general-cores/tags/v1.0.3
.. _[1.0.2]: https://www.ohwr.org/project/general-cores/tags/v1.0.2
.. _[1.0.1]: https://www.ohwr.org/project/general-cores/tags/v1.0.1
.. _[1.0.0]: https://www.ohwr.org/project/general-cores/tags/v1.0.0
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
This diff is collapsed.
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
PREFIX ?= /
GIT_VERSION := $(shell git describe --always --dirty --long --tags)
VERSION := $(shell git describe --tags --abbrev=0 | tr -d 'v')
GCORES_SW := $(GCORES)/software
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
rpmbuild
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TOPDIR ?= $(shell pwd)/../
TRTL ?= $(TOPDIR)
include $(TRTL)/common.mk
NAME := general-cores
SPEC_RPM := $(NAME).spec
DEST := rpmbuild
tar-post = \
$(eval tmpdir := $(shell mktemp -d)) \
tar --extract -C $(tmpdir)/ -f $(1) \
$(2)/common.mk && \
sed -e "s,^GIT_VERSION.*$$,GIT_VERSION := "$(GIT_VERSION)"," \
-e "s,^VERSION.*$$,VERSION := "$(VERSION)"," \
-i $(tmpdir)/$(2)/common.mk && \
tar --update -C $(tmpdir) -f $(1) \
$(2)/common.mk && \
rm -rf $(tmpdir)
all: rpmbuild-all
clean: rpmbuild-clean
include rpmbuild.mk
.PHONY: all clean
# SPDX-License-Identifier: GPL-3.0-or-later
#
# SPDX-FileCopyrightText: 2019 CERN
%define project_name general-cores
Summary: General Cores Drivers
Name: dkms-%{project_name}
Version: %{?_build_version}
License: GPL-2.0
Release: 1%{?dist}
URL: https://www.ohwr.org/projects/general-cores/
BuildRequires: make, gcc, git
Requires: dkms
Source0: %{project_name}-%{version}.tar.gz
Source1: CHANGELOG
%description
This package installs all general-cores drivers
%prep
%autosetup -n %{project_name}-%{version}
%build
%install
make -C software PREFIX=%{buildroot}/ -f dkms.mk dkms_install
%post
dkms add -m %{project_name} -v %{version} --rpm_safe_upgrade
dkms build -m %{project_name} -v %{version} --rpm_safe_upgrade
dkms install -m %{project_name} -v %{version} --rpm_safe_upgrade
%preun
dkms remove -m %{project_name} -v %{version} --rpm_safe_upgrade --all ||:
%files
%license LICENSES/CC0-1.0.txt
%license LICENSES/GPL-2.0.txt
/usr/src/%{project_name}-%{version}/*
%changelog
%include %{SOURCE1}
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2019 CERN
# Author: Federico Vaga <federico.vaga@cern.ch>
#
# Required Project Variables And Functions
#
ifndef TOPDIR
$(error "Define project top-level directory: TOPDIR")
endif
ifndef NAME
$(error "Define project name: NAME")
endif
ifndef VERSION
$(error "Define project version: VERSION")
endif
ifndef SPEC_RPM
$(error "Define RPM spec file: SPEC_RPM")
endif
#
# Internal Variables
#
FULL_NAME := $(NAME)-$(VERSION)
DEST ?= rpmbuild
RPMBUILD := $(shell /bin/pwd)/$(DEST)
SOURCES := $(RPMBUILD)/SOURCES
SRC_TAR := $(SOURCES)/$(FULL_NAME).tar
SRC_TAR_GZ := $(SOURCES)/$(FULL_NAME).tar.gz
CHANGELOG := $(SOURCES)/CHANGELOG
SPEC := $(RPMBUILD)/SPECS/$(FULL_NAME).spec
#
# Requirements
# - git (if this is a git repository)
#
GIT ?= git
ifeq (,$(shell which $(GIT)))
$(error "The tool 'git' is required to process '$@'")
endif
#
# Targets
#
# Prepare working directories
$(RPMBUILD):
@mkdir -p $@/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
# Build a tar with all sources with the assumption that sources
# are handled with a git repository. Otherwise, rewrite this rule
# in order to get get a clean tar.
$(SRC_TAR): $(RPMBUILD)
@cd $(TOPDIR) && \
$(GIT) archive --format=tar -o $@ --prefix=$(FULL_NAME)/ HEAD
ifdef tar-post
# Extra processing on the tar file.
# Modify this target according to project needs, if you do not use git-archive
# then do everything right while you are building your tar file
$(warning "Post processing tar file")
@$(call tar-post,$@,$(FULL_NAME))
endif
# Compress sources (optional)
$(SRC_TAR_GZ): $(SRC_TAR) $(RPMBUILD)
@rm -f $@ # remove any previous archive
@gzip $<
# Create an RPM compatible CHANGELOG from the project format
# (see https://keepachangelog.com/en/1.0.0/)
$(CHANGELOG): $(SRC_TAR_GZ)
$(eval $@_pattern := ^\[([0-9]+\.[0-9]+\.[0-9]+)\]\s-\s([0-9]{4}-[0-9]{2}-[0-9]{2})$)
$(eval $@_replace := echo -e "\n"\\* `date --date="\2" "+%a %b %d %Y"` "\1")
@tar -C $(SOURCES) -xf $< $(FULL_NAME)/CHANGELOG.rst
@mv $(SOURCES)/$(FULL_NAME)/CHANGELOG.rst $(CHANGELOG)
@rmdir $(SOURCES)/$(FULL_NAME)
@sed -r -i -e "1,+10d" -e "/^(=|-|\s)*$$/d" $(CHANGELOG)
@sed -r -i -e 's,$($@_pattern),$($@_replace),e' $(CHANGELOG)
# Put all necessary sources in the source directory
sources: $(SRC_TAR_GZ) $(CHANGELOG) $(RPMBUILD)
# Build the RPM spec file to embed in the .src.rpm file for a specific version
$(SPEC): $(SPEC_RPM) $(RPMBUILD)
@cp $< $@
@sed -i -e "s/%{?_build_version}/$(VERSION)/" $@
# rpmbuild targets
rpmbuild: $(SPEC) sources $(RPMBUILD)
rpmbuild-source: rpmbuild
@rpmbuild -bs --define "_topdir $(RPMBUILD)" $(SPEC)
rpmbuild-binary: rpmbuild
@rpmbuild -bb --define "_topdir $(RPMBUILD)" $(SPEC)
rpmbuild-all: rpmbuild
@rpmbuild -ba --define "_topdir $(RPMBUILD)" $(SPEC)
rpmbuild-clean:
@rm -rf $(RPMBUILD)
.PHONY: srpm sources $(SRC_TAR_GZ) $(SRC_TAR) $(CHANGELOG) $(SPEC)
......@@ -2,4 +2,9 @@
#
# SPDX-FileCopyrightText: 2019 CERN
Makefile.specific
\ No newline at end of file
Makefile.specific
*.mod.c
*.ko
*.cmd
Module.symvers
modules.order
\ No newline at end of file
-include Makefile.specific
# include parent_common.mk for buildsystem's defines
#use absolute path for REPO_PARENT
REPO_PARENT ?= $(shell /bin/pwd)/..
-include $(REPO_PARENT)/parent_common.mk
# SPDX-License-Identifier: CC0-1.0
#
# Copyright (C) 2019 CERN
DIRS := i2c-ocores
DIRS += spi-ocores
DIRS += htvic
.PHONY: all clean modules install modules_install
.PHONY: all clean modules install modules_install gtags
all: modules
install: modules_install
all clean modules install modules_install:
clean modules modules_install coccicheck:
for D in $(DIRS); do $(MAKE) -C $$D $@; done
gtags:
git ls-tree -r --name-only HEAD | grep -E '.*\.(c|h)$$' | gtags -f -
# SPDX-License-Identifier: CC0-1.0
#
# Copyright (C) 2019 CERN
PACKAGE_NAME="general-cores"
PACKAGE_VERSION="@PKGVER@"
CLEAN="make clean"
MAKE[0]="make KVERSION=$kernelver all"
BUILT_MODULE_NAME[0]="htvic"
BUILT_MODULE_NAME[1]="i2c-ocores"
BUILT_MODULE_NAME[2]="spi-ocores"
BUILT_MODULE_LOCATION[0]="htvic/driver"
BUILT_MODULE_LOCATION[1]="i2c-ocores/drivers/i2c/busses"
BUILT_MODULE_LOCATION[2]="spi-ocores/drivers/spi"
DEST_MODULE_LOCATION[0]="/updates"
DEST_MODULE_LOCATION[1]="/updates"
DEST_MODULE_LOCATION[2]="/updates"
AUTOINSTALL="yes"
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TOPDIR ?= $(shell pwd)/..
include $(TOPDIR)/common.mk
NAME := general-cores
FULL_NAME := $(NAME)-$(VERSION)
DST := /tmp/dkms-source-$(FULL_NAME)
all: dkms_install
# copy necessary source file to build this driver
dkms_sources:
mkdir -p $(DST)
find ./ -regextype posix-extended \
-regex '.*(Makefile|Kbuild|dkms.conf|/[^.]+\.[ch])' \
-exec cp --parents {} $(DST) \;
cp $(TOPDIR)/LICENSES/GPL-2.0.txt $(DST)
# fix the dkms source file so that the build system is consistent
# with its new location
dkms_sources_prep: dkms_sources
# we do not have git, copy the version
@find $(DST) -name Makefile -exec \
sed -e 's,$$(GIT_VERSION),$(GIT_VERSION),' \
-i {} \;
@sed -r -e "s/@PKGVER@/$(VERSION)/" \
-i $(DST)/dkms.conf
# we do not use the common.mk, but we need PREFIX
@find $(DST) -name Makefile -exec \
sed -r -e 's/^include.*common.mk$$/PREFIX ?= \//' \
-i {} \;
dkms_install: dkms_sources_prep
@mkdir -p $(PREFIX)/usr/src/$(FULL_NAME)/
@cp -a $(DST)/* $(PREFIX)/usr/src/$(FULL_NAME)
......@@ -2,13 +2,12 @@
#
# SPDX-FileCopyrightText: 2019 CERN
all: modules
.PHONY: all clean modules install modules_install gtags
install: modules_install
clean modules modules_install:
@$(MAKE) -C drivers/ $@
DIR := drivers/
gtags:
git ls-tree -r --name-only HEAD | grep -E '.*\.(c|h)$$' | gtags -f -
all: modules
install: modules_install
.PHONY: modules modules_install clean all gtags
clean modules modules_install coccicheck:
@$(MAKE) -C $(DIR) $@
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-License-Identifier: CC0-1.0
#
# Copyright (C) 2019 CERN
......@@ -9,6 +9,7 @@ endif
endif
ccflags-y += -DADDITIONAL_VERSIONS="$(SUBMODULE_VERSIONS-y)"
ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
ccflags-y += -Werror
obj-m := htvic.o
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-License-Identifier: CC0-1.0
#
# Copyright (C) 2019 CERN
TOPDIR ?= ../../../
GCORES ?= $(abspath $(TOPDIR))
#
# External variables and targets
#
-include Makefile.specific
REPO_PARENT ?= $(shell /bin/pwd)/../..
-include $(REPO_PARENT)/parent_common.mk
include $(GCORES)/common.mk
LINUX ?= /lib/modules/$(shell uname -r)/build
#
# Local variables
#
KVERSION ?= $(shell uname -r)
LINUX ?= /lib/modules/$(KVERSION)/build
#
# Local targets
#
all: modules
install: modules_install
clean coccicheck modules:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) \
GIT_VERSION=$(GIT_VERSION) \
$@
modules_install: modules
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) INSTALL_MOD_PATH=$(PREFIX) $@
clean modules help modules_install:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) $@
.PHONY: all modules clean help install modules_install
.PHONY: all clean coccicheck modules modules_install install
// SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2016 CERN
* Author: Federico Vaga <federico.vaga@cern.ch>
......
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2016 CERN
* Author: Federico Vaga <federico.vaga@cern.ch>
......
......@@ -2,10 +2,12 @@
#
# SPDX-FileCopyrightText: 2019 CERN
all: modules
.PHONY: all clean modules install modules_install
DIR := drivers/i2c/busses
all: modules
install: modules_install
clean modules modules_install:
make -C $(shell pwd)/drivers/i2c/busses $@
.PHONY: modules modules_install clean all
clean modules modules_install coccicheck:
@$(MAKE) -C $(DIR) $@
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-License-Identifier: CC0-1.0
#
# Copyright (C) 2019 CERN
......@@ -8,9 +8,12 @@ SUBMODULE_VERSIONS-y += MODULE_INFO(version_$(CONFIG_SUPER_REPO),\"$(CONFIG_SUPE
endif
endif
ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
ccflags-y += -Werror
ccflags-y += -I$(src)/../../../include
# priority to our local headers
LINUXINCLUDE := -I$(src)/../../../include -I$(src)/../../../include/linux $(LINUXINCLUDE)
# priority to our local headers (avoid conflict with the version in kernel)
LINUXINCLUDE := -I$(src)/../../../include $(LINUXINCLUDE)
LINUXINCLUDE := -I$(src)/../../../include/linux $(LINUXINCLUDE)
obj-$(CONFIG_I2C_OCORES) += i2c-ocores.o
\ No newline at end of file
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-License-Identifier: CC0-1.0
#
# Copyright (C) 2019 CERN
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (C) 2019 CERN
TOPDIR ?= ../../../../../
GCORES ?= $(abspath $(TOPDIR))
#
# External variables and targets
#
-include Makefile.specific
REPO_PARENT ?= $(shell /bin/pwd)/../..
-include $(REPO_PARENT)/parent_common.mk
include $(GCORES)/common.mk
#
# Local variables
#
KVERSION ?= $(shell uname -r)
LINUX ?= /lib/modules/$(KVERSION)/build
LINUX ?= /lib/modules/$(shell uname -r)/build
#
# Local targets
#
all: modules
install: modules_install
clean coccicheck modules:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) \
GIT_VERSION=$(GIT_VERSION) \
CONFIG_I2C_OCORES=m \
$@
modules_install: modules
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) INSTALL_MOD_PATH=$(PREFIX) $@
clean modules help modules_install:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) CONFIG_I2C_OCORES=m $@
.PHONY: all modules clean help install modules_install
.PHONY: all clean coccicheck modules modules_install install
......@@ -2,10 +2,13 @@
#
# SPDX-FileCopyrightText: 2019 CERN
all: modules
.PHONY: all clean modules install modules_install
DIR := drivers/spi
all: modules
install: modules_install
clean modules modules_install:
make -C $(shell pwd)/drivers/spi $@
.PHONY: modules modules_install clean all
clean modules modules_install coccicheck:
@$(MAKE) -C $(DIR) $@
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-License-Identifier: CC0-1.0
#
# Copyright (C) 2019 CERN
......@@ -8,6 +8,12 @@ SUBMODULE_VERSIONS-y += MODULE_INFO(version_$(CONFIG_SUPER_REPO),\"$(CONFIG_SUPE
endif
endif
ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
ccflags-y += -Werror
ccflags-y += -I$(src)/../../include
# priority to our local headers (avoid conflict with the version in kernel)
LINUXINCLUDE := -I$(src)/../../../include $(LINUXINCLUDE)
LINUXINCLUDE := -I$(src)/../../../include/linux $(LINUXINCLUDE)
obj-$(CONFIG_SPI_OCORES) += spi-ocores.o
\ No newline at end of file
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-License-Identifier: CC0-1.0
#
# Copyright (C) 2019 CERN
TOPDIR ?= ../../../../
GCORES ?= $(abspath $(TOPDIR))
#
# External variables and targets
#
-include Makefile.specific
REPO_PARENT ?= $(shell /bin/pwd)/../..
-include $(REPO_PARENT)/parent_common.mk
include $(GCORES)/common.mk
LINUX ?= /lib/modules/$(shell uname -r)/build
#
# Local variables
#
KVERSION ?= $(shell uname -r)
LINUX ?= /lib/modules/$(KVERSION)/build
#
# Local targets
#
all: modules
install: modules_install
clean coccicheck modules:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) \
GIT_VERSION=$(GIT_VERSION) \
CONFIG_SPI_OCORES=m \
$@
modules_install: modules
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) INSTALL_MOD_PATH=$(PREFIX) $@
clean modules help modules_install:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) CONFIG_SPI_OCORES=m $@
.PHONY: all modules clean help install modules_install
.PHONY: all clean coccicheck modules modules_install install
// SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 CERN (www.cern.ch)
* Author: Federico Vaga <federico.vaga@cern.ch>
......
// SPDX-License-Identifier: GPL-2.0-or-later
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2019 CERN (www.cern.ch)
* Author: Federico Vaga <federico.vaga@cern.ch>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment