1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#
# Copyright (c) 2024, Google, Inc. All rights reserved
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
LOCAL_DIR := $(GET_LOCAL_DIR)
MODULE := $(LOCAL_DIR)
MODULE_CRATE_NAME := rust_support
MODULE_SRCS := \
$(LOCAL_DIR)/lib.rs \
MODULE_DEPS := \
trusty/user/base/lib/liballoc-rust \
trusty/user/base/lib/trusty-std \
MODULE_BINDGEN_ALLOW_FUNCTIONS := \
_panic \
extern_is_mutex_held \
mutex_acquire_timeout \
mutex_destroy \
mutex_init \
mutex_release \
vaddr_to_paddr \
vmm_alloc_physical_etc \
vmm_alloc_contiguous \
vmm_free_region \
MODULE_BINDGEN_ALLOW_TYPES := \
lk_init_.* \
MODULE_BINDGEN_ALLOW_VARS := \
_kernel_aspace \
ARCH_MMU_FLAG_.* \
ERR_.* \
PAGE_SIZE \
PAGE_SIZE_SHIFT \
MODULE_BINDGEN_FLAGS := \
--newtype-enum lk_init_level \
--bitfield-enum lk_init_flags \
--no-prepend-enum-name \
MODULE_BINDGEN_SRC_HEADER := $(LOCAL_DIR)/bindings.h
include make/module.mk
|