2010/12/2 Arjan van de Ven <[email protected]>: >> >> Sounds like a good direction. Maybe we should provide a simple package >> wih '/usr/bin/meego-machinename' which outputs a proper machine name >> in an arch-indep manner? (I guess we shouldn't encourage people to >> parse /proc/cpuinfo or rely on /sys/devices/virtual/dmi/id/board_name >> existence.. #ifdef __arm__ or x86 is so ugly :) >> >> That, or a machine name being put in /etc/meego-machinename at startup >> or something to avoid launching a process each time. > > I like the /etc/meego-machinename thing or even just /etc/machinename > > we can do the x86 side no big deal in a short time... > (heck it could just be a symlink to the sysfs file there)
I guess a good place would be rc.sysinit for this then, CC'ing Auke.. To be a bit future proof, I'd like to propose following semantics then: * if exists /etc/machinename-override then symlink to that * else run machinename-detect * x86 initial impl: symlink to /sys/devices/virtual/dmi/id/board_name, if containing 'INVALID' (my laptop does that), restore to platform name * arm initial impl: parse /proc/cpuinfo for Hardware: line and write machine name to /etc/machinename, if invalid, restore to platform name (which we get from where?) -override is to deal with things like a BeagleBoard which may have differing configurations depending on what hardware is attached or for general development purposes. On ARM side it's complex as a board name also can contain spaces, so we might need some more parsing -- hence machinename-detect, but we'll contribute that part after talking to some vendors.. I think there is a unique board ID for each ARM board, but how to get it from userspace.. BR Carsten Munk _______________________________________________ MeeGo-packaging mailing list [email protected] http://lists.meego.com/listinfo/meego-packaging
