Bug 269870 - [NEW PORT] sysutils/blisp: tool for upgrading firmware on Pinecil soldering iron
Summary: [NEW PORT] sysutils/blisp: tool for upgrading firmware on Pinecil soldering iron
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Daniel Engberg
URL: https://github.com/pine64/blisp
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-28 07:49 UTC by Pero Oršolić
Modified: 2023-03-25 18:16 UTC (History)
3 users (show)

See Also:
bsd: maintainer-feedback+


Attachments
patch for blisp (5.78 KB, patch)
2023-02-28 07:49 UTC, Pero Oršolić
no flags Details | Diff
v2 (5.83 KB, patch)
2023-03-16 17:39 UTC, Pero Oršolić
no flags Details | Diff
v3 (3.78 KB, patch)
2023-03-17 15:33 UTC, Pero Oršolić
no flags Details | Diff
Patch for blisp v4 (2.86 KB, patch)
2023-03-20 16:26 UTC, Daniel Engberg
no flags Details | Diff
Patch for blisp v5 (2.86 KB, patch)
2023-03-20 16:30 UTC, Daniel Engberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pero Oršolić 2023-02-28 07:49:59 UTC
Created attachment 240475 [details]
patch for blisp

Open source tool and library for flashing Bouffalo RISC-V MCUs.
Used for upgrading firmware on Pinecil V2 open source soldering iron.
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2023-02-28 10:10:30 UTC
Hi,

Why are we not using upstream's CMake build framework?
Can we use release and backport needed patches?
etc/devd//pinecilv2.conf is a typo?
USES= tar:tgz is wrong and unnecessary

It also seems like it depends on procfs,if so preferably add a message about that

Thanks for your contribution!

Best regards,
Daniel
Comment 2 Pero Oršolić 2023-03-06 19:52:54 UTC
(In reply to Daniel Engberg from comment #1)

There are only a few files and cmake felt like overkill. I can suggest to upstream to include Makefile or rework PR to use upstream's CMake.

You mean extra '/' is typo? I'll remove it.

Are you sure it depends on procfs? I tried it without mounted /proc and it can flash new firmware.
Comment 3 bsd 2023-03-11 10:53:14 UTC
Looking at $URL, BLISP should be usable for any Bouffalo LABS MCU, BL60x and BL70x series at the moment. Fixing PR title would be good.
Comment 4 bsd 2023-03-11 12:13:03 UTC
pkg-message makes an impression BLISP is only for flashing firmware for Pinecil... it is fine to use Pinecil as an example given PR author has tested it this way. It should be usable at least for PineCone and PineNut boards as well, as they both use BL602 MCU (not tested yet, not available yet for me).

Also, file name etc/devd/pinecilv2.conf is misleading the same way. File name etc/devd/blisp.conf would be more appropriate, at least in my eyes :)
Comment 5 Pero Oršolić 2023-03-16 17:39:16 UTC
Created attachment 240902 [details]
v2
Comment 6 Pero Oršolić 2023-03-16 17:40:13 UTC
New patch uploaded. Changes:
- removed "tar:tgz"
- devd file renamed to blisp.conf
- pkg-message updated
Comment 7 Pero Oršolić 2023-03-17 15:33:09 UTC
Created attachment 240925 [details]
v3

v3
- rebased to latest upstream
- GNU Makefile removed
- uses cmake build system (patch for FreeBSD was merged to upstream)
Comment 8 Daniel Engberg freebsd_committer freebsd_triage 2023-03-20 16:19:35 UTC
(In reply to porsolic from comment #2)
This caught my eye
https://github.com/pine64/blisp/blob/master/tools/blisp/src/util.c#L38
Comment 9 Daniel Engberg freebsd_committer freebsd_triage 2023-03-20 16:26:02 UTC
Created attachment 241012 [details]
Patch for blisp v4

Fixes a few issues reported by portlint
Rearrage Makefile to follow Porters Handbook more closely
Rephrase COMMENT, pkg-descr and pkg-message to be more concise
Comment 10 Daniel Engberg freebsd_committer freebsd_triage 2023-03-20 16:30:10 UTC
Created attachment 241013 [details]
Patch for blisp v5

Use BUILD_WRKSRC variable
Comment 11 Pero Oršolić 2023-03-20 16:53:58 UTC
(In reply to Daniel Engberg from comment #8)

That was added by me to upstream. I didn't see that function (util_get_binary_folder) is not used anymore in the repo.

Looking through git history it seems that is not used anymore from this commit:
https://github.com/pine64/blisp/commit/279f2433ea9ba11b615833ed30ac4b6185e19741
Comment 12 bsd 2023-03-22 14:32:42 UTC
I tested porsolic's v3 patch, it works well - I mean, everything builds OK. I am going to test Daniel's v5 patch as well, so I am not going to comment more now.
Comment 13 Daniel Engberg freebsd_committer freebsd_triage 2023-03-23 06:55:14 UTC
(In reply to porsolic from comment #11)
I made some light touches to phrasing and style, if you don't have any objections I plan to commit my v5 patch but please set maintainer-approval to "+" in that case.

Thanks for working on this!
Comment 14 bsd 2023-03-23 07:10:12 UTC
(In reply to Daniel Engberg from comment #13)

I am going to test your v5 patch today.

In the mean time, is it possible to adjust PR's title from '[NEW PORT] sysutils/blisp: tool for upgrading firmware on Pinecil soldering iron' to something like '[NEW PORT] sysutils/blisp: tool for upgrading firmware on Bouffalo Labs MCU based devices' or something similar? As a committer, you should be able to do it, reporter probably has no means to do it itself. This would be much better description for what BLISP really does, given the description at $URL and even what's in pkg-message in newer version of patch.
Comment 15 bsd 2023-03-23 11:08:54 UTC
Patch v5 is building well as well :) I'd like to see it committed...
Comment 16 Pero Oršolić 2023-03-23 18:01:14 UTC
(In reply to Daniel Engberg from comment #13)

I do not mind. Thanks for review!

Also I agree that subject should be changed to something more generic than single soldering iron.
Comment 17 commit-hook freebsd_committer freebsd_triage 2023-03-25 18:15:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=38d60dbac72467af69671a0340dc6fc579d8dc8b

commit 38d60dbac72467af69671a0340dc6fc579d8dc8b
Author:     Pero Orsolic <porsolic@gmail.com>
AuthorDate: 2023-03-25 18:11:58 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2023-03-25 18:14:54 +0000

    sysutils/blisp: Utility for for flashing Bouffalo Labs RISC-V Microcontrollers and SoCs

    Utility and library for flashing Bouffalo RISC-V MCUs such as upgrading
    firmware on Pinecil V2 open source soldering iron

    PR:             269870

 sysutils/Makefile                          |  1 +
 sysutils/blisp/Makefile (new)              | 30 ++++++++++++++++++++++++++++++
 sysutils/blisp/distinfo (new)              |  5 +++++
 sysutils/blisp/files/devd-blisp.conf (new) |  8 ++++++++
 sysutils/blisp/pkg-descr (new)             |  2 ++
 sysutils/blisp/pkg-message (new)           | 14 ++++++++++++++
 6 files changed, 60 insertions(+)
Comment 18 Daniel Engberg freebsd_committer freebsd_triage 2023-03-25 18:16:08 UTC
Committed, thanks