-
Notifications
You must be signed in to change notification settings - Fork 2
Add Unikraft files for OpenJPEG #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| *.depend | ||
| *.o | ||
| *.a | ||
| *.d | ||
| *.so | ||
| *.orig | ||
| *.rej | ||
| *.bak | ||
| *.swp | ||
| *~ | ||
| ,* | ||
| \#*\# | ||
| .\#* | ||
| \#_*\# | ||
| .\#_* | ||
| !.gitignore | ||
| .* | ||
|
|
||
| # gnu global files | ||
| GPATH | ||
| GRTAGS | ||
| GSYMS | ||
| GTAGS | ||
|
|
||
| # cscope files | ||
| cscope.* | ||
| ncscope.* |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Coding Style | ||
| ============ | ||
|
|
||
| Please refer to the `CODING_STYLE.md` file in the main Unikraft repository. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Contributing to Unikraft | ||
| ======================== | ||
|
|
||
| Please refer to the `CONTRIBUTING.md` file in the main Unikraft repository. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| License | ||
| ======= | ||
|
|
||
| Unikraft lcms wrappers | ||
| ------------------------ | ||
|
|
||
| This repository contains wrapper code to build openjpeg with Unikraft. The code | ||
| is published as a mixture of BSD and MIT licences; each C code file in | ||
| this repository should declare who is the copyright owner and under which terms | ||
| and conditions the code is licensed. If such a licence note is missing, the | ||
| following copyright notice will apply: | ||
|
|
||
| Copyright (c) 2020, Consorci de Serveis Universitaris de Catalunya (CSUC). All rights reserved. | ||
|
|
||
| Redistribution and use in source and binary forms, with or without | ||
| modification, are permitted provided that the following conditions | ||
| are met: | ||
|
|
||
| 1. Redistributions of source code must retain the above copyright | ||
| notice, this list of conditions and the following disclaimer. | ||
| 2. Redistributions in binary form must reproduce the above copyright | ||
| notice, this list of conditions and the following disclaimer in the | ||
| documentation and/or other materials provided with the distribution. | ||
| 3. Neither the name of the copyright holder nor the names of its | ||
| contributors may be used to endorse or promote products derived from | ||
| this software without specific prior written permission. | ||
|
|
||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
| LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| POSSIBILITY OF SUCH DAMAGE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| config LIBOPENJPEG | ||
| bool "libopenjpeg - image compression standard" | ||
| default n | ||
| select LIBNOLIBC if !HAVE_LIBC | ||
| select LIBUKDEBUG | ||
| select LIBUKALLOC | ||
| select LIBPTHREAD_EMBEDDED | ||
| select LIBNEWLIBC | ||
|
|
||
| if LIBOPENJPEG | ||
| endif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| Maintainers List | ||
| ================ | ||
|
|
||
| For notes on how to read this information, please refer to `MAINTAINERS.md` in | ||
| the main Unikraft repository. | ||
|
|
||
| LCMS-UNIKRAFT | ||
| M: Esteban Martinez <[email protected]> | ||
| M: Xavier Peralra <[email protected]> | ||
| L: [email protected] | ||
| F: * | ||
|
Comment on lines
+1
to
+11
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove this file, it is now deprecated. :) We will add names to our governance repository instead. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| # | ||
| # openjpeg Makefile.uk | ||
| # | ||
| # Authors: Esteban Martinez <[email protected]> | ||
| # | ||
| # Copyright (c) 2019, Consorci de Serveis Universitaris de Catalunya (CSUC). All rights reserved. | ||
| # | ||
| # Redistribution and use in source and binary forms, with or without | ||
| # modification, are permitted provided that the following conditions | ||
| # are met: | ||
| # | ||
| # 1. Redistributions of source code must retain the above copyright | ||
| # notice, this list of conditions and the following disclaimer. | ||
| # 2. Redistributions in binary form must reproduce the above copyright | ||
| # notice, this list of conditions and the following disclaimer in the | ||
| # documentation and/or other materials provided with the distribution. | ||
| # 3. Neither the name of the copyright holder nor the names of its | ||
| # contributors may be used to endorse or promote products derived from | ||
| # this software without specific prior written permission. | ||
| # | ||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
| # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| # POSSIBILITY OF SUCH DAMAGE. | ||
| # | ||
| # THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY. | ||
| # | ||
|
Comment on lines
+33
to
+35
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove these lines. Please see this explanation as to why. |
||
|
|
||
| ################################################################################ | ||
| # Library registration | ||
| ################################################################################ | ||
| $(eval $(call addlib_s,libopenjpeg,$(CONFIG_LIBOPENJPEG))) | ||
|
|
||
| ################################################################################ | ||
| # Original sources | ||
| ################################################################################ | ||
| LIBOPENJPEG_VERSION=2.3.1 | ||
| LIBOPENJPEG_URL=https://github.com/python-pillow/pillow-depends/raw/master/openjpeg-$(LIBOPENJPEG_VERSION).tar.gz | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like a weird place to get the archive from. IS there anything else more official? Maybe https://github.com/uclouvain/openjpeg? Also, it does not resolve and the fetch stage fails: |
||
| LIBOPENJPEG_PATCHDIR=$(LIBOPENJPEG_BASE)/patches | ||
| LIBOPENJPEG_SUBDIR=openjpeg-$(LIBOPENJPEG_VERSION) | ||
| $(eval $(call fetch,libopenjpeg,$(LIBOPENJPEG_URL))) | ||
| $(eval $(call patch,libopenjpeg,$(LIBOPENJPEG_PATCHDIR),$(LIBOPENJPEG_SUBDIR))) | ||
|
|
||
| ################################################################################ | ||
| # Helpers | ||
| ################################################################################ | ||
| LIBOPENJPEG_EXTRACTED = $(LIBOPENJPEG_ORIGIN)/$(LIBOPENJPEG_SUBDIR) | ||
|
|
||
| ################################################################################ | ||
| # Library includes | ||
| ################################################################################ | ||
| LIBOPENJPEG_COMMON_INCLUDES-y += -I$(LIBOPENJPEG_EXTRACTED)/src/lib | ||
| LIBOPENJPEG_COMMON_INCLUDES-y += -I$(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2 | ||
| LIBOPENJPEG_COMMON_INCLUDES-y += -I$(LIBOPENJPEG_EXTRACTED)/src/bin/common | ||
| LIBOPENJPEG_COMMON_INCLUDES-y += -I$(LIBOPENJPEG_EXTRACTED)/build/src/lib | ||
| LIBOPENJPEG_COMMON_INCLUDES-y += -I$(LIBOPENJPEG_EXTRACTED)/build/src/lib/openjp2 | ||
| LIBOPENJPEG_COMMON_INCLUDES-y += -I$(LIBOPENJPEG_EXTRACTED)/build/src/bin/common | ||
| LIBOPENJPEG_COMMON_INCLUDES-y += -I$(LIBOPENJPEG_BASE)/include | ||
|
|
||
| CINCLUDES-$(CONFIG_LIBOPENJPEG) += $(LIBOPENJPEG_COMMON_INCLUDES-y) | ||
| CXXINCLUDES-$(CONFIG_LIBOPENJPEG) += $(LIBOPENJPEG_COMMON_INCLUDES-y) | ||
|
|
||
| LIBOPENJPEG_CINCLUDES += -I$(LIBOPENJPEG_EXTRACTED) | ||
|
|
||
| ################################################################################ | ||
| # Global flags | ||
| ################################################################################ | ||
| # Suppressed flags | ||
| LIBOPENJPEG_SUPPRESS_FLAGS += -Wno-unused-parameter \ | ||
| -Wno-unused-variable -Wno-unused-value -Wno-unused-function \ | ||
| -Wno-missing-field-initializers -Wno-implicit-fallthrough \ | ||
| -Wno-misleading-indentation -Wno-stringop-truncation \ | ||
| -Wno-strict-aliasing | ||
| LIBOPENJPEG_CFLAGS-y += $(LIBOPENJPEG_SUPPRESS_FLAGS) \ | ||
| -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast \ | ||
| -Wno-misleading-indentation -Wno-stringop-truncation \ | ||
| -Wno-strict-aliasing | ||
|
|
||
| ################################################################################ | ||
| # OPENJPEG src | ||
| ################################################################################ | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/thread.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/bio.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/cio.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/dwt.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/event.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/image.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/invert.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/j2k.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/jp2.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/mct.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/mqc.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/openjpeg.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/opj_clock.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/pi.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/t1.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/t2.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/tcd.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/tgt.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/function_list.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/opj_malloc.c | ||
| LIBOPENJPEG_SRCS-y += $(LIBOPENJPEG_EXTRACTED)/src/lib/openjp2/sparse_array.c | ||
|
|
||
| ################################################################################ | ||
| # OPENJPEG prepare | ||
| ################################################################################ | ||
| # Run ./configure | ||
| $(LIBOPENJPEG_EXTRACTED)/config.status: $(LIBOPENJPEG_BUILD)/.origin | ||
| $(call verbose_cmd,CONFIG,libopenjpeg: $(notdir $@), \ | ||
| cd $(LIBOPENJPEG_EXTRACTED) && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release) | ||
|
|
||
| LIBOPENJPEG_PREPARED_DEPS = \ | ||
| $(LIBOPENJPEG_EXTRACTED)/config.status \ | ||
|
|
||
| $(LIBOPENJPEG_BUILD)/.prepared: $(LIBOPENJPEG_PREPARED_DEPS) | ||
|
Comment on lines
+115
to
+123
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These step needs to be removed. What is required from the configure step are the any configuration header files which need to be explicitly created and placed within a top-level Also this step fails for me entirely. |
||
|
|
||
| UK_PREPARE += $(LIBOPENJPEG_BUILD)/.prepared | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,7 @@ | ||
| # lib-openjpeg | ||
| Unikraft port of openjpeg, a library for encoding and decoding JPEG image files | ||
| lcms for Unikraft | ||
| ============================= | ||
|
|
||
| This is the port of openjpeg for Unikraft as external library. | ||
|
|
||
| Please refer to the `README.md` as well as the documentation in the `doc/` | ||
| subdirectory of the main unikraft repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.