summaryrefslogtreecommitdiffstats
path: root/remote/modules/kernel-system
diff options
context:
space:
mode:
authorJonathan Bauer2014-05-08 14:30:09 +0200
committerJonathan Bauer2014-05-08 14:30:09 +0200
commit3a892436c9be1de4c77b504eb242ab154dfd68c3 (patch)
treeb34b40d8ad478467b6d9ba6b1247eaf625501a6a /remote/modules/kernel-system
parent[rfs-s31] used copy_kernel function (diff)
downloadtm-scripts-3a892436c9be1de4c77b504eb242ab154dfd68c3.tar.gz
tm-scripts-3a892436c9be1de4c77b504eb242ab154dfd68c3.tar.xz
tm-scripts-3a892436c9be1de4c77b504eb242ab154dfd68c3.zip
[kernel-system] function to detect kernel headers path
NOTE: currently not in use!
Diffstat (limited to 'remote/modules/kernel-system')
-rw-r--r--remote/modules/kernel-system/module.build41
1 files changed, 20 insertions, 21 deletions
diff --git a/remote/modules/kernel-system/module.build b/remote/modules/kernel-system/module.build
index d542a80d..e1fc86f6 100644
--- a/remote/modules/kernel-system/module.build
+++ b/remote/modules/kernel-system/module.build
@@ -34,29 +34,9 @@ get_kernel_version(){
pdebug "KERNEL_NEW_VERSION: '$KERNEL_NEW_VERSION'"
pdebug "KERNEL_BASE_DIR: '$KERNEL_BASE_DIR'"
- # set KERNEL_HEADERS_PATH
- #get_kernel_headers_path
}
-get_kernel_headers_path(){
- # determine the path to the kernel headers we just installed
- for DIR in $(list_content_package --dirs linux-headers-$(uname -r) ); do
- if [[ "$DIR" =~ .*linux-headers-$(uname -r)$ ]]; then
- # validate candidate
- [ -e "$DIR/./include/generated/utsrelease.h" ] \
- || perror "Could not find utsrelease.h at '$DIR/./include/generated/utsrelease.h'"
- # TODO: maybe check if SYS_UTS_RELEASE is the same as in the header.
- # all good, we found it
- pinfo "Kernel headers found at '$DIR'."
- declare -rg KERNEL_HEADERS_PATH="$DIR"
- break
- fi
- done
-
- [ -z "$KERNEL_HEADERS_PATH" ] && perror "KERNEL_HEADERS_PATH was not set correctly."
-
-}
fetch_source() {
@@ -103,7 +83,6 @@ build() {
[ -z "${KERNEL_TARGET_NAME}" ] && perror "KERNEL_TARGET_NAME not set, this mean something is wrong with remote/include/kernel.inc"
cp "${KERNEL_SYSTEM_PATH}" "${MODULE_BUILD_DIR}/${KERNEL_TARGET_NAME}" && \
pinfo "Copied kernel from '${KERNEL_SYSTEM_PATH}' to '${MODULE_BUILD_DIR}/${KERNEL_TARGET_NAME}'"
- #[ -z "${KERNEL_BUILD_DIR}" ] && KERNEL_BUILD_DIR="${MODULE_BUILD_DIR}"
}
post_copy() {
@@ -112,3 +91,23 @@ post_copy() {
#cp -a "$MODULE_BUILD_DIR/kernel" "$TARGET_BUILD_DIR/../kernel/kernel" || perror "could not copy kernel to remote build dir."
}
+# currently not used
+get_kernel_headers_path(){
+ # determine the path to the kernel headers we just installed
+ for DIR in $(list_content_package --dirs linux-headers-$(uname -r) ); do
+ if [[ "$DIR" =~ .*linux-headers-$(uname -r)$ ]]; then
+ # validate candidate
+ [ -e "$DIR/./include/generated/utsrelease.h" ] \
+ || perror "Could not find utsrelease.h at '$DIR/./include/generated/utsrelease.h'"
+ # TODO: maybe check if SYS_UTS_RELEASE is the same as in the header.
+
+ # all good, we found it
+ pinfo "Kernel headers found at '$DIR'."
+ declare -rg KERNEL_HEADERS_PATH="$DIR"
+ break
+ fi
+ done
+
+ [ -z "$KERNEL_HEADERS_PATH" ] && perror "KERNEL_HEADERS_PATH was not set correctly."
+
+}