grub-devel
[Top][All Lists]
Advanced

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

Re: [RFC] Long environment variables.


From: Yves Blusseau
Subject: Re: [RFC] Long environment variables.
Date: Mon, 31 Aug 2009 19:11:46 +0200

Currently we don't have a reliable autodetector to pass hardware info
to xnu kernel.
I wanted to let user specify it through environment variables - it
allows user to e.g. correct wrong entry in dump at boot time. E.g:
XNU.DeviceProperties.0.path.0=ACPI:167985616:0
XNU.DeviceProperties.0.path.1=PCI:0:2
XNU.DeviceProperties.0.property.AAPL01,DataJustify=01000000
XNU.DeviceProperties.0.property.AAPL01,Pipe=01000000
...
But the problem is that in some dumps I recieved from users one of
variables is 64K binary.
As all values in hardware info are binaries they are all hexified.
So it makes 128K environment variable. One problem is that 'set'
floods the terminal and another problem is that source <dump> takes
noticeable time.
Solutions to consider (ideas collected over freenode):
1) make set truncate variables on output unless user passes "set -a"
or perhaps instead of displaying variable say
'%s' is %d bytes long.
unless user specifies 'set -a'
Additionally make a command loadenvfile for fast loading of environment lists.
2) Not use environment variables for this at all. Load binary dumps.
Eventually have dedicated commands to modify device-properties. This
perhaps makes faster booting too. (no hexification/dehexification).
This allows to load dumps from dumping tool without preparsing done by
userspace tool (not a real issue, dumper is userspace too).
3) Use environment variables for only part of device-properties. It's
both ad-hoc and hard to get right. I would avoid this solution.
What do you think?

Solution 2, seems to be a good alternative.

Yves

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]