RISC OS News on Drobe
RISC OS Search
containing
"The original entry in the guide described VA_RPC as ARMless, now it's been updated to Mostly Harmless"
Welcome back guest  |  Login  |  Register Monday 21st July 
Login

drobe.co.uk
About Drobe
RISC OS News
Drobe Features
Alternatives
Bookmarks
Riscos.org.uk
Auctions
Events (shows)
AU issues
Tech Material
Wallpaper
Movies
File archives
SH eBooks
FAQs
Changelog

Interact
Forums
Online chat
Your webspace
BBC Emu(games!)
User gallery
RSS news &
comments
Submit news
Contact us

Quick Links
Open directory
Nutshells
ANS archives
ArcSite
RO Repository
Announce
RISCOS Ltd.
Castle

NTK
The Inquirer
The Register
OSNews
Slashdot
Google

Alternatives
NetBSD
ARM Linux
Iyonix Linux

Found Apps
 RISC OS Software !Avalanche
 RISC OS Software !Darts
 RISC OS Software !CFuncAnal
 RISC OS Software !TranTIFF+
 RISC OS Software !Dustbin
 RISC OS Software !NurseW
 RISC OS Software !Tally
 RISC OS Software !VideoLog
 RISC OS Software !USBKick
 RISC OS Software !Spr2Jpeg
Recent users
tduell is a RISC OS User tduell
jmb is a RISC OS User jmb
liquid is a RISC OS User liquid
Mart is a RISC OS User Mart
krisa is a RISC OS User krisa
Hairy is a RISC OS User Hairy
hubersn is a RISC OS User hubersn
DaveW is a RISC OS User DaveW
demondb is a RISC OS User demondb
PBiggs is a RISC OS User PBiggs


Why donate?

Serving: 15GB
Fuel: caffeine
0 users online
26 guests
176 active accts 24329 comments

Webstats

 
RISC OS News Article
Select hardware profiles uncovered
Published: 2nd Jan 2005, 00:05:38GMT  Source: drobe.co.uk
By Theo Markettos
Page 1 of 1
But it's elementary, my dear Watson
Theo Markettos investigates the little known feature of RISC OS Select and Adjust: the hardware profile system, which allows users to associate system and application choices with particular hardware configurations.

The instigation of a new Linux-based network backup system for my RiscPC gave me the chance to keep the hard drives of my RiscPC and VirtualAcorn laptop, both running RISC OS Adjust, synchronised. Whilst I've not automated this yet, I ran into a problem when using the RiscPC's hard drive image on VirtualRiscPC, as the emulator would complain when trying to configure hardware only found on the RiscPC, and vice versa.

RiscPC hardware motifAha! I thought. Just the ticket for Adjust's hardware profiles feature. Unfortunately these don't seem to be documented anywhere so I set out to find out how they worked. Apparently this functionality has been working since Select version 1, but currently has no front end. RISC OS Ltd don't like you messing about inside !Boot and this isn't officially supported - but for those who are interested, read on.

The idea behind hardware profiles is that the boot sequence checks the hardware of the machine and compares it to that it already knows about. It will either pick the configuration for the nearest hardware setup it has already seen, or ask whether to create a new configuration. Each can be configured independently - for example on a network of machines with different Ethernet cards, you can have one network boot sequence with different hardware profiles to configure each type of card. At home you might sometimes remove a SCSI card and want to ensure that the software for it isn't loaded when it isn't present.

All the work is done by !Boot.Utils.HWScan. This is run on boot, and usually says:

Profile: Hardware profiles disabled

To enable it, you must change the contents of !Boot.Choices.Hardware.Config from 'disabled' to 'automatic' or 'manual'. Let's set it to 'manual'. If we then run /Boot:Utils.HWScan in a Taskwindow, it says:

*/Boot:Utils.HWScan
Profile: No hardware profiles present

Adding new hardware profile

Profile name:


and then prompts for a profile name. I entered 'Bream'.

It then creates a new directory of !Boot.Choices.Hardware.ID_0 and puts a copy of the default hardware configuration files in there: Boot and Internet directories. It also creates a file !Boot.Choices.Hardware.Profiles that contains:

@Bream

[Bream] 0
ROM declaration: RISC OS Ally Adjust
ROM part number: 20040317-001
ROM build: Wed,17 Mar 2004.23:00:28
ROM dealer: RISCOS Ltd
ROM user: A Markettos
Memory DRAM: 32MB
Memory VRAM: 2MB
Memory ROM: 4MB
Memory I/O space: 136MB
Memory SoftROM: 0MB
Chips Special chip: none
Chips IO control: IOMD
Chips Video: VIDC20
Chips IO chip: 82C710/711/SMC665
Chips LCD: none
Chips IOMD variant: IOMD
Chips VIDC20 variant: VIDC20
Chips IO config: type 3
Machine Platform: RPC


and so on. The first line means that the last known profile was called 'Bream', whilst the following lines create a profile called 'Bream' with ID 0 and describe the hardware of the machine.

Now, if we reboot the machine we find it is using the hardware profile called 'Bream'. This means that hardware specific configuration like network settings will be stored in the !Boot.Choices.Hardware.ID_0 directory rather than the usual place for Choices. Unfortunately not many programs know about this feature, so you may have to move manually choices directories here from the place applications put them (probably !Boot.Choices.Users.Single). The directory for the current profile is pointed to by ChoicesHardware$Dir, whilst ChoicesHardware$ID gives the ID number and ChoicesHardware$Name the profile name.

So let's change the hardware - for the sake of demonstration configure another floppy drive with !Boot and restart. We find:

Hardware profile boot menu
Click for larger image


Here we have the options to create a new profile or use an existing one. 'HELP!' documents the profiles system and explains the different options. For demonstration we use 'N) treat this as a new clean profile' to create another profile called 'Dover Sole'. This creates a directory of !Boot.Choices.Hardware.ID_1 and a virgin copy of the default configuration in there. Any changes made to the previous settings of 'Bream' won't be reflected here. Similarly any reconfiguration we make here won't affect 'Bream'. What's more is that if we change the hardware back to the original, RISC OS will notice and automatically switch to the 'Bream' profile. So every time we change the hardware RISC OS will select the appropriate profile.

Putting 'automatic' in !Boot.Choices.Hardware.Config will select the default option every time the machine sees an unknown hardware setup. With changes to the number of drives present it opts for to create new profile each time and demands a name for it: so changes still require user input to boot. Changes to the amount of memory in the machine opt to use an existing profile - that the amount of RAM arguably doesn't affect the operation of the machine and so doesn't require a different profile.

So, that just about covers it. The hardware configuration directory is on Choices$Path, so if you move choices directories there applications should still be able to read them, even if they don't understand the hardware profiles system, and will still write their new configuration in the old place. One downside from this system is that it doesn't seem possible for one profile to depend on another - so if you want different profiles to deal independently with presence or absence of a SCSI card and a network card, you'll need to create profiles for all combinations of them. Similarly, any changes you make to profile-specific settings will only be reflected in the current profile: so if you change the network settings after inserting the SCSI card it won't affect the network settings in the profile where the SCSI card isn't present.

Despite this it's a useful system that should make dealing with multiple hardware configurations much easier.

Links
RISC OS Adjust website

Related articles
RISC OS 6.10 available to Select subscribers
Select 4 upgrade pack released
Select nets 1,000th subscriber

This article has been linked to, or is available in the following formats:  
 
 
 
 
 
[Printable] [Digg this] [Blog search]


sa110(good user) 
Face
2/1/05 10:30AM
A very interesting article.
jlavallin(bad user / troll) 
2/1/05 10:51AM
I don't think I'll fiddle with this anymore. I tried the above and with profiles left in it blocked my broadband connection - net card not recognised?
andretim 
2/1/05 10:54AM
On the same vain I should point out another useful info regarding not hardware profiles but user profiles.
!Boot.Choices.Default can be used to store the configuration files that should be common to all users (like Internet.Files.Mimemap).
jlavallin(bad user / troll) 
2/1/05 11:18AM
User profiles - sounds more usefull. I would like both !Dialup2 and !Netfetch2 to be able the same accounts for both mail and news. At the moment 'Dun' is blocked and only 'Dem' is available from Newshound. I don't want thousands of duplicate posts.
caliston2(good user) 
2/1/05 5:59PM
In reply to jlavallin:

One thing to be aware of is that the default profile for 'create a new clean profile' comes from !Boot.Choices.Hardware.Blank, whereas 'treat as a new profile based on ...' will in theory copy the profile you were using last time or the one with a configuration nearest to what you have now as use that (it only seems to use the blank profile in my experiments though). It won't use any settings made in Profiles Disabled mode - you start from a hardware unconfigured machine again - though the only part of the OS that uses profiles is the network settings. So if you have any settings you want to retain across all profiles it's best to either copy them from !Boot.Choices.Hardware.Disabled to !Boot.Choices.Hardware.Blank, or better create a first new profile, put them in there, and treat all new profiles as based on this.
 

Top Tip

Wallpaper

Download wallpapers for your desktop and contribute your own to our database
 
Headline news
Wakefield 2008 show photos
28th Apr 2008

Wakefield 2008 show live news
26th Apr 2008

Who would want an A9home PDA?
24th Apr 2008

RISC OS 6.10 available to Select subscribers
24th Apr 2008

Gallery photo
Older news
Animation and typing applications really released
24th Apr 2008

Wakefield 2008 show preview
22nd Apr 2008

R-Comp unveils new PDF authoring package
22nd Apr 2008

NetSurf bags GBP10K investment from Google
21st Apr 2008

Apple Mac VirtualRiscPC leaves beta
20th Apr 2008

Blu-ray disc burn breakthrough
14th Apr 2008

PDF import support for ArtWorks
13th Apr 2008

Wakefield 2008 show theatre line-up revealed
13th Apr 2008

Animation software collection falls into R-Comp's hands
9th Apr 2008

Features
A9home: two years on
4th Dec 2007

A9home DIY laptop: first pictures
1st Dec 2007

Software hosted by Drobe: Your guide
5th Nov 2007

 

Top | Design and concept © Fudgecake Design, 1999 - 2001. Content © The Drobe Team, 1999 - 2008. 
Click here for more information and terms and conditions.