<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" version="2.0">
  <channel>
    <title>パパ日記</title>
    <link>https://shirata.asablo.jp/blog/</link>
    <description/>
    <language>ja</language>
    <generator>mc 0.0</generator>
    <pubDate>Fri, 13 Nov 2020 21:06:54 +0900</pubDate>
    <item>
      <title>ESP32ラジコン進化系（ソフト編）</title>
      <link>https://shirata.asablo.jp/blog/2020/11/13/9316029</link>
      <guid>https://shirata.asablo.jp/blog/2020/11/13/9316029</guid>
      <pubDate>Fri, 13 Nov 2020 00:34:17 +0900</pubDate>
      <dcterms:modified>2020-11-13T01:05:36+09:00</dcterms:modified>
      <dcterms:created>2020-11-13T00:45:43+09:00</dcterms:created>
      <description>&lt;a href="http://shirata.asablo.jp/blog/2020/11/12/9315950"&gt;前回の記事&lt;/a&gt;の構想に基づいて実装してみた。&lt;/br&gt;&#13;
&#13;
ウインカーはハンドル切らないと点滅しないのではなんだかなぁなので、ステアリングとは連動しないで十字ボタンの左右で制御することにした。ブレーキはESCが勝手に制御するのでESP32からは制動中であることが判らない。R1プレス中に点灯することで妥協する。&lt;/br&gt;&#13;
&#13;
ブザーとLEDによる操作反応は結構イケている。でもバッテリーの消費が早すぎる気がするが、ESP32が多喰らいなのと電源監視のADCに常時加圧しているのが原因かな。この辺は改善の余地あり。&lt;/br&gt;&#13;
&#13;
&lt;pre&gt;&#13;
/*******************************************************************************&#13;
  デバグ用マクロ&#13;
*******************************************************************************/&#13;
&#13;
// DEBUGマクロを定義するとデバグ情報をシリアルポートへ出力する&#13;
#define DEBUG&#13;
&#13;
#if defined(DEBUG)&#13;
#define DSTART() Serial.begin(115200)&#13;
#define DPRINTF(...) Serial.printf(__VA_ARGS__)&#13;
#else&#13;
#define DSTART()&#13;
#define DPRINTF(...)&#13;
#endif&#13;
&#13;
/*******************************************************************************&#13;
  使用ライブラリのヘッダファイル&#13;
*******************************************************************************/&#13;
&#13;
#include &amp;lt;Ps3Controller.h&amp;gt;&#13;
#include &amp;lt;ESP32Servo.h&amp;gt;&#13;
#include &amp;lt;Preferences.h&amp;gt;&#13;
&#13;
/*******************************************************************************&#13;
  定数定義&#13;
*******************************************************************************/&#13;
&#13;
// このプログラムの名前空間と最大チャンネル数&#13;
const char NAME_SPACE[] = "ESP32RCPS3BT6CH";&#13;
const int MAX_SERVO_NUM = 16;&#13;
const int   MAX_LED_NUM = 16;&#13;
&#13;
// PS3コントローラのアナログコントロールスティック／ボタンとサーボチャンネルの対応&#13;
enum SERVO_CH {LX_CH, LY_CH, RX_CH, RY_CH, L1L2_CH, R1R2_CH};&#13;
&#13;
// ライトとLEDチャンネルの対応&#13;
enum LED_CH {HEAD_CH, TAIL_CH, BRAKE_CH, FOG_CH, LWINK_CH, RWINK_CH};&#13;
&#13;
// ステアリング／スロットルとPS3コントローラの対応&#13;
const int STEERING_CH = LX_CH;&#13;
const int THROTTLE_CH = R1R2_CH;&#13;
&#13;
/*******************************************************************************&#13;
  型定義&#13;
*******************************************************************************/&#13;
&#13;
// ピンアサイン&#13;
typedef struct {&#13;
  uint8_t adc;&#13;
  uint8_t buzzer;&#13;
  uint8_t servo[MAX_SERVO_NUM];&#13;
  uint8_t led[MAX_LED_NUM];&#13;
} pin_asign_t;&#13;
&#13;
// サーボ諸元&#13;
typedef struct {&#13;
  uint16_t min_pulse_width;&#13;
  uint16_t max_pulse_width;&#13;
  int8_t neutral_deg;&#13;
} servo_factor_t;&#13;
&#13;
// 全体構成&#13;
typedef struct {&#13;
  servo_factor_t servo_factor;&#13;
  uint8_t neutral_margin;&#13;
  uint32_t led_interval;&#13;
  float min_voltage;&#13;
  uint8_t servo_num;&#13;
  uint8_t led_num;&#13;
  pin_asign_t pin;&#13;
} conf_t;&#13;
&#13;
// サーボ調整&#13;
typedef struct {&#13;
  int8_t neutral[MAX_SERVO_NUM];&#13;
  uint8_t range[MAX_SERVO_NUM];&#13;
  uint16_t reverse;&#13;
} servo_trim_t;&#13;
&#13;
/*******************************************************************************&#13;
  グローバル変数定義&#13;
*******************************************************************************/&#13;
&#13;
// 全体構成&#13;
conf_t conf = {{500, 2500, 90}, 20, 100000, 4.5, 6, 6,&#13;
  {34, 13, {32, 33, 25, 26, 27, 14}, {19, 18, 5, 17, 16, 4}}&#13;
};&#13;
&#13;
// サーボ調整&#13;
servo_trim_t trim = {{0, 0, 0, 0, 0, 0}, {45, 45, 45, 45, 45, 45}, 0};&#13;
&#13;
Preferences pref;&#13;
&#13;
// サーボインスタンス、サーボ調整修飾ボタン（□△○×）状態、サーボ調整対象チャンネル、緊急処理中&#13;
Servo servo[MAX_SERVO_NUM];&#13;
uint8_t servo_trim_bn = 0;&#13;
uint8_t lr1_bn = 0;&#13;
uint8_t channel = 0;&#13;
uint8_t isEmargency = 0;&#13;
&#13;
// LED状態初期値（タイマー割込同期用ミューテックス,ON/OFF、フラッシュ対象）&#13;
portMUX_TYPE timerMux = portMUX_INITIALIZER_UNLOCKED;&#13;
uint8_t led_val[MAX_LED_NUM] = {LOW, LOW, LOW, LOW};&#13;
uint16_t led_isFlash = bit(LWINK_CH) + bit(RWINK_CH);&#13;
&#13;
/*******************************************************************************&#13;
  ブザー制御&#13;
*******************************************************************************/&#13;
&#13;
void buzzer_op(int count, int t1, int t2)&#13;
{&#13;
  // 回数、有音長、無音長に従ってブザーを鳴らす&#13;
  while (--count &gt; 0) {&#13;
    digitalWrite(conf.pin.buzzer, HIGH);&#13;
    delay(t1);&#13;
    digitalWrite(conf.pin.buzzer, LOW);&#13;
    delay(t2);&#13;
  }&#13;
  digitalWrite(conf.pin.buzzer, HIGH);&#13;
  delay(t1);&#13;
  digitalWrite(conf.pin.buzzer, LOW);&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  ブザー初期化&#13;
*******************************************************************************/&#13;
&#13;
void buzzer_init()&#13;
{&#13;
  // ブザー用ピン割当&#13;
  pinMode(conf.pin.buzzer, OUTPUT);&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  サーボ制御&#13;
*******************************************************************************/&#13;
&#13;
void servo_op(int ch, int val)&#13;
{&#13;
  // リバースが必要な場合値を反転する&#13;
  if (bitRead(trim.reverse, ch)) val = -val;&#13;
&#13;
  // ニュートラル調整と舵角調整で設定された範囲のパルス幅を求める&#13;
  int neutral = conf.servo_factor.neutral_deg + trim.neutral[ch];&#13;
  int pwm_min = map(neutral - trim.range[ch], 0,&#13;
                    conf.servo_factor.neutral_deg * 2,&#13;
                    conf.servo_factor.min_pulse_width,&#13;
                    conf.servo_factor.max_pulse_width);&#13;
  int pwm_max = map(neutral + trim.range[ch], 0,&#13;
                    conf.servo_factor.neutral_deg * 2,&#13;
                    conf.servo_factor.min_pulse_width,&#13;
                    conf.servo_factor.max_pulse_width);&#13;
&#13;
  // コントローラのニュートラル付近にマージンを取る&#13;
  if (abs(val) &lt; conf.neutral_margin) val = 0;&#13;
  else val -= (val &gt;= conf.neutral_margin) ?&#13;
                conf.neutral_margin : -conf.neutral_margin;&#13;
&#13;
  // マージン除外後の範囲に再マッピングしてサーボを動作させる&#13;
  servo[ch].writeMicroseconds(&#13;
    map(val, -128 + conf.neutral_margin,&#13;
        127 + conf.neutral_margin, pwm_min, pwm_max));&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  サーボニュートラル調整&#13;
*******************************************************************************/&#13;
&#13;
void servo_trim_neutral(int dir)&#13;
{&#13;
  // 増減フラグ（非０：増、０：減）&#13;
  int isUp = (dir + 1) &amp; 2;&#13;
&#13;
  // ニュートラル補正の絶対値は90度を越えない&#13;
  if (!isUp &amp;&amp; trim.neutral[channel] &gt; -(int)conf.servo_factor.neutral_deg&#13;
      || isUp &amp;&amp; trim.neutral[channel] &lt; conf.servo_factor.neutral_deg) {&#13;
&#13;
    // Dパッドボタンの右或いは上ボタンなら増加、左或いは下ボタンなら減少&#13;
    trim.neutral[channel] += isUp ? 1 : -1;&#13;
&#13;
    // 舵角とニュートラル補正の絶対値の和が90度を越える場合は舵角を減少&#13;
    trim.range[channel] -=&#13;
      abs(trim.neutral[channel]) + trim.range[channel]&#13;
      &gt; conf.servo_factor.neutral_deg;&#13;
&#13;
    // 設定結果を反映する&#13;
    servo_op(channel, 0);&#13;
  }&#13;
&#13;
  // 限界ならブザーを２回鳴らす&#13;
  else buzzer_op(2, 20, 50);&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  サーボ舵角調整&#13;
*******************************************************************************/&#13;
&#13;
void servo_trim_range(int dir)&#13;
{&#13;
  // 増減フラグ（非０：増、０：減）&#13;
  int isUp = (dir + 1) &amp; 2;&#13;
&#13;
  // Dパッドボタンの右或いは上ボタン（増加）&#13;
  // かつ角幅とニュートラル補正の絶対値の和が90度を越えない場合のみ増加&#13;
  if (isUp &amp;&amp; abs(trim.neutral[channel]) +&#13;
      trim.range[channel] &lt; conf.servo_factor.neutral_deg)&#13;
    ++trim.range[channel];&#13;
&#13;
  // Dパッドボタンの左或いは下ボタン（減少）かつ舵角が0度未満にならない場合のみ減少&#13;
  else if (!isUp &amp;&amp; trim.range[channel] &gt; 0)&#13;
    --trim.range[channel];&#13;
&#13;
  // 限界ならブザーを２回鳴らす&#13;
  else buzzer_op(2, 20, 50);&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  サーボ調整チェック&#13;
*******************************************************************************/&#13;
&#13;
void servo_check()&#13;
{&#13;
  // 動作確認用&#13;
  const int check_val[5] = {0, -128, 0, 127, 0};&#13;
&#13;
  // １秒間隔で５段階動作させる&#13;
  for (int i = 0; i &lt; 5; ++i) {&#13;
    for (int ch = 0; ch &lt; conf.servo_num; ++ch) servo_op(ch, check_val[i]);&#13;
    delay(1000);&#13;
  }&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  サーボ調整&#13;
*******************************************************************************/&#13;
&#13;
void servo_trim(int dir)&#13;
{&#13;
  // 短いブザーを１回鳴らす&#13;
  buzzer_op(1, 10, 0);&#13;
&#13;
  // □ボタンが押されている場合はニュートラル調整&#13;
  if (bitRead(servo_trim_bn, 0)) servo_trim_neutral(dir);&#13;
&#13;
  // △ボタンが押されている場合は舵角調整&#13;
  else if (bitRead(servo_trim_bn, 1)) servo_trim_range(dir);&#13;
&#13;
  // ○ボタンが押されている場合はリバース切替&#13;
  else if (bitRead(servo_trim_bn, 2))&#13;
    bitWrite(trim.reverse, channel, !bitRead(trim.reverse, channel));&#13;
&#13;
  // デバグ情報&#13;
  DPRINTF("Neutral: ");&#13;
  for (int i = 0; i &lt; conf.servo_num; ++i)&#13;
    DPRINTF("%5d ", trim.neutral[i]);&#13;
  DPRINTF("\n");&#13;
  DPRINTF("  Range: ");&#13;
  for (int i = 0; i &lt; conf.servo_num; ++i)&#13;
    DPRINTF("%5d ", trim.range[i]);&#13;
  DPRINTF("\n");&#13;
  DPRINTF("Reverse: %02x\n", trim.reverse);&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  サーボ調整チャンネル選択&#13;
*******************************************************************************/&#13;
&#13;
int select_ch(int ch)&#13;
{&#13;
  // セレクトボタンでサーボ調整用チャンネルを切り替える&#13;
  if (ch &lt; conf.servo_num - 1) {&#13;
&#13;
    // 短いブザーを１回鳴らす&#13;
    buzzer_op(1, 10, 0);&#13;
    ++ch;&#13;
  } else {&#13;
&#13;
    // 一周したら短いブザーを２回鳴らす&#13;
    buzzer_op(2, 10, 100);&#13;
    ch = 0;&#13;
  }&#13;
&#13;
  // 現在のチャンネルをコントローラのLEDで表示する（2進数表現で0〜15）&#13;
  DPRINTF("CHANNEL = %d\n", ch);&#13;
  ps3_cmd_t cmd = {0};&#13;
  *(((uint8_t *)&amp;cmd) + 4) = ch;&#13;
  ps3Cmd(cmd);&#13;
  return ch;&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  サーボ調整情報入力&#13;
*******************************************************************************/&#13;
&#13;
void read_trim()&#13;
{&#13;
  // サーボ調整情報を入力する（無ければ初期値を温存）&#13;
  pref.getBytes("trim", &amp;trim, sizeof(trim));&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  サーボ調整情報出力&#13;
*******************************************************************************/&#13;
&#13;
void write_trim()&#13;
{&#13;
  // 現在のサーボ調整情報を保存する&#13;
  pref.putBytes("trim", &amp;trim, sizeof(trim));&#13;
&#13;
  // ブザーを３回鳴らす&#13;
  buzzer_op(3, 20, 100);&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  サーボ初期化&#13;
*******************************************************************************/&#13;
&#13;
void servo_init()&#13;
{&#13;
  // 全サーボをアタッチしてニュートラルにする&#13;
  for (int ch = 0; ch &lt; conf.servo_num; ++ch) {&#13;
    servo[ch].attach(conf.pin.servo[ch]);&#13;
    servo_op(ch, 0);&#13;
  }&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  LED点滅&#13;
*******************************************************************************/&#13;
&#13;
void led_flash()&#13;
{&#13;
  // トグルスイッチ&#13;
  static byte toggle = HIGH;&#13;
&#13;
  // フラッシュ有効かつON状態のLEDを点滅させる&#13;
  portENTER_CRITICAL(&amp;timerMux);&#13;
  for (int ch = 0; ch &lt; conf.led_num; ++ch)&#13;
    if (led_val[ch] &amp;&amp; bitRead(led_isFlash, ch))&#13;
      digitalWrite(conf.pin.led[ch], toggle);&#13;
    else digitalWrite(conf.pin.led[ch], led_val[ch]);&#13;
  toggle = !toggle;&#13;
  portEXIT_CRITICAL(&amp;timerMux);&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  LED制御&#13;
*******************************************************************************/&#13;
&#13;
void led_op(int ch)&#13;
{&#13;
  // 押されたボタンに対応するチャネルのON/OFF状態を反転して点灯／消灯する&#13;
  portENTER_CRITICAL(&amp;timerMux);&#13;
  digitalWrite(conf.pin.led[ch], led_val[ch] = !led_val[ch]);&#13;
  portEXIT_CRITICAL(&amp;timerMux);&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  ウインカー制御&#13;
*******************************************************************************/&#13;
&#13;
void winker_op(int ch)&#13;
{&#13;
  // 排他連動するチャネル&#13;
  int exch = (ch == LWINK_CH) ? RWINK_CH : LWINK_CH;&#13;
&#13;
  // LWINK_CHとRWINK_CHを排他連動させる&#13;
  if (led_val[LWINK_CH] == led_val[RWINK_CH])&#13;
    led_op((led_val[exch] ? exch : ch));&#13;
  else {&#13;
    if (led_val[exch]) led_op(exch);&#13;
    led_op(ch);&#13;
  }&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  ハザード制御&#13;
*******************************************************************************/&#13;
&#13;
void hazard_op()&#13;
{&#13;
  // LWINK_CHとRWINK_CHを同期連動させる&#13;
  if (led_val[LWINK_CH] == led_val[RWINK_CH]) {&#13;
    led_op(LWINK_CH);&#13;
    led_op(RWINK_CH);&#13;
  }&#13;
  else led_op(led_val[LWINK_CH] == HIGH ? RWINK_CH : LWINK_CH);&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  LED初期化&#13;
*******************************************************************************/&#13;
&#13;
void led_init()&#13;
{&#13;
  // 全LEDをピンモード設定して初期化（消灯）する&#13;
  for (int ch = 0; ch &lt; conf.led_num; ++ch) {&#13;
    pinMode(conf.pin.led[ch], OUTPUT);&#13;
    digitalWrite(conf.pin.led[ch], led_val[ch]);&#13;
  }&#13;
&#13;
  // タイマー割り込みを有効にする&#13;
  // タイマー番号=0、分周比=80:80MHz/80=1マイクロ秒、カウントアップ、エッジタイプ、自動再起動&#13;
  hw_timer_t *flash_timer = timerBegin(0, 80, true);&#13;
  timerAttachInterrupt(flash_timer, &amp;led_flash, true);&#13;
  timerAlarmWrite(flash_timer, conf.led_interval, true);&#13;
  timerAlarmEnable(flash_timer);&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  緊急制御&#13;
*******************************************************************************/&#13;
&#13;
void emergency_op()&#13;
{&#13;
  // 緊急処理中&#13;
  isEmargency = 1;&#13;
&#13;
  // 全サーボをニュートラルに戻す&#13;
  for (int ch = 0; ch &lt; conf.servo_num; ++ch) servo_op(ch, 0);&#13;
&#13;
  // 全LEDを点滅する&#13;
  for (int ch = 0; ch &lt; conf.led_num; ++ch) {&#13;
    led_val[ch] = HIGH;&#13;
    led_isFlash = 0xffff;&#13;
  }&#13;
&#13;
  // ブザーを10回鳴らす&#13;
  buzzer_op(10, 20, 100);&#13;
  DPRINTF("shutdown!!!\n");&#13;
&#13;
  // 念の為もう一度全サーボをニュートラルに戻す&#13;
  for (int ch = 0; ch &lt; conf.servo_num; ++ch) servo_op(ch, 0);&#13;
&#13;
  // スリープする&#13;
  delay(1000);&#13;
  esp_deep_sleep_start();&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  PS3コントローライベントハンドラ&#13;
*******************************************************************************/&#13;
&#13;
void notify()&#13;
{&#13;
  // 緊急処理中はイベントを無視する&#13;
  if (isEmargency) return;&#13;
&#13;
  // アナログスティックイベント&#13;
  // アナログスティックLXチェンジ（LX_CH）&#13;
  if (Ps3.event.analog_changed.stick.lx)&#13;
    servo_op(LX_CH, Ps3.data.analog.stick.lx);&#13;
  // アナログスティックLYチェンジ（LY_CH）&#13;
  if (Ps3.event.analog_changed.stick.ly)&#13;
    servo_op(LY_CH, Ps3.data.analog.stick.ly);&#13;
  // アナログスティックRXチェンジ（RX_CH）&#13;
  if (Ps3.event.analog_changed.stick.rx)&#13;
    servo_op(RX_CH, Ps3.data.analog.stick.rx);&#13;
  // アナログスティックRYチェンジ（RY_CH）&#13;
  if (Ps3.event.analog_changed.stick.ry)&#13;
    servo_op(RY_CH, Ps3.data.analog.stick.ry);&#13;
&#13;
  // ショルダー／トリガーボタンイベント&#13;
  // ショルダーL1プレスとトリガーL2チェンジの組み合わせ（L1L2_CH）&#13;
  if (Ps3.event.button_down.l1) {&#13;
    bitSet(lr1_bn, 0);&#13;
    // ブレーキランプ&#13;
    if (THROTTLE_CH == L1L2_CH) led_op(BRAKE_CH);&#13;
  }&#13;
  if (Ps3.event.button_up.l1) {&#13;
    bitClear(lr1_bn, 0);&#13;
    // ブレーキランプ&#13;
    if (THROTTLE_CH == L1L2_CH) led_op(BRAKE_CH);&#13;
  }&#13;
  if (Ps3.event.analog_changed.button.l2)&#13;
    servo_op(L1L2_CH, Ps3.data.analog.button.l2&#13;
             / (bitRead(lr1_bn, 0) ? -2 : 2));&#13;
  // ショルダーR1プレスとトリガーR2チェンジの組み合わせ（R1R2_CH）&#13;
  if (Ps3.event.button_down.r1) {&#13;
    bitSet(lr1_bn, 1);&#13;
    // ブレーキランプ&#13;
    if (THROTTLE_CH == R1R2_CH) led_op(BRAKE_CH);&#13;
  }&#13;
  if (Ps3.event.button_up.r1) {&#13;
    bitClear(lr1_bn, 1);&#13;
    // ブレーキランプ&#13;
    if (THROTTLE_CH == R1R2_CH) led_op(BRAKE_CH);&#13;
  }&#13;
  if (Ps3.event.analog_changed.button.r2)&#13;
    servo_op(R1R2_CH, Ps3.data.analog.button.r2&#13;
             / (bitRead(lr1_bn, 1) ? -2 : 2));&#13;
&#13;
  // セレクト／スタート／PSボタンイベント&#13;
  // PSボタンプレス（サーボ調整チェック）&#13;
  if (Ps3.event.button_down.ps) servo_check();&#13;
  // セレクトボタンプレス（サーボ調整用チャンネル選択）&#13;
  if (Ps3.event.button_down.select) channel = select_ch(channel);&#13;
  // スタートボタンプレス（ハザード）&#13;
  if (Ps3.event.button_down.start) hazard_op();&#13;
&#13;
  // サーボ調整修飾用ボタンイベント（0:□、1:△、2:○、3:☓）&#13;
  // □ボタンプレス／リリース（ニュートラル調整用）&#13;
  if (Ps3.event.button_down.square) bitSet(servo_trim_bn, 0);&#13;
  if (Ps3.event.button_up.square) bitClear(servo_trim_bn, 0);&#13;
  // △ボタンプレス／リリース（舵角調整用）&#13;
  if (Ps3.event.button_down.triangle) bitSet(servo_trim_bn, 1);&#13;
  if (Ps3.event.button_up.triangle) bitClear(servo_trim_bn, 1);&#13;
  // ○ボタンプレス／リリース（反転用）&#13;
  if (Ps3.event.button_down.circle) bitSet(servo_trim_bn, 2);&#13;
  if (Ps3.event.button_up.circle) bitClear(servo_trim_bn, 2);&#13;
  // ☓ボタンプレス／リリース（未使用）&#13;
  if (Ps3.event.button_down.cross) bitSet(servo_trim_bn, 3);&#13;
  if (Ps3.event.button_up.cross) bitClear(servo_trim_bn, 3);&#13;
&#13;
  // Dパッドボタンイベント（0:左、1:上、2:右、3:下）&#13;
  // サーボ調整情操作&#13;
  if (servo_trim_bn) {&#13;
    // 下げる&#13;
    if (Ps3.event.button_down.left) servo_trim(0);&#13;
    else if (Ps3.event.button_down.down) servo_trim(3);&#13;
    // 上げる&#13;
    else if (Ps3.event.button_down.up) servo_trim(1);&#13;
    else if (Ps3.event.button_down.right) servo_trim(2);&#13;
  }&#13;
&#13;
  // LED操作&#13;
  else {&#13;
    // ヘッドライトとテールライト&#13;
    if (Ps3.event.button_down.up) {&#13;
      led_op(HEAD_CH);&#13;
      led_op(TAIL_CH);&#13;
    }&#13;
    // フォグライト&#13;
    else if (Ps3.event.button_down.down) led_op(FOG_CH);&#13;
    // 左ウインカー&#13;
    else if (Ps3.event.button_down.left) winker_op(LWINK_CH);&#13;
    // 右ウインカー&#13;
    else if (Ps3.event.button_down.right) winker_op(RWINK_CH);&#13;
  }&#13;
&#13;
  // バッテリーイベント（PS3コントローラのバッテリー切れ時の緊急停止）&#13;
  if (Ps3.data.status.battery == ps3_status_battery_dying&#13;
      || Ps3.data.status.battery == ps3_status_battery_shutdown)&#13;
    emergency_op();&#13;
&#13;
  // L3ボタン押下イベント（サーボ調整情報保存）&#13;
  if (Ps3.event.button_down.l3) write_trim();&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  PS3コントローラ接続完了イベント&#13;
*******************************************************************************/&#13;
&#13;
void onConnect()&#13;
{&#13;
  // ブザーを２回鳴らしてハザード解除する&#13;
  buzzer_op(2, 20, 100);&#13;
  hazard_op();&#13;
&#13;
  // サーボ調整用チャンネルを初期化する&#13;
  select_ch(-1);&#13;
  DPRINTF("Connected!\n");&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  PS3コントローラ接続&#13;
*******************************************************************************/&#13;
&#13;
void connect_controller()&#13;
{&#13;
  // ESP32のMACアドレス（バイナリ、文字列）&#13;
  uint8_t btmac[6];&#13;
  char btmac_str[20];&#13;
&#13;
  // PS3コントローラを接続する&#13;
  Ps3.attach(notify);&#13;
  Ps3.attachOnConnect(onConnect);&#13;
  Ps3.attachOnDisconnect(emergency_op);&#13;
  esp_read_mac(btmac, ESP_MAC_BT);&#13;
  sprintf(btmac_str, "%02x:%02x:%02x:%02x:%02x:%02x",&#13;
          btmac[0], btmac[1], btmac[2], btmac[3], btmac[4], btmac[5]);&#13;
  DPRINTF("MAC: %s\n", btmac_str);&#13;
  Ps3.begin(btmac_str);&#13;
  DPRINTF("Ready...\n");&#13;
&#13;
  // ハザード点滅してブザーを１回鳴らす&#13;
  hazard_op();&#13;
  buzzer_op(1, 20, 0);&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  電源チェック&#13;
*******************************************************************************/&#13;
&#13;
void power_check()&#13;
{&#13;
  static int count = 5;&#13;
&#13;
  // 電源監視&#13;
  int value = analogRead(conf.pin.adc);&#13;
  float voltage = value * 2 * (3.6 / 4096);&#13;
  DPRINTF("value = %4d, voltage = %3.2f count = %d\n", value, voltage, count);&#13;
  if (voltage &lt; conf.min_voltage)&#13;
    // 突発的な低下は5回まで見逃してやる&#13;
    if (--count &lt;= 0) emergency_op();&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  セットアップ&#13;
*******************************************************************************/&#13;
&#13;
void setup()&#13;
{&#13;
  // デバグ情報を有効化する&#13;
  DSTART();&#13;
&#13;
  // トリム情報を入力して初期化する&#13;
  pref.begin(NAME_SPACE, false);&#13;
  read_trim();&#13;
&#13;
  // ブザー、サーボ、LEDを初期化する&#13;
  buzzer_init();&#13;
  servo_init();&#13;
  led_init();&#13;
&#13;
  // PS3コントローラを接続する&#13;
  connect_controller();&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  メインループ&#13;
*******************************************************************************/&#13;
&#13;
void loop()&#13;
{&#13;
  // 電源チェック&#13;
  if (Ps3.isConnected()) power_check();&#13;
  delay(1000);&#13;
}&#13;
&lt;/pre&gt;
</description>
      <dc:subject>esp32</dc:subject>
    </item>
    <item>
      <title>ESP32ラジコン進化系（ハード編）</title>
      <link>https://shirata.asablo.jp/blog/2020/11/12/9315950</link>
      <guid>https://shirata.asablo.jp/blog/2020/11/12/9315950</guid>
      <pubDate>Thu, 12 Nov 2020 20:29:08 +0900</pubDate>
      <dcterms:modified>2020-11-13T21:06:54+09:00</dcterms:modified>
      <dcterms:created>2020-11-12T20:54:12+09:00</dcterms:created>
      <description>&lt;a href="http://shirata.asablo.jp/blog/2020/11/12/9315670"&gt;前回の記事&lt;/a&gt;で最低限の機能は実現できたが、実用レベルにはほど遠い。&lt;/br&gt;&#13;
&#13;
サーボのニュートラルや舵角調整、反転、そしてその結果の永続化は必須機能だ。当初はWiFi接続してスマホかタブレットからリッチなUIで調整操作することを目論んだが、流石にBTとWiFi両方のライブラリを組み込むとフラッシュメモリが足りなかったので諦めた。&lt;/br&gt;&#13;
&#13;
そこでPS3コントローラのボタン操作で簡単に調整操作する方法を考えた。右の4つのボタンで機能を選択、左の十字ボタンで増減を指定、セレクトボタンを押す毎にチャンネルが切り替わると。しかし、画面がない状態で操作するのは心もとないので、ブザーでクリック音を出すと同時に、PS3コントローラやESP32でLEDを光らせたり実際にサーボを動作させて、操作に対する反応を視聴覚的に返すようにする。&lt;/br&gt;&#13;
&#13;
折角LEDを制御するなら、車のヘッドライトやウインカーを見立ててLED操作出来るようにしよう。6系統の制御を可能とするが、LEDの数はその倍必要。ペアのLEDは直列接続で良いのかな？&lt;/br&gt;&#13;
&#13;
更にラジコンはバッテリ使用となるので、バッテリ切れが心配だ。そこで、ESP32とPS３コントローラ両方の電源監視機能も加える。PS3コントローラには元々電源監視機能が備わっているのでイベントを拾うだけで済むが、ESP32では電源が6Vなので、10kΩの抵抗を2つ使って半分に分圧してADCで監視すれば良い。&lt;/br&gt;&#13;
&#13;
6サーボの内幾つかはESCを使用する予定なので、実際には7.4VのリポバッテリからESCのBECで6Vが供給される事になる。ESCにも電源監視機能がありモーターは停止するので、サーボをニュートラルに戻すだけで良いかな。ESCが先に停止する様に限界電圧を調整しよう。ESP32が動作不安定にならない程度で。&lt;/br&gt;&#13;
&#13;
これでほぼ実用レベルになるだろう。これら全てを実現するための配線がこれ。&lt;/br&gt;
</description>
      <enclosure url="https://shirata.asablo.jp/blog/img/2020/11/12/5c37e6.png" length="59006" type="image/png"/>
      <dc:subject>esp32</dc:subject>
    </item>
    <item>
      <title>PS3コントローラでサーボ制御</title>
      <link>https://shirata.asablo.jp/blog/2020/11/12/9315670</link>
      <guid>https://shirata.asablo.jp/blog/2020/11/12/9315670</guid>
      <pubDate>Thu, 12 Nov 2020 02:59:49 +0900</pubDate>
      <dcterms:modified>2020-11-12T04:16:03+09:00</dcterms:modified>
      <dcterms:created>2020-11-12T03:37:58+09:00</dcterms:created>
      <description>PS3コントローラを接続できたので、サーボを動かしてみる。&lt;/br&gt;&#13;
&#13;
ESP32は16個までのサーボが制御可能な様だが、そんなにいらないので6ch仕様にする。4ch分はアナログスティックを使用するが、残り2ch分はトリガーを使用することにした。&lt;/br&gt;&#13;
&#13;
トリガーが返す値は0〜255でニュートラルがないので、ショルダーとの組み合わせでアナログスティックと同様に-128〜127を得る（ショルダープレスでマイナス、トリガーリリースでニュートラルとなる）様にする。&lt;/br&gt;&#13;
&#13;
ESP32でサーボを制御するには、&lt;a href="https://github.com/madhephaestus/ESP32Servo"&gt;ESP32Servo&lt;/a&gt;を使用するらしい。Servo::writeを使うと分解能が1度になってしまいもったいないので、Servo::writeMicrosecondsを使用する。パルス幅は使用するサーボの諸元に応じて定義する。&lt;/br&gt;&#13;
&#13;
後々、ニュートラルや舵角調整、反転を調整可能としたいが、取り敢えず初期値で定義しておく。&lt;/br&gt;&#13;
&#13;
アナログスティックはニュートラルが安定しないので、マージンを取るようにした。&lt;/br&gt;&#13;
&#13;
ESP32にサーボを適切に接続して、以下のスケッチを実行してPS3コントローラと接続すると、6ch分のサーボ制御が出来た。&#13;
&#13;
&lt;pre&gt;&#13;
/*******************************************************************************&#13;
  デバグ用マクロ&#13;
*******************************************************************************/&#13;
&#13;
// DEBUGマクロを定義するとデバグ情報をシリアルポートへ出力する&#13;
#define DEBUG&#13;
&#13;
#if defined(DEBUG)&#13;
#define DSTART() Serial.begin(115200)&#13;
#define DPRINTF(...) Serial.printf(__VA_ARGS__)&#13;
#else&#13;
#define DSTART()&#13;
#define DPRINTF(...)&#13;
#endif&#13;
&#13;
/*******************************************************************************&#13;
  使用ライブラリのヘッダファイル&#13;
*******************************************************************************/&#13;
&#13;
#include &amp;lt;Ps3Controller.h&amp;gt;&#13;
#include &amp;lt;ESP32Servo.h&amp;gt;&#13;
&#13;
/*******************************************************************************&#13;
  定数定義&#13;
*******************************************************************************/&#13;
&#13;
// 最大チャンネル数&#13;
const int MAX_SERVO_NUM = 16;&#13;
&#13;
// PS3コントローラのアナログコントロールスティック／トリガーとサーボチャンネルの対応&#13;
enum SERVO_CH {LX_CH, LY_CH, RX_CH, RY_CH, L1L2_CH, R1R2_CH};&#13;
&#13;
/*******************************************************************************&#13;
  型定義&#13;
*******************************************************************************/&#13;
&#13;
// ピンアサイン&#13;
typedef struct {&#13;
  uint8_t servo[MAX_SERVO_NUM];&#13;
} pin_asign_t;&#13;
&#13;
// サーボ諸元&#13;
typedef struct {&#13;
  uint16_t min_pulse_width;&#13;
  uint16_t max_pulse_width;&#13;
  int8_t neutral_deg;&#13;
} servo_factor_t;&#13;
&#13;
// 全体構成&#13;
typedef struct {&#13;
  servo_factor_t servo_factor;&#13;
  uint8_t neutral_margin;&#13;
  uint8_t servo_num;&#13;
  pin_asign_t pin;&#13;
} conf_t;&#13;
&#13;
// サーボ調整&#13;
typedef struct {&#13;
  int8_t neutral[MAX_SERVO_NUM];&#13;
  uint8_t range[MAX_SERVO_NUM];&#13;
  uint16_t reverse; // （ビット配列）&#13;
} servo_trim_t;&#13;
&#13;
/*******************************************************************************&#13;
  グローバル変数定義&#13;
*******************************************************************************/&#13;
&#13;
// 全体構成&#13;
conf_t conf = {{500, 2500, 90} /* （SG92Rの場合） */, 20, 6,&#13;
  {{32, 33, 25, 26, 27, 14}}&#13;
};&#13;
&#13;
// サーボ調整&#13;
servo_trim_t trim = {{0, 0, 0, 0, 0, 0}, {45, 45, 45, 45, 45, 45}, 0};&#13;
&#13;
// サーボインスタンス、ショルダーボタン状態（ビット配列）&#13;
Servo servo[MAX_SERVO_NUM];&#13;
uint8_t lr1_bn = 0;&#13;
&#13;
/*******************************************************************************&#13;
  サーボ制御&#13;
*******************************************************************************/&#13;
&#13;
void servo_op(int ch, int val)&#13;
{&#13;
  // リバースが必要な場合値を反転する&#13;
  if (bitRead(trim.reverse, ch)) val = -val;&#13;
&#13;
  // ニュートラル調整と舵角調整で設定された範囲のパルス幅を求める&#13;
  int neutral = conf.servo_factor.neutral_deg + trim.neutral[ch];&#13;
  int pwm_min = map(neutral - trim.range[ch], 0,&#13;
                    conf.servo_factor.neutral_deg * 2,&#13;
                    conf.servo_factor.min_pulse_width,&#13;
                    conf.servo_factor.max_pulse_width);&#13;
  int pwm_max = map(neutral + trim.range[ch], 0,&#13;
                    conf.servo_factor.neutral_deg * 2,&#13;
                    conf.servo_factor.min_pulse_width,&#13;
                    conf.servo_factor.max_pulse_width);&#13;
&#13;
  // コントローラのニュートラル付近にマージンを取る&#13;
  if (abs(val) &lt; conf.neutral_margin) val = 0;&#13;
  else val -= (val &gt;= conf.neutral_margin) ?&#13;
                conf.neutral_margin : -conf.neutral_margin;&#13;
&#13;
  // マージン除外後の範囲に再マッピングしてサーボを動作させる&#13;
  servo[ch].writeMicroseconds(&#13;
    map(val, -128 + conf.neutral_margin,&#13;
        127 + conf.neutral_margin, pwm_min, pwm_max));&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  サーボ初期化&#13;
*******************************************************************************/&#13;
&#13;
void servo_init()&#13;
{&#13;
  // 全サーボをアタッチしてニュートラルにする&#13;
  for (int ch = 0; ch &lt; conf.servo_num; ++ch) {&#13;
    servo[ch].attach(conf.pin.servo[ch]);&#13;
    servo_op(ch, 0);&#13;
  }&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  PS3コントローライベントハンドラ&#13;
*******************************************************************************/&#13;
&#13;
void notify()&#13;
{&#13;
  // アナログスティックイベント&#13;
  // アナログスティックLXチェンジ（LX_CH）&#13;
  if (Ps3.event.analog_changed.stick.lx)&#13;
    servo_op(LX_CH, Ps3.data.analog.stick.lx);&#13;
  // アナログスティックLYチェンジ（LY_CH）&#13;
  if (Ps3.event.analog_changed.stick.ly)&#13;
    servo_op(LY_CH, Ps3.data.analog.stick.ly);&#13;
  // アナログスティックRXチェンジ（RX_CH）&#13;
  if (Ps3.event.analog_changed.stick.rx)&#13;
    servo_op(RX_CH, Ps3.data.analog.stick.rx);&#13;
  // アナログスティックRYチェンジ（RY_CH）&#13;
  if (Ps3.event.analog_changed.stick.ry)&#13;
    servo_op(RY_CH, Ps3.data.analog.stick.ry);&#13;
&#13;
  // ショルダー／トリガーボタンイベント&#13;
  // ショルダーL1プレスとトリガーL2チェンジの組み合わせ（L1L2_CH）&#13;
  if (Ps3.event.button_down.l1) bitSet(lr1_bn, 0);&#13;
  if (Ps3.event.button_up.l1) bitClear(lr1_bn, 0);&#13;
  if (Ps3.event.analog_changed.button.l2)&#13;
    servo_op(L1L2_CH, Ps3.data.analog.button.l2&#13;
             / (bitRead(lr1_bn, 0) ? -2 : 2));&#13;
  // ショルダーR1プレスとトリガーR2チェンジの組み合わせ（R1R2_CH）&#13;
  if (Ps3.event.button_down.r1) bitSet(lr1_bn, 1);&#13;
  if (Ps3.event.button_up.r1) bitClear(lr1_bn, 1);&#13;
  if (Ps3.event.analog_changed.button.r2)&#13;
    servo_op(R1R2_CH, Ps3.data.analog.button.r2&#13;
             / (bitRead(lr1_bn, 1) ? -2 : 2));&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  PS3コントローラ接続完了イベント&#13;
*******************************************************************************/&#13;
&#13;
void onConnect()&#13;
{&#13;
  DPRINTF("Connected!\n");&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  PS3コントローラ接続&#13;
*******************************************************************************/&#13;
&#13;
void connect_controller()&#13;
{&#13;
  // ESP32のMACアドレス（バイナリ、文字列）&#13;
  uint8_t btmac[6];&#13;
  char btmac_str[20];&#13;
&#13;
  // PS3コントローラを接続する&#13;
  Ps3.attach(notify);&#13;
  Ps3.attachOnConnect(onConnect);&#13;
  esp_read_mac(btmac, ESP_MAC_BT);&#13;
  sprintf(btmac_str, "%02x:%02x:%02x:%02x:%02x:%02x",&#13;
          btmac[0], btmac[1], btmac[2], btmac[3], btmac[4], btmac[5]);&#13;
  DPRINTF("MAC: %s\n", btmac_str);&#13;
  Ps3.begin(btmac_str);&#13;
  DPRINTF("Ready...\n");&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  セットアップ&#13;
*******************************************************************************/&#13;
&#13;
void setup()&#13;
{&#13;
  // デバグ情報を有効化する&#13;
  DSTART();&#13;
&#13;
  // サーボを初期化する&#13;
  servo_init();&#13;
&#13;
  // PS3コントローラを接続する&#13;
  connect_controller();&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  メインループ&#13;
*******************************************************************************/&#13;
&#13;
void loop()&#13;
{&#13;
}&#13;
&lt;/pre&gt;
</description>
      <dc:subject>esp32</dc:subject>
    </item>
    <item>
      <title>ESP32にPS3コントローラをBT接続</title>
      <link>https://shirata.asablo.jp/blog/2020/11/12/9315665</link>
      <guid>https://shirata.asablo.jp/blog/2020/11/12/9315665</guid>
      <pubDate>Thu, 12 Nov 2020 01:04:28 +0900</pubDate>
      <dcterms:modified>2020-11-12T01:56:59+09:00</dcterms:modified>
      <dcterms:created>2020-11-12T01:23:00+09:00</dcterms:created>
      <description>ESP32にPS3コントローラをBT接続してみる。&lt;/br&gt;&#13;
&#13;
以下のスケッチを実行するとESP32のMACアドレスが表示されるので、PCにPS3コントローラをUSB接続し、&lt;a href="http://shirata.asablo.jp/blog/2020/11/11/9315528"&gt;前の記事&lt;/a&gt;でビルドしたsixaxispairerにESP32のMACアドレスを指定してペアリングする。&lt;/br&gt;&#13;
&#13;
PS3コントローラのUSBを抜いて、PSボタンを押すとESP32に接続する。ちゃんとイベントが発生するか、□△○×ボタンを押して確認する。&#13;
&#13;
&lt;pre&gt;&#13;
/*******************************************************************************&#13;
  デバグ用マクロ&#13;
*******************************************************************************/&#13;
&#13;
// DEBUGマクロを定義するとデバグ情報をシリアルポートへ出力する&#13;
#define DEBUG&#13;
&#13;
#if defined(DEBUG)&#13;
#define DSTART() Serial.begin(115200)&#13;
#define DPRINTF(...) Serial.printf(__VA_ARGS__)&#13;
#else&#13;
#define DSTART()&#13;
#define DPRINTF(...)&#13;
#endif&#13;
&#13;
/*******************************************************************************&#13;
  使用ライブラリのヘッダファイル&#13;
*******************************************************************************/&#13;
&#13;
#include &amp;lt;Ps3Controller.h&amp;gt;&#13;
&#13;
/*******************************************************************************&#13;
  PS3コントローライベントハンドラ&#13;
*******************************************************************************/&#13;
&#13;
void notify()&#13;
{&#13;
  // □ボタンプレス／リリース&#13;
  if (Ps3.event.button_down.square) DPRINTF("□ button down\n");&#13;
  if (Ps3.event.button_up.square) DPRINTF("□ button release\n");&#13;
  // △ボタンプレス／リリース&#13;
  if (Ps3.event.button_down.triangle) DPRINTF("△ button down\n");&#13;
  if (Ps3.event.button_up.triangle) DPRINTF("△ button release\n");&#13;
  // ○ボタンプレス／リリース&#13;
  if (Ps3.event.button_down.circle) DPRINTF("○ button down\n");&#13;
  if (Ps3.event.button_up.circle) DPRINTF("○ button release\n");&#13;
  // ☓ボタンプレス／リリース&#13;
  if (Ps3.event.button_down.cross) DPRINTF("☓ button down\n");&#13;
  if (Ps3.event.button_up.cross) DPRINTF("☓ button release\n");&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  PS3コントローラ接続完了イベント&#13;
*******************************************************************************/&#13;
&#13;
void onConnect()&#13;
{&#13;
  DPRINTF("Connected!\n");&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  PS3コントローラ接続&#13;
*******************************************************************************/&#13;
&#13;
void connect_controller()&#13;
{&#13;
  // ESP32のMACアドレス（バイナリ、文字列）&#13;
  uint8_t btmac[6];&#13;
  char btmac_str[20];&#13;
&#13;
  // PS3コントローラを接続する&#13;
  Ps3.attach(notify);&#13;
  Ps3.attachOnConnect(onConnect);&#13;
  esp_read_mac(btmac, ESP_MAC_BT);&#13;
  sprintf(btmac_str, "%02x:%02x:%02x:%02x:%02x:%02x",&#13;
          btmac[0], btmac[1], btmac[2], btmac[3], btmac[4], btmac[5]);&#13;
  DPRINTF("MAC: %s\n", btmac_str);&#13;
  Ps3.begin(btmac_str);&#13;
  DPRINTF("Ready...\n");&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  セットアップ&#13;
*******************************************************************************/&#13;
&#13;
void setup()&#13;
{&#13;
  // デバグ情報を有効化する&#13;
  DSTART();&#13;
&#13;
  // PS3コントローラを接続する&#13;
  connect_controller();&#13;
}&#13;
&#13;
/*******************************************************************************&#13;
  メインループ&#13;
*******************************************************************************/&#13;
&#13;
void loop()&#13;
{&#13;
}&#13;
&lt;/pre&gt;&#13;
&#13;
うまく行けば、シリアルモニタにはこんな内容が表示される。&lt;/br&gt;&#13;
&#13;
&lt;pre&gt;&#13;
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)&#13;
configsip: 0, SPIWP:0xee&#13;
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00&#13;
mode:DIO, clock div:1&#13;
load:0x3fff0018,len:4&#13;
load:0x3fff001c,len:1216&#13;
ho 0 tail 12 room 4&#13;
load:0x40078000,len:10864&#13;
load:0x40080400,len:6432&#13;
entry 0x400806b8&#13;
MAC: xx:xx:xx:xx:xx:xx&#13;
Ready...&#13;
Connected!&#13;
□ button down&#13;
□ button release&#13;
△ button down&#13;
△ button release&#13;
○ button down&#13;
○ button release&#13;
☓ button down&#13;
☓ button release&#13;
&lt;/pre&gt;
</description>
      <dc:subject>esp32</dc:subject>
    </item>
    <item>
      <title>ESP32とPS3コントローラのペアリング</title>
      <link>https://shirata.asablo.jp/blog/2020/11/11/9315528</link>
      <guid>https://shirata.asablo.jp/blog/2020/11/11/9315528</guid>
      <pubDate>Wed, 11 Nov 2020 18:44:54 +0900</pubDate>
      <dcterms:modified>2020-11-12T02:57:51+09:00</dcterms:modified>
      <dcterms:created>2020-11-11T19:44:24+09:00</dcterms:created>
      <description>ESP32でPS3コントローラを使うには、&lt;a href="https://github.com/jvpernis/esp32-ps3"&gt;esp32-ps3ライブラリ&lt;/a&gt;を使うと良いらしい。&lt;/br&gt;&#13;
&#13;
先ずはペアリングが必要だが、素のESP32ではUSB接続できないのでPC用のツールでペアリングしてやることになるが、&lt;a href="https://dancingpixelstudios.com/sixaxis-controller/sixaxispairtool/" rel="nofollow"&gt;SixaxisPairTool&lt;/a&gt;を使用するのが良いらしい。&lt;/br&gt;&#13;
&#13;
でも我が家にはWindows環境が無いので、&lt;a href="https://github.com/user-none/sixaxispairer"&gt;sixaxispairer&lt;/a&gt;をUbuntuで使用した。&lt;/br&gt;&#13;
&#13;
SixaxisPairToolは&lt;a href="https://github.com/libusb/hidapi#linux"&gt;HID API&lt;/a&gt;に依存しているので、先にインストールしておく。&lt;/br&gt;&#13;
&#13;
sixaxispairerをビルドしてroot権限で実行する。&lt;/br&gt;&#13;
&#13;
最後の2行が実行で、その1行目は現在設定されているMACアドレスの参照、2行目がペアリングするESP32のMACアドレスの設定。&lt;/br&gt;&#13;
&#13;
&lt;pre&gt;&#13;
mkdir ps3controller&#13;
cd ps3controller&#13;
git clone git://github.com/libusb/hidapi.git&#13;
sudo apt-get install libudev-dev libusb-1.0-0-dev libfox-1.6-dev&#13;
sudo apt-get install autotools-dev autoconf automake libtool&#13;
cd hidapi&#13;
./bootstrap&#13;
./configure --prefix=/usr&#13;
make&#13;
sudo make install&#13;
cd ..&#13;
git clone https://github.com/user-none/sixaxispairer.git&#13;
cd sixaxispairer&#13;
mkdir build&#13;
cd build&#13;
cmake .. -DHDIAPI_INCLUDE_DIRS=/usr/include/hidapi -DHIDAPI_LIBRARIES=hidapi-libusb&#13;
sudo ./bin/sixaxispairer&#13;
sudo ./bin/sixaxispairer xx:xx:xx:xx:xx:xx&#13;
&lt;/pre&gt;
</description>
      <dc:subject>esp32</dc:subject>
    </item>
    <item>
      <title>ESP32でラジコンやってみるか</title>
      <link>https://shirata.asablo.jp/blog/2020/11/11/9315491</link>
      <guid>https://shirata.asablo.jp/blog/2020/11/11/9315491</guid>
      <pubDate>Wed, 11 Nov 2020 18:25:55 +0900</pubDate>
      <dcterms:modified>2020-11-11T18:31:10+09:00</dcterms:modified>
      <dcterms:created>2020-11-11T18:28:32+09:00</dcterms:created>
      <description>ESP32で遊んでみたが、結構使える。&#13;&lt;br&gt;
WiFiやBTが使えるので、ラジコンが作れるではないか。&#13;&lt;br&gt;
PS3のコントローラが遊んでいるので、これを利用しよう。&lt;br&gt;
</description>
      <dc:subject>esp32</dc:subject>
    </item>
    <item>
      <title>復活の日</title>
      <link>https://shirata.asablo.jp/blog/2020/11/11/9315490</link>
      <guid>https://shirata.asablo.jp/blog/2020/11/11/9315490</guid>
      <pubDate>Wed, 11 Nov 2020 18:23:19 +0900</pubDate>
      <dcterms:modified>2020-11-11T18:25:17+09:00</dcterms:modified>
      <dcterms:created>2020-11-11T18:24:43+09:00</dcterms:created>
      <description>そうだ、アサブロが有ったんだ。&#13;
久しぶりに投稿してみるか。
</description>
      <dc:subject>日記</dc:subject>
    </item>
    <item>
      <title>pandaboard始動</title>
      <link>https://shirata.asablo.jp/blog/2012/04/20/6419532</link>
      <guid>https://shirata.asablo.jp/blog/2012/04/20/6419532</guid>
      <pubDate>Fri, 20 Apr 2012 00:34:34 +0900</pubDate>
      <dcterms:modified>2012-04-20T00:36:40+09:00</dcterms:modified>
      <dcterms:created>2012-04-20T00:36:40+09:00</dcterms:created>
      <description>やっとまともに動作する様になった。以下ブートログ。&#13;
&#13;
&lt;pre&gt;&#13;
U-Boot SPL 2012.04-rc3-dirty (Apr 19 2012 - 23:40:53)&#13;
OMAP4460 ES1.1&#13;
OMAP SD/MMC: 0&#13;
reading u-boot.img&#13;
reading u-boot.img&#13;
&#13;
&#13;
U-Boot 2012.04-rc3-dirty (Apr 19 2012 - 23:40:53)&#13;
&#13;
CPU  : OMAP4460 ES1.1&#13;
Board: OMAP4 Panda&#13;
I2C:   ready&#13;
DRAM:  1 GiB&#13;
MMC:   OMAP SD/MMC: 0&#13;
Using default environment&#13;
&#13;
In:    serial&#13;
Out:   serial&#13;
Err:   serial&#13;
Net:   No ethernet found.&#13;
Hit any key to stop autoboot:  0 &#13;
reading boot.scr&#13;
&#13;
** Unable to read "boot.scr" from mmc 0:1 **&#13;
reading uImage&#13;
&#13;
3719360 bytes read&#13;
Booting from mmc0 ...&#13;
## Booting kernel from Legacy Image at 82000000 ...&#13;
   Image Name:   Linux-3.3.2&#13;
   Image Type:   ARM Linux Kernel Image (uncompressed)&#13;
   Data Size:    3719296 Bytes = 3.5 MiB&#13;
   Load Address: 80008000&#13;
   Entry Point:  80008000&#13;
   Verifying Checksum ... OK&#13;
   Loading Kernel Image ... OK&#13;
OK&#13;
&#13;
Starting kernel ...&#13;
&#13;
Uncompressing Linux... done, booting the kernel.&#13;
[    0.000000] Booting Linux on physical CPU 0&#13;
[    0.000000] Initializing cgroup subsys cpu&#13;
[    0.000000] Linux version 3.3.2 (yasushi@ubuntu) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #3 SMP Fri Apr 20 00:12:38 JST 2012&#13;
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d&#13;
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache&#13;
[    0.000000] Machine: OMAP4 Panda board&#13;
[    0.000000] Truncating RAM at 80000000-bfffffff to -af7fffff (vmalloc region overlap).&#13;
[    0.000000] Reserving 16777216 bytes SDRAM for VRAM&#13;
[    0.000000] Memory policy: ECC disabled, Data cache writealloc&#13;
[    0.000000] OMAP4: Map 0xae600000 to 0xfe600000 for dram barrier&#13;
[    0.000000] OMAP4460 ES1.0&#13;
[    0.000000] PERCPU: Embedded 8 pages/cpu @c12d4000 s10944 r8192 d13632 u32768&#13;
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 188432&#13;
[    0.000000] Kernel command line: console=ttyO2,115200n8 vram=16M root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait&#13;
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)&#13;
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)&#13;
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)&#13;
[    0.000000] Memory: 742MB = 742MB total&#13;
[    0.000000] Memory: 739672k/739672k available, 38568k reserved, 0K highmem&#13;
[    0.000000] Virtual kernel memory layout:&#13;
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)&#13;
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)&#13;
[    0.000000]     vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)&#13;
[    0.000000]     lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)&#13;
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)&#13;
[    0.000000]       .text : 0xc0008000 - 0xc06c0d7c   (6884 kB)&#13;
[    0.000000]       .init : 0xc06c1000 - 0xc06feac0   ( 247 kB)&#13;
[    0.000000]       .data : 0xc0700000 - 0xc077b4a0   ( 494 kB)&#13;
[    0.000000]        .bss : 0xc077b4c4 - 0xc0cd65ec   (5485 kB)&#13;
[    0.000000] Hierarchical RCU implementation.&#13;
[    0.000000] NR_IRQS:474&#13;
[    0.000000] omap_hwmod: dpll_mpu_m2_ck: missing clockdomain for dpll_mpu_m2_ck.&#13;
[    0.000000] OMAP clockevent source: GPTIMER1 at 32768 Hz&#13;
[    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms&#13;
[    0.000000] Console: colour dummy device 80x30&#13;
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar&#13;
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8&#13;
[    0.000000] ... MAX_LOCK_DEPTH:          48&#13;
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191&#13;
[    0.000000] ... CLASSHASH_SIZE:          4096&#13;
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384&#13;
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768&#13;
[    0.000000] ... CHAINHASH_SIZE:          16384&#13;
[    0.000000]  memory used by lock dependency info: 3695 kB&#13;
[    0.000000]  per task-struct memory footprint: 1152 bytes&#13;
[    0.000762] Calibrating delay loop... 1392.74 BogoMIPS (lpj=5439488)&#13;
[    0.062530] pid_max: default: 32768 minimum: 301&#13;
[    0.063079] Security Framework initialized&#13;
[    0.063293] Mount-cache hash table entries: 512&#13;
[    0.067535] Initializing cgroup subsys cpuacct&#13;
[    0.067535] Initializing cgroup subsys devices&#13;
[    0.067565] Initializing cgroup subsys freezer&#13;
[    0.067565] Initializing cgroup subsys blkio&#13;
[    0.067871] CPU: Testing write buffer coherency: ok&#13;
[    0.068695] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000&#13;
[    0.069091] Setting up static identity map for 0x804ce8d0 - 0x804ce928&#13;
[    0.069152] L310 cache controller enabled&#13;
[    0.069183] l2x0: 16 ways, CACHE_ID 0x410000c7, AUX_CTRL 0x7e470000, Cache size: 1048576 B&#13;
[    0.072113] CPU1: Booted secondary processor&#13;
[    0.139373] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001&#13;
[    0.139404] CPU1: Unknown IPI message 0x1&#13;
[    0.139617] Brought up 2 CPUs&#13;
[    0.139617] SMP: Total of 2 processors activated (2792.83 BogoMIPS).&#13;
[    0.142272] devtmpfs: initialized&#13;
[    0.152496] omap_hwmod: l3_div_ck: missing clockdomain for l3_div_ck.&#13;
[    0.157501] omap_hwmod: mcpdm: cannot be enabled (3)&#13;
[    0.163665] print_constraints: dummy: &#13;
[    0.164978] NET: Registered protocol family 16&#13;
[    0.165588] GPMC revision 6.0&#13;
[    0.172546] gpiochip_add: registered GPIOs 0 to 31 on device: gpio&#13;
[    0.172943] OMAP GPIO hardware version 0.1&#13;
[    0.173492] gpiochip_add: registered GPIOs 32 to 63 on device: gpio&#13;
[    0.174285] gpiochip_add: registered GPIOs 64 to 95 on device: gpio&#13;
[    0.175109] gpiochip_add: registered GPIOs 96 to 127 on device: gpio&#13;
[    0.175933] gpiochip_add: registered GPIOs 128 to 159 on device: gpio&#13;
[    0.176727] gpiochip_add: registered GPIOs 160 to 191 on device: gpio&#13;
[    0.180969] omap_mux_init: Add partition: #1: core, flags: 2&#13;
[    0.182891] omap_mux_init: Add partition: #2: wkup, flags: 2&#13;
[    0.186798] _omap_mux_get_by_name: Could not find signal uart1_cts.uart1_cts&#13;
[    0.186828] _omap_mux_get_by_name: Could not find signal uart1_cts.uart1_cts&#13;
[    0.186828] omap_hwmod_mux_init: Could not allocate device mux entry&#13;
[    0.191741]  usbhs_omap: alias fck already exists&#13;
[    0.196838] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.&#13;
[    0.196838] hw-breakpoint: maximum watchpoint size is 4 bytes.&#13;
[    0.210845] OMAP DMA hardware revision 0.0&#13;
[    0.259033] bio: create slab &lt;bio-0&gt; at 0&#13;
[    0.261169] print_constraints: vwl1271: 1800 mV &#13;
[    0.265472] SCSI subsystem initialized&#13;
[    0.269989] usbcore: registered new interface driver usbfs&#13;
[    0.270660] usbcore: registered new interface driver hub&#13;
[    0.271057] usbcore: registered new device driver usb&#13;
[    0.288055] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 400 kHz&#13;
[    0.291290] Skipping twl internal clock init and using bootloader value (unknown osc rate)&#13;
[    0.292480] twl6030: PIH (irq 39) chaining IRQs 368..387&#13;
[    0.294464] print_constraints: VUSB: 3300 mV normal standby&#13;
[    0.295928] print_constraints: VMMC: 1200 &lt;--&gt; 3000 mV at 3000 mV normal standby&#13;
[    0.297637] print_constraints: VPP: 1800 &lt;--&gt; 2500 mV at 1900 mV normal standby&#13;
[    0.299285] print_constraints: VCXIO: 1800 mV normal standby&#13;
[    0.300445] print_constraints: VDAC: 1800 mV normal standby&#13;
[    0.301879] print_constraints: VAUX2_6030: 1200 &lt;--&gt; 2800 mV at 1800 mV normal standby&#13;
[    0.303375] print_constraints: VAUX3_6030: 1000 &lt;--&gt; 3000 mV at 1200 mV normal standby&#13;
[    0.304748] print_constraints: CLK32KG: &#13;
[    0.305938] print_constraints: VANA: 2100 mV normal standby&#13;
[    0.319152] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 400 kHz&#13;
[    0.334747] omap_i2c omap_i2c.3: bus 3 rev2.4.0 at 100 kHz&#13;
[    0.350402] omap_i2c omap_i2c.4: bus 4 rev2.4.0 at 400 kHz&#13;
[    0.353179] Advanced Linux Sound Architecture Driver Version 1.0.24.&#13;
[    0.358459] Switching to clocksource 32k_counter&#13;
[    0.358978] cfg80211: Calling CRDA to update world regulatory domain&#13;
[    0.462860] usbhs_omap usbhs_omap: ehci_logic_fck failed:-2&#13;
[    0.464843] NET: Registered protocol family 2&#13;
[    0.465301] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)&#13;
[    0.466705] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)&#13;
[    0.469696] TCP bind hash table entries: 65536 (order: 9, 2359296 bytes)&#13;
[    0.493194] TCP: Hash tables configured (established 131072 bind 65536)&#13;
[    0.493316] TCP reno registered&#13;
[    0.493377] UDP hash table entries: 512 (order: 3, 40960 bytes)&#13;
[    0.493774] UDP-Lite hash table entries: 512 (order: 3, 40960 bytes)&#13;
[    0.494720] NET: Registered protocol family 1&#13;
[    0.495758] RPC: Registered named UNIX socket transport module.&#13;
[    0.495758] RPC: Registered udp transport module.&#13;
[    0.495788] RPC: Registered tcp transport module.&#13;
[    0.495788] RPC: Registered tcp NFSv4.1 backchannel transport module.&#13;
[    0.496429] NetWinder Floating Point Emulator V0.97 (double precision)&#13;
[    0.660186] VFS: Disk quotas dquot_6.5.2&#13;
[    0.660430] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)&#13;
[    0.662750] JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.&#13;
[    0.663391] msgmni has been set to 1444&#13;
[    0.666595] io scheduler noop registered&#13;
[    0.666595] io scheduler deadline registered&#13;
[    0.666717] io scheduler cfq registered (default)&#13;
[    0.668334] OMAP DSS rev 4.0&#13;
[    0.929992] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled&#13;
[    0.934936] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 104) is a OMAP UART0&#13;
[    0.936309] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1&#13;
[    0.937530] omap_uart.2: ttyO2 at MMIO 0x48020000 (irq = 106) is a OMAP UART2&#13;
[    1.741729] console [ttyO2] enabled&#13;
[    1.746520] omap_uart.3: ttyO3 at MMIO 0x4806e000 (irq = 102) is a OMAP UART3&#13;
[    1.779144] brd: module loaded&#13;
[    1.796478] loop: module loaded&#13;
[    1.803619] mtdoops: mtd device (mtddev=name/number) must be supplied&#13;
[    1.811767] usbcore: registered new interface driver smsc95xx&#13;
[    1.818206] usbcore: registered new interface driver net1080&#13;
[    1.825286] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver&#13;
[    1.832672] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller&#13;
[    1.841766] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1&#13;
[    1.850006] ehci-omap ehci-omap.0: irq 109, io mem 0x4a064c00&#13;
[    1.866668] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00&#13;
[    1.873504] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002&#13;
[    1.880706] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1&#13;
[    1.888336] usb usb1: Product: OMAP-EHCI Host Controller&#13;
[    1.893951] usb usb1: Manufacturer: Linux 3.3.2 ehci_hcd&#13;
[    1.899566] usb usb1: SerialNumber: ehci-omap.0&#13;
[    1.907379] hub 1-0:1.0: USB hub found&#13;
[    1.911468] hub 1-0:1.0: 3 ports detected&#13;
[    1.945037] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver&#13;
[    1.951812] ohci-omap3 ohci-omap3.0: OMAP3 OHCI Host Controller&#13;
[    1.958831] ohci-omap3 ohci-omap3.0: new USB bus registered, assigned bus number 2&#13;
[    1.967132] ohci-omap3 ohci-omap3.0: irq 108, io mem 0x4a064800&#13;
[    2.051330] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001&#13;
[    2.058502] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1&#13;
[    2.066131] usb usb2: Product: OMAP3 OHCI Host Controller&#13;
[    2.071838] usb usb2: Manufacturer: Linux 3.3.2 ohci_hcd&#13;
[    2.077453] usb usb2: SerialNumber: ohci-omap3.0&#13;
[    2.084014] hub 2-0:1.0: USB hub found&#13;
[    2.088012] hub 2-0:1.0: 3 ports detected&#13;
[    2.094329] usbcore: registered new interface driver cdc_wdm&#13;
[    2.100280] Initializing USB Mass Storage driver...&#13;
[    2.105865] usbcore: registered new interface driver usb-storage&#13;
[    2.112213] USB Mass Storage support registered.&#13;
[    2.118133] usbcore: registered new interface driver libusual&#13;
[    2.241668] usb 1-1: new high-speed USB device number 2 using ehci-omap&#13;
[    2.398559] usb 1-1: New USB device found, idVendor=0424, idProduct=9514&#13;
[    2.405670] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0&#13;
[    2.415191] hub 1-1:1.0: USB hub found&#13;
[    2.419433] hub 1-1:1.0: 5 ports detected&#13;
[    2.427124] usbcore: registered new interface driver usbtest&#13;
[    2.434326] mousedev: PS/2 mouse device common for all mice&#13;
[    2.447143] twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0&#13;
[    2.454315] i2c /dev entries driver&#13;
[    2.461242] Driver for 1-wire Dallas network protocol.&#13;
[    2.469085] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec&#13;
[    2.487426] usbcore: registered new interface driver usbhid&#13;
[    2.493316] usbhid: USB HID core driver&#13;
[    2.499450] usbcore: registered new interface driver snd-usb-audio&#13;
[    2.510833] ALSA device list:&#13;
[    2.513946]   No soundcards found.&#13;
[    2.517578] oprofile: hardware counters not available&#13;
[    2.522949] oprofile: using timer interrupt.&#13;
[    2.527954] TCP cubic registered&#13;
[    2.531402] Initializing XFRM netlink socket&#13;
[    2.536010] NET: Registered protocol family 17&#13;
[    2.540802] NET: Registered protocol family 15&#13;
[    2.545684] lib80211: common routines for IEEE802.11 drivers&#13;
[    2.551757] Registering the dns_resolver key type&#13;
[    2.557220] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4&#13;
[    2.565368] ThumbEE CPU extension supported.&#13;
[    2.569915] Registering SWP/SWPB emulation handler&#13;
[    2.581481] omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).&#13;
[    2.589935] omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).&#13;
[    2.599273] Power Management for TI OMAP4.&#13;
[    2.626953] clock: disabling unused clocks to save power&#13;
[    2.657226] Console: switching to colour frame buffer device 80x30&#13;
[    2.670867] omapdss DPI: Could not find exact pixel clock. Requested 23500 kHz, got 23630 kHz&#13;
[    2.683502] regulator_init_complete: VANA: incomplete constraints, leaving on&#13;
[    2.691558] regulator_init_complete: CLK32KG: incomplete constraints, leaving on&#13;
[    2.700683] regulator_init_complete: VDAC: incomplete constraints, leaving on&#13;
[    2.709350] regulator_init_complete: VUSB: incomplete constraints, leaving on&#13;
[    2.718627] twl_rtc twl_rtc: setting system clock to 2000-01-01 03:52:32 UTC (946698752)&#13;
[    2.718627] Waiting for root device /dev/mmcblk0p2...&#13;
[    2.741851] usb 1-1.1: new high-speed USB device number 3 using ehci-omap&#13;
[    2.749084] mmc0: host does not support reading read-only switch. assuming write-enable.&#13;
[    2.761291] mmc0: new high speed SDHC card at address e624&#13;
[    2.768798] mmcblk0: mmc0:e624 SD32G 29.7 GiB &#13;
[    2.786102]  mmcblk0: p1 p2 p3&#13;
[    2.898468] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00&#13;
[    2.898468] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)&#13;
[    2.898468] VFS: Mounted root (ext4 filesystem) on device 179:2.&#13;
[    2.920562] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0&#13;
[    2.926086] mmc1: card claims to support voltages below the defined range. These will be ignored.&#13;
[    2.928833] devtmpfs: mounted&#13;
[    2.929321] Freeing init memory: 244K&#13;
[    2.939117] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)&#13;
[    2.940887] mmc1: new SDIO card at address 0001&#13;
[    2.969970] smsc95xx v1.0.4&#13;
[    3.058624] smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at usb-ehci-omap.0-1.1, smsc95xx USB 2.0 Ethernet, 2a:c5:7e:35:56:b4&#13;
&#13;
Welcome to Fedora 17 (Beefy Miracle)!&#13;
&#13;
Started Replay Read-Ahead Data                                         [  OK  ]&#13;
Starting Collect Read-Ahead Data...                                            &#13;
Started Lock Directory                                                 [  OK  ]&#13;
Starting Media Directory...                                                    &#13;
Starting Runtime Directory...                                                  &#13;
Started Security File System                                           [  OK  ]&#13;
Started Huge Pages File System                                         [  OK  ]&#13;
Starting POSIX Message Queue File System...                                    &#13;
Starting Debug File System...                                                  &#13;
Starting Journal Service...                                                    &#13;
Started Journal Service                                                [  OK  ]&#13;
Starting udev Kernel Device Manager...                                         &#13;
Starting udev Coldplug all Devices...                                          &#13;
[    5.010101] udevd[1153]: starting version 181&#13;
Started udev Kernel Device Manager                                     [  OK  ]&#13;
Started Collect Read-Ahead Data                                        [  OK  ]&#13;
Started Media Directory                                                [  OK  ]&#13;
Started Runtime Directory                                              [  OK  ]&#13;
Started POSIX Message Queue File System                                [  OK  ]&#13;
Started Debug File System                                              [  OK  ]&#13;
Started Load legacy module configuration                               [  OK  ]&#13;
Starting File System Check on Root Device...                                   &#13;
Starting Remount API VFS...                                                    &#13;
Starting Apply Kernel Variables...                                             &#13;
Started Set Up Additional Binary Formats                               [  OK  ]&#13;
Started Load Kernel Modules                                            [  OK  ]&#13;
Started Configuration File System                                      [  OK  ]&#13;
Started FUSE Control File System                                       [  OK  ]&#13;
Starting Setup Virtual Console...                                              &#13;
Started File System Check on Root Device                               [  OK  ]&#13;
Started Remount API VFS                                                [  OK  ]&#13;
Started Apply Kernel Variables                                         [  OK  ]&#13;
Starting Remount Root FS...                                                    &#13;
Started Setup Virtual Console                                          [  OK  ]&#13;
Starting /dev/disk/by-label/swap...                                            &#13;
[    7.251647] Adding 2096124k swap on /dev/mmcblk0p3.  Priority:0 extents:1 across:2096124k SS&#13;
Started /dev/disk/by-label/swap                                        [  OK  ]&#13;
Started udev Coldplug all Devices                                      [  OK  ]&#13;
Starting udev Wait for Complete Device Initialization...                       &#13;
[    8.097808] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)&#13;
Started Remount Root FS                                                [  OK  ]&#13;
Starting Configure read-only root support...                                   &#13;
Started Configure read-only root support                               [  OK  ]&#13;
[   38.671874] wl12xx: loaded&#13;
Started udev Wait for Complete Device Initialization                   [  OK  ]&#13;
Starting Wait for storage scan...                                              &#13;
Starting Show Plymouth Boot Screen...                                          &#13;
Failed to start Show Plymouth Boot Screen                              [FAILED]&#13;
See 'systemctl status plymouth-start.service' for details.                     &#13;
Started Wait for storage scan                                          [  OK  ]&#13;
Starting Initialize storage subsystems (RAID, LVM, etc.)...                    &#13;
Started Initialize storage subsystems (RAID, LVM, etc.)                [  OK  ]&#13;
Starting Initialize storage subsystems (RAID, LVM, etc.)...                    &#13;
Started Initialize storage subsystems (RAID, LVM, etc.)                [  OK  ]&#13;
Started Reconfigure the system on administrator request                [  OK  ]&#13;
Starting Mark the need to relabel after reboot...                              &#13;
Started Relabel all filesystems, if necessary                          [  OK  ]&#13;
Starting Load Random Seed...                                                   &#13;
Starting Recreate Volatile Files and Directories...                            &#13;
Starting Tell Plymouth To Write Out Runtime Data...                            &#13;
Started Mark the need to relabel after reboot                          [  OK  ]&#13;
Started Load Random Seed                                               [  OK  ]&#13;
Started Recreate Volatile Files and Directories                        [  OK  ]&#13;
Started Tell Plymouth To Write Out Runtime Data                        [  OK  ]&#13;
Starting LSB: Mount and unmount network filesystems....                        &#13;
Starting LSB: Bring up/down networking...                                      &#13;
Starting Network Manager...                                                    &#13;
Starting Security Auditing Service...                                          &#13;
Starting SSH server keys generation....                                        &#13;
Starting Login Service...                                                      &#13;
network[2205]: FATAL: Module ipv6 not found.&#13;
Starting Wait for Plymouth Boot Screen to Quit...                              &#13;
Starting System Logging Service...                                             &#13;
Starting Terminate Plymouth Boot Screen...                                     &#13;
Starting D-Bus System Message Bus...                                           &#13;
Failed to start Security Auditing Service                              [FAILED]&#13;
See 'systemctl status auditd.service' for details.                             &#13;
Started Wait for Plymouth Boot Screen to Quit                          [  OK  ]&#13;
Started Terminate Plymouth Boot Screen                                 [  OK  ]&#13;
Starting Command Scheduler...                                                  &#13;
Started Command Scheduler                                              [  OK  ]&#13;
Started D-Bus System Message Bus                                       [  OK  ]&#13;
Stopped systemd-kmsg-syslogd.service                                   [  OK  ]&#13;
Started System Logging Service                                         [  OK  ]&#13;
Started Login Service                                                  [  OK  ]&#13;
Started Network Manager                                                [  OK  ]&#13;
[   45.062622] wl12xx: firmware booted (Rev 6.3.0.0.77)&#13;
Started LSB: Mount and unmount network filesystems.                    [  OK  ]&#13;
Starting Permit User Sessions...                                               &#13;
Started Permit User Sessions                                           [  OK  ]&#13;
Starting Getty on tty1...                                                      &#13;
Started Getty on tty1                                                  [  OK  ]&#13;
Starting Serial Getty on ttyO2...                                              &#13;
Started Serial Getty on ttyO2                                          [  OK  ]&#13;
network[2205]: Bringing up loopback interface:  [  OK  ]&#13;
&#13;
[   46.840148] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1&#13;
Fedora release 17 (Beefy Miracle)&#13;
Kernel 3.3.2 on an armv7l (ttyO2)&#13;
&#13;
fedora-arm login: network[2205]: Bringing up interface eth0:  Active connection state: activating&#13;
network[2205]: Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/1&#13;
network[2205]: state: activated&#13;
network[2205]: Connection activated&#13;
network[2205]: [  OK  ]&#13;
network[2205]: FATAL: Module ipv6 not found.&#13;
Started LSB: Bring up/down networking                                  [  OK  ]&#13;
Started Load static arp entries                                        [  OK  ]&#13;
Starting WPA Supplicant daemon...                                              &#13;
Starting RPC bind service...                                                   &#13;
Started RPC bind service                                               [  OK  ]&#13;
Starting NFS file locking service....                                          &#13;
Started WPA Supplicant daemon                                          [  OK  ]&#13;
Started NFS file locking service.                                      [  OK  ]&#13;
Started SSH server keys generation.                                    [  OK  ]&#13;
Starting OpenSSH server daemon...                                              &#13;
Started OpenSSH server daemon                                          [  OK  ]&#13;
&#13;
Fedora release 17 (Beefy Miracle)&#13;
Kernel 3.3.2 on an armv7l (ttyO2)&#13;
&#13;
fedora-arm login: root&#13;
[root@fedora-arm ~]# &#13;
&lt;/pre&gt;
</description>
      <dc:subject>Linux</dc:subject>
      <dc:subject>Pandaboard</dc:subject>
    </item>
    <item>
      <title>pandaboard仕切り直し</title>
      <link>https://shirata.asablo.jp/blog/2012/04/19/6419273</link>
      <guid>https://shirata.asablo.jp/blog/2012/04/19/6419273</guid>
      <pubDate>Thu, 19 Apr 2012 20:57:54 +0900</pubDate>
      <dcterms:modified>2012-04-20T00:34:02+09:00</dcterms:modified>
      <dcterms:created>2012-04-19T21:36:49+09:00</dcterms:created>
      <description>クロス開発用のホストとして、Ubuntu 12.04 LTS (Precise Pangolin) Daily Build版を使用して一から準備した。クロスツールチェインはlinaro提供のを使用した。以下はubuntuをインストールした直後の手順。&lt;br&gt;&#13;
&#13;
&lt;pre&gt;&#13;
sudo apt-get update&#13;
sudo apt-get upgrade&#13;
sudo apt-get install git gcc-arm-linux-gnueabi ncurses-dev u-boot-tools gparted&#13;
&lt;/pre&gt;&#13;
&#13;
これで下準備ができたので、後は一気にu-bootとkernelをビルドする。今回はkernelのバージョンは3.3.2を使用し、rootfsをext4にする。&lt;br&gt;&lt;br&gt;&#13;
&#13;
u-bootの環境変数の初期値を、rootfstype=ext4に変更しておく。&#13;
&#13;
&lt;pre&gt;&#13;
151 #define CONFIG_EXTRA_ENV_SETTINGS \&#13;
152         "loadaddr=0x82000000\0" \&#13;
153         "console=ttyO2,115200n8\0" \&#13;
154         "usbtty=cdc_acm\0" \&#13;
155         "vram=16M\0" \&#13;
156         "mmcdev=0\0" \&#13;
157         "mmcroot=/dev/mmcblk0p2 rw\0" \&#13;
158         "mmcrootfstype=&lt;font color=red&gt;ext4&lt;/font&gt; rootwait\0" \&#13;
159         "mmcargs=setenv bootargs console=${console} " \&#13;
160                 "vram=${vram} " \&#13;
161                 "root=${mmcroot} " \&#13;
162                 "rootfstype=${mmcrootfstype}\0" \&#13;
163         "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \&#13;
164         "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \&#13;
165                 "source ${loadaddr}\0" \&#13;
166         "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \&#13;
167         "mmcboot=echo Booting from mmc${mmcdev} ...; " \&#13;
168                 "run mmcargs; " \&#13;
169                 "bootm ${loadaddr}\0" \&#13;
&lt;/pre&gt;&#13;
&#13;
元にしたコンフィグに、以下を追加する。&lt;br&gt;&#13;
&#13;
&lt;pre&gt;&#13;
CONFIG_DEVTMPFS=y&#13;
CONFIG_DEVTMPFS_MOUNT=y&#13;
&#13;
CONFIG_CGROUPS=y&#13;
CONFIG_CGROUP_FREEZER=y&#13;
CONFIG_CGROUP_DEVICE=y&#13;
CONFIG_CGROUP_CPUACCT=y&#13;
CONFIG_CGROUP_SCHED=y&#13;
CONFIG_FAIR_GROUP_SCHED=y&#13;
CONFIG_BLK_CGROUP=y&#13;
&#13;
CONFIG_EXT4_FS=y&#13;
CONFIG_EXT4_FS_XATTR=y&#13;
&lt;/pre&gt;&#13;
&#13;
以下、ビルド手順。&#13;
&#13;
&lt;pre&gt;&#13;
cd&#13;
export ARCH=arm&#13;
export CROSS_COMPILE=arm-linux-gnueabi-&#13;
git clone git://git.denx.de/u-boot.git&#13;
cd u-boot&#13;
vi include/configs/omap4_common.h&#13;
make omap4_panda_config&#13;
make&#13;
cd&#13;
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.3.2.tar.bz2&#13;
tar xvf linux-3.3.2.tar.bz2&#13;
cd linux-3.3.2&#13;
wget -O .config http://elinux.org/images/1/10/Config.3.3.1&#13;
make menuconfig&#13;
make&#13;
make uImage&#13;
make modules&#13;
&lt;/pre&gt;&#13;
&#13;
最後に、&lt;a href="/blog/2012/04/08/6404727"&gt;SDHCカードを作成する&lt;/a&gt;と同様にSDHCカードを作成する。但し、rootfsはext4でフォーマットする。
</description>
      <dc:subject>Linux</dc:subject>
      <dc:subject>Pandaboard</dc:subject>
    </item>
    <item>
      <title>fedora17、ウザッ！</title>
      <link>https://shirata.asablo.jp/blog/2012/04/15/6412536</link>
      <guid>https://shirata.asablo.jp/blog/2012/04/15/6412536</guid>
      <pubDate>Sun, 15 Apr 2012 23:14:06 +0900</pubDate>
      <dcterms:modified>2012-04-15T23:20:00+09:00</dcterms:modified>
      <dcterms:created>2012-04-15T23:20:00+09:00</dcterms:created>
      <description>&lt;pre&gt;&#13;
# systemctl restart named.service&#13;
Failed to get D-Bus connection: No connection to service manager.&#13;
&lt;/pre&gt;&#13;
まだ安定してないね。sheevaplugなら、これはでないのだが...&lt;br&gt;&lt;br&gt;&#13;
&#13;
当分、fedora17でのサーバ構築検証は、sheevaplugで継続しよう。
</description>
      <dc:subject>Linux</dc:subject>
      <dc:subject>Pandaboard</dc:subject>
    </item>
    <item>
      <title>パッケージリポジトリを設定する</title>
      <link>https://shirata.asablo.jp/blog/2012/04/08/6404890</link>
      <guid>https://shirata.asablo.jp/blog/2012/04/08/6404890</guid>
      <pubDate>Sun, 08 Apr 2012 21:14:58 +0900</pubDate>
      <dcterms:modified>2012-04-08T21:22:55+09:00</dcterms:modified>
      <dcterms:created>2012-04-08T21:20:10+09:00</dcterms:created>
      <description>Feodra17は未だリリースされておらず、正規のパッケージリポジトリは未だないので、kojiサーバを参照する様に設定する。&lt;br&gt;&lt;br&gt;&#13;
&#13;
/etc/yum.repos.dにある、fedora.repoとfedora-updates.repoの[fedora]と[update]セクションの以下の行を修正すれば良い。&#13;
&#13;
&lt;pre&gt;&#13;
baseurl=http://arm.koji.fedoraproject.org/repos/f17-build/latest/armhfp/&#13;
&lt;/pre&gt;&#13;
&#13;
これでyumコマンドが使える様になる。&#13;
&#13;
&lt;pre&gt;&#13;
yum update&#13;
yum install gcc g++&#13;
yum install samba&#13;
&lt;/pre&gt;&#13;
&#13;
良さげですな。
</description>
      <dc:subject>Linux</dc:subject>
      <dc:subject>Pandaboard</dc:subject>
    </item>
    <item>
      <title>ブートログ</title>
      <link>https://shirata.asablo.jp/blog/2012/04/08/6404838</link>
      <guid>https://shirata.asablo.jp/blog/2012/04/08/6404838</guid>
      <pubDate>Sun, 08 Apr 2012 20:32:42 +0900</pubDate>
      <dcterms:modified>2012-04-08T20:38:13+09:00</dcterms:modified>
      <dcterms:created>2012-04-08T20:34:41+09:00</dcterms:created>
      <description>若干FAILEDも有るが、無事起動できた。&#13;
&lt;pre&gt;&#13;
U-Boot SPL 2012.04-rc1 (Apr 08 2012 - 12:25:22)&#13;
OMAP4460 ES1.1&#13;
OMAP SD/MMC: 0&#13;
reading u-boot.img&#13;
reading u-boot.img&#13;
&#13;
&#13;
U-Boot 2012.04-rc1 (Apr 08 2012 - 12:25:22)&#13;
&#13;
CPU  : OMAP4460 ES1.1&#13;
Board: OMAP4 Panda&#13;
I2C:   ready&#13;
DRAM:  1 GiB&#13;
MMC:   OMAP SD/MMC: 0&#13;
Using default environment&#13;
&#13;
In:    serial&#13;
Out:   serial&#13;
Err:   serial&#13;
Net:   No ethernet found.&#13;
Hit any key to stop autoboot:  0 &#13;
reading boot.scr&#13;
&#13;
** Unable to read "boot.scr" from mmc 0:1 **&#13;
reading uImage&#13;
&#13;
3520680 bytes read&#13;
Booting from mmc0 ...&#13;
## Booting kernel from Legacy Image at 82000000 ...&#13;
   Image Name:   Linux-3.4.0-rc2&#13;
   Image Type:   ARM Linux Kernel Image (uncompressed)&#13;
   Data Size:    3520616 Bytes = 3.4 MiB&#13;
   Load Address: 80008000&#13;
   Entry Point:  80008000&#13;
   Verifying Checksum ... OK&#13;
   Loading Kernel Image ... OK&#13;
OK&#13;
&#13;
Starting kernel ...&#13;
&#13;
Uncompressing Linux... done, booting the kernel.&#13;
[    0.000000] Booting Linux on physical CPU 0&#13;
[    0.000000] Linux version 3.4.0-rc2 (root@antec) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #3 SMP Sun Apr 8 16:12:33 JST 2012&#13;
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d&#13;
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache&#13;
[    0.000000] Machine: OMAP4 Panda board&#13;
[    0.000000] Truncating RAM at 80000000-bfffffff to -af7fffff (vmalloc region overlap).&#13;
[    0.000000] Reserving 16777216 bytes SDRAM for VRAM&#13;
[    0.000000] Memory policy: ECC disabled, Data cache writealloc&#13;
[    0.000000] OMAP4: Map 0xae600000 to 0xfe600000 for dram barrier&#13;
[    0.000000] OMAP4460 ES1.0&#13;
[    0.000000] PERCPU: Embedded 8 pages/cpu @c124a000 s11648 r8192 d12928 u32768&#13;
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 188432&#13;
[    0.000000] Kernel command line: console=ttyO2,115200n8 vram=16M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait&#13;
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)&#13;
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)&#13;
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)&#13;
[    0.000000] Memory: 742MB = 742MB total&#13;
[    0.000000] Memory: 740224k/740224k available, 38016k reserved, 0K highmem&#13;
[    0.000000] Virtual kernel memory layout:&#13;
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)&#13;
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)&#13;
[    0.000000]     vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)&#13;
[    0.000000]     lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)&#13;
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)&#13;
[    0.000000]       .text : 0xc0008000 - 0xc0650ed4   (6436 kB)&#13;
[    0.000000]       .init : 0xc0651000 - 0xc0689d80   ( 228 kB)&#13;
[    0.000000]       .data : 0xc068a000 - 0xc06f73c8   ( 437 kB)&#13;
[    0.000000]        .bss : 0xc06f73ec - 0xc0c4cac8   (5462 kB)&#13;
[    0.000000] Hierarchical RCU implementation.&#13;
[    0.000000] NR_IRQS:474&#13;
[    0.000000] omap_hwmod: dpll_mpu_m2_ck: missing clockdomain for dpll_mpu_m2_ck.&#13;
[    0.000000] OMAP clockevent source: GPTIMER1 at 32768 Hz&#13;
[    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms&#13;
[    0.000000] Console: colour dummy device 80x30&#13;
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar&#13;
[    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8&#13;
[    0.000000] ... MAX_LOCK_DEPTH:          48&#13;
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191&#13;
[    0.000000] ... CLASSHASH_SIZE:          4096&#13;
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384&#13;
[    0.000000] ... MAX_LOCKDEP_CHAINS:      32768&#13;
[    0.000000] ... CHAINHASH_SIZE:          16384&#13;
[    0.000000]  memory used by lock dependency info: 3695 kB&#13;
[    0.000000]  per task-struct memory footprint: 1152 bytes&#13;
[    0.000854] Calibrating delay loop... 1392.74 BogoMIPS (lpj=5439488)&#13;
[    0.062499] pid_max: default: 32768 minimum: 301&#13;
[    0.063110] Security Framework initialized&#13;
[    0.063323] Mount-cache hash table entries: 512&#13;
[    0.067901] CPU: Testing write buffer coherency: ok&#13;
[    0.068725] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000&#13;
[    0.069030] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available&#13;
[    0.069213] Setting up static identity map for 0x8048bc18 - 0x8048bc70&#13;
[    0.069274] L310 cache controller enabled&#13;
[    0.069305] l2x0: 16 ways, CACHE_ID 0x410000c7, AUX_CTRL 0x7e470000, Cache size: 1048576 B&#13;
[    0.072204] CPU1: Booted secondary processor&#13;
[    0.139343] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001&#13;
[    0.139434] CPU1: Unknown IPI message 0x1&#13;
[    0.139617] Brought up 2 CPUs&#13;
[    0.139648] SMP: Total of 2 processors activated (2792.83 BogoMIPS).&#13;
[    0.142364] devtmpfs: initialized&#13;
[    0.152465] omap_hwmod: l3_div_ck: missing clockdomain for l3_div_ck.&#13;
[    0.167663] omap_hwmod: i2c1: softreset failed (waited 10000 usec)&#13;
[    0.180908] omap_hwmod: i2c2: softreset failed (waited 10000 usec)&#13;
[    0.194122] omap_hwmod: i2c3: softreset failed (waited 10000 usec)&#13;
[    0.207336] omap_hwmod: i2c4: softreset failed (waited 10000 usec)&#13;
[    0.210327] omap_hwmod: mcpdm: cannot be enabled (3)&#13;
[    0.216369] dummy: &#13;
[    0.217834] NET: Registered protocol family 16&#13;
[    0.218597] GPMC revision 6.0&#13;
[    0.225402] gpiochip_add: registered GPIOs 0 to 31 on device: gpio&#13;
[    0.225769] OMAP GPIO hardware version 0.1&#13;
[    0.226379] gpiochip_add: registered GPIOs 32 to 63 on device: gpio&#13;
[    0.227294] gpiochip_add: registered GPIOs 64 to 95 on device: gpio&#13;
[    0.228210] gpiochip_add: registered GPIOs 96 to 127 on device: gpio&#13;
[    0.229125] gpiochip_add: registered GPIOs 128 to 159 on device: gpio&#13;
[    0.230041] gpiochip_add: registered GPIOs 160 to 191 on device: gpio&#13;
[    0.233612] omap_mux_init: Add partition: #1: core, flags: 2&#13;
[    0.235473] omap_mux_init: Add partition: #2: wkup, flags: 2&#13;
[    0.239959] _omap_mux_get_by_name: Could not find signal uart1_cts.uart1_cts&#13;
[    0.239990] _omap_mux_get_by_name: Could not find signal uart1_cts.uart1_cts&#13;
[    0.239990] omap_hwmod_mux_init: Could not allocate device mux entry&#13;
[    0.244964]  usbhs_omap: alias fck already exists&#13;
[    0.249999] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.&#13;
[    0.250030] hw-breakpoint: maximum watchpoint size is 4 bytes.&#13;
[    0.258728] OMAP DMA hardware revision 0.0&#13;
[    0.307678] bio: create slab &lt;bio-0&gt; at 0&#13;
[    0.309783] vwl1271: 1800 mV &#13;
[    0.313964] SCSI subsystem initialized&#13;
[    0.315277] omap2_mcspi omap2_mcspi.1: master is unqueued, this is deprecated&#13;
[    0.316101] omap2_mcspi omap2_mcspi.2: master is unqueued, this is deprecated&#13;
[    0.316802] omap2_mcspi omap2_mcspi.3: master is unqueued, this is deprecated&#13;
[    0.317504] omap2_mcspi omap2_mcspi.4: master is unqueued, this is deprecated&#13;
[    0.318542] usbcore: registered new interface driver usbfs&#13;
[    0.319213] usbcore: registered new interface driver hub&#13;
[    0.319641] usbcore: registered new device driver usb&#13;
[    0.334869] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 400 kHz&#13;
[    0.337554] Skipping twl internal clock init and using bootloader value (unknown osc rate)&#13;
[    0.338806] twl 1-0048: PIH (irq 39) chaining IRQs 352..372&#13;
[    0.340759] VUSB: 3300 mV normal standby&#13;
[    0.342224] VMMC: 1200 &lt;--&gt; 3000 mV at 3000 mV normal standby&#13;
[    0.343811] VPP: 1800 &lt;--&gt; 2500 mV at 1900 mV normal standby&#13;
[    0.345489] VCXIO: 1800 mV normal standby&#13;
[    0.346679] VDAC: 1800 mV normal standby&#13;
[    0.348022] VAUX2_6030: 1200 &lt;--&gt; 2800 mV at 1800 mV normal standby&#13;
[    0.349548] VAUX3_6030: 1000 &lt;--&gt; 3000 mV at 1200 mV normal standby&#13;
[    0.350891] CLK32KG: &#13;
[    0.352050] VANA: 2100 mV normal standby&#13;
[    0.365997] omap_i2c omap_i2c.2: bus 2 rev2.4.0 at 400 kHz&#13;
[    0.381591] omap_i2c omap_i2c.3: bus 3 rev2.4.0 at 100 kHz&#13;
[    0.397216] omap_i2c omap_i2c.4: bus 4 rev2.4.0 at 400 kHz&#13;
[    0.399963] Advanced Linux Sound Architecture Driver Version 1.0.25.&#13;
[    0.405273] Switching to clocksource 32k_counter&#13;
[    0.405883] cfg80211: Calling CRDA to update world regulatory domain&#13;
[    0.498748] usbhs_omap usbhs_omap: ehci_logic_fck failed:-2&#13;
[    0.500915] NET: Registered protocol family 2&#13;
[    0.501464] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)&#13;
[    0.503112] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)&#13;
[    0.506591] TCP bind hash table entries: 65536 (order: 9, 2359296 bytes)&#13;
[    0.529144] TCP: Hash tables configured (established 131072 bind 65536)&#13;
[    0.529296] TCP: reno registered&#13;
[    0.529327] UDP hash table entries: 512 (order: 3, 40960 bytes)&#13;
[    0.529724] UDP-Lite hash table entries: 512 (order: 3, 40960 bytes)&#13;
[    0.531097] NET: Registered protocol family 1&#13;
[    0.532196] RPC: Registered named UNIX socket transport module.&#13;
[    0.532226] RPC: Registered udp transport module.&#13;
[    0.532226] RPC: Registered tcp transport module.&#13;
[    0.532257] RPC: Registered tcp NFSv4.1 backchannel transport module.&#13;
[    0.532958] NetWinder Floating Point Emulator V0.97 (double precision)&#13;
[    0.709960] VFS: Disk quotas dquot_6.5.2&#13;
[    0.710327] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)&#13;
[    0.711395] NFS: Registering the id_resolver key type&#13;
[    0.712371] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.&#13;
[    0.713012] msgmni has been set to 1445&#13;
[    0.716247] io scheduler noop registered&#13;
[    0.716278] io scheduler deadline registered&#13;
[    0.716400] io scheduler cfq registered (default)&#13;
[    0.719390] OMAP DSS rev 4.0&#13;
[    0.966674] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled&#13;
[    0.971343] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 104) is a OMAP UART0&#13;
[    0.972686] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1&#13;
[    0.973632] omap_uart.2: ttyO2 at MMIO 0x48020000 (irq = 106) is a OMAP UART2&#13;
[    1.807037] console [ttyO2] enabled&#13;
[    1.812011] omap_uart.3: ttyO3 at MMIO 0x4806e000 (irq = 102) is a OMAP UART3&#13;
[    1.843231] brd: module loaded&#13;
[    1.860290] loop: module loaded&#13;
[    1.866577] mtdoops: mtd device (mtddev=name/number) must be supplied&#13;
[    1.875274] usbcore: registered new interface driver smsc95xx&#13;
[    1.881652] usbcore: registered new interface driver net1080&#13;
[    1.888732] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver&#13;
[    1.896118] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller&#13;
[    1.905273] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1&#13;
[    1.913574] ehci-omap ehci-omap.0: irq 109, io mem 0x4a064c00&#13;
[    1.929107] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00&#13;
[    1.935943] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002&#13;
[    1.943145] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1&#13;
[    1.950775] usb usb1: Product: OMAP-EHCI Host Controller&#13;
[    1.956390] usb usb1: Manufacturer: Linux 3.4.0-rc2 ehci_hcd&#13;
[    1.962371] usb usb1: SerialNumber: ehci-omap.0&#13;
[    1.970184] hub 1-0:1.0: USB hub found&#13;
[    1.974243] hub 1-0:1.0: 3 ports detected&#13;
[    2.007720] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver&#13;
[    2.014495] ohci-omap3 ohci-omap3.0: OMAP3 OHCI Host Controller&#13;
[    2.021514] ohci-omap3 ohci-omap3.0: new USB bus registered, assigned bus number 2&#13;
[    2.029815] ohci-omap3 ohci-omap3.0: irq 108, io mem 0x4a064800&#13;
[    2.113739] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001&#13;
[    2.120910] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1&#13;
[    2.128540] usb usb2: Product: OMAP3 OHCI Host Controller&#13;
[    2.134277] usb usb2: Manufacturer: Linux 3.4.0-rc2 ohci_hcd&#13;
[    2.140258] usb usb2: SerialNumber: ohci-omap3.0&#13;
[    2.146759] hub 2-0:1.0: USB hub found&#13;
[    2.150787] hub 2-0:1.0: 3 ports detected&#13;
[    2.157073] usbcore: registered new interface driver cdc_wdm&#13;
[    2.163055] Initializing USB Mass Storage driver...&#13;
[    2.168609] usbcore: registered new interface driver usb-storage&#13;
[    2.174987] USB Mass Storage support registered.&#13;
[    2.181121] usbcore: registered new interface driver libusual&#13;
[    2.304138] usb 1-1: new high-speed USB device number 2 using ehci-omap&#13;
[    2.460968] usb 1-1: New USB device found, idVendor=0424, idProduct=9514&#13;
[    2.468048] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0&#13;
[    2.477600] hub 1-1:1.0: USB hub found&#13;
[    2.481811] hub 1-1:1.0: 5 ports detected&#13;
[    2.489410] usbcore: registered new interface driver usbtest&#13;
[    2.496643] mousedev: PS/2 mouse device common for all mice&#13;
[    2.505950] twl_rtc twl_rtc: Power up reset detected.&#13;
[    2.512115] twl_rtc twl_rtc: Enabling TWL-RTC&#13;
[    2.520233] twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0&#13;
[    2.527343] i2c /dev entries driver&#13;
[    2.534332] Driver for 1-wire Dallas network protocol.&#13;
[    2.542419] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec&#13;
[    2.562622] usbcore: registered new interface driver usbhid&#13;
[    2.568511] usbhid: USB HID core driver&#13;
[    2.575134] usbcore: registered new interface driver snd-usb-audio&#13;
[    2.584197] ALSA device list:&#13;
[    2.587524]   No soundcards found.&#13;
[    2.592132] oprofile: using arm/armv7-ca9&#13;
[    2.597167] TCP: cubic registered&#13;
[    2.600677] Initializing XFRM netlink socket&#13;
[    2.605285] NET: Registered protocol family 17&#13;
[    2.610046] NET: Registered protocol family 15&#13;
[    2.614990] lib80211: common routines for IEEE802.11 drivers&#13;
[    2.621032] Registering the dns_resolver key type&#13;
[    2.626220] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4&#13;
[    2.634338] ThumbEE CPU extension supported.&#13;
[    2.638854] Registering SWP/SWPB emulation handler&#13;
[    2.650360] omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).&#13;
[    2.658721] omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).&#13;
[    2.668151] Power Management for TI OMAP4.&#13;
[    2.695953] clock: disabling unused clocks to save power&#13;
[    2.727050] Console: switching to colour frame buffer device 80x30&#13;
[    2.740814] omapdss DPI: Could not find exact pixel clock. Requested 23500 kHz, got 23630 kHz&#13;
[    2.753326] VANA: incomplete constraints, leaving on&#13;
[    2.759002] CLK32KG: incomplete constraints, leaving on&#13;
[    2.765869] VDAC: incomplete constraints, leaving on&#13;
[    2.772003] VUSB: incomplete constraints, leaving on&#13;
[    2.779266] twl_rtc twl_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)&#13;
[    2.791442] Waiting for root device /dev/mmcblk0p2...&#13;
[    2.797088] usb 1-1.1: new high-speed USB device number 3 using ehci-omap&#13;
[    2.800231] mmc0: host does not support reading read-only switch. assuming write-enable.&#13;
[    2.803771] mmc0: new high speed SDHC card at address e624&#13;
[    2.819793] mmcblk0: mmc0:e624 SD32G 29.7 GiB &#13;
[    2.835968]  mmcblk0: p1 p2 p3&#13;
[    2.929962] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00&#13;
[    2.937286] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0&#13;
[    2.950500] smsc95xx v1.0.4&#13;
[    2.966491] mmc1: card claims to support voltages below the defined range. These will be ignored.&#13;
[    2.993011] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)&#13;
[    3.007446] mmc1: new SDIO card at address 0001&#13;
[    3.032012] smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at usb-ehci-omap.0-1.1, smsc95xx USB 2.0 Ethernet, 16:8c:48:21:ce:25&#13;
[    3.221374] kjournald starting.  Commit interval 5 seconds&#13;
[    3.227691] EXT3-fs (mmcblk0p2): warning: maximal mount count reached, running e2fsck is recommended&#13;
[    3.239715] EXT3-fs (mmcblk0p2): using internal journal&#13;
[    3.247650] EXT3-fs (mmcblk0p2): recovery complete&#13;
[    3.252746] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode&#13;
[    3.260101] VFS: Mounted root (ext3 filesystem) on device 179:2.&#13;
[    3.273101] devtmpfs: mounted&#13;
[    3.276611] Freeing init memory: 224K&#13;
&#13;
Welcome to Fedora 17 (Beefy Miracle)!&#13;
&#13;
Starting Collect Read-Ahead Data...                                            &#13;
Started Replay Read-Ahead Data                                         [  OK  ]&#13;
[   13.992279] systemd-readahead-collect[1132]: Failed to create fanotify object: Function not implemented&#13;
Starting Media Directory...                                                    &#13;
Starting Runtime Directory...                                                  &#13;
Started Lock Directory                                                 [  OK  ]&#13;
Starting Journal Service...                                                    &#13;
Started Journal Service                                                [  OK  ]&#13;
Started Huge Pages File System                                         [  OK  ]&#13;
Starting POSIX Message Queue File System...                                    &#13;
Starting Debug File System...                                                  &#13;
Started Security File System                                           [  OK  ]&#13;
Starting udev Kernel Device Manager...                                         &#13;
Starting udev Coldplug all Devices...                                          &#13;
Started Collect [   14.288726] udevd[1138]: starting version 181&#13;
Read-Ahead Data                                        [  OK  ]&#13;
Started udev Kernel Device Manager                                     [  OK  ]&#13;
Started Media Directory                                                [  OK  ]&#13;
Started Runtime Directory                                              [  OK  ]&#13;
Started POSIX Message Queue File System                                [  OK  ]&#13;
Started Debug File System                                              [  OK  ]&#13;
Started Load legacy module configuration                               [  OK  ]&#13;
Starting File System Check on Root Device...                                   &#13;
Starting Remount API VFS...                                                    &#13;
Started Load Kernel Modules                                            [  OK  ]&#13;
Started Configuration File System                                      [  OK  ]&#13;
Started FUSE Control File System                                       [  OK  ]&#13;
Starting Apply Kernel Variables...                                             &#13;
Started Set Up Additional Binary Formats                               [  OK  ]&#13;
Starting Setup Virtual Console...                                              &#13;
Started File System Check on Root Device                               [  OK  ]&#13;
Started Remount API VFS                                                [  OK  ]&#13;
Started Apply Kernel Variables                                         [  OK  ]&#13;
Starting Remount Root FS...                                                    &#13;
Started Setup Virtual Console                                          [  OK  ]&#13;
Starting /dev/disk/by-label/swap...                                            &#13;
[   15.562225] Adding 2097148k swap on /dev/mmcblk0p3.  Priority:0 extents:1 across:2097148k SS&#13;
Started /dev/disk/by-label/swap                                        [  OK  ]&#13;
Started Remount Root FS                                                [  OK  ]&#13;
Starting Configure read-only root support...                                   &#13;
Starting /tmp...                                                               &#13;
Started Import network configuration from initramfs                    [  OK  ]&#13;
Started /tmp                                                           [  OK  ]&#13;
Started Configure read-only root support                               [  OK  ]&#13;
Started udev Coldplug all Devices                                      [  OK  ]&#13;
Starting udev Wait for Complete Device Initialization...                       &#13;
[   46.754852] wl12xx: loaded&#13;
Started udev Wait for Complete Device Initialization                   [  OK  ]&#13;
Starting Wait for storage scan...                                              &#13;
Starting Show Plymouth Boot Screen...                                          &#13;
Failed to start Show Plymouth Boot Screen                              [FAILED]&#13;
See 'systemctl status plymouth-start.service' for details.                     &#13;
Started Wait for storage scan                                          [  OK  ]&#13;
Starting Initialize storage subsystems (RAID, LVM, etc.)...                    &#13;
Started Initialize storage subsystems (RAID, LVM, etc.)                [  OK  ]&#13;
Starting Initialize storage subsystems (RAID, LVM, etc.)...                    &#13;
Started Initialize storage subsystems (RAID, LVM, etc.)                [  OK  ]&#13;
Started Relabel all filesystems, if necessary                          [  OK  ]&#13;
Started Reconfigure the system on administrator request                [  OK  ]&#13;
Started Mark the need to relabel after reboot                          [  OK  ]&#13;
Starting Load Random Seed...                                                   &#13;
Starting Tell Plymouth To Write Out Runtime Data...                            &#13;
Starting Recreate Volatile Files and Directories...                            &#13;
Started Load Random Seed                                               [  OK  ]&#13;
Started Tell Plymouth To Write Out Runtime Data                        [  OK  ]&#13;
Started Recreate Volatile Files and Directories                        [  OK  ]&#13;
Starting LSB: Bring up/down networking...                                      &#13;
Starting Permit User Sessions...                                               &#13;
Starting SSH server keys generation....                                        &#13;
Starting Security Auditing Service...                                          &#13;
Starting Network Manager...                                                    &#13;
Starting Wait for Plymouth Boot Screen to Quit...                              &#13;
Starting Login Service...                                                      &#13;
Starting System Logging Service...                                             &#13;
Starting Terminate Plymouth Boot Screen...                                     &#13;
Starting D-Bus System Message Bus...                                           &#13;
Started Permit User Sessions                                           [  OK  ]&#13;
Started SSH server keys generation.                                    [  OK  ]&#13;
Failed to start Security Auditing Service                              [FAILED]&#13;
See 'systemctl status auditd.service' for details.                             &#13;
Started Wait for Plymouth Boot Screen to Quit                          [  OK  ]&#13;
Failed to start System Logging Service                                 [FAILED]&#13;
See 'systemctl status rsyslog.service' for details.                            &#13;
Started Terminate Plymouth Boot Screen                                 [  OK  ]&#13;
Starting Command Scheduler...                                                  &#13;
Started Command Scheduler                                              [  OK  ]&#13;
Starting Getty on tty1...                                                      &#13;
Started Getty on tty1                                                  [  OK  ]&#13;
Starting Serial Getty on ttyO2...                                              &#13;
Started Serial Getty on ttyO2                                          [  OK  ]&#13;
network[2153]: FATAL: Module ipv6 not found.&#13;
Started D-Bus System Message Bus                                       [  OK  ]&#13;
Starting System Logging Service...                                             &#13;
Failed to start System Logging Service                                 [FAILED]&#13;
See 'systemctl status rsyslog.service' for details.                            &#13;
Starting System Logging Service...                                             &#13;
Failed to start System Logging Service                                 [FAILED]&#13;
See 'systemctl status rsyslog.service' for details.                            &#13;
Starting System Logging Service...                                             &#13;
Failed to start System Logging Service                                 [FAILED]&#13;
See 'systemctl status rsyslog.service' for details.                            &#13;
Starting System Logging Service...                                             &#13;
Failed to start System Logging Service                                 [FAILED]&#13;
See 'systemctl status rsyslog.service' for details.                            &#13;
Starting System Logging Service...                                             &#13;
Failed to start System Logging Service                                 [FAILED]&#13;
See 'systemctl status rsyslog.service' for details.                            &#13;
Starting System Logging Service...                                             &#13;
Failed to start System Logging Service                                 [FAILED]&#13;
See 'systemctl status rsyslog.service' for details.                            &#13;
Started Login Service                                                  [  OK  ]&#13;
Started Network Manager                                                [  OK  ]&#13;
&#13;
Fedora release 17 (Beefy Miracle)&#13;
Kernel 3.4.0-rc2 on an armv7l (ttyO2)&#13;
&#13;
panda login: [   49.303009] wl12xx: ERROR could not get firmware ti-connectivity/wl127x-fw-4-sr.bin: -2&#13;
[   49.687408] wl12xx: ERROR could not get firmware ti-connectivity/wl127x-fw-4-sr.bin: -2&#13;
[   50.068481] wl12xx: ERROR could not get firmware ti-connectivity/wl127x-fw-4-sr.bin: -2&#13;
[   50.078155] wl12xx: ERROR firmware boot failed despite 3 retries&#13;
network[2153]: Bringing up loopback interface:  [  OK  ]&#13;
[   51.814575] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1&#13;
network[2153]: Bringing up interface eth0:  Active connection state: activating&#13;
network[2153]: Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/1&#13;
network[2153]: state: activated&#13;
network[2153]: Connection activated&#13;
network[2153]: [  OK  ]&#13;
network[2153]: FATAL: Module ipv6 not found.&#13;
Started LSB: Bring up/down networking                                  [  OK  ]&#13;
Started Load static arp entries                                        [  OK  ]&#13;
Starting WPA Supplicant daemon...                                              &#13;
Starting OpenSSH server daemon...                                              &#13;
Started OpenSSH server daemon                                          [  OK  ]&#13;
Starting RPC bind service...                                                   &#13;
Started RPC bind service                                               [  OK  ]&#13;
Starting NFS file locking service....                                          &#13;
Started WPA Supplicant daemon                                          [  OK  ]&#13;
[   56.042572] wl12xx: ERROR could not get firmware ti-connectivity/wl127x-fw-4-sr.bin: -2&#13;
[   56.419891] wl12xx: ERROR could not get firmware ti-connectivity/wl127x-fw-4-sr.bin: -2&#13;
[   56.802307] wl12xx: ERROR could not get firmware ti-connectivity/wl127x-fw-4-sr.bin: -2&#13;
[   56.811981] wl12xx: ERROR firmware boot failed despite 3 retries&#13;
[   57.192718] wl12xx: ERROR could not get firmware ti-connectivity/wl127x-fw-4-sr.bin: -2&#13;
]&#13;
Started NFS file locking service.                                      [  OK  ]&#13;
[   57.575531] wl12xx: ERROR could not get firmware ti-connectivity/wl127x-fw-4-sr.bin: -2&#13;
[   57.942382] wl12xx: ERROR could not get firmware ti-connectivity/wl127x-fw-4-sr.bin: -2&#13;
[   57.952026] wl12xx: ERROR firmware boot failed despite 3 retries&#13;
&#13;
Fedora release 17 (Beefy Miracle)&#13;
Kernel 3.4.0-rc2 on an armv7l (ttyO2)&#13;
&#13;
panda login: &#13;
&lt;/pre&gt;
</description>
      <dc:subject>Linux</dc:subject>
      <dc:subject>Pandaboard</dc:subject>
    </item>
    <item>
      <title>ブートしてみる</title>
      <link>https://shirata.asablo.jp/blog/2012/04/08/6404806</link>
      <guid>https://shirata.asablo.jp/blog/2012/04/08/6404806</guid>
      <pubDate>Sun, 08 Apr 2012 19:57:36 +0900</pubDate>
      <dcterms:modified>2012-04-08T21:04:23+09:00</dcterms:modified>
      <dcterms:created>2012-04-08T19:58:55+09:00</dcterms:created>
      <description>ブートして、u-bootの設定を確認しておく。&#13;
&#13;
&lt;pre&gt;&#13;
U-Boot SPL 2012.04-rc1 (Apr 08 2012 - 12:25:22)&#13;
OMAP4460 ES1.1&#13;
OMAP SD/MMC: 0&#13;
reading u-boot.img&#13;
reading u-boot.img&#13;
&#13;
&#13;
U-Boot 2012.04-rc1 (Apr 08 2012 - 12:25:22)&#13;
&#13;
CPU  : OMAP4460 ES1.1&#13;
Board: OMAP4 Panda&#13;
I2C:   ready&#13;
DRAM:  1 GiB&#13;
MMC:   OMAP SD/MMC: 0&#13;
Using default environment&#13;
&#13;
In:    serial&#13;
Out:   serial&#13;
Err:   serial&#13;
Net:   No ethernet found.&#13;
Hit any key to stop autoboot:  0 &#13;
Panda # printenv&#13;
baudrate=115200&#13;
bootcmd=if mmc rescan ${mmcdev}; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; fi; fi; fi&#13;
bootdelay=3&#13;
bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}&#13;
console=ttyO2,115200n8&#13;
loadaddr=0x82000000&#13;
loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr&#13;
loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage&#13;
mmcargs=setenv bootargs console=${console} vram=${vram} root=${mmcroot} rootfstype=${mmcrootfstype}&#13;
mmcboot=echo Booting from mmc${mmcdev} ...; run mmcargs; bootm ${loadaddr}&#13;
mmcdev=0&#13;
mmcroot=/dev/mmcblk0p2 rw&#13;
mmcrootfstype=ext3 rootwait&#13;
usbtty=cdc_acm&#13;
vram=16M&#13;
&#13;
Environment size: 686/131068 bytes&#13;
&lt;/pre&gt;&#13;
このままで良さそうだ。&#13;
&lt;pre&gt;&#13;
Panda # boot&#13;
&lt;/pre&gt;
</description>
      <dc:subject>Linux</dc:subject>
      <dc:subject>Pandaboard</dc:subject>
    </item>
    <item>
      <title>SDHCカードを作成する</title>
      <link>https://shirata.asablo.jp/blog/2012/04/08/6404727</link>
      <guid>https://shirata.asablo.jp/blog/2012/04/08/6404727</guid>
      <pubDate>Sun, 08 Apr 2012 18:36:33 +0900</pubDate>
      <dcterms:modified>2012-04-18T23:27:30+09:00</dcterms:modified>
      <dcterms:created>2012-04-08T18:39:25+09:00</dcterms:created>
      <description>&lt;br&gt;gpartedを利用して、上記の様にSDHCカードへパーティションを作成する。作成したパーティションをマウントして（swapは除く）、ビルドして作成したファイルをコピーする。&lt;br&gt;&lt;br&gt;&#13;
&#13;
rootfsはこれも新し物好きの性で、Fedora 17 Alpha 1 release for ARMv7hlを試してみる。rootパスワードが設定されているが、何だか分からないので消しておく。swapパーティションを作っておいたので、以下の1行をfstabに追加しておく。&#13;
&lt;pre&gt;&#13;
LABEL="swap"		swap                    swap    defaults        0 0&#13;
&lt;/pre&gt;&#13;
&#13;
x-loader（MLO）はBOOTパーティションの先頭に配置する必要があるらしいので、パーティション作成直後に最初にコピーし、直ぐにsyncしておく。後で入れ替える場合は、パーティションを作成し直す必要がある。&#13;
&lt;pre&gt;&#13;
wget wget http://fedora.roving-it.com/rootfs-f17-hfp-alpha1.tar.bz2&#13;
sudo tar xvf rootfs-f17-hfp-alpha1.tar.bz2 -C /media/rootfs&#13;
cp ~/u-boot/MLO /media/BOOT&#13;
sync; sync; sync&#13;
cp ~/u-boot/u-boot.img /media/BOOT&#13;
cd ~/linux-3.4-rc2&#13;
cp arch/arm/boot/uImage /media/BOOT&#13;
sudo make INSTALL_MOD_PATH=/media/rootfs/usr modules_install&#13;
sudo make INSTALL_MOD_PATH=/media/rootfs/usr firmware_install&#13;
&lt;/pre&gt;
</description>
      <enclosure url="https://shirata.asablo.jp/blog/img/2012/04/08/1ed409.png" length="20962" type="image/png"/>
      <dc:subject>Linux</dc:subject>
      <dc:subject>Pandaboard</dc:subject>
    </item>
    <item>
      <title>kernelのビルド</title>
      <link>https://shirata.asablo.jp/blog/2012/04/08/6404713</link>
      <guid>https://shirata.asablo.jp/blog/2012/04/08/6404713</guid>
      <pubDate>Sun, 08 Apr 2012 18:19:57 +0900</pubDate>
      <dcterms:modified>2012-04-08T18:58:31+09:00</dcterms:modified>
      <dcterms:created>2012-04-08T18:27:16+09:00</dcterms:created>
      <description>新し物好きなので、最新版を試してみる。コンフィグは他のヒトのをパクる。以下の変更をしておかないと起動できなかったので、makeの前に変更しておく。&#13;
&#13;
&lt;pre&gt;&#13;
CONFIG_DEVTMPFS=y&#13;
CONFIG_DEVTMPFS_MOUNT=y&#13;
&lt;/pre&gt;&#13;
&#13;
ビルド手順は以下の通り。&#13;
&#13;
&lt;pre&gt;&#13;
wget http://www.kernel.org/pub/linux/kernel/v3.0/testing/linux-3.4-rc2.tar.bz2&#13;
tar xvf linux-3.4-rc2.tar.bz2&#13;
cd linux-3.4-rc2&#13;
wget -O .config http://elinux.org/images/1/10/Config.3.3.1&#13;
make&#13;
make uImage&#13;
make modules&#13;
&lt;/pre&gt;&#13;
&#13;
arch/arm/boot/uImageができたらOK。
</description>
      <dc:subject>Linux</dc:subject>
      <dc:subject>Pandaboard</dc:subject>
    </item>
  </channel>
</rss>
