Skip to content

Commit

Permalink
Cherry-pick commits from master to support build edge deb flow in 202…
Browse files Browse the repository at this point in the history
…4.1 (#8440)

* In GCC 13.1 usage of uint64 and similar will result in an error without (#8224)

#include <cstdint>

Signed-off-by: Manoj Takasi <[email protected]>
Co-authored-by: Manoj Takasi <[email protected]>
(cherry picked from commit 8964124)

* Added checks to version api's to throw exception when information is not available

Signed-off-by: Manoj Takasi <[email protected]>
(cherry picked from commit 7623356)

---------

Co-authored-by: Manoj Takasi <[email protected]>
  • Loading branch information
ManojTakasi and Manoj Takasi authored Sep 24, 2024
1 parent 22cef19 commit f6205f4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions build/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Build-Depends: cmake,
pkg-config,
protobuf-compiler,
rapidjson-dev,
systemtap-sdt-dev,
uuid-dev,
Standards-Version: 4.5.0

Expand Down
10 changes: 10 additions & 0 deletions src/CMake/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)

#Set XRT_HEAD_COMMITS to default value if above command is not executed
if (NOT XRT_HEAD_COMMITS)
set (XRT_HEAD_COMMITS -1)
endif()

# Get number of commits between HEAD and master
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-list --count HEAD ^origin/master
Expand All @@ -44,6 +49,11 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)

#Set XRT_BRANCH_COMMITS to default value if above command is not executed
if (NOT XRT_BRANCH_COMMITS)
set (XRT_BRANCH_COMMITS -1)
endif()

# Get the latest abbreviated commit hash date of the working branch
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --pretty=format:%cD
Expand Down
4 changes: 2 additions & 2 deletions src/runtime_src/core/edge/drm/zocl/common/zocl_xclbin.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ zocl_update_apertures(struct drm_zocl_dev *zdev, struct drm_zocl_slot *slot)
int i = 0;
char kname[64] = {0};
char *kname_p = NULL;
struct kernel_info *krnl_info = NULL;
struct kernel_info *krnl_info = NULL;

/* Update aperture should only happen when loading xclbin */
if (slot->ip)
Expand Down Expand Up @@ -339,7 +339,7 @@ zocl_update_apertures(struct drm_zocl_dev *zdev, struct drm_zocl_slot *slot)
apt = &zdev->cu_subdev.apertures[apt_idx];

apt->addr = ip->m_base_address;

strncpy(kname, ip->m_name, sizeof(kname));
kname[sizeof(kname)-1] = '\0';
kname_p = &kname[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#pragma once

#include <cstdint>
#include <string>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions src/runtime_src/core/edge/user/zynq_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef _XCL_ZYNQ_DEV_H_
#define _XCL_ZYNQ_DEV_H_

#include <cstdint>
#include <fstream>
#include <string>
#include <vector>
Expand Down

0 comments on commit f6205f4

Please sign in to comment.