Intermec ck1 Reference Guide

Page of 390
Chapter 2 — Configuring the CK1 System 
CK1 SDK Programmer’s Reference Manual 
103 
Upgrading 
 
Purpose:  Remote upgrade with assigned specified partition. 
 
Syntax: 
int RUUpgrade(char *SpecPart)
 
 On-CK1 Parameters:  SpecPart 
{kernel, rootfs, usrlocal} 
 
On-CK1 Return: -1 
 Upgrade 
failed 
0 Upgrade 
succeeded 
 On-Host Parameters:  SpecPart No 
action 
 
On-Host Return:  Always return -1 
Getting Firmware Version 
 
Purpose:  Get firmware version of images in NAND and NOR parts. 
 
Syntax: 
char* GetFirmwareVersion(char* whichFirmware, char* 
Version);
 
 On-CK1 Parameters:  whichFirmware 
Image parts (kernel, rootfs, usrlocal, bootloader, bios, 
writer, diag) 
Version 
Buffer to place the firmware version string 
 
On-CK1 Return:  Pointer to the version string if successful; NULL if failed 
 
On-Host Return:  Always return 0 
System Configuration Setting 
You should include the header file if you want to use the system 
configuration setting application APIs. 
To include the header file 
•  Add this line to your source file: 
 #include 
<eslib_nandtool.h> 
Example Code 
/************************************************************** 
 * Program : NANDTOOL API TEST 
 *************************************************************/ 
#include <stdio.h> 
#include <unistd.h> 
#include <eslib_nandtool.h> 
#include <signal.h> 
 
int main(int argc,char *argv[]) 

  char Flag[100]; 
 
  if (WriteBootFlag("diag"))