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

ox64 flashing added Archlinux commands #91

Merged
merged 1 commit into from
May 1, 2024
Merged

ox64 flashing added Archlinux commands #91

merged 1 commit into from
May 1, 2024

Conversation

giorez
Copy link
Contributor

@giorez giorez commented May 1, 2024

@x1y I re-tested the guide to work also on Arch Linux system.

A strange behaviuor when I copy & paste the code from the web page:

rendered text:

$ BASE=ppp-multi-image
$ DEV=sdb # i.e. sdb or mmcblk0
$ ATTR=RequiredPartition,LegacyBIOSBootable
$ SIZE=11GiB

copied & pasted text:

BASE=ppp-multi-image

DEV=sdb # i.e. sdb or mmcblk0

ATTR=RequiredPartition,LegacyBIOSBootable

SIZE=11GiB

Every line add a new-line.

@x1y
Copy link
Collaborator

x1y commented May 1, 2024

Every line add a new-line.

Please open an issue, I don't have time to look into it right now and otherwise it will be forgotten.

@x1y x1y merged commit 5ba25e4 into pine64:main May 1, 2024
1 check passed
@Pavlos1
Copy link
Contributor

Pavlos1 commented May 1, 2024

bflb-iot-tool shouldn't be run as root for reasons explained in the same document ...

@x1y
Copy link
Collaborator

x1y commented May 1, 2024

bflb-iot-tool shouldn't be run as root for reasons explained in the same document ...

I don't think it is required for minicom either. If you create a PR I will merge it.

@giorez giorez mentioned this pull request May 1, 2024
@giorez
Copy link
Contributor Author

giorez commented May 1, 2024

bflb-iot-tool shouldn't be run as root for reasons explained in the same document ...

On my new Arch Linux installation, if I use a regular user, I get permission error, anyway I revised the page accroding to your request.

1451f47

@Pavlos1
Copy link
Contributor

Pavlos1 commented May 2, 2024

@giorez Run ls -l /dev/ttyACM0 on your Arch Linux system to find out which group is allowed to talk to serial ports.

@giorez
Copy link
Contributor Author

giorez commented May 2, 2024

@Pavlos1 thanks Pavel for the tip, you are my teacher! I revisioned the page on https://github.com/pine64/website/pull/93/files.

$ ls -l /dev/ttyACM0
crw-rw---- 1 root uucp 166, 0 May 2 12:48 /dev/ttyACM0
$ ls -l /dev/ttyACM1
crw-rw---- 1 root uucp 166, 1 May 2 12:48 /dev/ttyACM1

$ cat /etc/group
...
uucp:x:986:gio
...

Minicom command permission has been fixed, unfortynatelly, i keep getting permission error when I run:
$ bflb-iot-tool --chipname bl808 --interface uart --port $PORT --baudrate $BAUD --addr 0x0 --firmware bl808-combined.bin --single

Traceback (most recent call last):
  File "/home/gio/.local/share/virtualenvs/ox64-Qkt4LDkf/lib/python3.12/site-packages/bflb_iot_tool/core/bflb_iot_tool.py", line 1650, in flasher_download_thread
    self.bl60x_mfg_flasher_cfg(uart, uart_brd)
  File "/home/gio/.local/share/virtualenvs/ox64-Qkt4LDkf/lib/python3.12/site-packages/bflb_iot_tool/core/bflb_iot_tool.py", line 901, in bl60x_mfg_flasher_cfg
    cfg.write(f, 'w')
  File "/home/gio/.local/share/virtualenvs/ox64-Qkt4LDkf/lib/python3.12/site-packages/bflb_iot_tool/libs/bflb_configobj.py", line 2454, in write
    self.cfg_obj.write()
  File "/home/gio/.local/share/virtualenvs/ox64-Qkt4LDkf/lib/python3.12/site-packages/bflb_iot_tool/libs/bflb_configobj.py", line 2047, in write
    with open(self.filename, 'wb') as h:
         ^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/home/gio/.local/share/virtualenvs/ox64-Qkt4LDkf/lib/python3.12/site-packages/bflb_iot_tool/chips/bl808/eflash_loader/eflash_loader_cfg.ini'

@Pavlos1
Copy link
Contributor

Pavlos1 commented May 2, 2024

@Pavlos1 thanks Pavel for the tip, you are my teacher! I revisioned the page on https://github.com/pine64/website/pull/93/files.

$ ls -l /dev/ttyACM0 crw-rw---- 1 root uucp 166, 0 May 2 12:48 /dev/ttyACM0 $ ls -l /dev/ttyACM1 crw-rw---- 1 root uucp 166, 1 May 2 12:48 /dev/ttyACM1

$ cat /etc/group ... uucp:x:986:gio ...

Minicom command permission has been fixed, unfortynatelly, i keep getting permission error when I run: $ bflb-iot-tool --chipname bl808 --interface uart --port $PORT --baudrate $BAUD --addr 0x0 --firmware bl808-combined.bin --single

Traceback (most recent call last):
  File "/home/gio/.local/share/virtualenvs/ox64-Qkt4LDkf/lib/python3.12/site-packages/bflb_iot_tool/core/bflb_iot_tool.py", line 1650, in flasher_download_thread
    self.bl60x_mfg_flasher_cfg(uart, uart_brd)
  File "/home/gio/.local/share/virtualenvs/ox64-Qkt4LDkf/lib/python3.12/site-packages/bflb_iot_tool/core/bflb_iot_tool.py", line 901, in bl60x_mfg_flasher_cfg
    cfg.write(f, 'w')
  File "/home/gio/.local/share/virtualenvs/ox64-Qkt4LDkf/lib/python3.12/site-packages/bflb_iot_tool/libs/bflb_configobj.py", line 2454, in write
    self.cfg_obj.write()
  File "/home/gio/.local/share/virtualenvs/ox64-Qkt4LDkf/lib/python3.12/site-packages/bflb_iot_tool/libs/bflb_configobj.py", line 2047, in write
    with open(self.filename, 'wb') as h:
         ^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/home/gio/.local/share/virtualenvs/ox64-Qkt4LDkf/lib/python3.12/site-packages/bflb_iot_tool/chips/bl808/eflash_loader/eflash_loader_cfg.ini'

Yeah that's what the warning about bflb-iot-tool creating root-owned files in your home directory was about. Run sudo rm -rf /home/gio/.local/share/virtualenvs/ox64-Qkt4LDkf and try again. (This will wipe your virtual environment so you'll need to do the pipenv stuff again.)

@giorez
Copy link
Contributor Author

giorez commented May 2, 2024

Yeah that's what the warning about bflb-iot-tool creating root-owned files in your home directory was about. Run sudo rm -rf /home/gio/.local/share/virtualenvs/ox64-Qkt4LDkf and try again. (This will wipe your virtual environment so you'll need to do the pipenv stuff again.)

it worked perfectly, thanks again for your patience.

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.

3 participants