コグノスケ


link 未来から過去へ表示(*)  link 過去から未来へ表示

link もっと前
2024年6月13日 >>> 2024年5月31日
link もっと後

2024年6月11日

ROCK 3Cの描画速度改善

目次: Arduino

エアガン的当てゲームを作り始めたとき(1月くらいかな?)から気になっていたのですが、ROCK 3C上でJavaを使って画面を描画すると妙に描画速度が遅いです。もうひとつ不思議なことに、マウスカーソルをぐりぐり動かすと描画が止まります。なんで?

最初はJava側の問題か?と思ったものの、秋葉原のTARGET-1に置いている機体はJava側のプログラムは全く同じなのに、描画速度がメチャ速いです(マウスカーソルを動かしても画面描画が止まらない)。ROCK 3C側(というかメインSoCであるRockchip RK3566)のグラフィック関連がどこかおかしいんでしょう。たぶん。

描画が遅い機体と速い機体で大きな違いがあるとするとaptでアップデートしたくらいです。描画速度が遅い機体を持ち帰ってきてアップデートしました。結果だけ先に言ってしまうと、描画速度はやや改善したものの全く同じにはなりませんでした。何が違うんだろう?

カーネルとlibmaliのアップデート

描画速度に効いていると思われるのは下記の2つです。

  • カーネルバージョン: 5.10.160-33-rk356x -> 5.10.160-34-rk356x
  • libmali: libmali-bifrost-g31-g2p0-x11-gbm -> libmali-bifrost-g52-g2p0-x11-gbm

アップデート方法はapt-get updateとapt-get upgradeですが、下記のようにchanged its 'Origin' value from 'AAAA' to 'BBBB'エラーが出る場合があります。

apt-get updateのエラー
Reading package lists... Done
E: Repository 'https://radxa-repo.github.io/bullseye rockchip-bullseye InRelease' changed its 'Origin' value from 'rsdk-local rockchip-bullseye' to 'Radxa'
E: Repository 'https://radxa-repo.github.io/bullseye rockchip-bullseye InRelease' changed its 'Label' value from 'rsdk-local rockchip-bullseye' to 'Freight'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'https://radxa-repo.github.io/bullseye bullseye InRelease' changed its 'Origin' value from 'rsdk-local bullseye' to 'Radxa'
E: Repository 'https://radxa-repo.github.io/bullseye bullseye InRelease' changed its 'Label' value from 'rsdk-local bullseye' to 'Freight'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done

これはリポジトリのReleaseファイルが変わっているが良いのか?と確認してくれているためで、今回は無視して良いので--allow-releaseinfo-changeを付けてapt-get updateすれば先に進みます。

最新のRockchip用カーネルに更新
# apt-get update --allow-releaseinfo-change

(...略...)

# apt-get dist-upgrade

Hit:1 https://download.vscodium.com/debs vscodium InRelease
Hit:2 https://deb.debian.org/debian bullseye InRelease
Hit:3 https://deb.debian.org/debian bullseye-backports InRelease
Hit:4 https://deb.debian.org/debian-security bullseye-security InRelease
Hit:5 https://deb.debian.org/debian bullseye-updates InRelease
Hit:6 https://radxa-repo.github.io/bullseye rockchip-bullseye InRelease
Hit:7 https://radxa-repo.github.io/bullseye bullseye InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  librtui linux-headers-5.10.160-34-rk356x linux-image-5.10.160-34-rk356x
  r8125-dkms radxa-system-config-r8125-dkms
The following packages will be upgraded:
  aic8800-firmware aic8800-sdio-dkms aicrf-test linux-headers-rock-3c
  linux-image-rock-3c radxa-firmware radxa-overlays-dkms
  radxa-system-config-aic8800-sdio-dkms radxa-system-config-bullseye
  radxa-system-config-common radxa-system-config-kernel-cmdline-ttyfiq0
  radxa-system-config-rockchip radxa-udev rsetup rsetup-config-aic8800-ttys1
  task-rock-3c

描画速度はやや改善したものの全く同じにはなりません。描画速度が速い機種と改善後の機種を比べると、

描画が速い機種描画が遅い機種(改善後)
マウスカーソルちらつくちらつかない
マウスカーソルを動かし続ける描画が止まらない描画が止まる
描画速度16ms〜32ms(たまに1フレームスキップ)たまに16ms、ほぼ32ms〜64ms(ほぼ1フレームスキップ)

うーん?何が違うんだろう?

編集者:すずき(2024/07/05 10:32)

コメント一覧

  • コメントはありません。
open/close この記事にコメントする



2024年6月10日

PCBを設計して注文、第二弾

目次: Arduino

前回(2024年3月24日の日記参照)発注して燃えた(2024年4月3日の日記参照)PCBの設計を改修して発注しました。前回と同様にJLPCBにお願いしています。

JLPCBはドル決済なので円安だと支払いが増えて結構痛いんですよね……。円安がマシにならないかなーと思って1ヶ月くらい待ったんですが、特に良くなる傾向がなかったので諦めました。

編集者:すずき(2024/06/22 15:48)

コメント一覧

  • コメントはありません。
open/close この記事にコメントする



2024年5月31日

Bitbakeのクラス

目次: Yocto

Yocto Scarthgap(5.0.1)のメモです。前回同様、コードを読んで依存関係を調べるのは大変時間が掛かるので、簡易的な調査手法として全ファイルを消してエラーを観察し、エラーの原因となるファイルを復活させて次ステップに進める手段を用います。

引き続きBitbakeを実行してエラーを見て、足りないファイルを元に戻していく方法で各パーツや設定の動作を見ます。

クラスが見つからないエラー
$ bitbake core-image-sato

ERROR: Unable to parse /home/katsuhiro/share/projects/oss/poky/bitbake/lib/bb/parse/parse_py/BBHandler.py
Traceback (most recent call last):
  File "/home/katsuhiro/share/projects/oss/poky/bitbake/lib/bb/parse/parse_py/BBHandler.py", line 71, in inherit(files=['base'], fn='configuration INHERITs', lineno=0, d=<bb.data_smart.DataSmart object at 0x7f7a85863c50>, deferred=False):
             if not os.path.exists(file):
    >            raise ParseError("Could not inherit file %s" % (file), fn, lineno)

bb.parse.ParseError: ParseError in configuration INHERITs: Could not inherit file classes/base.bbclass

なにやらclassesディレクトリと*.bbclassファイルが出てきました。これはクラス(Classes - The Yoct Project)といってレシピ間で処理を共有するための仕組みです。ドキュメントによると3種類あるそうです。

  • classes-recipe/ - レシピに個別に継承されることを意図したクラス
  • classes-global/ - グローバルに継承されることを意図したクラス
  • classes/ - 使用コンテキストが明確に定義されていないクラス

Yoctoのクラス(*.bbclassファイル)は全部meta/classes-globalかと思ったらそうでもなく、一部のクラスはmeta/classesディレクトリに配置されています。

エラーメッセージはmeta/classes/base.bbclassがないと言っていますが、ファイルの実際の在処はmeta/classes-global/base.bbclassです。どういうことでしょう?Bitbakeのソースコードを見ると、

Bitbakeのクラスの検索処理

# bitbake/lib/bb/parse/parse_py/BBHandler.py

def inherit(files, fn, lineno, d, deferred=False):
    __inherit_cache = d.getVar('__inherit_cache', False) or []
    #if "${" in files and not deferred:
    #    bb.warn("%s:%s has non deferred conditional inherit" % (fn, lineno))
    files = d.expand(files).split()

    #★★files配列には'base'だけが入っている★★
    for file in files:
        classtype = d.getVar("__bbclasstype", False)    #★★classtype = global★★
        origfile = file

        #★★classes-global/base.bbclassがなければ、classes/base.bbclassを探す★★
        for t in ["classes-" + classtype, "classes"]:
            file = origfile
            #★★パスと拡張子を連結★★
            if not os.path.isabs(file) and not file.endswith(".bbclass"):
                file = os.path.join(t, '%s.bbclass' % file)

            if not os.path.isabs(file):
                bbpath = d.getVar("BBPATH")
                abs_fn, attempts = bb.utils.which(bbpath, file, history=True)
                for af in attempts:
                    if af != abs_fn:
                        bb.parse.mark_dependency(d, af)
                if abs_fn:
                    file = abs_fn

            if os.path.exists(file):
                break

        #★★どちらもないと最後に探したパス名でエラーメッセージを出してくる★★
        if not os.path.exists(file):
            raise ParseError("Could not inherit file %s" % (file), fn, lineno)  #★★エラーメッセージを発生させる行★★

Bitbakeはclasses-globalとclassesの両方を探し、どちらにも目当てのクラスがない場合は最後に探したパス名でエラーメッセージを出力します。従ってエラーメッセージのパスは必ずmeta/classesになります。

今回登場したファイル、ディレクトリは、

  • poky/meta/classes-global/base.bbclass
  • poky/meta/classes-global/*.bbclass
  • poky/meta/classes/*.bbclass

こんなとこ。次回はディストリビューションを見ます。

編集者:すずき(2024/07/05 10:32)

コメント一覧

  • コメントはありません。
open/close この記事にコメントする



link もっと前
2024年6月13日 >>> 2024年5月31日
link もっと後

管理用メニュー

link 記事を新規作成

<2024>
<<<06>>>
------1
2345678
9101112131415
16171819202122
23242526272829
30------

最近のコメント5件

  • link 25年10月6日
    すずきさん (10/10 13:14)
    「ですね。ccはもはやコンパイラというより...」
  • link 25年10月6日
    hdkさん (10/10 08:27)
    「ただのHello, worldでも試して...」
  • link 25年9月29日
    すずきさん (10/03 00:29)
    「なんと、メタパッケージ入れてなかったです...」
  • link 25年9月29日
    hdkさん (10/02 06:51)
    「あれ、dkmsは自動ビルドされるのが便利...」
  • link 20年8月24日
    すずきさん (08/30 22:06)
    「ですね、自分も今はPulseAudioを...」

最近の記事20件

  • link 22年5月5日
    すずき (10/14 05:13)
    「[ALSA - まとめリンク] 目次: ALSA一覧が欲しくなったので作りました。ALSAその1 - 使ってみようALSAその...」
  • link 25年10月11日
    すずき (10/14 05:13)
    「[PipeWireをPulseAudioサーバーの代わりにする] 目次: ALSA最近はPulseAudioがPipeWire...」
  • link 22年12月13日
    すずき (10/14 01:10)
    「[独自OS - まとめリンク] 目次: 独自OS自作OSの紹介その1 - 概要自作OSの紹介その2 - デザイン何もない組み込...」
  • link 20年10月23日
    すずき (10/14 01:10)
    「[ROCK64/ROCKPro64 - まとめリンク] 目次: ROCK64/ROCKPro64ROCK64ブート周りの話のま...」
  • link 21年6月18日
    すずき (10/14 01:10)
    「[RISC-V - まとめリンク] 目次: RISC-VSiFive社ボードの話、CoreMarkの話のまとめ。RISC-V ...」
  • link 20年9月6日
    すずき (10/14 01:09)
    「[FreeRTOS - まとめリンク] 目次: FreeRTOSFreeRTOSで遊ぼう その1 - FreeRTOS入門Fr...」
  • link 23年9月18日
    すずき (10/14 01:08)
    「[一覧の一覧 - まとめリンク] 目次: 一覧の一覧OS、アーキテクチャ系。目次: Android目次: Arduino目次:...」
  • link 23年6月2日
    すずき (10/14 01:08)
    「[Arduino - まとめリンク] 目次: ArduinoM5Stackとesp32とArduinoM5Stamp C3のA...」
  • link 23年4月10日
    すずき (10/10 01:20)
    「[Linux - まとめリンク] 目次: Linuxカーネル、ドライバ関連。Linux kernel 2.4 for ARMが...」
  • link 25年10月6日
    すずき (10/10 01:19)
    「[makeのデフォルトルールのリンクはLDを使わない] 目次: LinuxMakefileの達人には常識かもしれませんが、ma...」
  • link 09年11月3日
    すずき (10/09 23:58)
    「[Automakeの出力を簡潔化する方法がわからない] 目次: Linux最近はMakefileを自作せずに、GNU Tool...」
  • link 18年7月2日
    すずき (10/09 23:56)
    「[libtoolが見つからないときの謎エラー] 目次: LinuxRaspberry Pi 3を持っているのですが、あまり速く...」
  • link 15年12月27日
    すずき (10/09 23:55)
    「[GNU autotools入門 その2] 目次: LinuxGNU autotoolsは簡単なんですが、使い始めるまではかな...」
  • link 15年12月26日
    すずき (10/09 23:55)
    「[GNU autotools入門 その1] 目次: Linuxソースコードのビルドシステムは多々あって決定打はない(個人的には...」
  • link 19年9月17日
    すずき (10/09 23:54)
    「[makeは環境変数とmake変数の挙動が違う] 目次: Linuxシェルからmakeに渡す環境変数とmake変数の関係を知ら...」
  • link 09年4月8日
    すずき (10/09 23:53)
    「[同じ環境のPC2台なのにsedのビルド成功/失敗が変わる?] 目次: Linuxサーバでプログラムをmakeすると、挙動が違...」
  • link 15年12月28日
    すずき (10/09 23:50)
    「[GNU autotools入門 その3] 目次: LinuxGNU autotoolsの話を書いていて思い出したのですが、a...」
  • link 19年10月14日
    すずき (10/09 23:50)
    「[linux-nextでdirtyがバージョン情報に付く仕組み] 目次: LinuxLinuxというかlinux-nextです...」
  • link 15年6月3日
    すずき (10/09 23:49)
    「[ビルド高速化ツールccache] 目次: Linux巨大なプロジェクト(Androidなど)をコンパイルするときに欠かせない...」
  • link 15年6月5日
    すずき (10/09 23:49)
    「[バージョン管理システムとmakeの相性] 目次: Linux前々から感じていたのですが、この2者は非常に相性が悪いと思います...」
link もっとみる

こんてんつ

open/close wiki
open/close Linux JM
open/close Java API

過去の日記

open/close 2002年
open/close 2003年
open/close 2004年
open/close 2005年
open/close 2006年
open/close 2007年
open/close 2008年
open/close 2009年
open/close 2010年
open/close 2011年
open/close 2012年
open/close 2013年
open/close 2014年
open/close 2015年
open/close 2016年
open/close 2017年
open/close 2018年
open/close 2019年
open/close 2020年
open/close 2021年
open/close 2022年
open/close 2023年
open/close 2024年
open/close 2025年
open/close 過去日記について

その他の情報

open/close アクセス統計
open/close サーバ一覧
open/close サイトの情報

合計:  counter total
本日:  counter today

link About www.katsuster.net
RDFファイル RSS 1.0

最終更新: 10/14 05:13