Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GENERIC64 aarch64 failure to autoboot



On Sun, Mar 05, 2023 at 12:56:29PM +0000, Chavdar Ivanov wrote:

[   1.3797015] dk0 at sd0: "EFI system", 262144 blocks at 2048, type:
msdos
[   1.3897890] dk1 at sd0: "cc8f4a89-edc0-48d1-b9ce-b40d227a4a07",

> netbsd,gpt-guid         894a8fcc c0edd148 b9ceb40d 227a4a07   .J.....H...."zJ.


Means, the bootloader passes dk1 as the boot device.

But the code only checks "ld", "sd" and "wd" devices:

        if (device_is_a(dev, "ld") || device_is_a(dev, "sd") || device_is_a(dev, "wd")) 
               fdt_detect_root_device(dev);

wedges are skipped, but even if a "dk" device would be checked, then:

        if (of_hasprop(chosen, "netbsd,gpt-guid")) {
                const struct uuid *guid =
                    fdtbus_get_prop(chosen, "netbsd,gpt-guid", &len);

                if (guid != NULL && len == 16)
                        booted_device = dev;

                return;
        }

this matches anything.

In this case, the first "ld", "sd" or "wd" device matches as soon
as a netbsd,gpt-guid is passed by the bootloader.


Greetings,
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index