R
Richard
I ended up using DD on Linux to clone my Compact Flashed and it works pretty
good. I have one issue though, and it does this regardless which method I
use to clone the CF.
When I say Clone, I have one Master "Golden" CF which is totally complete
and tested. Final Image.
Problem.
I run an Advantech board and Advantech has a setup program called
AdvLMSensor with installs some sort of hook in the system. my shell grabs
the CPU and Motherboard temps, processes the infor to turn on a fan and
such.
Problem is, after making a duplicate image, this does not work and I always
have to uninstall and reinstall AdvLmSensor to get it working again. I've
even tried it on the "same" SBC to see if it was an SBC Issue.
For some reason, it can never get the handle from the file below. Any ideas
why?
See below for code snippet;
My Shell does this to get the temps:
Procedure TMain.GetTemps;
begin
hLMSensor := CreateFile('\\.\AdvLmDev',
GENERIC_WRITE,
FILE_SHARE_WRITE,
Nil,
OPEN_EXISTING,
0,
0,);
If (hLMSensor = INVALID_HANDLE_VALUE) then
Begin
Showmessage('Unable to get handle from LMSensor');
Exit;
End Else
Begin
iF DeviceIOControl(hLMSensor,
IOCTL_LMSENSOR_GET_TEMP,
NIL,0,
@temp[0],SizeOf(Temp),
Ret,
NIL) THEN
Begin
PTempC := Temp[1]/10;
MBTempC := Temp[2] / 10;
PTempF := 32 + PTempC * 9 /5;
MBTempF := 32 + MBTempC * 9 /5;
ProcTempLabel.Caption := FloatToStrF(PTempC,ffFixed,6,1)+ 'C / '+
FloatToStrF(PTempF,ffFixed,6,1)+ 'F ';
MBTempLabel.Caption := FloatToStrF(MBTempC,ffFixed,6,1)+ 'C / ' +
FloatToStrF(MBTempF,ffFixed,6,1)+ 'F ';
SendInfo(CPUTempMsg, Round(PTempF));
SendInfo(MBTempMsg, Round(MBTempF));
End Else
Begin
ProcTempLabel.Caption := '0.00';
MBTempLabel.Caption := '0.00';
End;
CloseHandle(hLMSensor);
End;
good. I have one issue though, and it does this regardless which method I
use to clone the CF.
When I say Clone, I have one Master "Golden" CF which is totally complete
and tested. Final Image.
Problem.
I run an Advantech board and Advantech has a setup program called
AdvLMSensor with installs some sort of hook in the system. my shell grabs
the CPU and Motherboard temps, processes the infor to turn on a fan and
such.
Problem is, after making a duplicate image, this does not work and I always
have to uninstall and reinstall AdvLmSensor to get it working again. I've
even tried it on the "same" SBC to see if it was an SBC Issue.
For some reason, it can never get the handle from the file below. Any ideas
why?
See below for code snippet;
My Shell does this to get the temps:
Procedure TMain.GetTemps;
begin
hLMSensor := CreateFile('\\.\AdvLmDev',
GENERIC_WRITE,
FILE_SHARE_WRITE,
Nil,
OPEN_EXISTING,
0,
0,);
If (hLMSensor = INVALID_HANDLE_VALUE) then
Begin
Showmessage('Unable to get handle from LMSensor');
Exit;
End Else
Begin
iF DeviceIOControl(hLMSensor,
IOCTL_LMSENSOR_GET_TEMP,
NIL,0,
@temp[0],SizeOf(Temp),
Ret,
NIL) THEN
Begin
PTempC := Temp[1]/10;
MBTempC := Temp[2] / 10;
PTempF := 32 + PTempC * 9 /5;
MBTempF := 32 + MBTempC * 9 /5;
ProcTempLabel.Caption := FloatToStrF(PTempC,ffFixed,6,1)+ 'C / '+
FloatToStrF(PTempF,ffFixed,6,1)+ 'F ';
MBTempLabel.Caption := FloatToStrF(MBTempC,ffFixed,6,1)+ 'C / ' +
FloatToStrF(MBTempF,ffFixed,6,1)+ 'F ';
SendInfo(CPUTempMsg, Round(PTempF));
SendInfo(MBTempMsg, Round(MBTempF));
End Else
Begin
ProcTempLabel.Caption := '0.00';
MBTempLabel.Caption := '0.00';
End;
CloseHandle(hLMSensor);
End;