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

Buildroot helpers #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions buildroot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Helpers for Buildroot

These scripts allow you to build this package outside of the main buildroot tree. This makes debugging easier.

# Usage

```
./cmake.sh
make
./install.sh
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to say where the project needs to be pasted relative to the Buildroot directory? Just inside it?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Especially because the conf.sh file hardcodes this.

22 changes: 22 additions & 0 deletions buildroot/cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

source ./conf.sh

PATH=${BUILDROOT}/build/host/bin:${PATH}

cmake \
.. \
-G"Unix Makefiles" \
-DCMAKE_TOOLCHAIN_FILE=${BUILDROOT}/build/host/share/buildroot/toolchainfile.cmake \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_RUNSTATEDIR="/run" \
-DCMAKE_COLOR_MAKEFILE=OFF \
-DBUILD_DOC=OFF \
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLE=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TEST=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_SHARED_LIB=ON
Comment on lines +14 to +22
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the lines with S and without S? Only with S is correct.

Copy link
Collaborator Author

@strijar strijar Dec 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the lines with S and without S? Only with S is correct.

This is exactly what buildroot does when it works. Just copy-paste

Also, I would like more if this was inside maybe scripts/buildroot, not just builldroot/, for project organization reasons. Other than that, I like it.

I don't think there will be any more scripts in this project. I don't see the need for this. So there is no point in making a subdirectory

1 change: 1 addition & 0 deletions buildroot/conf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BUILDROOT="../../AetherX6100Buildroot"
9 changes: 9 additions & 0 deletions buildroot/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

source ./conf.sh

PATH=${BUILDROOT}/build/host/bin:${PATH}

/usr/bin/make \
DESTDIR=${BUILDROOT}/build/target \
install/fast