Skip to content

Conversation

@yetanothercarbot
Copy link

This makes a number of changes to sourcelib_install.sh:

  1. Supports Fedora and its derivatives by using dnf when it detects its presence.
  2. Prompts the user to confirm changes before making them to their system.
  3. Downloads J-Link binaries directly from the Segger website rather than from a mirror. This also checks that the OS is x86_64 before downloading.

…ltty from being removed (is a depend of pop-desktop)
@twilfredo
Copy link
Collaborator

twilfredo commented May 3, 2022

Hey, thanks for the PR! A good improvement over what was there.

However, I was thinking maybe we do something like this instead of trying to auto-detect the OS/Distro. Just so it's a little more consistent.

What do you think?

#!/bin/bash
echo "Enter Distro:
    [1] Arch
    [2] Fedora
    [3] Debian"

read x

if [ "$x" = "1" ]
then
    echo "Installing for Arch..."
elif [ "$x" = "2" ]
then
    echo "Installing for Fedora..."
elif [ "$x" = "3" ]
then
    echo "Installing for Deb..."
else
    echo "Invalid input"
fi

@yetanothercarbot
Copy link
Author

Out of curiosity, in what cases would there be an apt or dnf (or other package manager) that exists but can't be called?

I'd be okay with doing this, I just don't really see the point I guess haha.

@twilfredo
Copy link
Collaborator

Out of curiosity, in what cases would there be an apt or dnf (or other package manager) that exists but can't be called?

I'd be okay with doing this, I just don't really see the point I guess haha.

No that's fair, I can't think of a scenario. I'm happy with this, any-chance you were able to test this on Debian and seeing if a sample app can compile? Don't want to merge until it's tested just in case.

@yetanothercarbot
Copy link
Author

yetanothercarbot commented May 4, 2022

I decided to try it on my Chromebook with its Debian VM.

It correctly detects the architecture is not x86_64 (it's aarch64) and doesn't download JLink as a result, instead telling the user to download it manually.

Unfortunately, it doesn't seem to build the blink sketch correctly. make is complaining about .depend not existing. I'm not exactly sure where this is supposed to be? The .bashrc file is still being updated with the paths.

@twilfredo
Copy link
Collaborator

twilfredo commented May 4, 2022

I decided to try it on my Chromebook with its Debian VM.

It correctly detects the architecture is not x86_64 (it's aarch64) and doesn't download JLink as a result, instead telling the user to download it manually.

Unfortunately, it doesn't seem to build the blink sketch correctly. make is complaining about .depend not existing. I'm not exactly sure where this is supposed to be? The .bashrc file is still being updated with the paths.

Nice!

About the missing make dependencies, can you check if env var SOURCELIB_ROOT is set? Maybe it's missing the path to source lib? Maybe it's set in bash but not sourced into the environment?

@yetanothercarbot
Copy link
Author

yetanothercarbot commented May 4, 2022

$SOURCELIB_ROOT was set. I forgot to put sourcelib in ~/csse3010/ - I had just put it in my home folder.

make -j worked fine:

image

I haven't tried flashing to the Nucleo board though.

@twilfredo
Copy link
Collaborator

$SOURCELIB_ROOT was set. I forgot to put sourcelib in ~/csse3010/ - I had just put it in my home folder.

make -j worked fine:

image

I haven't tried flashing to the Nucleo board though.

Awesome, thanks for that. I'll test when I get some time and merge if it's all good.

@twilfredo twilfredo requested a review from SergeDudn May 5, 2022 03:49
@twilfredo twilfredo changed the base branch from main to experimental_devel May 5, 2022 05:29
@twilfredo twilfredo changed the base branch from experimental_devel to main May 5, 2022 05:30
@twilfredo twilfredo changed the base branch from main to experimental_devel May 5, 2022 05:30
@twilfredo twilfredo changed the base branch from experimental_devel to main May 5, 2022 05:31
@twilfredo
Copy link
Collaborator

twilfredo commented May 5, 2022

@yetanothercarbot this has been merged to the experimental branch for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants