Skip to content
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

Test #28

Closed
wants to merge 2 commits into from
Closed

Test #28

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/build_ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM ubuntu:latest
FROM ubuntu:24.04

ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

# Install prerequisites
RUN apt-get --quiet=2 update && apt-get install --quiet=2 --assume-yes sudo git python3 python3-pip wget
RUN apt-get --quiet=2 update && apt-get install --quiet=2 --assume-yes sudo git python3 python3-pip python3-venv wget

# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh
Expand Down
23 changes: 22 additions & 1 deletion .github/actions/build_ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@ The supported targets are:

## Example usage

Inside a github action use:
```
uses: ./.github/actions/build_ci
with:
target: linux
target: linux
```

## Desktop testing

Right now the directory expectations of the CI script are very messy.
This should be cleaned up in a future PR.

Desktop testing is possible but is likewise messy right now.

One time setup, starting in open-amp directory:
```
$ git clone https://github.com/OpenAMP/libmetal.git
```

A sequence like below will work, change the "zephyr" at the end of the docker command line to "linux" or "generic" for the other working tests
```
$ docker build -t openamp-ci .github/actions/build_ci/ && docker run -it --rm -v$PWD:/prj -w /prj openamp-ci zephyr
$ sudo rm -rf build* zephyr*
```
22 changes: 13 additions & 9 deletions .github/actions/build_ci/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@
FREERTOS_ZIP_URL=https://cfhcable.dl.sourceforge.net/project/freertos/FreeRTOS/V10.0.1/FreeRTOSv10.0.1.zip

pre_build(){
# fix issue related to tzdata install
# fix issue related to tzdata install, not needed for 24.04 but kept for 22.04 and earlier
echo 'Etc/UTC' > /etc/timezone || exit 1
ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime || exit 1
ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime || exit 1

#Create a new virtual environment
python3 -m venv ./.venv
source ./.venv/bin/activate

# add make and cmake
# cmake from packages will work for 22.04 and later but use pip to get the latest on any distro

Check warning on line 25 in .github/actions/build_ci/entrypoint.sh

View workflow job for this annotation

GitHub Actions / checkpatch review

LONG_LINE

.github/actions/build_ci/entrypoint.sh:25 line over 100 characters
apt update || exit 1
apt-get install -y make || exit 1
sudo pip3 install cmake || exit 1
pip install cmake || exit 1
}

build_linux(){
Expand Down Expand Up @@ -77,13 +84,10 @@
echo " Build for Zephyr OS "
sudo apt-get install -y git cmake ninja-build gperf || exit 1
sudo apt-get install -y ccache dfu-util device-tree-compiler wget || exit 1
sudo apt-get install -y python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file || exit 1
sudo apt-get install -y python3-dev python3-setuptools python3-tk python3-wheel xz-utils file || exit 1

Check warning on line 87 in .github/actions/build_ci/entrypoint.sh

View workflow job for this annotation

GitHub Actions / checkpatch review

LONG_LINE

.github/actions/build_ci/entrypoint.sh:87 line over 100 characters
sudo apt-get install -y make gcc gcc-multilib g++-multilib libsdl2-dev || exit 1
sudo apt-get install -y libc6-dev-i386 gperf g++ python3-ply python3-yaml device-tree-compiler ncurses-dev uglifyjs -qq || exit 1
sudo pip3 install pyelftools || exit 1
pip3 install --user -U west
echo 'export PATH=~/.local/bin:"$PATH"' >> ~/.bashrc
source ~/.bashrc
pip install west || exit 1

wget $ZEPHYR_SDK_DOWNLOAD_URL || exit 1
tar xvf $ZEPHYR_SDK_SETUP_TAR || exit 1
Expand All @@ -93,7 +97,7 @@
cd ./zephyrproject || exit 1
west update || exit 1
west zephyr-export || exit 1
pip3 install --user -r ./zephyr/scripts/requirements.txt || exit 1
pip install -r ./zephyr/scripts/requirements.txt || exit 1
echo "Update zephyr OpenAMP repos"
#Update zephyr OpenAMP repos
cp -r ../lib modules/lib/open-amp/open-amp/ || exit 1
Expand Down
6 changes: 3 additions & 3 deletions lib/include/openamp/rpmsg_rpc_client_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ extern "C" {
* Aligning to 64 bits -> 488UL
*/
#define MAX_BUF_LEN 488UL
#define MAX_FUNC_ID_LEN sizeof(unsigned long int)
#define MAX_FUNC_ID_LEN sizeof(uint32_t)

struct rpmsg_rpc_clt;
struct rpmsg_rpc_svr;

typedef void (*rpmsg_rpc_shutdown_cb)(struct rpmsg_rpc_clt *rpc);
typedef void (*app_cb)(struct rpmsg_rpc_clt *rpc, int statust, void *data,
typedef void (*app_cb)(struct rpmsg_rpc_clt *rpc, int status, void *data,
size_t len);
typedef int (*rpmsg_rpc_syscall_cb)(void *data, struct rpmsg_rpc_svr *rpcs);

Expand Down Expand Up @@ -181,7 +181,7 @@ int rpmsg_rpc_server_init(struct rpmsg_rpc_svr *rpcs, struct rpmsg_device *rdev,
* @return Length of the received response, negative value for failure.
*/
int rpmsg_rpc_client_send(struct rpmsg_rpc_clt *rpc,
unsigned int rpc_id, void *request_param,
uint32_t rpc_id, void *request_param,
size_t req_param_size);

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/service/rpmsg/rpc/rpmsg_rpc_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int rpmsg_rpc_client_init(struct rpmsg_rpc_clt *rpc,
}

int rpmsg_rpc_client_send(struct rpmsg_rpc_clt *rpc,
unsigned int rpc_id, void *request_param,
uint32_t rpc_id, void *request_param,
size_t req_param_size)
{
unsigned char tmpbuf[MAX_BUF_LEN];
Expand Down
Loading