0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

kernel の bootargs

Last updated at Posted at 2022-11-22

kernelに対するbootargsは、petalinux-config(引数なしの基本コンフィグ)からできるのだが、system-user.dtsiからもできる。

system-user.dtsiからやる方法をお勧めしたい。

なぜ?

以下の理由により、極力petalinux-configを使いたくない。ため。

  1. 頻繁に設定したものが巻き戻る。 (v2020.2)
    特に petalinux-config -c u-boot 。
    system-user.dtsiをいじると、まず間違いなく巻き戻る。
    すごく困る。とてもとても困る。
    デバイスツリーをいじったのだから、u-bootの再構築が必要なのはわかる。
    が、だからといって、設定値が巻き戻ってはいけないと思う。
    たまにpetalinux-config -c kernel でも起きる。
    こちらはどんなときに巻き戻るのか、特定できていない。 さらに厄介。 毎回確認する必要がある。
    このせいで、費用にして数十万~100万程度は損害があったと思われる。

    何かうまい回避方法をご存じの方がいらっしゃいましたら、ご教示いただけると、とてもとてもありがたいです。

  2. 着目点が限定される。
    「なにかいじろうかと思ったら可能な限りsystem-user.dtsi」という決まりにしておけば、ミスが起こりにくい(と、思う。)
    何々をしやすいとか、分かりやすいとか、主観だよね。
    万人にとっての分かり「やすい」って無いと思うんだ。

Example

project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
/include/ "system-conf.dtsi"
/ {

	chosen {
		bootargs = " earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/ram0 rw";
		stdout-path = "serial0:115200n8";
	};

};

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?