embeded/odroid2025. 8. 13. 21:08

pip 로 face-recognition 패키지를 멀티코어 빌드 하다가

버벅하더니 맛이 가버림.. 리부팅 몇번해도 안살아 나서 화면 달아서 해보니 영 시원찮아짐

 

메모리가 2GB 밖에 안되는데 4개 코어 돌려서 죽었나..

아니면 다이소 5천원 32GB axxen 중국산 sd라 망가졌나(class 10이라 sandisk보다 선호)

어느쪽이려나..

 

Bus error

real    11m49.128s
user    27m32.299s
sys     1m0.566s

Broadcast message from systemd-journald@odroidc2 (Wed 2025-08-13 20:37:57 KST):

systemd[1]: Caught <BUS> from PID -1445126080.


Broadcast message from systemd-journald@odroidc2 (Wed 2025-08-13 20:37:57 KST):

systemd[1]: Caught <BUS>, core dump failed (child 9885, code=killed, status=7/BUS).


Broadcast message from systemd-journald@odroidc2 (Wed 2025-08-13 20:37:57 KST):

systemd[1]: Freezing execution.
Posted by 구차니
embeded/odroid2025. 8. 12. 10:16

haarcascade_frontalface_default.xml 와

haarcascade_eye.xml 를 이용해서 odroid c2 에서 돌릴 경우 cpu 점유율

 

face recognition 라이브러리를 이용하여 돌릴때의 cpu 점유율

dlib를 멀티 코어로 못쓰나?

[링크 : https://pypi.org/project/face-recognition/]

Posted by 구차니
embeded/odroid2025. 8. 11. 23:21

먼가 되는것 같으면서도

원격지로 뜨는건지 mobaxterm을 통해 뜨지 않는다. 머지?

 

$ sudo apt-get install xauth

[링크 : https://forum.armbian.com/topic/26672-what-do-i-need-to-set-on-armbian-for-x11-forwarding-on-remote-osx-xserver/]

[링크 : https://serverfault.com/questions/12198/how-can-i-enable-x11-forwarding-to-a-debian-server-box]

 

+

wayland 에서 x.org로 바꾸면 해결.

어우.. 이놈의 wayland은 어떻게 해결이 안되는게 많아

2022.07.11 - [프로그램 사용/ssh scp sftp] - ubuntu ssh x11 forwarding시 gnome 화면 끌어오기

Posted by 구차니
embeded/odroid2025. 8. 11. 15:54

어우.. 빡세다

 

일단~~~은 cmake 가 필요하고

Building wheels for collected packages: dlib, face-recognition-models
  Building wheel for dlib (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for dlib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [41 lines of output]
      running bdist_wheel
      running build
      running build_ext

      ================================================================================
      ================================================================================
      ================================================================================

                         CMake is not installed on your system!

          Or it is possible some broken copy of cmake is installed on your system.
          It is unfortunately very common for python package managers to include
          broken copies of cmake.  So if the error above this refers to some file
          path to a cmake file inside a python or anaconda or miniconda path then you
          should delete that broken copy of cmake from your computer.

          Instead, please get an official copy of cmake from one of these known good
          sources of an official cmake:
              - cmake.org (this is how windows users should get cmake)
              - apt install cmake (for Ubuntu or Debian based systems)
              - yum install cmake (for Redhat or CenOS based systems)

          On a linux machine you can run `which cmake` to see what cmake you are
          actually using.  If it tells you it's some cmake from any kind of python
          packager delete it and install an official cmake.

          More generally, cmake is not installed if when you open a terminal window
          and type
             cmake --version
          you get an error.  So you can use that as a very basic test to see if you
          have cmake installed.  That is, if cmake --version doesn't run from the
          same terminal window from which you are reading this error message, then
          you have not installed cmake.  Windows users should take note that they
          need to tell the cmake installer to add cmake to their PATH.  Since you
          can't run commands that are not in your PATH.  This is how the PATH works
          on Linux as well, but failing to add cmake to the PATH is a particularly
          common problem on windows and rarely a problem on Linux.

      ================================================================================
      ================================================================================
      ================================================================================
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for dlib
  Building wheel for face-recognition-models (setup.py) ... -

 

이단~~~(?) 헤멘건 gpt 조언으로 dlib 설치시 안되는 문제는 python3-dev를 깔고 해결되었다.

잘 읽어보니 개발용 패키지에 설치되는 python 헤더가 없다고 아무 지나가듯(?) 써있네

에러는 전혀 연관없이 나오니 될리가 있나 ㅠㅠ

      CMake Error in CMakeLists.txt:
        Imported target "pybind11::module" includes non-existent path
      
          "/usr/include/python3.12"
      
        in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:
      
        * The path was deleted, renamed, or moved to another location.
      
        * An install or uninstall procedure did not complete successfully.
      
        * The installation package was faulty and references files it does not
        provide.
      
      
      
      -- Generating done (0.1s)
      CMake Generate step failed.  Build files cannot be regenerated correctly.
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/build_meta.py", line 435, in build_wheel
          return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/build_meta.py", line 423, in _build
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/build_meta.py", line 404, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 243, in <module>
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/__init__.py", line 115, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/_distutils/core.py", line 186, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/_distutils/core.py", line 202, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/dist.py", line 1102, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/command/bdist_wheel.py", line 370, in run
          self.run_command("build")
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/_distutils/cmd.py", line 357, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/dist.py", line 1102, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/_distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/_distutils/cmd.py", line 357, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/dist.py", line 1102, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-m2v2cjv_/overlay/local/lib/python3.12/dist-packages/setuptools/_distutils/dist.py", line 1021, in run_command
          cmd_obj.run()
        File "<string>", line 168, in run
        File "<string>", line 206, in build_extension
        File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-s3fay2b6/dlib_ef2badcad50f402ebee63ad6986a540e/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-s3fay2b6/dlib_ef2badcad50f402ebee63ad6986a540e/build/lib.linux-aarch64-cpython-312', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DDLIB_USE_FFMPEG=OFF', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for dlib
Failed to build dlib
ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects

 

[링크 : https://pypi.org/project/face-recognition/]

 

+

2025.08.12

어우.. 강제로 1코어 빌드하게 되어있어서 71분 걸렸네..

여전히 멀티코어 빌드 하는 옵션을 못 찾음..

$ time pip3 install --break-system-packages face-recognition 
real 71m7.101s
user 67m55.042s
sys 1m33.850s

 

 

+

2025.08.12

i.mx8mp evk 에서 돌리니 -j3가 뜬다. 머야머야?! 무슨 차이야!?

그 와중에 시간이 반으로 줄었네

  Invoking CMake build: 'cmake --build . --config Release -- -j3'


real 31m9.576s
user 83m15.457s
sys 2m41.699s

'embeded > odroid' 카테고리의 다른 글

odroid c2 opencv haar cascade / face_recognition  (0) 2025.08.12
armbian X11-forwarding 활성화 하기  (0) 2025.08.11
armbian on odroid c2  (0) 2025.08.10
ordroid c2 - mrs 명령어 고찰  (0) 2023.09.05
wayland on odroid-c2  (0) 2021.11.22
Posted by 구차니
embeded/odroid2025. 8. 10. 23:05

으아아아 terminator가 기본이다!

그런데 먼진 모르겠지만.. desktop으로 했는데 gnome-terminal이 이상하리 만치 느리게 뜬다.

xfce 계열인가?

 

 

'embeded > odroid' 카테고리의 다른 글

armbian X11-forwarding 활성화 하기  (0) 2025.08.11
python face-recognition on armbian / odroid c2  (0) 2025.08.11
ordroid c2 - mrs 명령어 고찰  (0) 2023.09.05
wayland on odroid-c2  (0) 2021.11.22
odroid c2 gpio 와 wiringpi  (0) 2021.09.29
Posted by 구차니
embeded/odroid2023. 9. 5. 11:08

라즈베리 파이 3b

$ cat /proc/cpuinfo 
processor : 0
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

 

odroid-c2

$ cat /proc/cpuinfo 
processor : 0
BogoMIPS : 2.00
Features : fp asimd crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

 

소스코드

#include <stdint.h>
#include "timer.h"

void main()
{
opal_sys_timer_freq();
}
#ifndef OPAL_SYS_ARCH_TIMER_H
#define OPAL_SYS_ARCH_TIMER_H 1

#include <sys/times.h>

typedef uint64_t opal_timer_t;

static inline opal_timer_t
opal_sys_timer_get_cycles(void)
{
    opal_timer_t ret;

    __asm__ __volatile__ ("isb" ::: "memory");
    __asm__ __volatile__ ("mrs %0,  CNTVCT_EL0" : "=r" (ret));

    return ret;
}


static inline opal_timer_t
opal_sys_timer_freq(void)
{
    opal_timer_t freq;
    __asm__ __volatile__ ("mrs %0,  CNTFRQ_EL0" : "=r" (freq));
    return (opal_timer_t)(freq);
}

#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1

#endif /* ! OPAL_SYS_ARCH_TIMER_H */

 

실행파일 디스어셈블

0000000000000724 <opal_sys_timer_freq>:
 724: d10043ff  sub sp, sp, #0x10
 728: d53be000  mrs x0, cntfrq_el0
 72c: f90007e0  str x0, [sp, #8]
 730: f94007e0  ldr x0, [sp, #8]
 734: 910043ff  add sp, sp, #0x10
 738: d65f03c0  ret

 

라즈베리 파이(좌), odroid-c2(우)

(gdb) r
Starting program: /home/pi/src/a.out 
[Inferior 1 (process 2762) exited normally]


(gdb) r
Starting program: /root/src/a.out 

Program received signal SIGILL, Illegal instruction.
0x0000005555555720 in opal_sys_timer_freq ()

 

MRS
Move the contents of the CPSR or SPSR to a general-purpose register.

Usage
Use MRS in combination with MSR as part of a read-modify-write sequence for updating a PSR, for example to change processor mode, or to clear the Q flag.

Caution
You must not attempt to access the SPSR when the processor is in User or System mode. This is your responsibility. The assembler cannot warn you about this as it does not know what processor mode code will be executed in.

Architectures
This instruction is available in ARM architecture versions 3 and above.

[링크 : https://developer.arm.com/documentation/dui0068/b/ARM-Instruction-Reference/Miscellaneous-ARM-instructions/MRS]

 

MSR
Load specified fields of the CPSR or SPSR with an immediate constant, or from the contents of a general-purpose register.

Architectures
This instruction is available in ARM architecture versions 3 and above.

[링크 : https://developer.arm.com/documentation/dui0068/b/ARM-Instruction-Reference/Miscellaneous-ARM-instructions/MSR]

 

 

[링크 :https://developer.arm.com/documentation/ddi0601/2022-03/AArch64-Registers/CNTFRQ-EL0--Counter-timer-Frequency-register]

 

 

Saved Process Status Register

[링크 : https://developer.arm.com/documentation/den0024/a/ARMv8-Registers/AArch64-special-registers/Saved-Process-Status-Register]

 

AArch64 (ARM64)에서는 ARMv7의 CPSR (Current Program Status Register)과 directly 연결되는 개념을 갖고 있지 않다. 그 대신 AArch64에서는 CPSR field의 각 값을 PSTATE로 정의하였다.

[링크 : https://gongpd.tistory.com/9]

 

EL이라는 것에 따라서 PSR 접근이 달라지는 거라면.. 명령어도 illegal이 될 수 있으려나?

[링크 : https://developer.arm.com/documentation/den0024/a/ARMv8-Registers/AArch64-special-registers]

 

EL0 = ARMv7의 User 모드
EL1 = ARMv7의 Supervisor 모드(커널 코드 실행)
EL2 = 하이퍼바이저 모드(하이퍼바이저 실행)
EL3 = Secure 모드(트러스트 존 실행)

[링크 : https://blog.naver.com/crushhh/222093330435]

 

분위기를 보아하니.. cpu ring level(privilige mode) 에 따라서 접근 가능한 레지스터가 바뀌는데

그러면서 특정 명령어가 사용불능이 되기도 하는건가 싶은데

 

라즈베리 파이 3b / 64 odroid c2
$ uname -a
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux
# uname -a
Linux odroid 3.16.85-65 #1 SMP PREEMPT Mon Jan 18 13:32:38 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

 

설마 커널 버전에 따른 atf 혹은 el 설정방법 차이나 누락으로 인해 이런 문제가 발생하는건가?

 

시간나면 odroid-c2용 armbian 으로 시도해봐야겠다. 커널 버전이 너무 차이나네..

Armbian 23.8 Bookworm
Kernel 6.1, Size: 467Mb, Release date: Aug 31, 2023

[링크 : https://www.armbian.com/odroid-c2/]

 

+

걍 armbian 하니 잘 된다. 커널 버전이나 aarch64 지원이 미흡한 구버전 커널이라 그럴수도 있을 듯 하다.

minimonk@odroidc2:~$ mpirun
--------------------------------------------------------------------------
mpirun could not find anything to do.

It is possible that you forgot to specify how many processes to run
via the "-np" argument.
--------------------------------------------------------------------------

'embeded > odroid' 카테고리의 다른 글

python face-recognition on armbian / odroid c2  (0) 2025.08.11
armbian on odroid c2  (0) 2025.08.10
wayland on odroid-c2  (0) 2021.11.22
odroid c2 gpio 와 wiringpi  (0) 2021.09.29
g_mass_storage rpi - odroid c2  (0) 2021.09.28
Posted by 구차니
embeded/odroid2021. 11. 22. 22:17

라즈베리 파이랑 비슷하네

일단 odroid-c2 / Ubuntu 20.04.3 LTS (GNU/Linux 3.16.85-65 aarch64) 버전인데

$ sudo apt-cache search wayland
libwayland-client++0 - wayland compositor infrastructure - client library C++ bindings
libwayland-client-extra++0 - wayland compositor infrastructure - client library extra C++ bindings
libwayland-cursor++0 - wayland compositor infrastructure - cursor library C++ bindings
libwayland-egl++0 - wayland compositor infrastructure - EGL library C++ bindings
libwayland-egl1-mesa - transitional dummy package
libweston-8-0 - reference implementation of a wayland compositor (shared libs)
libweston-8-dev - reference implementation of a wayland compositor (shared libs)
weston - reference implementation of a wayland compositor

 

그나저나.. 패키지가 라즈베리에 비하면 많이 적어 보이네

$ sudo apt-get install weston
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libegl1-mesa libfreerdp2-2 libpipewire-0.2-1 libweston-8-0 libwinpr2-2 libxcb-composite0
Suggested packages:
  freerdp2-x11
The following NEW packages will be installed:
  libegl1-mesa libfreerdp2-2 libpipewire-0.2-1 libweston-8-0 libwinpr2-2 libxcb-composite0 weston
0 upgraded, 7 newly installed, 0 to remove and 119 not upgraded.
Need to get 3942 kB of archives.
After this operation, 17.5 MB of additional disk space will be used.
Do you want to continue? [Y/n]

 

그래도.. 라즈베리 보단 메모리가 큰데 돌려볼만 하려나?

아니면 저사양에서도 문제없이 잘 돌아가려나?

'embeded > odroid' 카테고리의 다른 글

armbian on odroid c2  (0) 2025.08.10
ordroid c2 - mrs 명령어 고찰  (0) 2023.09.05
odroid c2 gpio 와 wiringpi  (0) 2021.09.29
g_mass_storage rpi - odroid c2  (0) 2021.09.28
g_mass_storage ins/rm 실패  (0) 2021.09.28
Posted by 구차니
embeded/odroid2021. 9. 29. 17:50

ADC 제외하고는 3.3V

라즈베리와 동일한 전압레벨이니 ok

[링크 : https://wiki.odroid.com/odroid-c2/hardware/expansion_connectors]

 

이런저런 경고가 뜨지만 무시하고 설치!

$ sudo apt install software-properties-common
$ sudo add-apt-repository ppa:hardkernel/ppa
$ sudo apt update
$ sudo apt install odroid-wiringpi
$ gpio readall
 +-----+-----+---------+------+---+--- C2 ---+---+------+---------+-----+-----+
 | I/O | wPi |   Name  | Mode | V | Physical | V | Mode |  Name   | wPi | I/O |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3V |      |   |  1 || 2  |   |      | 5V      |     |     |
 | 205 |   8 |   SDA.1 |   IN | 1 |  3 || 4  |   |      | 5V      |     |     |
 | 206 |   9 |   SCL.1 |   IN | 1 |  5 || 6  |   |      | 0V      |     |     |
 | 249 |   7 |  IO.249 |   IN | 1 |  7 || 8  |   |      | TxD1    | 15  |     |
 |     |     |      0V |      |   |  9 || 10 |   |      | RxD1    | 16  |     |
 | 247 |   0 |  IO.247 |   IN | 1 | 11 || 12 | 1 | IN   | IO.238  | 1   | 238 |
 | 239 |   2 |  IO.239 |   IN | 1 | 13 || 14 |   |      | 0V      |     |     |
 | 237 |   3 |  IO.237 |   IN | 1 | 15 || 16 | 1 | IN   | IO.236  | 4   | 236 |
 |     |     |    3.3V |      |   | 17 || 18 | 1 | IN   | IO.233  | 5   | 233 |
 | 235 |  12 |  IO.235 |   IN | 1 | 19 || 20 |   |      | 0V      |     |     |
 | 232 |  13 |  IO.232 |   IN | 1 | 21 || 22 | 1 | IN   | IO.231  | 6   | 231 |
 | 230 |  14 |  IO.230 |   IN | 1 | 23 || 24 | 1 | IN   | IO.229  | 10  | 229 |
 |     |     |      0V |      |   | 25 || 26 | 1 | OUT  | IO.225  | 11  | 225 |
 |     |  30 |   SDA.2 |      |   | 27 || 28 |   |      | SCL.2   | 31  |     |
 | 228 |  21 |  IO.228 |   IN | 1 | 29 || 30 |   |      | 0V      |     |     |
 | 219 |  22 |  IO.219 |   IN | 1 | 31 || 32 | 1 | IN   | IO.224  | 26  | 224 |
 | 234 |  23 |  IO.234 |   IN | 0 | 33 || 34 |   |      | 0V      |     |     |
 | 214 |  24 |  IO.214 |   IN | 1 | 35 || 36 | 1 | IN   | IO.218  | 27  | 218 |
 |     |  25 |   AIN.1 |      |   | 37 || 38 |   |      | 1V8     | 28  |     |
 |     |     |      0V |      |   | 39 || 40 |   |      | AIN.0   | 29  |     |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 | I/O | wPi |   Name  | Mode | V | Physical | V | Mode |  Name   | wPi | I/O |
 +-----+-----+---------+------+---+--- C2 ---+---+------+---------+-----+-----+

Err:3 http://deb.odroid.in/c2 bionic InRelease
  The following signatures were invalid: EXPKEYSIG 5360FB9DAB19BAC9 Mauro Ribeiro (mdrjr) <mauro.ribeiro@hardkernel.com>

Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://deb.odroid.in/c2 bionic InRelease: The following signatures were invalid: EXPKEYSIG 5360FB9DAB19BAC9 Mauro Ribeiro (mdrjr) <mauro.ribeiro@hardkernel.com>
W: Failed to fetch http://deb.odroid.in/c2/dists/bionic/InRelease  The following signatures were invalid: EXPKEYSIG 5360FB9DAB19BAC9 Mauro Ribeiro (mdrjr) <mauro.ribeiro@hardkernel.com>
W: Some index files failed to download. They have been ignored, or old ones used instead.

[링크 : https://wiki.odroid.com/odroid-c2/application_note/gpio/wiringpi]

'embeded > odroid' 카테고리의 다른 글

ordroid c2 - mrs 명령어 고찰  (0) 2023.09.05
wayland on odroid-c2  (0) 2021.11.22
g_mass_storage rpi - odroid c2  (0) 2021.09.28
g_mass_storage ins/rm 실패  (0) 2021.09.28
odroid c2 ubuntu 18.04, 20.04 kernel 버전 정보  (0) 2021.09.27
Posted by 구차니
embeded/odroid2021. 9. 28. 23:37

dd 해서 파일기반 파일시스템을 만들고 mkfs를 하지 않으면 g_mass_storage에 연결은 되어있지만

USB HOST 측에서 마운트를 할 수 없다(파일 시스템을 알 수 없어 마운트 불가)

// odroid c2 에서 작업
# dd if=/dev/zero of=otg.drive bs=1M count=128
# mkfs -t ext4 otg.drive
# modprobe g_mass_storage filename=otg.drive

 

USB HOST 측에서는 단순하게 마운트 해서 쓰면 되는데

// rpi 2b 에서 작업
$ sudo mount /dev/sda /mnt
$ sudo touch /mnt/tt
$ sudo umount /mnt

 

odroid의 mmcblk0p1을 연결했을 때는 sync 하면 쓰이는게 보였던 것 같은데

파일 기반 파일시스템이라 그런가 rpi 2b에서 파일을 생성하고 sync 해도 변화가 없고, umount를 해도 변화가 없었다.

odroid c2 에서 해당 파일을 umount 하고 mount 해야 변경점이 보이는데

물리 장칙 아니라 그런진 모르겠다.

 

[링크 : https://linuxconfig.org/how-to-create-a-file-based-filesystem-using-dd-command-on-linux]

[링크 : https://www.kernel.org/doc/Documentation/usb/mass-storage.txt]

'embeded > odroid' 카테고리의 다른 글

wayland on odroid-c2  (0) 2021.11.22
odroid c2 gpio 와 wiringpi  (0) 2021.09.29
g_mass_storage ins/rm 실패  (0) 2021.09.28
odroid c2 ubuntu 18.04, 20.04 kernel 버전 정보  (0) 2021.09.27
odroid c2 usb otg, libcomposite usb hid  (0) 2021.09.26
Posted by 구차니
embeded/odroid2021. 9. 28. 22:32

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=216810]

 

[링크 : https://linuxlink.timesys.com/docs/wiki/engineering/HOWTO_Use_USB_Gadget_File_Storage]

[링크 : https://www.kernel.org/doc/Documentation/usb/mass-storage.txt]

[링크 : https://linux-sunxi.org/USB_Gadget/Mass_storage]

 

 

# modprobe g_mass_storage file=/dev/mmcblk0p1 removable=y
# dmesg
[   41.197852] Mass Storage Function, version: 2009/09/11
[   41.197867] LUN: removable file: (no medium)
[   41.197950] LUN: removable file: /dev/mmcblk0p1
[   41.197956] Number of LUNs=1
[   41.197965] Number of LUNs=1
[   41.198085] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[   41.198092] g_mass_storage gadget: userspace failed to provide iSerialNumber
[   41.198097] g_mass_storage gadget: g_mass_storage ready
[   41.504544] USB RESET
[   41.583840] usb 1-1.3: new high-speed USB device number 3 using dwc_otg
[   41.587991] USB RESET
[   41.685839] g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage
[   41.686316] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[   41.686873] usb-storage 1-1.3:1.0: Quirks match for vid 0525 pid a4a5: 10000
[   41.686927] scsi0 : usb-storage 1-1.3:1.0
[   42.684797] scsi 0:0:0:0: Direct-Access     Linux    File-Stor Gadget 0316 PQ: 0 ANSI: 2
[   42.688020] sd 0:0:0:0: [sda] 262144 512-byte logical blocks: (134 MB/128 MiB)
[   42.688133] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process
[   42.696834] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   42.794589] sd 0:0:0:0: [sda] Write Protect is off
[   42.794603] sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00
[   42.794783] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process
[   42.904614] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   42.906940] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process
[   43.014729] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process
[   43.125146]  sda:
[   43.127871] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process
[   43.235032] WARN::dwc_otg_pcd_ep_halt:2432: 1 IN XFer In process
[   43.344734] sd 0:0:0:0: [sda] Attached SCSI removable disk
# lsmod
Module                  Size  Used by
sg                     31094  0
g_mass_storage          2587  0
usb_f_mass_storage     35010  2 g_mass_storage
libcomposite           46311  2 usb_f_mass_storage,g_mass_storage
ir_lirc_codec           4934  3
lirc_dev               10879  1 ir_lirc_codec
ir_mce_kbd_decoder      3426  0
ir_rc6_decoder          2010  0
ir_sanyo_decoder        1657  0
ir_sony_decoder         1663  0
ir_jvc_decoder          1725  0
ir_rc5_decoder          1586  0
ir_nec_decoder          1789  0
meson_ir                3356  0
w1_gpio                 3801  0
wire                   28614  1 w1_gpio
gxbb_wdt                3395  0
meson_gpiomem           4040  0
sch_fq_codel            7827  2
ip_tables              17220  0
ipv6                  387317  18
autofs4                27592  2
# rmmod g_mass_storage
root@odroid:~# lsmod
Module                  Size  Used by
sg                     31094  0
usb_f_mass_storage     35010  0
libcomposite           46311  1 usb_f_mass_storage
ir_lirc_codec           4934  3
lirc_dev               10879  1 ir_lirc_codec
ir_mce_kbd_decoder      3426  0
ir_rc6_decoder          2010  0
ir_sanyo_decoder        1657  0
ir_sony_decoder         1663  0
ir_jvc_decoder          1725  0
ir_rc5_decoder          1586  0
ir_nec_decoder          1789  0
meson_ir                3356  0
w1_gpio                 3801  0
wire                   28614  1 w1_gpio
gxbb_wdt                3395  0
meson_gpiomem           4040  0
sch_fq_codel            7827  2
ip_tables              17220  0
ipv6                  387317  18
autofs4                27592  2
# modprobe g_mass_storage file=/dev/mmcblk0p1 removable=y
modprobe: ERROR: could not insert 'g_mass_storage': Device or resource busy

[링크 : https://developer.ridgerun.com/wiki/index.php?title=How_to_use_mass_storage_gadget]

Posted by 구차니