Page MenuHomeFreeBSD

ofw: Load initrd file

Authored by on Jun 8 2018, 2:27 PM.



This is an OFW initrd module that would load the initrd from device tree
parameters and give the to the md driver.

With this patch, it is possible to pass as rootfs through kexec in PowerNV
mode (powerpc64).

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Change OF_getencprop() to OF_hasprop() on probe() function.

jhibbits added inline comments.Jun 12 2018, 6:53 PM
79 ↗(On Diff #43459)

This should be a ||, since both are needed.

136 ↗(On Diff #43459)

Since only one initrd should be here, you can limit it here with:

if (device_find_child(parent, "initrd", -1) != NULL)

Adding Justin's suggestions and removing an unused variable.

jhibbits accepted this revision.Jun 27 2018, 12:50 AM

Just one minor nit, but otherwise good to go.

83 ↗(On Diff #44075)

One nit: add parentheses around the return value. Then good to go.

This revision is now accepted and ready to land.Jun 27 2018, 12:50 AM
This revision was automatically updated to reflect the committed changes.