mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Shiyan <eagle.alexander923@gmail.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 1/2] Add support for extlinux.conf
Date: Tue, 5 May 2026 15:44:26 +0300	[thread overview]
Message-ID: <CAP1tNvRkGxsKGsvGhTdcM9zL_y46wWOS58tVCLwyxLANXVjenw@mail.gmail.com> (raw)
In-Reply-To: <32447f15-ff62-4215-a845-376f28261b87@pengutronix.de>

barebox@Diasom DS-RK3568-SOM-EVB:/ global
* allow_color: 1
  arch: arm64
  autoboot: countdown (values: "countdown", "abort", "halt", "menu", "boot")
  autoboot_abort_key: <NULL>
* autoboot_timeout: 2
* boot.default: default
  boot.watchdog_timeout: 0
* bootm.appendroot: 1
  bootm.dryrun: 0
  bootm.earlycon: 0
  bootm.image:
  bootm.image.loadaddr:
  bootm.initrd:
  bootm.initrd.loadaddr:
  bootm.oftree:
  bootm.provide_hostname: 0
* bootm.provide_machine_id: 1
  bootm.root_dev:
  bootm.root_param: root
  bootm.tee:
  bootm.verbose: 0
  bootm.verify: available (values: "none", "hash", "signature", "available")
  console.ctrlc_allowed: 1
  dhcp.bootfile:
  dhcp.client_id:
  dhcp.client_uuid:
  dhcp.hostname:
  dhcp.oftree_file:
  dhcp.option224:
  dhcp.retries: 20
  dhcp.rootpath:
  dhcp.tftp_server_name:
  dhcp.user_class:
  dhcp.vendor_id: barebox
  endianness: little
  env.autoprobe: 1
  fastboot.bbu: 0
  fastboot.max_download_size: 134217728
  fastboot.partitions:
  firmware.path: /env/firmware
  hostname: diasom
  linux.bootargs.base:
  linux.bootargs.console: console=ttyS2,1500000n8
  linux.bootargs_append: 0
  linux.rootnfsopts: v3,tcp
  log_max_messages: 32768
  loglevel: 7
  machine_id: 181af2816b4c6b0aef77068e0ccc69ad
  model: Diasom DS-RK3568-SOM-EVB
  net.domainname:
  net.fetchdir: /mnt/tftp
  net.gateway: 0.0.0.0
  net.ifup_force_detect: 0
  net.nameserver: 0.0.0.0
  net.server:
  nfs.port: 0
  of.kernel.add_machine_compatible:
  of.overlay.compatible:
  of.overlay.filter: pattern compatible
  of.overlay.path:
  of.overlay.pattern: *
  of_partition_binding: adaptive (values: "new", "legacy",
"donttouch", "adaptive")
  partitions.first_usable_lba: 16384
  system.partitions:
  system.reset: unknown (values: "unknown", "POR", "RST", "WDG",
"WKE", "JTAG", "THERM", "EXT", "BROWNOUT")
  system.reset_instance: 0
  tftp.windowsize: 1
  usbgadget.acm: 0
  usbgadget.dfu_function:
* user: none
  version: 2026.04.0-00765-gd3f78fc00c40-dirty
barebox@Diasom DS-RK3568-SOM-EVB:/ global.boot.default=mmc1.2
barebox@Diasom DS-RK3568-SOM-EVB:/ boot
ext4 ext40: EXT2 rev 1, inode_size 256, descriptor size 64
Booting entry 'extlinux: linux'
extlinux: Booting extlinux label 'linux'
Adding "root=/dev/mmcblk1p3" to Kernel commandline

Loading ARM aarch64 Linux/EFI image '/mnt/mmc1.2/boot/extlinux/../vmlinuz'
Camera IMX662 detected.
commandline: console=ttyS2,1500000n8 root=LABEL=ROOT ro
systemd.unit=setup.target quiet splash  root=/dev/mmcblk1p3
systemd.machine_id=181af2816b4c6b0aef77068e0ccc69ad
Loaded kernel to 0x0a400000, devicetree at 0x000000000fb49000
nv variables modified, saving them
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
I/TC: Secondary CPU 2 initializing
I/TC: Secondary CPU 2 switching to normal world boot
I/TC: Secondary CPU 3 initializing
I/TC: Secondary CPU 3 switching to normal world boot

Now it works!

вт, 5 мая 2026 г. в 15:22, Ahmad Fatoum <a.fatoum@pengutronix.de>:
>
> Hello Alexander,
>
> On 5/5/26 2:19 PM, Alexander Shiyan wrote:
> > barebox@Diasom DS-RK3568-SOM-EVB:/ global
> > * bootm.~appendroot: true
>
> This should be bootm.appendroot: 1.
>
> > bootm.~appendroot: true, but now is ever not added to the cmdline.
>
> The tilde is just an implementation detail in common/bootm.c. You should
> just global.bootm.appendroot as before.
>
> Thanks,
> Ahmad
>
> >
> > вт, 5 мая 2026 г. в 13:49, Ahmad Fatoum <a.fatoum@pengutronix.de>:
> >>
> >> Hello Alexander,
> >>
> >> On 5/5/26 12:47 PM, Alexander Shiyan wrote:
> >>> Hello Ahmad.
> >>>
> >>> ...
> >>>>> +     if (e->append) {
> >>>>> +             char *append;
> >>>>> +
> >>>>> +             /*
> >>>>> +              * The same rootfs image may be launched from eMMC or SD card.
> >>>>> +              * Remove any hardcoded root= parameter from "append" to avoid
> >>>>> +              * conflicts, then let barebox automatically add the correct
> >>>>> +              * root= (via global.bootm.appendroot) based on the boot device.
> >>>>> +              */
> >>>>> +             if (data.appendroot)
> >>>>> +                     append = remove_param(e->append, "ROOT=");
> >>> ...
> >>>> I thus have a question to you: What happens if you drop remove_param()
> >>>> completely? Sure we will have two root=, but the later gets precedence,
> >>>> so your use case would continue to work without giving users a wrong
> >>>> expectation.
> >>>
> >>> Yes, the second one takes priority.
> >>> The second one is the one added via extlinux.conf APPEND option.
> >>> In our case we need the first parameter, i.e. which comes from barebox
> >>> when global.bootm.appendroot is toggled on.
> >>
> >> Ack. Please check the series I Cc'd you on, which ensures that
> >> global.bootm.appendroot applies _after_ extlinux.conf APPEND.
> >>
> >> Thanks,
> >> Ahmad
> >>
> >>>
> >>> Thanks!
> >>>
> >>
> >> --
> >> Pengutronix e.K.                  |                             |
> >> Steuerwalder Str. 21              | http://www.pengutronix.de/  |
> >> 31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
> >> Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |
> >>
> >
>
> --
> Pengutronix e.K.                  |                             |
> Steuerwalder Str. 21              | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |
>



  reply	other threads:[~2026-05-05 12:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28 13:28 Alexander Shiyan
2026-04-28 13:28 ` [PATCH v2 2/2] Documentation: add extlinux.conf support description Alexander Shiyan
2026-05-05  9:56 ` [PATCH v2 1/2] Add support for extlinux.conf Ahmad Fatoum
2026-05-05 10:47   ` Alexander Shiyan
2026-05-05 10:49     ` Ahmad Fatoum
2026-05-05 12:19       ` Alexander Shiyan
2026-05-05 12:22         ` Ahmad Fatoum
2026-05-05 12:44           ` Alexander Shiyan [this message]
2026-05-05 12:52             ` Ahmad Fatoum
2026-05-05 13:01               ` Alexander Shiyan
2026-05-05 13:04                 ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP1tNvRkGxsKGsvGhTdcM9zL_y46wWOS58tVCLwyxLANXVjenw@mail.gmail.com \
    --to=eagle.alexander923@gmail.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox