本文档讲述有两种方法

方法1:通过u-boot命令行临时编辑

  1. 在uboot阶段快速输入11,进入命令行
  2. 输入env print bootargs查看启动参数
  3. 输入env edit bootargs编辑启动参数,例如添加启动参数:gedu=test 然后回车,再输入boot_android mmc 0:1开始启动进入。
    在进入系统后输入命令cat /proc/cmdline,可以在里面找到自己添加的内核启动参数。

方法2:使用ylboot.ini

注释:这种方法需要更新uboot,进入系统
在/boot/分区下创建ylboot.ini,(需要更新uboot支持,链接:https://gedu.oss-cn-beijing.aliyuncs.com/Products/GDK8/Release/Ubuntu/FengXian2/uboot.img )(如果链接过期,可以查看https://www.nanocode.cn/wiki/docs/gdk8_primer/gdk8_img_bom 寻找最新版本),内容格式如下示例:

geduer@gdk8:~$ cat /boot/ylboot.ini
#
# Boot config for YourLand, visit link below for details.
# https://www.nanocode.cn/wiki/docs/youlan/bootini for details.
#
[sum]
default=krnl5

[krnl5]
kernel=
initramfs=
BootArgs=systemd.debug_shell=1  gedu=test

[krnl6]
kernel=
initramfs=
BootArgs=

其中gedu=test就是测试添加的启动参数,然后重启,查看效果cat /proc/cmdline

作者:zuoyingying  创建时间:2025-02-06 16:10
最后编辑:zuoyingying  更新时间:2025-02-12 11:28