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

Support for x86 (32bit and 64bit) #340

Merged
merged 32 commits into from
Mar 25, 2019
Merged

Support for x86 (32bit and 64bit) #340

merged 32 commits into from
Mar 25, 2019

Conversation

darkdrgn2k
Copy link
Contributor

@darkdrgn2k darkdrgn2k commented Mar 10, 2019

New board detection routine Closes #329
Added support for x86 and arm64 Closes #328
Node Exporter Closes #212 , Grafana Closes #204 and Prometheus version bump

  • FULL install on Debian 9 VM
  • It keeps wanting to access ipv6 addresses when ipv6 is not around, maybe demote ipv6 by default? (updated in ygg-tunnel-ipv6 branch)
  • Test new detection method on some other boards (probably will have to happen after merge)
  • Add support for i686 (same as i386)

@darkdrgn2k darkdrgn2k mentioned this pull request Mar 11, 2019
2 tasks
@darkdrgn2k darkdrgn2k changed the title [WIP] I386 Support for x86 Mar 11, 2019
@darkdrgn2k darkdrgn2k added this to In Progress in Prototype v0.5 via automation Mar 11, 2019
@darkdrgn2k darkdrgn2k changed the title Support for x86 Support for x86 (32bit and 64bit) Mar 11, 2019
@makew0rld makew0rld moved this from In Progress to Pending Review in Prototype v0.5 Mar 24, 2019
Copy link
Contributor

@makew0rld makew0rld left a comment

Choose a reason for hiding this comment

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

Looks like great work to support more boards, thanks a lot! I left some small comments. The only large thing I think is left is updating docs to explain the support that is not offered, and the variety of boards that fall under it. I think that should be done in this PR.

URL="https://dl.grafana.com/oss/release/grafana_${GRAFANA_VERSION}_armel.deb";
;;
armv6l)
# Use old grafana - no new one available
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe have a separate GRAFANA_ARMHF_VERSION variable to change later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have not been able to find any other Grafana for armv6l and i dont think it will be updated.
If some one can find it please let me know

Otherwise the options are

  • Not have Grafana available
  • Keep it static to an old version as it is now :( (at least for now still compatible)
  • Build it ourselves (any takes on building it from source :))

We can Create this as an issue if there is interest in it

PS: armv6l = Raspbery Pi 1 and Zero

Copy link
Contributor

Choose a reason for hiding this comment

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

Building a binary ourselves would be the best for compatibility, but there are trust issues, since they won't be confirmed by the devs. Maybe you can contact the devs about this (make a new issue for it in the repo too), and for now we'll leave the old version? I would also some sort of warning with echo.

;;
*)
echo "Unknown Arch"
exit 1
Copy link
Contributor

Choose a reason for hiding this comment

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

You use exit 0 up above for when you can't download because of i386. Does the code make any difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Difference is as folows:

0 will exit the script but continue executing install (we KNOW i386 is not available so just continue)
1 will stop execution the install script (Something went wrong if we dont know what ARCH it is!)


BOARD_MODEL="Unknown"
BOARD_NAME="Unknown"
BOARD_OS="Unknown"
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these variables exported?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No.

Instead of being exported somewhere in the script then used by the modules, the function is part of a shared file and the function can be called by any module when needed to set it in their environment.

This allows each module to be run without having to run the whole script to set them and be independent.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see, so the variables are set every time.

# Set some defaults
if [[ "$ARCH" == "armv7l" ]]; then
#TODO# -O2 workaround. Needs to be resolved.
CJDNS_BUILD_CMD="sudo Seccomp_NO=1 CFLAGS=\"-O2 -s -static -Wall -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -fomit-frame-pointer -marm\" ./do"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe single quotes would make this cleaner?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe. But its a copy /paste from Prototype version1.

The whole cjdns build needs to be assessed and cleaned up Noted in #165

scripts/yggdrasil/install Outdated Show resolved Hide resolved
scripts/yggdrasil/install Outdated Show resolved Hide resolved
@darkdrgn2k
Copy link
Contributor Author

Looks like great work to support more boards, thanks a lot! I left some small comments. The only large thing I think is left is updating docs to explain the support that is not offered, and the variety of boards that fall under it. I think that should be done in this PR.

Grafana note added in this repo
Prometheus in Prometheus Doc branch to avoid conflicts in mearning

@darkdrgn2k darkdrgn2k merged commit 84f690e into develop Mar 25, 2019
Prototype v0.5 automation moved this from Pending Review to Done Mar 25, 2019
@darkdrgn2k darkdrgn2k deleted the i386 branch June 22, 2019 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants