Sei sulla pagina 1di 5

*************

The help info


*************
Usage: python ./yaft.py [-d <directory>] [-f] [-i <ip_address>] [-l <logdir>] [-x
<path_to/XML_file> | -z <path_to/ZIP_file>] \
[-m] [-p] [-s <sec>] [-C] [-F] [-P <port>] [-S] [-Y] [--module] [--package_load]
[--force] [--reboot_cmd <cmd>] [--ignore_slaves] \
[--flash_failsafe_partition] [--yupper_param <parameter>] [--ecl_zip_file_root
<path>] [--sshkeydir <path>] [--ptsw] [-v] [-h|--help] \
...

Options:

Defining where to get the data from:


-c|--custom_file <cust.xml> will additionally evaluate this XML file too
(add/remove/keep content and run shell comands)
multiple -c parameter could be given -
evaluated in given order
-d|--dir_image the location were the files for flashing
are/to be located
-e|--eclfile <path_to/ECL_file> take ECL info for fetching content (needed for
-f option)
-x|--xml <path_to/XML_file> will take info from given XML-file. XML file
could be:
version_control.xml
ptsw_urec_version_control.xml mikroRec
ptsw_fsmr3_version_control.xml FSMR3
TargetBD*.xml eNB load
-z|--zip will take zip file (mainly from a release),
extracts and copy to BTS

Some additional parameter:


-f|--fetch_data fetches the files to -d|--dir_image for
flashing (-x or -e mandatory)
-i|--ip <ip_address> will set the IP address of the target
(default: '192.168.255.1').
-l|--logdir define the logfile directory if default 'log'
not wanted
-m|--mandatory ONLY mandatory files are copied (FSMr2/3 only)
-p|--patch don't cleanup first, just patch content to
_running_ partition
-P|--Port <port> custom port for ssh connection (default: 22)
-s|--sleep time to wait (in sec) before reconnect
-T|--TargetBD the files are put to target with version in
their names (like from TargetBD)
-u|--uboot_update uboot update function for LFS & CCS (only if
no HWAPI running)
-v|--verbose verbose mode - some additional debug info
printed

--ahp_ip IP add AHP IP to netconfig.appstart in LRC if not


default
--ask_for_password enables password query if private key
authentication fails
--clean_to_default try to remove any comissioning e.g. done under
/ffs/run/config
(alpha state!)
--copy_dir_from_running_partition overwrites the by FSDS specified directories
to be copied from running partition.
<parameter> Parameter given as '/dir1 /dir2 /dir3'
(relative to /ffs/run).
If "" given nothing is copied.
--ecl_zip_file_root <path> overwrites the default search directory for SC
zip files
--execute_on_slaves <parameter> <parameter> will be called on any available
'slave' (mainly known as FSPs)
--flash_failsafe_partition copies the new load to 3rd partition too
(RP001323) for failsafe reboot
--fpga_update try to do FPGA update even HWAPI is available
--force force flashing (mainly in 'repair' mode -
ignore errors) - No warranty!
--hwtsw special reduced SW load with special behaviour
for HW Test SW
--ignore_slaves replace --skip_slaves_check; ignores the
slaves (no SW update, no check, nothing)
--ipv6 defines that the IP of the target is IPv6 and
handled accordingly [PSFEATURE-54115]
--module <board|module> in fetching mode (-f option) reduce content
only to <board|module>
--package_load package fetched content to ffs_run.tgz
especially for FSMr4 netboot
requires --module
--ptsw checks for 'ptsw-custom-control.xml' files and
takes them - if available -
as custom.xml file(s)
--reboot_cmd <cmd> overwrites the common reboot command
--sci switch to SCI mode - needed for ECL evaluation
(taking 'small' zip files)
--sci_product take only matching SCI entries in ECL file
--sshkeydir <path> directory where your SSH Keys (e.g.
id_rsa_toor4nsn) are located
--watchdog_feeder feed the watchdog (mainly in LFS where no CCS
is available)
--yupper_param <parameter> yupper could be called with additional
parameter

Skip some operations (you should know what you are doing here!):
-C|--NO_check skips checks after flashing and reboot
-F|--NO_flashing skips any flashing operation - only fetching
content
--NO_fpga_update skips the FPGA update even no HWAPI is running
-K|--NO_lockfile ignores existing lockfile (not blocking
flashing)
-R|--NO_reboot skips the reboot after the partition was newly
set up
-S|--NO_signing skips the signing of the tgz
-Y|--NO_yupper skips the yupper call

This help page


-h|--help prints this help
--version prints the YAFT commit version = YAFT version

Following Preconditions are needed:


* python version 2.7.x (python -V)
e.g.: /build/ltesdkroot/Tools/Tools/python/python-2.7.2/bin/python
* HW connected and could be reached (ping & ssh) on -i|--ip <ip_address>
Exampels:
# fetch data from release and flash to dedicated IP (UNIX only)
python yaft.py -f -d MY_DIR -x
/build/ltesdkroot/Platforms/PS_REL/PS_REL_2012_11_04/C_Platform/version_control.xml
-i 129.168.203.185

# flashing LFS only directly from CI_LFS


python yaft.py -i 129.168.203.185 -x
/build/home/CI_LFS/Release_Candidates/FSMr3/PS_LFS_OS_2015_02_0362/os/version_contr
ol.xml

# download YAFT release zip file from WFT


python yaft.py -i 129.168.203.185 -z release_zip_file_for_YAFT_from_WFT.zip

# download FSMr3 ptsw.zip from SVN and unzip under '<My_Unzip_Dir>/FCT'


# FSMr4 PTSW file is generated to be used in netboot only (not YAFT)
# use already fetched/downloaded data and flash to dedicated IP
python yaft.py -i 129.168.203.185 -d My_Unzip_Dir

# do the same above without extracting the zip first


python yaft.py -i 129.168.203.185 -d My_Unzip_Dir -z My_Location_Of_The_Zipfile

# fetch 'FCTJ' content only by given ECL file to My_Target_Dir without flashing
python yaft.py -d My_Target_Dir -e ECL/ECL_MCUHWAPI -f -F --module FCTJ

# fetch 'FCTJ' content only by given ECL file to My_Target_Dir without flashing
in SCI mode
# --sci_product FSM4 speeds up as only FSM4 zips are extracted/evaluated
python yaft.py -d My_Target_Dir -e ECL/ECL_MCUHWAPI -f -F --module FCTJ --sci
--sci_product FSM4

# fetch 'FCTJ' content and pack it to a ffs_run.tgz package


python yaft.py -d My_Target_Dir -e ECL/ECL_MCUHWAPI -f -F --module FCTJ
--package_load

# patch a load on the _running_ partition ('replace' just some files -


Attention: no 'clean' setup!)
python yaft.py -x My_Files/patch_version_control.xml -p

# with own reboot command


python yaft.py -d My_Release_Dir --reboot_cmd "(sleep 1; systemctl reboot
reconfig) &"

# copy/keep only /etc from running partition


python yaft.py -d My_Release_Dir --copy_dir_from_running_partition '/etc'

Hint! Most options could be stored in ./yaftrc.py or ~/yaftrc.py (see


yaftrc_example.py) like:
IPTarget='129.168.203.185'

InputXML='/build/ltesdkroot/Platforms/PS_REL/PS_REL_2012_11_04/C_Platform/version_c
ontrol.xml'
DirImage='my_local_directory_to_put_fetched_data_to'
Custom files support:
Similar to the vcf you could create a 'custom.xml' file which defines custom
files
to be add (replaced), files to be copied from 'running' to 'not_running'
partition
and files which should be deleted from official load.

*** all relative paths on host (e.g. ADD, SHELL) are relative to the custom xml
file! ***

custom_file_example.xml:
---
<?xml version="1.0" encoding="UTF-8" ?>
<CustomControlFile>
<!-- target related -->
<REMOVE>
<file source="resetCnt*.tgz" mandatory="yes" version=""
destination="addons/fct">
<module>FCT</module>
</file>
</REMOVE>
<COPY>
<file source="addons/fct/pre-config.tgz" mandatory="yes" version=""
destination="addons/fct">
<module>FCT</module>
<module>FCTE</module>
</file>
</COPY>
<KEEP>
<file source="boot/keep.xml" mandatory="yes" version=""
destination="boot">
<module>FCT</module>
</file>
</KEEP>
<!-- host related -->
<ADD>
<file source="BTS_T_YAFT/custom_file_example.xml" mandatory="yes"
version="" destination="flash">
<module>FCT</module>
</file>
<!-- needs leading '/' !!! -->
<file source="/@@@LFS_DIR@@@/os/addons/arm-cortexa15-linux-
gnueabihf/devtools.tgz" mandatory="yes" version="" destination="flash">
<module>FCT</module>
</file>
</ADD>
<SHELL>
<script source="power_switch_ip.sh -i @@@IP@@@ -h @@@HOSTNAME@@@"
mandatory="yes" hook="reboot">
<module>FSCE</module>
<module>FCTJ</module>
</script>
</SHELL>
</CustomControlFile>
---

The 'custom.xml' will be evaluated _after_ the original vcf.

Use -c <custom.xml>|--custome_file <custom.xml> option.


Any valid filename is taken.

For 'SHELL' and 'ADD' section (host related) following hooks and keys are
supported:

hooks: reboot command called directly after reboot (e.g. for


power cycling)
keys: @@@IP@@@ the target IP address
@@@HOSTNAME@@@ the hostname the script is running on
@@@DIR_IMAGE@@@ the -d option given path or the directory the -x
file is located in
useful for adding from a given release a dedicated
file/tarball (e.g. for debugging)
@@@LFS_DIR@@@ the LFS location uImage.initramfs is taken from
(Attention! needs leading 'slash' ('/')
(see example)

Version:
YAFT version is the svn commit revision. Call
python yaft.py --version
to get the version info.

Support:
Confluence page is:
https://confluence.int.net.nokia.com/display/BtsScmUlm/YAFT

SVN repository is:


https://svne1.access.nsn.com/isource/svnroot/BTS_T_YAFT/trunk/

git repository (from LFS)


ssh://gerrit.ext.net.nokia.com:29418/MN/RPSW/LFS/build/yaft

New Feature Requests, Errors, Improvements, ...


should be added to:
https://wft.int.net.nokia.com/support/projects/psyaft/issues/new

In urgent cases a support request could be send to:


YAFT.support@nokia.com

Potrebbero piacerti anche