nvram doesn't remember my boot-args settings. How to fix it?

1k views Asked by At

I'm working on a kernel extension - a device driver - and rely heavily on diagnostic messages that come from kprintf().

$ fwkpfv on the host machine will display log messages from kprintf() on the target, but it needs "debug=0x8" in boot-args.

# nvram boot-args="debug=0x14e kdp_match_name=firewire"
# nvram -p | grep boot-args
boot-args      "debug=0x14e kdp_match_name=firewire"

(I don't remember clearly whether the quotes were included.)

If I boot normally after setting boot-args:

# nvram -p | grep boot-args

#

I am eternally in your debt.

1

There are 1 answers

0
Mike Crawford On

Some folks on the darwin-drivers mailing list pointed out to me that the nvram command holds its settings in RAM until a clean shutdown is performed. I've been in the habit of forcibly powering my Mac Pro off as sometimes my driver panics when it's just been installed.

It worked to boot into recovery mode, set the boot-args, then shutdown from the Apple menu.

This got my Firewire logging back.