Hi! New here. Going through the C++ tutorial. I'm comfortable with software development on Linux and I use git daily. I'm trying to figure out what the word "update" means when the tutorial lesson 0 says "bring the Bela up to date".

  • bela-image-builder looks like a cross compiler toolchain and a kernel so probably not that? It's at version 0.3.8
  • Bela looks like it's what is referred to as updating the IDE. Cool! But there aren't any releases on github.
  • Updating Bela tutorial web page links to the automatically created ZIP archive of the master branch of the Bela repository. Now we're getting somewhere.

Cool, so we're tracking master. i wonder if the Bela directory on the board (I got a kit with the pre-flashed image) has a git repo? Looks like it does but it has lots of uncommited changes. I haven't created original work yet. I've only run examples through the IDE.

root@bela:~/Bela# git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	gitcommithash
	lib/
	pru_rtaudio.txt
	pru_rtaudio_irq.txt
	resources/tools/bela-cape-btn/bela-cape-btn
	resources/tools/board_detect/board_detect
	resources/tools/mcasp-dump-tool/mcasp-dump-tool

nothing added to commit but untracked files present (use "git add" to track)
root@bela:~/Bela# git fetch
fatal: unable to access 'https://github.com/BelaPlatform/Bela.git/': Could not resolve host: github.com

Derp, I don't have internet on the board. I guess I could use ethernet or a wifi dongle? Meh. Continuing to do things the hard way, I clone the Bela repo on my host computer and I'm running the update_board script from there. The update is running as I expected. It's so cool to have a full GNU toolchain on the board! Looks like there's some custom .deb packages too...

The script says I updated successfully.

The last commit in git log in /root/Bela outputs

Author: Giulio Moro <giuliomoro@yahoo.it>
Date:   Mon Feb 24 12:20:59 2020 +0000

    Csound: updated to 6.14

But the repo I just ran update_board from says the last commit to master was

commit be6a814d7486706e62cd00b3b1fe8dff64a7fbd6 (HEAD -> master, origin/master, origin/HEAD)
Author: Giulio Moro <giuliomoro@yahoo.it>
Date:   Sun Jun 14 16:20:32 2020 +0000

    terminal-only: updated main.cpps, using AudioFileUtilities

Am I up to date? I really can't tell. Help?

A few minutes later the board seemed to automatically reboot the OS. Still not sure if I'm at the right version.

Ran the update through the IDE via github ZIP archive of master. Now there are a whole bunch of uncommited files in the repo on the Bela. So it looks like the script just doesn't delete the Bela/.git dir before copying and I should expect that history to reflect anything useful.

Props to the hacker that named the Linux USB ethernet device enxbe1ab7a6d2ca

    lazzarello bela-image-builder looks like a cross compiler toolchain and a kernel so probably not that? It's at version 0.3.8

    v0.3.8a you mean! That is the one that builds the image that you flash. Updating through this means reflashing an SD card (and/or eMMC), and having to backup/restore all your projects. You wouldn't normally need to do this.

    lazzarello Bela looks like it's what is referred to as updating the IDE. Cool! But there aren't any releases on github.

    Yup no releases: the master branch should always be in a good state to be used for updating your board.

    lazzarello Updating Bela tutorial web page links to the automatically created ZIP archive of the master branch of the Bela repository. Now we're getting somewhere.

    That's the one!

    lazzarello oks like it does but it has lots of uncommited changes.

    those are not uncommitted changes. They are untracked files. It means those files/folders are not actually tracked by git. We recently updated the .gitignore, so in more recent images (or more-up-to date "core code"), you wouldn't see those files.

    The update process does update the code on the board, rebuild some tools and install some packages, but it does not update the git repo. So after you update the board, the git repo will still show the previous HEAD, and lots of changed files. That's expected behaviour. The reason why this is the case is because there is not way to download a zip archive from GitHub which contains also the git repo (i.e.: the hidden .git folder). This, combined with the lack of internet access on the board by default, means that we'd have to require people to install git, clone the repo, pull the repo, run the update script (which would have to be modified to bring the repo up to date).

    The current solution works fine, and the downside is that the few people who care about git do not see the updated repo has been pretty tolerable so far. Some people also complained about not being able to tell "what version" they have. Again, this doesn't seem to have caused many troubles anyhow. (see more details here).

    As for what I do on my board when the board doesn't have internet access, it's explained here. Note that this only covers the cases where the tools and packages to be installed have not changed since the previous version (as they get updated very rarely, that's often a good assumption). If I really want to rebuild/reinstall those as well, I either do it manually or run ./scripts/update_board.sh --no-frills in-place (e.g.: on the board itself after having updated the repo as explained at that link).

      lazzarello Am I up to date? I really can't tell. Help?

      you are! because the update script said so!

      giuliomoro Thanks for clearing up the release process. The work you've put into this IDE is impressive! I'm really getting into the C++ class with Andrew McPherson.

      update This morning I rebooted the board after the update and now the IDE loads in the browser but it can't talk to the filesystem. The Examples and Libraries menus are empty and I can't upload projects.

      🙁

      Opening a private window seems to fix all that. :shrug:

        lazzarello update This morning I rebooted the board after the update and now the IDE loads in the browser but it can't talk to the filesystem. The Examples and Libraries menus are empty and I can't upload projects.

        sorry, there is an open issue for that. As a workaround, you should just need to refresh.