embeded/esp322021. 11. 27. 14:30

눈으로 보면 미친듯이 밝은데 생각외로 밝진 않은 느낌 -_ㅠ

가장 아래 Flash 버튼을 추가했음

 

Flash on!

 

새로 스케치 만들어서 붙여넣고

스케치 - 라이브러리 포함하기 - ESP32 하고

툴 - 라이브러리 관리 - esp32servo 설치하면 된다.

#include <dummy.h>

/*********
  Rui Santos
  Complete instructions at https://RandomNerdTutorials.com/esp32-cam-projects-ebook/
  
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files.
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*********/
#define LED_BUILTIN 4

#include "esp_camera.h"
#include <WiFi.h>
#include "esp_timer.h"
#include "img_converters.h"
#include "Arduino.h"
#include "fb_gfx.h"
#include "soc/soc.h"             // disable brownout problems
#include "soc/rtc_cntl_reg.h"    // disable brownout problems
#include "esp_http_server.h"
#include <ESP32Servo.h>

// Replace with your network credentials
const char* ssid = "wifi_ssid";
const char* password = "wifi_passwd";

#define PART_BOUNDARY "123456789000000000000987654321"

#define CAMERA_MODEL_AI_THINKER
//#define CAMERA_MODEL_M5STACK_PSRAM
//#define CAMERA_MODEL_M5STACK_WITHOUT_PSRAM
//#define CAMERA_MODEL_M5STACK_PSRAM_B
//#define CAMERA_MODEL_WROVER_KIT

#if defined(CAMERA_MODEL_WROVER_KIT)
  #define PWDN_GPIO_NUM    -1
  #define RESET_GPIO_NUM   -1
  #define XCLK_GPIO_NUM    21
  #define SIOD_GPIO_NUM    26
  #define SIOC_GPIO_NUM    27
  
  #define Y9_GPIO_NUM      35
  #define Y8_GPIO_NUM      34
  #define Y7_GPIO_NUM      39
  #define Y6_GPIO_NUM      36
  #define Y5_GPIO_NUM      19
  #define Y4_GPIO_NUM      18
  #define Y3_GPIO_NUM       5
  #define Y2_GPIO_NUM       4
  #define VSYNC_GPIO_NUM   25
  #define HREF_GPIO_NUM    23
  #define PCLK_GPIO_NUM    22

#elif defined(CAMERA_MODEL_M5STACK_PSRAM)
  #define PWDN_GPIO_NUM     -1
  #define RESET_GPIO_NUM    15
  #define XCLK_GPIO_NUM     27
  #define SIOD_GPIO_NUM     25
  #define SIOC_GPIO_NUM     23
  
  #define Y9_GPIO_NUM       19
  #define Y8_GPIO_NUM       36
  #define Y7_GPIO_NUM       18
  #define Y6_GPIO_NUM       39
  #define Y5_GPIO_NUM        5
  #define Y4_GPIO_NUM       34
  #define Y3_GPIO_NUM       35
  #define Y2_GPIO_NUM       32
  #define VSYNC_GPIO_NUM    22
  #define HREF_GPIO_NUM     26
  #define PCLK_GPIO_NUM     21

#elif defined(CAMERA_MODEL_M5STACK_WITHOUT_PSRAM)
  #define PWDN_GPIO_NUM     -1
  #define RESET_GPIO_NUM    15
  #define XCLK_GPIO_NUM     27
  #define SIOD_GPIO_NUM     25
  #define SIOC_GPIO_NUM     23
  
  #define Y9_GPIO_NUM       19
  #define Y8_GPIO_NUM       36
  #define Y7_GPIO_NUM       18
  #define Y6_GPIO_NUM       39
  #define Y5_GPIO_NUM        5
  #define Y4_GPIO_NUM       34
  #define Y3_GPIO_NUM       35
  #define Y2_GPIO_NUM       17
  #define VSYNC_GPIO_NUM    22
  #define HREF_GPIO_NUM     26
  #define PCLK_GPIO_NUM     21

#elif defined(CAMERA_MODEL_AI_THINKER)
  #define PWDN_GPIO_NUM     32
  #define RESET_GPIO_NUM    -1
  #define XCLK_GPIO_NUM      0
  #define SIOD_GPIO_NUM     26
  #define SIOC_GPIO_NUM     27
  
  #define Y9_GPIO_NUM       35
  #define Y8_GPIO_NUM       34
  #define Y7_GPIO_NUM       39
  #define Y6_GPIO_NUM       36
  #define Y5_GPIO_NUM       21
  #define Y4_GPIO_NUM       19
  #define Y3_GPIO_NUM       18
  #define Y2_GPIO_NUM        5
  #define VSYNC_GPIO_NUM    25
  #define HREF_GPIO_NUM     23
  #define PCLK_GPIO_NUM     22

#elif defined(CAMERA_MODEL_M5STACK_PSRAM_B)
  #define PWDN_GPIO_NUM     -1
  #define RESET_GPIO_NUM    15
  #define XCLK_GPIO_NUM     27
  #define SIOD_GPIO_NUM     22
  #define SIOC_GPIO_NUM     23
  
  #define Y9_GPIO_NUM       19
  #define Y8_GPIO_NUM       36
  #define Y7_GPIO_NUM       18
  #define Y6_GPIO_NUM       39
  #define Y5_GPIO_NUM        5
  #define Y4_GPIO_NUM       34
  #define Y3_GPIO_NUM       35
  #define Y2_GPIO_NUM       32
  #define VSYNC_GPIO_NUM    25
  #define HREF_GPIO_NUM     26
  #define PCLK_GPIO_NUM     21

#else
  #error "Camera model not selected"
#endif

#define SERVO_1      14
#define SERVO_2      15

#define SERVO_STEP   5

Servo servoN1;
Servo servoN2;
Servo servo1;
Servo servo2;

int servo1Pos = 0;
int servo2Pos = 0;
int flash = 0;

static const char* _STREAM_CONTENT_TYPE = "multipart/x-mixed-replace;boundary=" PART_BOUNDARY;
static const char* _STREAM_BOUNDARY = "\r\n--" PART_BOUNDARY "\r\n";
static const char* _STREAM_PART = "Content-Type: image/jpeg\r\nContent-Length: %u\r\n\r\n";

httpd_handle_t camera_httpd = NULL;
httpd_handle_t stream_httpd = NULL;

static const char PROGMEM INDEX_HTML[] = R"rawliteral(
<html>
  <head>
    <title>ESP32-CAM Robot</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
      body { font-family: Arial; text-align: center; margin:0px auto; padding-top: 30px;}
      table { margin-left: auto; margin-right: auto; }
      td { padding: 8 px; }
      .button {
        background-color: #2f4468;
        border: none;
        color: white;
        padding: 10px 20px;
        text-align: center;
        text-decoration: none;
        display: inline-block;
        font-size: 18px;
        margin: 6px 3px;
        cursor: pointer;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: rgba(0,0,0,0);
      }
      img {  width: auto ;
        max-width: 100% ;
        height: auto ; 
      }
    </style>
  </head>
  <body>
    <h1>ESP32-CAM Pan and Tilt</h1>
    <img src="" id="photo" >
    <table>
      <tr><td colspan="3" align="center"><button class="button" onmousedown="toggleCheckbox('up');" ontouchstart="toggleCheckbox('up');">Up</button></td></tr>
      <tr><td align="center"><button class="button" onmousedown="toggleCheckbox('left');" ontouchstart="toggleCheckbox('left');">Left</button></td><td align="center"></td><td align="center"><button class="button" onmousedown="toggleCheckbox('right');" ontouchstart="toggleCheckbox('right');">Right</button></td></tr>
      <tr><td colspan="3" align="center"><button class="button" onmousedown="toggleCheckbox('down');" ontouchstart="toggleCheckbox('down');">Down</button></td></tr>                   
      <tr><td colspan="3" align="center"><button class="button" onmousedown="toggleCheckbox('flash');" ontouchstart="toggleCheckbox('flash');">Flash</button></td></tr>
    </table>
   <script>
   function toggleCheckbox(x) {
     var xhr = new XMLHttpRequest();
     xhr.open("GET", "/action?go=" + x, true);
     xhr.send();
   }
   window.onload = document.getElementById("photo").src = window.location.href.slice(0, -1) + ":81/stream";
  </script>
  </body>
</html>
)rawliteral";

static esp_err_t index_handler(httpd_req_t *req){
  httpd_resp_set_type(req, "text/html");
  return httpd_resp_send(req, (const char *)INDEX_HTML, strlen(INDEX_HTML));
}

static esp_err_t stream_handler(httpd_req_t *req){
  camera_fb_t * fb = NULL;
  esp_err_t res = ESP_OK;
  size_t _jpg_buf_len = 0;
  uint8_t * _jpg_buf = NULL;
  char * part_buf[64];

  res = httpd_resp_set_type(req, _STREAM_CONTENT_TYPE);
  if(res != ESP_OK){
    return res;
  }

  while(true){
    fb = esp_camera_fb_get();
    if (!fb) {
      Serial.println("Camera capture failed");
      res = ESP_FAIL;
    } else {
      if(fb->width > 400){
        if(fb->format != PIXFORMAT_JPEG){
          bool jpeg_converted = frame2jpg(fb, 80, &_jpg_buf, &_jpg_buf_len);
          esp_camera_fb_return(fb);
          fb = NULL;
          if(!jpeg_converted){
            Serial.println("JPEG compression failed");
            res = ESP_FAIL;
          }
        } else {
          _jpg_buf_len = fb->len;
          _jpg_buf = fb->buf;
        }
      }
    }
    if(res == ESP_OK){
      size_t hlen = snprintf((char *)part_buf, 64, _STREAM_PART, _jpg_buf_len);
      res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen);
    }
    if(res == ESP_OK){
      res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len);
    }
    if(res == ESP_OK){
      res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY));
    }
    if(fb){
      esp_camera_fb_return(fb);
      fb = NULL;
      _jpg_buf = NULL;
    } else if(_jpg_buf){
      free(_jpg_buf);
      _jpg_buf = NULL;
    }
    if(res != ESP_OK){
      break;
    }
    //Serial.printf("MJPG: %uB\n",(uint32_t)(_jpg_buf_len));
  }
  return res;
}

static esp_err_t cmd_handler(httpd_req_t *req){
  char*  buf;
  size_t buf_len;
  char variable[32] = {0,};
  
  buf_len = httpd_req_get_url_query_len(req) + 1;
  if (buf_len > 1) {
    buf = (char*)malloc(buf_len);
    if(!buf){
      httpd_resp_send_500(req);
      return ESP_FAIL;
    }
    if (httpd_req_get_url_query_str(req, buf, buf_len) == ESP_OK) {
      if (httpd_query_key_value(buf, "go", variable, sizeof(variable)) == ESP_OK) {
      } else {
        free(buf);
        httpd_resp_send_404(req);
        return ESP_FAIL;
      }
    } else {
      free(buf);
      httpd_resp_send_404(req);
      return ESP_FAIL;
    }
    free(buf);
  } else {
    httpd_resp_send_404(req);
    return ESP_FAIL;
  }

  sensor_t * s = esp_camera_sensor_get();
  //flip the camera vertically
  //s->set_vflip(s, 1);          // 0 = disable , 1 = enable
  // mirror effect
  //s->set_hmirror(s, 1);          // 0 = disable , 1 = enable

  int res = 0;
  
  if(!strcmp(variable, "up")) {
    if(servo1Pos <= 170) {
      servo1Pos += 10;
      servo1.write(servo1Pos);
    }
    Serial.println(servo1Pos);
    Serial.println("Up");
  }
  else if(!strcmp(variable, "left")) {
    if(servo2Pos <= 170) {
      servo2Pos += 10;
      servo2.write(servo2Pos);
    }
    Serial.println(servo2Pos);
    Serial.println("Left");
  }
  else if(!strcmp(variable, "right")) {
    if(servo2Pos >= 10) {
      servo2Pos -= 10;
      servo2.write(servo2Pos);
    }
    Serial.println(servo2Pos);
    Serial.println("Right");
  }
  else if(!strcmp(variable, "down")) {
    if(servo1Pos >= 10) {
      servo1Pos -= 10;
      servo1.write(servo1Pos);
    }
    Serial.println(servo1Pos);
    Serial.println("Down");
  }
  else if(!strcmp(variable, "flash")) {
    flash = !flash;
    digitalWrite(LED_BUILTIN, flash);
    Serial.println("flash");
  }
  else {
    res = -1;
  }

  if(res){
    return httpd_resp_send_500(req);
  }

  httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
  return httpd_resp_send(req, NULL, 0);
}

void startCameraServer(){
  httpd_config_t config = HTTPD_DEFAULT_CONFIG();
  config.server_port = 80;
  httpd_uri_t index_uri = {
    .uri       = "/",
    .method    = HTTP_GET,
    .handler   = index_handler,
    .user_ctx  = NULL
  };

  httpd_uri_t cmd_uri = {
    .uri       = "/action",
    .method    = HTTP_GET,
    .handler   = cmd_handler,
    .user_ctx  = NULL
  };
  httpd_uri_t stream_uri = {
    .uri       = "/stream",
    .method    = HTTP_GET,
    .handler   = stream_handler,
    .user_ctx  = NULL
  };
  if (httpd_start(&camera_httpd, &config) == ESP_OK) {
    httpd_register_uri_handler(camera_httpd, &index_uri);
    httpd_register_uri_handler(camera_httpd, &cmd_uri);
  }
  config.server_port += 1;
  config.ctrl_port += 1;
  if (httpd_start(&stream_httpd, &config) == ESP_OK) {
    httpd_register_uri_handler(stream_httpd, &stream_uri);
  }
}

void setup() {
  WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector
  servo1.setPeriodHertz(50);    // standard 50 hz servo
  servo2.setPeriodHertz(50);    // standard 50 hz servo
  servoN1.attach(2, 1000, 2000);
  servoN2.attach(13, 1000, 2000);
  
  servo1.attach(SERVO_1, 1000, 2000);
  servo2.attach(SERVO_2, 1000, 2000);
  
  servo1.write(servo1Pos);
  servo2.write(servo2Pos);

  pinMode (LED_BUILTIN, OUTPUT);
  digitalWrite(LED_BUILTIN, flash);

  Serial.begin(115200);
  Serial.setDebugOutput(false);
  
  camera_config_t config;
  config.ledc_channel = LEDC_CHANNEL_0;
  config.ledc_timer = LEDC_TIMER_0;
  config.pin_d0 = Y2_GPIO_NUM;
  config.pin_d1 = Y3_GPIO_NUM;
  config.pin_d2 = Y4_GPIO_NUM;
  config.pin_d3 = Y5_GPIO_NUM;
  config.pin_d4 = Y6_GPIO_NUM;
  config.pin_d5 = Y7_GPIO_NUM;
  config.pin_d6 = Y8_GPIO_NUM;
  config.pin_d7 = Y9_GPIO_NUM;
  config.pin_xclk = XCLK_GPIO_NUM;
  config.pin_pclk = PCLK_GPIO_NUM;
  config.pin_vsync = VSYNC_GPIO_NUM;
  config.pin_href = HREF_GPIO_NUM;
  config.pin_sscb_sda = SIOD_GPIO_NUM;
  config.pin_sscb_scl = SIOC_GPIO_NUM;
  config.pin_pwdn = PWDN_GPIO_NUM;
  config.pin_reset = RESET_GPIO_NUM;
  config.xclk_freq_hz = 20000000;
  config.pixel_format = PIXFORMAT_JPEG; 
  
  if(psramFound()){
    config.frame_size = FRAMESIZE_VGA;
    config.jpeg_quality = 10;
    config.fb_count = 2;
  } else {
    config.frame_size = FRAMESIZE_SVGA;
    config.jpeg_quality = 12;
    config.fb_count = 1;
  }
  
  // Camera init
  esp_err_t err = esp_camera_init(&config);
  if (err != ESP_OK) {
    Serial.printf("Camera init failed with error 0x%x", err);
    return;
  }
  // Wi-Fi connection
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");
  
  Serial.print("Camera Stream Ready! Go to: http://");
  Serial.println(WiFi.localIP());
  
  // Start streaming web server
  startCameraServer();
}

void loop() {
  
}

[링크 : https://randomnerdtutorials.com/esp32-cam-pan-and-tilt-2-axis/]

[링크 : https://raw.githubusercontent.com/RuiSantosdotme/ESP32-CAM-eBook/master/Code/Module_4/Pan_and_Tilt_Video_Streaming/Pan_and_Tilt_Video_Streaming.ino]

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

esp32cam ptz 카메라 완료  (0) 2021.12.30
esp32 servo와 flash  (0) 2021.11.28
stm32 vs esp32  (0) 2021.11.27
eps32-cam 내장 LED  (0) 2021.11.24
포고플(PGP) 리버싱 자료  (0) 2021.08.19
Posted by 구차니
embeded/esp322021. 11. 27. 11:45

stm32f407 168mhz (cortex-m4)

stm32f103 72mhz (cortex-m3)

esp32 240mhz

 

아키텍쳐가 달라서 완벽한 비교도 아니니 참고 수준이지만

cortex m3 보단 낫고

cortex m4 와는 비근하지만 약간 쳐지는 수준안가?

 

[링크 : https://forum.arduino.cc/t/esp32-beats-stm32f407-and-is-48-times-faster-than-the-mega-2560/590788]

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

esp32 servo와 flash  (0) 2021.11.28
esp32 flash on/off 버전  (0) 2021.11.27
eps32-cam 내장 LED  (0) 2021.11.24
포고플(PGP) 리버싱 자료  (0) 2021.08.19
esp32cam pwm  (0) 2021.08.08
Posted by 구차니
embeded/esp322021. 11. 24. 11:52

4번 핀이라는데 한번 테스트는 해봐야겠네

#define LED_BUILTIN 4
pinMode (LED_BUILTIN, OUTPUT);

digitalWrite(LED_BUILTIN, HIGH);
digitalWrite(LED_BUILTIN, LOW);

[링크 : https://arduinodiy.wordpress.com/.../turning-led-off-and-on-on-the-esp32-camera-module-using-bluetooth/]

 

회도로 상으로는 LED / 9번 핀, GPIO33이라는데?

 

좀더 보다보니 LED가 아니라 LED_FLASH1 발견 -_-

HS2_DATA1은 GPIO4 / 26번 핀에 연결되어 있고 그게 바로 4번의 정체..

[링크 : https://github.com/SeeedDocument/forum_doc/blob/master/reg/ESP32_CAM_V1.6.pdf]

  [링크 : https://randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/]

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

esp32 flash on/off 버전  (0) 2021.11.27
stm32 vs esp32  (0) 2021.11.27
포고플(PGP) 리버싱 자료  (0) 2021.08.19
esp32cam pwm  (0) 2021.08.08
회사에 남는 부품으로 쓱쓱  (0) 2021.07.14
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/raspberry pi2021. 11. 22. 22:10

라즈베리 파이 2B 이긴한데 buster 버전.

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

$ cat /etc/rpi-issue
Raspberry Pi reference 2020-08-20
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 9a3a10bf1019ebb2d59053564dc6b90068bad27d, stage2l

 

혹시나 해서 검색해보는데 흐음...

$ sudo apt-cache search wayland
libwayland-bin - wayland compositor infrastructure - binary utilities
libwayland-client0 - wayland compositor infrastructure - client library
libwayland-cursor0 - wayland compositor infrastructure - cursor library
libwayland-dev - wayland compositor infrastructure - development files
libwayland-doc - wayland compositor infrastructure - documentation files
libwayland-egl-backend-dev - wayland compositor infrastructure - EGL backend development files
libwayland-egl1 - wayland compositor infrastructure - EGL library
libwayland-egl1-mesa - transitional dummy package
libwayland-server0 - wayland compositor infrastructure - server library
libweston-5-0 - reference implementation of a wayland compositor (shared libs)
libweston-5-dev - reference implementation of a wayland compositor (shared libs)
wayland-protocols - wayland compositor protocols
weston - reference implementation of a wayland compositor

 

weston에 줄줄이 비엔나로 깔리는데 한번 시도는 해볼까나?

$ sudo apt-get install weston
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libdrm-amdgpu1 libdrm-common libdrm-nouveau2 libdrm-radeon1 libdrm2 libegl-mesa0 libegl1 libegl1-mesa libevdev2 libgbm1 libgl1-mesa-dri libglapi-mesa libgles2 libglvnd0 libgudev-1.0-0
  libinput-bin libinput10 libllvm9 libmtdev1 libsensors-config libsensors5 libwacom-bin libwacom-common libwacom2 libwayland-server0 libweston-5-0 libx11-xcb1 libxcb-composite0 libxcb-dri2-0
  libxcb-dri3-0 libxcb-present0 libxcb-shape0 libxcb-sync1 libxcb-xfixes0 libxcb-xkb1 libxshmfence1
Suggested packages:
  lm-sensors
The following NEW packages will be installed:
  libdrm-amdgpu1 libdrm-common libdrm-nouveau2 libdrm-radeon1 libdrm2 libegl-mesa0 libegl1 libegl1-mesa libevdev2 libgbm1 libgl1-mesa-dri libglapi-mesa libgles2 libglvnd0 libgudev-1.0-0
  libinput-bin libinput10 libllvm9 libmtdev1 libsensors-config libsensors5 libwacom-bin libwacom-common libwacom2 libwayland-server0 libweston-5-0 libx11-xcb1 libxcb-composite0 libxcb-dri2-0
  libxcb-dri3-0 libxcb-present0 libxcb-shape0 libxcb-sync1 libxcb-xfixes0 libxcb-xkb1 libxshmfence1 weston
0 upgraded, 37 newly installed, 0 to remove and 0 not upgraded.
Need to get 21.6 MB of archives.
After this operation, 554 MB of additional disk space will be used.
Do you want to continue? [Y/n]

'embeded > raspberry pi' 카테고리의 다른 글

rpitx on rpi4  (0) 2021.12.22
rpitx  (0) 2021.12.16
rpi 3b 2초 부팅 fs  (0) 2021.11.20
img 파일 마운트 하기  (0) 2021.11.20
rpi 3b 2초 부팅 이미지 테스트  (0) 2021.11.17
Posted by 구차니
embeded/raspberry pi2021. 11. 20. 23:21

와.. /dev 아래 없는 것 보소..

 

/mnt $ sudo tree
.
├── bin
│   ├── arch -> busybox
│   ├── ash -> busybox
│   ├── base64 -> busybox
│   ├── busybox
│   ├── cat -> busybox
│   ├── chattr -> busybox
│   ├── chgrp -> busybox
│   ├── chmod -> busybox
│   ├── chown -> busybox
│   ├── cp -> busybox
│   ├── cpio -> busybox
│   ├── date -> busybox
│   ├── dd -> busybox
│   ├── df -> busybox
│   ├── dmesg -> busybox
│   ├── dnsdomainname -> busybox
│   ├── dumpkmap -> busybox
│   ├── echo -> busybox
│   ├── egrep -> busybox
│   ├── false -> busybox
│   ├── fdflush -> busybox
│   ├── fgrep -> busybox
│   ├── getopt -> busybox
│   ├── grep -> busybox
│   ├── gunzip -> busybox
│   ├── gzip -> busybox
│   ├── hostname -> busybox
│   ├── kill -> busybox
│   ├── link -> busybox
│   ├── linux32 -> busybox
│   ├── linux64 -> busybox
│   ├── ln -> busybox
│   ├── login -> busybox
│   ├── ls -> busybox
│   ├── lsattr -> busybox
│   ├── mkdir -> busybox
│   ├── mknod -> busybox
│   ├── mktemp -> busybox
│   ├── more -> busybox
│   ├── mount -> busybox
│   ├── mountpoint -> busybox
│   ├── mt -> busybox
│   ├── mv -> busybox
│   ├── netstat -> busybox
│   ├── nice -> busybox
│   ├── nuke -> busybox
│   ├── pidof -> busybox
│   ├── ping -> busybox
│   ├── pipe_progress -> busybox
│   ├── printenv -> busybox
│   ├── ps -> busybox
│   ├── pwd -> busybox
│   ├── resume -> busybox
│   ├── rm -> busybox
│   ├── rmdir -> busybox
│   ├── run-parts -> busybox
│   ├── sed -> busybox
│   ├── setarch -> busybox
│   ├── setpriv -> busybox
│   ├── setserial -> busybox
│   ├── sh -> busybox
│   ├── sleep -> busybox
│   ├── stty -> busybox
│   ├── su -> busybox
│   ├── sync -> busybox
│   ├── tar -> busybox
│   ├── touch -> busybox
│   ├── true -> busybox
│   ├── umount -> busybox
│   ├── uname -> busybox
│   ├── usleep -> busybox
│   ├── vi -> busybox
│   ├── watch -> busybox
│   └── zcat -> busybox
├── dev
│   ├── fd -> ../proc/self/fd
│   ├── log -> ../tmp/log
│   ├── pts
│   ├── shm
│   ├── stderr -> ../proc/self/fd/2
│   ├── stdin -> ../proc/self/fd/0
│   └── stdout -> ../proc/self/fd/1
├── etc
│   ├── fstab
│   ├── group
│   ├── hostname
│   ├── hosts
│   ├── init.d
│   │   ├── rcK
│   │   ├── rcS
│   │   ├── S01syslogd
│   │   ├── S02klogd
│   │   ├── S20urandom
│   │   └── S21ftDev
│   ├── inittab
│   ├── issue
│   ├── mtab -> ../proc/self/mounts
│   ├── network
│   │   ├── if-down.d
│   │   ├── if-post-down.d
│   │   ├── if-pre-up.d
│   │   └── if-up.d
│   ├── nsswitch.conf
│   ├── os-release -> ../usr/lib/os-release
│   ├── passwd
│   ├── profile
│   ├── profile.d
│   │   └── umask.sh
│   ├── protocols
│   ├── random-seed
│   ├── resolv.conf -> ../tmp/resolv.conf
│   ├── services
│   ├── shadow
│   └── shells
├── lib
│   ├── ld-2.28.so
│   ├── ld-linux-armhf.so.3 -> ld-2.28.so
│   ├── libanl-2.28.so
│   ├── libanl.so.1 -> libanl-2.28.so
│   ├── libatomic.so -> libatomic.so.1.2.0
│   ├── libatomic.so.1 -> libatomic.so.1.2.0
│   ├── libatomic.so.1.2.0
│   ├── libc-2.28.so
│   ├── libcrypt-2.28.so
│   ├── libcrypt.so.1 -> libcrypt-2.28.so
│   ├── libc.so.6 -> libc-2.28.so
│   ├── libdl-2.28.so
│   ├── libdl.so.2 -> libdl-2.28.so
│   ├── libgcc_s.so
│   ├── libgcc_s.so.1
│   ├── libm-2.28.so
│   ├── libm.so.6 -> libm-2.28.so
│   ├── libnss_dns-2.28.so
│   ├── libnss_dns.so.2 -> libnss_dns-2.28.so
│   ├── libnss_files-2.28.so
│   ├── libnss_files.so.2 -> libnss_files-2.28.so
│   ├── libpthread-2.28.so
│   ├── libpthread.so.0 -> libpthread-2.28.so
│   ├── libresolv-2.28.so
│   ├── libresolv.so.2 -> libresolv-2.28.so
│   ├── librt-2.28.so
│   ├── librt.so.1 -> librt-2.28.so
│   ├── libutil-2.28.so
│   ├── libutil.so.1 -> libutil-2.28.so
│   └── modules
│       └── 4.14.29-v7
│           ├── kernel
│           │   ├── arch
│           │   │   └── arm
│           │   │       ├── crypto
│           │   │       │   ├── aes-arm-bs.ko
│           │   │       │   ├── aes-arm.ko
│           │   │       │   ├── sha1-arm.ko
│           │   │       │   └── sha1-arm-neon.ko
│           │   │       ├── lib
│           │   │       │   └── xor-neon.ko
│           │   │       └── oprofile
│           │   │           └── oprofile.ko
│           │   ├── crypto
│           │   │   ├── arc4.ko
│           │   │   ├── async_tx
│           │   │   │   ├── async_memcpy.ko
│           │   │   │   ├── async_pq.ko
│           │   │   │   ├── async_raid6_recov.ko
│           │   │   │   ├── async_tx.ko
│           │   │   │   └── async_xor.ko
│           │   │   ├── authencesn.ko
│           │   │   ├── authenc.ko
│           │   │   ├── cast5_generic.ko
│           │   │   ├── cast_common.ko
│           │   │   ├── ccm.ko
│           │   │   ├── cmac.ko
│           │   │   ├── cryptd.ko
│           │   │   ├── crypto_simd.ko
│           │   │   ├── ctr.ko
│           │   │   ├── cts.ko
│           │   │   ├── deflate.ko
│           │   │   ├── drbg.ko
│           │   │   ├── ecb.ko
│           │   │   ├── ecdh_generic.ko
│           │   │   ├── echainiv.ko
│           │   │   ├── gcm.ko
│           │   │   ├── gf128mul.ko
│           │   │   ├── ghash-generic.ko
│           │   │   ├── hmac.ko
│           │   │   ├── jitterentropy_rng.ko
│           │   │   ├── lz4.ko
│           │   │   ├── lzo.ko
│           │   │   ├── md4.ko
│           │   │   ├── md5.ko
│           │   │   ├── michael_mic.ko
│           │   │   ├── seqiv.ko
│           │   │   ├── sha1_generic.ko
│           │   │   ├── sha256_generic.ko
│           │   │   ├── sha512_generic.ko
│           │   │   ├── tgr192.ko
│           │   │   ├── wp512.ko
│           │   │   ├── xcbc.ko
│           │   │   ├── xor.ko
│           │   │   └── xts.ko
│           │   ├── drivers
│           │   │   ├── bcma
│           │   │   │   └── bcma.ko
│           │   │   ├── block
│           │   │   │   ├── cryptoloop.ko
│           │   │   │   ├── pktcdvd.ko
│           │   │   │   └── zram
│           │   │   │       └── zram.ko
│           │   │   ├── cdrom
│           │   │   │   └── cdrom.ko
│           │   │   ├── char
│           │   │   │   └── broadcom
│           │   │   │       └── bcm2835_smi_dev.ko
│           │   │   ├── dax
│           │   │   │   └── dax.ko
│           │   │   ├── extcon
│           │   │   │   └── extcon-core.ko
│           │   │   ├── gpio
│           │   │   │   ├── gpio-arizona.ko
│           │   │   │   ├── gpio-mockup.ko
│           │   │   │   └── gpio-pcf857x.ko
│           │   │   ├── gpu
│           │   │   │   └── drm
│           │   │   │       ├── drm_kms_helper.ko
│           │   │   │       ├── drm.ko
│           │   │   │       ├── panel
│           │   │   │       │   └── panel-simple.ko
│           │   │   │       └── tinydrm
│           │   │   │           ├── core
│           │   │   │           │   └── tinydrm.ko
│           │   │   │           ├── mi0283qt.ko
│           │   │   │           ├── mipi-dbi.ko
│           │   │   │           └── repaper.ko
│           │   │   ├── hid
│           │   │   │   ├── hid-belkin.ko
│           │   │   │   ├── hid-cherry.ko
│           │   │   │   ├── hid-chicony.ko
│           │   │   │   ├── hid-cypress.ko
│           │   │   │   ├── hid-dr.ko
│           │   │   │   ├── hid-elecom.ko
│           │   │   │   ├── hid-emsff.ko
│           │   │   │   ├── hid-ezkey.ko
│           │   │   │   ├── hid-gaff.ko
│           │   │   │   ├── hid-gembird.ko
│           │   │   │   ├── hid-gyration.ko
│           │   │   │   ├── hid-kensington.ko
│           │   │   │   ├── hid-keytouch.ko
│           │   │   │   ├── hid-kye.ko
│           │   │   │   ├── hid-lcpower.ko
│           │   │   │   ├── hid-led.ko
│           │   │   │   ├── hid-microsoft.ko
│           │   │   │   ├── hid-monterey.ko
│           │   │   │   ├── hid-multitouch.ko
│           │   │   │   ├── hid-ortek.ko
│           │   │   │   ├── hid-petalynx.ko
│           │   │   │   ├── hid-picolcd.ko
│           │   │   │   ├── hid-pl.ko
│           │   │   │   ├── hid-samsung.ko
│           │   │   │   ├── hid-sjoy.ko
│           │   │   │   ├── hid-speedlink.ko
│           │   │   │   ├── hid-sunplus.ko
│           │   │   │   ├── hid-tmff.ko
│           │   │   │   ├── hid-topseed.ko
│           │   │   │   ├── hid-twinhan.ko
│           │   │   │   ├── hid-waltop.ko
│           │   │   │   ├── hid-wiimote.ko
│           │   │   │   ├── hid-xinmo.ko
│           │   │   │   ├── hid-zpff.ko
│           │   │   │   ├── hid-zydacron.ko
│           │   │   │   └── uhid.ko
│           │   │   ├── hwmon
│           │   │   │   ├── ads1015.ko
│           │   │   │   ├── hwmon.ko
│           │   │   │   ├── ina2xx.ko
│           │   │   │   ├── jc42.ko
│           │   │   │   ├── lm75.ko
│           │   │   │   ├── sht21.ko
│           │   │   │   ├── sht3x.ko
│           │   │   │   ├── shtc1.ko
│           │   │   │   └── tmp102.ko
│           │   │   ├── i2c
│           │   │   │   ├── algos
│           │   │   │   │   └── i2c-algo-bit.ko
│           │   │   │   ├── busses
│           │   │   │   │   ├── i2c-bcm2708.ko
│           │   │   │   │   ├── i2c-bcm2835.ko
│           │   │   │   │   └── i2c-gpio.ko
│           │   │   │   ├── i2c-dev.ko
│           │   │   │   ├── i2c-mux.ko
│           │   │   │   └── muxes
│           │   │   │       ├── i2c-mux-gpmux.ko
│           │   │   │       └── i2c-mux-pca954x.ko
│           │   │   ├── input
│           │   │   │   ├── evdev.ko
│           │   │   │   ├── ff-memless.ko
│           │   │   │   ├── gameport
│           │   │   │   │   ├── gameport.ko
│           │   │   │   │   ├── lightning.ko
│           │   │   │   │   └── ns558.ko
│           │   │   │   ├── input-polldev.ko
│           │   │   │   ├── keyboard
│           │   │   │   │   └── gpio_keys.ko
│           │   │   │   ├── misc
│           │   │   │   │   ├── ad714x-i2c.ko
│           │   │   │   │   ├── ad714x.ko
│           │   │   │   │   ├── ad714x-spi.ko
│           │   │   │   │   ├── adxl34x-i2c.ko
│           │   │   │   │   ├── adxl34x.ko
│           │   │   │   │   ├── adxl34x-spi.ko
│           │   │   │   │   ├── cma3000_d0x.ko
│           │   │   │   │   ├── rotary_encoder.ko
│           │   │   │   │   └── uinput.ko
│           │   │   │   └── serio
│           │   │   │       ├── serio.ko
│           │   │   │       ├── serio_raw.ko
│           │   │   │       └── serport.ko
│           │   │   ├── leds
│           │   │   │   └── trigger
│           │   │   │       ├── ledtrig-camera.ko
│           │   │   │       └── ledtrig-transient.ko
│           │   │   ├── md
│           │   │   │   ├── dm-bio-prison.ko
│           │   │   │   ├── dm-bufio.ko
│           │   │   │   ├── dm-crypt.ko
│           │   │   │   ├── dm-log.ko
│           │   │   │   ├── dm-mirror.ko
│           │   │   │   ├── dm-mod.ko
│           │   │   │   ├── dm-raid.ko
│           │   │   │   ├── dm-region-hash.ko
│           │   │   │   ├── dm-snapshot.ko
│           │   │   │   ├── dm-thin-pool.ko
│           │   │   │   ├── dm-zero.ko
│           │   │   │   ├── linear.ko
│           │   │   │   ├── md-mod.ko
│           │   │   │   ├── persistent-data
│           │   │   │   │   └── dm-persistent-data.ko
│           │   │   │   ├── raid0.ko
│           │   │   │   ├── raid10.ko
│           │   │   │   ├── raid1.ko
│           │   │   │   └── raid456.ko
│           │   │   ├── mfd
│           │   │   │   ├── arizona-i2c.ko
│           │   │   │   ├── arizona-spi.ko
│           │   │   │   ├── rpisense-core.ko
│           │   │   │   └── wl1273-core.ko
│           │   │   ├── misc
│           │   │   │   ├── bcm2835_smi.ko
│           │   │   │   └── eeprom
│           │   │   │       ├── at24.ko
│           │   │   │       └── eeprom_93cx6.ko
│           │   │   ├── mmc
│           │   │   │   └── host
│           │   │   │       ├── mmc_spi.ko
│           │   │   │       └── of_mmc_spi.ko
│           │   │   ├── mtd
│           │   │   │   ├── chips
│           │   │   │   │   └── chipreg.ko
│           │   │   │   ├── devices
│           │   │   │   │   └── m25p80.ko
│           │   │   │   ├── mtd_blkdevs.ko
│           │   │   │   ├── mtdblock.ko
│           │   │   │   ├── mtd.ko
│           │   │   │   ├── nand
│           │   │   │   │   ├── bcm2835_smi_nand.ko
│           │   │   │   │   ├── nand_ecc.ko
│           │   │   │   │   └── nand.ko
│           │   │   │   ├── ofpart.ko
│           │   │   │   ├── spi-nor
│           │   │   │   │   └── spi-nor.ko
│           │   │   │   └── ubi
│           │   │   │       └── ubi.ko
│           │   │   ├── mux
│           │   │   │   └── mux-core.ko
│           │   │   ├── perf
│           │   │   │   └── raspberrypi_axi_monitor.ko
│           │   │   ├── pinctrl
│           │   │   │   └── pinctrl-mcp23s08.ko
│           │   │   ├── power
│           │   │   │   └── supply
│           │   │   │       └── ds2760_battery.ko
│           │   │   ├── pps
│           │   │   │   ├── clients
│           │   │   │   │   ├── pps-gpio.ko
│           │   │   │   │   └── pps-ldisc.ko
│           │   │   │   └── pps_core.ko
│           │   │   ├── pwm
│           │   │   │   ├── pwm-bcm2835.ko
│           │   │   │   └── pwm-pca9685.ko
│           │   │   ├── regulator
│           │   │   │   └── fixed.ko
│           │   │   ├── rtc
│           │   │   │   ├── rtc-abx80x.ko
│           │   │   │   ├── rtc-bq32k.ko
│           │   │   │   ├── rtc-ds1302.ko
│           │   │   │   ├── rtc-ds1305.ko
│           │   │   │   ├── rtc-ds1307.ko
│           │   │   │   ├── rtc-ds1374.ko
│           │   │   │   ├── rtc-ds1390.ko
│           │   │   │   ├── rtc-ds1672.ko
│           │   │   │   ├── rtc-ds3232.ko
│           │   │   │   ├── rtc-em3027.ko
│           │   │   │   ├── rtc-fm3130.ko
│           │   │   │   ├── rtc-isl12022.ko
│           │   │   │   ├── rtc-isl1208.ko
│           │   │   │   ├── rtc-m41t80.ko
│           │   │   │   ├── rtc-m41t93.ko
│           │   │   │   ├── rtc-m41t94.ko
│           │   │   │   ├── rtc-max6900.ko
│           │   │   │   ├── rtc-max6902.ko
│           │   │   │   ├── rtc-pcf2123.ko
│           │   │   │   ├── rtc-pcf2127.ko
│           │   │   │   ├── rtc-pcf8523.ko
│           │   │   │   ├── rtc-pcf8563.ko
│           │   │   │   ├── rtc-pcf8583.ko
│           │   │   │   ├── rtc-r9701.ko
│           │   │   │   ├── rtc-rs5c348.ko
│           │   │   │   ├── rtc-rs5c372.ko
│           │   │   │   ├── rtc-rv3029c2.ko
│           │   │   │   ├── rtc-rx4581.ko
│           │   │   │   ├── rtc-rx8025.ko
│           │   │   │   ├── rtc-rx8581.ko
│           │   │   │   ├── rtc-s35390a.ko
│           │   │   │   └── rtc-x1205.ko
│           │   │   ├── scsi
│           │   │   │   ├── iscsi_boot_sysfs.ko
│           │   │   │   ├── osst.ko
│           │   │   │   ├── sg.ko
│           │   │   │   ├── sr_mod.ko
│           │   │   │   └── st.ko
│           │   │   ├── spi
│           │   │   │   ├── spi-bcm2835aux.ko
│           │   │   │   ├── spi-bcm2835.ko
│           │   │   │   └── spidev.ko
│           │   │   ├── ssb
│           │   │   │   └── ssb.ko
│           │   │   ├── staging
│           │   │   │   ├── fbtft
│           │   │   │   │   ├── fb_agm1264k-fl.ko
│           │   │   │   │   ├── fb_bd663474.ko
│           │   │   │   │   ├── fb_hx8340bn.ko
│           │   │   │   │   ├── fb_hx8347d.ko
│           │   │   │   │   ├── fb_hx8353d.ko
│           │   │   │   │   ├── fb_hx8357d.ko
│           │   │   │   │   ├── fb_ili9163.ko
│           │   │   │   │   ├── fb_ili9320.ko
│           │   │   │   │   ├── fb_ili9325.ko
│           │   │   │   │   ├── fb_ili9340.ko
│           │   │   │   │   ├── fb_ili9341.ko
│           │   │   │   │   ├── fb_ili9481.ko
│           │   │   │   │   ├── fb_ili9486.ko
│           │   │   │   │   ├── fb_pcd8544.ko
│           │   │   │   │   ├── fb_ra8875.ko
│           │   │   │   │   ├── fb_s6d02a1.ko
│           │   │   │   │   ├── fb_s6d1121.ko
│           │   │   │   │   ├── fb_ssd1289.ko
│           │   │   │   │   ├── fb_ssd1306.ko
│           │   │   │   │   ├── fb_ssd1331.ko
│           │   │   │   │   ├── fb_ssd1351.ko
│           │   │   │   │   ├── fb_st7735r.ko
│           │   │   │   │   ├── fb_st7789v.ko
│           │   │   │   │   ├── fbtft_device.ko
│           │   │   │   │   ├── fbtft.ko
│           │   │   │   │   ├── fb_tinylcd.ko
│           │   │   │   │   ├── fb_tls8204.ko
│           │   │   │   │   ├── fb_uc1701.ko
│           │   │   │   │   ├── fb_upd161704.ko
│           │   │   │   │   ├── fb_watterott.ko
│           │   │   │   │   └── flexfb.ko
│           │   │   │   └── speakup
│           │   │   │       ├── speakup.ko
│           │   │   │       └── speakup_soft.ko
│           │   │   ├── tty
│           │   │   │   └── serial
│           │   │   │       └── sc16is7xx.ko
│           │   │   ├── uio
│           │   │   │   ├── uio.ko
│           │   │   │   └── uio_pdrv_genirq.ko
│           │   │   ├── video
│           │   │   │   ├── backlight
│           │   │   │   │   ├── gpio_backlight.ko
│           │   │   │   │   ├── lcd.ko
│           │   │   │   │   └── rpi_backlight.ko
│           │   │   │   └── fbdev
│           │   │   │       ├── core
│           │   │   │       │   ├── fb_sys_fops.ko
│           │   │   │       │   ├── syscopyarea.ko
│           │   │   │       │   ├── sysfillrect.ko
│           │   │   │       │   └── sysimgblt.ko
│           │   │   │       ├── rpisense-fb.ko
│           │   │   │       └── ssd1307fb.ko
│           │   │   ├── w1
│           │   │   │   ├── masters
│           │   │   │   │   ├── ds1wm.ko
│           │   │   │   │   ├── ds2482.ko
│           │   │   │   │   └── w1-gpio.ko
│           │   │   │   ├── slaves
│           │   │   │   │   ├── w1_ds2406.ko
│           │   │   │   │   ├── w1_ds2408.ko
│           │   │   │   │   ├── w1_ds2413.ko
│           │   │   │   │   ├── w1_ds2423.ko
│           │   │   │   │   ├── w1_ds2431.ko
│           │   │   │   │   ├── w1_ds2433.ko
│           │   │   │   │   ├── w1_ds2438.ko
│           │   │   │   │   ├── w1_ds2760.ko
│           │   │   │   │   ├── w1_ds2780.ko
│           │   │   │   │   ├── w1_ds2781.ko
│           │   │   │   │   ├── w1_ds28e04.ko
│           │   │   │   │   ├── w1_smem.ko
│           │   │   │   │   └── w1_therm.ko
│           │   │   │   └── wire.ko
│           │   │   └── watchdog
│           │   │       └── gpio_wdt.ko
│           │   ├── fs
│           │   │   ├── binfmt_misc.ko
│           │   │   ├── btrfs
│           │   │   │   └── btrfs.ko
│           │   │   ├── ecryptfs
│           │   │   │   └── ecryptfs.ko
│           │   │   ├── fuse
│           │   │   │   ├── cuse.ko
│           │   │   │   └── fuse.ko
│           │   │   ├── gfs2
│           │   │   │   └── gfs2.ko
│           │   │   ├── hfs
│           │   │   │   └── hfs.ko
│           │   │   ├── hfsplus
│           │   │   │   └── hfsplus.ko
│           │   │   ├── isofs
│           │   │   │   └── isofs.ko
│           │   │   ├── jffs2
│           │   │   │   └── jffs2.ko
│           │   │   ├── jfs
│           │   │   │   └── jfs.ko
│           │   │   ├── nilfs2
│           │   │   │   └── nilfs2.ko
│           │   │   ├── nls
│           │   │   │   ├── nls_cp1250.ko
│           │   │   │   ├── nls_cp1251.ko
│           │   │   │   ├── nls_cp1255.ko
│           │   │   │   ├── nls_cp737.ko
│           │   │   │   ├── nls_cp775.ko
│           │   │   │   ├── nls_cp850.ko
│           │   │   │   ├── nls_cp852.ko
│           │   │   │   ├── nls_cp855.ko
│           │   │   │   ├── nls_cp857.ko
│           │   │   │   ├── nls_cp860.ko
│           │   │   │   ├── nls_cp861.ko
│           │   │   │   ├── nls_cp862.ko
│           │   │   │   ├── nls_cp863.ko
│           │   │   │   ├── nls_cp864.ko
│           │   │   │   ├── nls_cp865.ko
│           │   │   │   ├── nls_cp866.ko
│           │   │   │   ├── nls_cp869.ko
│           │   │   │   ├── nls_cp874.ko
│           │   │   │   ├── nls_cp932.ko
│           │   │   │   ├── nls_cp936.ko
│           │   │   │   ├── nls_cp949.ko
│           │   │   │   ├── nls_cp950.ko
│           │   │   │   ├── nls_euc-jp.ko
│           │   │   │   ├── nls_iso8859-13.ko
│           │   │   │   ├── nls_iso8859-14.ko
│           │   │   │   ├── nls_iso8859-15.ko
│           │   │   │   ├── nls_iso8859-1.ko
│           │   │   │   ├── nls_iso8859-2.ko
│           │   │   │   ├── nls_iso8859-3.ko
│           │   │   │   ├── nls_iso8859-4.ko
│           │   │   │   ├── nls_iso8859-5.ko
│           │   │   │   ├── nls_iso8859-6.ko
│           │   │   │   ├── nls_iso8859-7.ko
│           │   │   │   ├── nls_iso8859-9.ko
│           │   │   │   ├── nls_koi8-r.ko
│           │   │   │   ├── nls_koi8-ru.ko
│           │   │   │   ├── nls_koi8-u.ko
│           │   │   │   └── nls_utf8.ko
│           │   │   ├── ntfs
│           │   │   │   └── ntfs.ko
│           │   │   ├── overlayfs
│           │   │   │   └── overlay.ko
│           │   │   ├── quota
│           │   │   │   ├── quota_tree.ko
│           │   │   │   ├── quota_v1.ko
│           │   │   │   └── quota_v2.ko
│           │   │   ├── reiserfs
│           │   │   │   └── reiserfs.ko
│           │   │   ├── squashfs
│           │   │   │   └── squashfs.ko
│           │   │   ├── ubifs
│           │   │   │   └── ubifs.ko
│           │   │   ├── udf
│           │   │   │   └── udf.ko
│           │   │   └── xfs
│           │   │       └── xfs.ko
│           │   ├── kernel
│           │   │   └── configs.ko
│           │   ├── lib
│           │   │   ├── crc7.ko
│           │   │   ├── crc8.ko
│           │   │   ├── crc-ccitt.ko
│           │   │   ├── lz4
│           │   │   │   └── lz4_compress.ko
│           │   │   ├── lzo
│           │   │   │   └── lzo_compress.ko
│           │   │   ├── raid6
│           │   │   │   └── raid6_pq.ko
│           │   │   ├── xxhash.ko
│           │   │   ├── zlib_deflate
│           │   │   │   └── zlib_deflate.ko
│           │   │   └── zstd
│           │   │       ├── zstd_compress.ko
│           │   │       └── zstd_decompress.ko
│           │   └── mm
│           │       └── zsmalloc.ko
│           ├── modules.alias
│           ├── modules.alias.bin
│           ├── modules.builtin
│           ├── modules.builtin.bin
│           ├── modules.dep
│           ├── modules.dep.bin
│           ├── modules.devname
│           ├── modules.order
│           ├── modules.softdep
│           ├── modules.symbols
│           └── modules.symbols.bin
├── lib32 -> lib
├── linuxrc -> bin/busybox
├── lost+found
├── media
├── mnt
├── opt
├── proc
├── root
│   └── QmlTestApplication
├── run
│   └── utmp
├── sbin
│   ├── arp -> ../bin/busybox
│   ├── blkid -> ../bin/busybox
│   ├── devmem -> ../bin/busybox
│   ├── fdisk -> ../bin/busybox
│   ├── freeramdisk -> ../bin/busybox
│   ├── fsck -> ../bin/busybox
│   ├── fstrim -> ../bin/busybox
│   ├── getty -> ../bin/busybox
│   ├── halt -> ../bin/busybox
│   ├── hdparm -> ../bin/busybox
│   ├── hwclock -> ../bin/busybox
│   ├── ifconfig -> ../bin/busybox
│   ├── ifdown -> ../bin/busybox
│   ├── ifup -> ../bin/busybox
│   ├── init -> ../bin/busybox
│   ├── insmod -> ../bin/busybox
│   ├── ip -> ../bin/busybox
│   ├── ipaddr -> ../bin/busybox
│   ├── iplink -> ../bin/busybox
│   ├── ipneigh -> ../bin/busybox
│   ├── iproute -> ../bin/busybox
│   ├── iprule -> ../bin/busybox
│   ├── iptunnel -> ../bin/busybox
│   ├── klogd -> ../bin/busybox
│   ├── loadkmap -> ../bin/busybox
│   ├── losetup -> ../bin/busybox
│   ├── lsmod -> ../bin/busybox
│   ├── makedevs -> ../bin/busybox
│   ├── mdev -> ../bin/busybox
│   ├── mkdosfs -> ../bin/busybox
│   ├── mke2fs -> ../bin/busybox
│   ├── mkswap -> ../bin/busybox
│   ├── modprobe -> ../bin/busybox
│   ├── nameif -> ../bin/busybox
│   ├── pivot_root -> ../bin/busybox
│   ├── poweroff -> ../bin/busybox
│   ├── reboot -> ../bin/busybox
│   ├── rmmod -> ../bin/busybox
│   ├── route -> ../bin/busybox
│   ├── run-init -> ../bin/busybox
│   ├── runlevel -> ../bin/busybox
│   ├── setconsole -> ../bin/busybox
│   ├── start-stop-daemon -> ../bin/busybox
│   ├── sulogin -> ../bin/busybox
│   ├── swapoff -> ../bin/busybox
│   ├── swapon -> ../bin/busybox
│   ├── switch_root -> ../bin/busybox
│   ├── sysctl -> ../bin/busybox
│   ├── syslogd -> ../bin/busybox
│   ├── tc -> ../bin/busybox
│   ├── udhcpc -> ../bin/busybox
│   ├── uevent -> ../bin/busybox
│   ├── vconfig -> ../bin/busybox
│   └── watchdog -> ../bin/busybox
├── sys
├── tmp
├── usr
│   ├── bin
│   │   ├── [ -> ../../bin/busybox
│   │   ├── [[ -> ../../bin/busybox
│   │   ├── ar -> ../../bin/busybox
│   │   ├── awk -> ../../bin/busybox
│   │   ├── basename -> ../../bin/busybox
│   │   ├── bunzip2 -> ../../bin/busybox
│   │   ├── bzcat -> ../../bin/busybox
│   │   ├── chrt -> ../../bin/busybox
│   │   ├── chvt -> ../../bin/busybox
│   │   ├── cksum -> ../../bin/busybox
│   │   ├── clear -> ../../bin/busybox
│   │   ├── cmp -> ../../bin/busybox
│   │   ├── containers_check_frame_int
│   │   ├── containers_datagram_receiver
│   │   ├── containers_datagram_sender
│   │   ├── containers_dump_pktfile
│   │   ├── containers_rtp_decoder
│   │   ├── containers_stream_client
│   │   ├── containers_stream_server
│   │   ├── containers_test
│   │   ├── containers_test_bits
│   │   ├── containers_test_uri
│   │   ├── containers_uri_pipe
│   │   ├── crontab -> ../../bin/busybox
│   │   ├── cut -> ../../bin/busybox
│   │   ├── dc -> ../../bin/busybox
│   │   ├── deallocvt -> ../../bin/busybox
│   │   ├── diff -> ../../bin/busybox
│   │   ├── dirname -> ../../bin/busybox
│   │   ├── dos2unix -> ../../bin/busybox
│   │   ├── dtmerge
│   │   ├── dtoverlay
│   │   ├── dtoverlay-post
│   │   ├── dtoverlay-pre
│   │   ├── dtparam -> dtoverlay
│   │   ├── du -> ../../bin/busybox
│   │   ├── eject -> ../../bin/busybox
│   │   ├── env -> ../../bin/busybox
│   │   ├── expr -> ../../bin/busybox
│   │   ├── factor -> ../../bin/busybox
│   │   ├── fallocate -> ../../bin/busybox
│   │   ├── find -> ../../bin/busybox
│   │   ├── flock -> ../../bin/busybox
│   │   ├── fold -> ../../bin/busybox
│   │   ├── free -> ../../bin/busybox
│   │   ├── fuser -> ../../bin/busybox
│   │   ├── head -> ../../bin/busybox
│   │   ├── hexdump -> ../../bin/busybox
│   │   ├── hexedit -> ../../bin/busybox
│   │   ├── hostid -> ../../bin/busybox
│   │   ├── id -> ../../bin/busybox
│   │   ├── install -> ../../bin/busybox
│   │   ├── ipcrm -> ../../bin/busybox
│   │   ├── ipcs -> ../../bin/busybox
│   │   ├── killall -> ../../bin/busybox
│   │   ├── last -> ../../bin/busybox
│   │   ├── less -> ../../bin/busybox
│   │   ├── logger -> ../../bin/busybox
│   │   ├── logname -> ../../bin/busybox
│   │   ├── lsof -> ../../bin/busybox
│   │   ├── lspci -> ../../bin/busybox
│   │   ├── lsscsi -> ../../bin/busybox
│   │   ├── lsusb -> ../../bin/busybox
│   │   ├── lzcat -> ../../bin/busybox
│   │   ├── lzma -> ../../bin/busybox
│   │   ├── lzopcat -> ../../bin/busybox
│   │   ├── md5sum -> ../../bin/busybox
│   │   ├── mesg -> ../../bin/busybox
│   │   ├── microcom -> ../../bin/busybox
│   │   ├── mkfifo -> ../../bin/busybox
│   │   ├── mkpasswd -> ../../bin/busybox
│   │   ├── mmal_vc_diag
│   │   ├── nl -> ../../bin/busybox
│   │   ├── nohup -> ../../bin/busybox
│   │   ├── nproc -> ../../bin/busybox
│   │   ├── nslookup -> ../../bin/busybox
│   │   ├── od -> ../../bin/busybox
│   │   ├── openvt -> ../../bin/busybox
│   │   ├── passwd -> ../../bin/busybox
│   │   ├── paste -> ../../bin/busybox
│   │   ├── patch -> ../../bin/busybox
│   │   ├── printf -> ../../bin/busybox
│   │   ├── raspistill
│   │   ├── raspivid
│   │   ├── raspividyuv
│   │   ├── raspiyuv
│   │   ├── readlink -> ../../bin/busybox
│   │   ├── realpath -> ../../bin/busybox
│   │   ├── renice -> ../../bin/busybox
│   │   ├── reset -> ../../bin/busybox
│   │   ├── resize -> ../../bin/busybox
│   │   ├── seq -> ../../bin/busybox
│   │   ├── setfattr -> ../../bin/busybox
│   │   ├── setkeycodes -> ../../bin/busybox
│   │   ├── setsid -> ../../bin/busybox
│   │   ├── sha1sum -> ../../bin/busybox
│   │   ├── sha256sum -> ../../bin/busybox
│   │   ├── sha3sum -> ../../bin/busybox
│   │   ├── sha512sum -> ../../bin/busybox
│   │   ├── shred -> ../../bin/busybox
│   │   ├── sort -> ../../bin/busybox
│   │   ├── strings -> ../../bin/busybox
│   │   ├── svc -> ../../bin/busybox
│   │   ├── svok -> ../../bin/busybox
│   │   ├── tail -> ../../bin/busybox
│   │   ├── tee -> ../../bin/busybox
│   │   ├── telnet -> ../../bin/busybox
│   │   ├── test -> ../../bin/busybox
│   │   ├── tftp -> ../../bin/busybox
│   │   ├── time -> ../../bin/busybox
│   │   ├── top -> ../../bin/busybox
│   │   ├── tr -> ../../bin/busybox
│   │   ├── traceroute -> ../../bin/busybox
│   │   ├── truncate -> ../../bin/busybox
│   │   ├── tty -> ../../bin/busybox
│   │   ├── tvservice
│   │   ├── uniq -> ../../bin/busybox
│   │   ├── unix2dos -> ../../bin/busybox
│   │   ├── unlink -> ../../bin/busybox
│   │   ├── unlzma -> ../../bin/busybox
│   │   ├── unlzop -> ../../bin/busybox
│   │   ├── unxz -> ../../bin/busybox
│   │   ├── unzip -> ../../bin/busybox
│   │   ├── uptime -> ../../bin/busybox
│   │   ├── uudecode -> ../../bin/busybox
│   │   ├── uuencode -> ../../bin/busybox
│   │   ├── vcgencmd
│   │   ├── vchiq_test
│   │   ├── vcmailbox
│   │   ├── vcsmem
│   │   ├── vlock -> ../../bin/busybox
│   │   ├── w -> ../../bin/busybox
│   │   ├── wc -> ../../bin/busybox
│   │   ├── wget -> ../../bin/busybox
│   │   ├── which -> ../../bin/busybox
│   │   ├── who -> ../../bin/busybox
│   │   ├── whoami -> ../../bin/busybox
│   │   ├── xargs -> ../../bin/busybox
│   │   ├── xxd -> ../../bin/busybox
│   │   ├── xz -> ../../bin/busybox
│   │   ├── xzcat -> ../../bin/busybox
│   │   └── yes -> ../../bin/busybox
│   ├── etc
│   │   └── init.d
│   │       └── vcfiled
│   ├── lib
│   │   ├── libbcm_host.so
│   │   ├── libbrcmEGL.so
│   │   ├── libbrcmGLESv2.so
│   │   ├── libbrcmOpenVG.so
│   │   ├── libbrcmWFC.so
│   │   ├── libcontainers.so
│   │   ├── libdebug_sym.so
│   │   ├── libdtovl.so
│   │   ├── libEGL.so
│   │   ├── libGLESv2.so
│   │   ├── libkhrn_client.so
│   │   ├── libmmal_components.so
│   │   ├── libmmal_core.so
│   │   ├── libmmal.so
│   │   ├── libmmal_util.so
│   │   ├── libmmal_vc_client.so
│   │   ├── libopenmaxil.so
│   │   ├── libOpenVG.so
│   │   ├── libstdc++.so -> libstdc++.so.6.0.24
│   │   ├── libstdc++.so.6 -> libstdc++.so.6.0.24
│   │   ├── libstdc++.so.6.0.24
│   │   ├── libstdc++.so.6.0.24-gdb.py
│   │   ├── libvcfiled_check.so
│   │   ├── libvchiq_arm.so
│   │   ├── libvchostif.so
│   │   ├── libvcilcs.so
│   │   ├── libvcos.so
│   │   ├── libvcsm.so
│   │   ├── libWFC.so
│   │   ├── os-release
│   │   └── plugins
│   │       ├── reader_asf.so
│   │       ├── reader_avi.so
│   │       ├── reader_binary.so
│   │       ├── reader_flv.so
│   │       ├── reader_metadata_id3.so
│   │       ├── reader_mkv.so
│   │       ├── reader_mp4.so
│   │       ├── reader_mpga.so
│   │       ├── reader_ps.so
│   │       ├── reader_qsynth.so
│   │       ├── reader_raw_video.so
│   │       ├── reader_rcv.so
│   │       ├── reader_rtp.so
│   │       ├── reader_rtsp.so
│   │       ├── reader_rv9.so
│   │       ├── reader_simple.so
│   │       ├── reader_wav.so
│   │       ├── writer_asf.so
│   │       ├── writer_avi.so
│   │       ├── writer_binary.so
│   │       ├── writer_dummy.so
│   │       ├── writer_mp4.so
│   │       ├── writer_raw_video.so
│   │       └── writer_simple.so
│   ├── lib32 -> lib
│   ├── sbin
│   │   ├── addgroup -> ../../bin/busybox
│   │   ├── adduser -> ../../bin/busybox
│   │   ├── arping -> ../../bin/busybox
│   │   ├── chroot -> ../../bin/busybox
│   │   ├── crond -> ../../bin/busybox
│   │   ├── delgroup -> ../../bin/busybox
│   │   ├── deluser -> ../../bin/busybox
│   │   ├── dnsd -> ../../bin/busybox
│   │   ├── ether-wake -> ../../bin/busybox
│   │   ├── fbset -> ../../bin/busybox
│   │   ├── fdformat -> ../../bin/busybox
│   │   ├── fsfreeze -> ../../bin/busybox
│   │   ├── i2cdetect -> ../../bin/busybox
│   │   ├── i2cdump -> ../../bin/busybox
│   │   ├── i2cget -> ../../bin/busybox
│   │   ├── i2cset -> ../../bin/busybox
│   │   ├── inetd -> ../../bin/busybox
│   │   ├── killall5 -> ../../bin/busybox
│   │   ├── loadfont -> ../../bin/busybox
│   │   ├── partprobe -> ../../bin/busybox
│   │   ├── rdate -> ../../bin/busybox
│   │   ├── readprofile -> ../../bin/busybox
│   │   ├── setlogcons -> ../../bin/busybox
│   │   ├── ubirename -> ../../bin/busybox
│   │   └── vcfiled
│   └── share
│       └── udhcpc
│           ├── default.script
│           └── default.script.d
└── var
    ├── cache -> ../tmp
    ├── lib
    │   └── misc -> ../../tmp
    ├── lock -> ../tmp
    ├── log -> ../tmp
    ├── run -> ../run
    ├── spool -> ../tmp
    ├── tmp -> ../tmp
    └── www

151 directories, 785 files

'embeded > raspberry pi' 카테고리의 다른 글

rpitx  (0) 2021.12.16
wayland on rpi  (0) 2021.11.22
img 파일 마운트 하기  (0) 2021.11.20
rpi 3b 2초 부팅 이미지 테스트  (0) 2021.11.17
라즈베리 피코 USB HID 키코드  (0) 2021.11.16
Posted by 구차니
embeded/raspberry pi2021. 11. 20. 23:18

mount offset 기능을 이용해서 계산해 적당히 붙이면 된다고..

# fdisk -l whatever.img
Device         Boot     Start       End  Blocks  Id System
whatever.img1            8192    122879   57344   c W95 FAT32 (LBA)
whatever.img2          122880   5785599 2831360  83 Linux

# mount -v -o offset=4194304 -t vfat whatever.img /mnt/img/one
# mount -v -o offset=62914560 -t ext4 whatever.img /mnt/img/two

[링크 : https://raspberrypi.stackexchange.com/questions/13137/how-can-i-mount-a-raspberry-pi-linux-distro-image]

'embeded > raspberry pi' 카테고리의 다른 글

wayland on rpi  (0) 2021.11.22
rpi 3b 2초 부팅 fs  (0) 2021.11.20
rpi 3b 2초 부팅 이미지 테스트  (0) 2021.11.17
라즈베리 피코 USB HID 키코드  (0) 2021.11.16
라즈베리 파이 피코 한글 키 입력?  (0) 2021.11.16
Posted by 구차니
embeded/raspberry pi2021. 11. 17. 23:35

빠르긴 한데

터미널도 없어진건가?!

 

$ sudo fdisk /dev/sda -l
Disk /dev/sda: 1.9 GiB, 1977614336 bytes, 3862528 sectors
Disk model: SD  Transcend
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xdd604128

Device     Boot Start    End Sectors Size Id Type
/dev/sda1  *        1  32768   32768  16M  c W95 FAT32 (LBA)
/dev/sda2       32769 163840  131072  64M 83 Linux

 

$ ls -al /mnt
total 5462
drwxr-xr-x  3 root root   16384 Jan  1  1970  .
drwxr-xr-x 21 root root    4096 Aug 20  2020  ..
-rwxr-xr-x  1 root root   52296 Nov 16 17:32  bootcode.bin
-rwxr-xr-x  1 root root      65 Nov 16 17:32  cmdline.txt
-rwxr-xr-x  1 root root     199 Nov 16 17:32  config.txt
-rwxr-xr-x  1 root root 2869636 Nov 16 17:32  start.elf
drwxr-xr-x  2 root root    2048 Nov 17  2021 'System Volume Information'
-rwxr-xr-x  1 root root 2641736 Nov 16 17:32  zImagen

$ cat /mnt/config.txt
#---> Boot
kernel=zImagen
disable_overscan=1
boot_delay=0
enable_uart=1
disable_splash=1

#--> OverClock
#sdram_freq=700
#initial_turbo=1
#force_turbo=1
#over_voltage=6
#arm_freq=1400
#core_freq=600

$ cat /mnt/cmdline.txt
root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200

 

/mnt/etc $ cat inittab
# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
#
# Note: BusyBox init doesn't support runlevels.  The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id        == tty to run on, or empty for /dev/console
# runlevels == ignored
# action    == one of sysinit, respawn, askfirst, wait, and once
# process   == program to run

# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mount -o remount,rw /
::sysinit:/bin/mkdir -p /dev/pts /dev/shm
::sysinit:/bin/mount -a
::sysinit:/sbin/swapon -a
null::sysinit:/bin/ln -sf /proc/self/fd /dev/fd
null::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin
null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout
null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr
::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS

# Put a getty on the serial port
console::respawn:/sbin/getty -L  console 0 vt100 # GENERIC_SERIAL

# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot

# Stuff to do before rebooting
::shutdown:/etc/init.d/rcK
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r

/mnt/etc/init.d $ ls -al
total 9
drwxr-xr-x 2 root root 1024 Nov 16 08:01 .
drwxr-xr-x 5 root root 1024 Jan  1  1970 ..
-rwxr-xr-x 1 root root  423 Nov 16 08:26 rcK
-rwxr-xr-x 1 root root  408 Nov 16 08:26 rcS
-rwxr-xr-x 1 root root 1012 Nov 16 08:26 S01syslogd
-rwxr-xr-x 1 root root 1004 Nov 16 08:26 S02klogd
-rwxr-xr-x 1 root root 1272 Nov 16 08:26 S20urandom
-rwxr-xr-x 1 root root   54 Nov 16 08:01 S21ftDev


/mnt/etc/init.d $ cat rcS
#!/bin/sh


# Start all init scripts in /etc/init.d
# executing them in numerical order.
#
for i in /etc/init.d/S??* ;do

     # Ignore dangling symlinks (if any).
     [ ! -f "$i" ] && continue

     case "$i" in
        *.sh)
            # Source shell script for speed.
            (
                trap - INT QUIT TSTP
                set start
                . $i
            )
            ;;
        *)
            # No sh extension, so fork subprocess.
            $i start
            ;;
    esac
done

pi@raspberrypi:/mnt/etc/init.d $ cat S21ftDev
#! /bin/sh

/root/QmlTestApplication --platform eglfs

/mnt $ sudo ls -al root
total 17151
drwx------  2 root root     1024 Nov 16 08:01 .
drwxr-xr-x 19 root root     1024 Jan  1  1970 ..
-rwxr-xr-x  1 root root 17710284 Nov 16 08:01 QmlTestApplication


/mnt $ sudo file root/QmlTestApplication
root/QmlTestApplication: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 4.14.0, stripped

'embeded > raspberry pi' 카테고리의 다른 글

rpi 3b 2초 부팅 fs  (0) 2021.11.20
img 파일 마운트 하기  (0) 2021.11.20
라즈베리 피코 USB HID 키코드  (0) 2021.11.16
라즈베리 파이 피코 한글 키 입력?  (0) 2021.11.16
rpi3 2초만에 부팅하기  (0) 2021.10.30
Posted by 구차니
embeded/raspberry pi2021. 11. 16. 16:39

일단 테스트 해보니.. Keycode.LEFT_ARROW 하니 ctrl+shift+left_arrow 하듯 작동한다.

ascii 문자열로 출력하는 거라 방향키를 넣을 방법은 라이브러리를 수정하기 전에는 불가능 할 듯.

 

    PRINT_SCREEN = 0x46
    """Print Screen (SysRq)"""
    SCROLL_LOCK = 0x47
    """Scroll Lock"""
    PAUSE = 0x48
    """Pause (Break)"""

    INSERT = 0x49
    """Insert"""
    HOME = 0x4A
    """Home (often moves to beginning of line)"""
    PAGE_UP = 0x4B
    """Go back one page"""
    DELETE = 0x4C
    """Delete forward"""
    END = 0x4D
    """End (often moves to end of line)"""
    PAGE_DOWN = 0x4E
    """Go forward one page"""

    RIGHT_ARROW = 0x4F
    """Move the cursor right"""
    LEFT_ARROW = 0x50
    """Move the cursor left"""
    DOWN_ARROW = 0x51
    """Move the cursor down"""
    UP_ARROW = 0x52
    """Move the cursor up"""

[링크 : https://circuitpython.readthedocs.io/projects/hid/en/latest/_modules/adafruit_hid/keycode.html]

Posted by 구차니
embeded/raspberry pi2021. 11. 16. 16:31

예제 코드를 보다보니 layout 어쩌구 나와서

from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS

 

소스를 뒤져보는데 흐음...

        b"\x04"  # a
        b"\x05"  # b
        b"\x06"  # c
        b"\x07"  # d
        b"\x08"  # e

[링크 : https://github.com/adafruit/Adafruit_CircuitPython_HID/blob/main/adafruit_hid/keyboard_layout_us.py]

 

걍 한영키 눌러 놓고 아래와 같이 입력하도록 해두니 잘 된다.

"동해물과 백두산이 마르고 딿도록" (딿은 의도적으로 쌍디귿 나오게 하려고 입력한 값)

keys_pressed = ["ehdgoanfrhk qorentksdl akfmrh Ekfgehfhr"]

 

한글 키보드라고 해도.. 키코드는 별개의 문제였구나..

'embeded > raspberry pi' 카테고리의 다른 글

rpi 3b 2초 부팅 이미지 테스트  (0) 2021.11.17
라즈베리 피코 USB HID 키코드  (0) 2021.11.16
rpi3 2초만에 부팅하기  (0) 2021.10.30
rpi 4는 USB to Ethernet이 아닌가?  (0) 2021.09.29
rpi zero otg  (0) 2021.09.27
Posted by 구차니