Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x86: Add an onie-tool command to show ONIE version information #227

Closed
wants to merge 1 commit into from

Conversation

cbrune
Copy link
Contributor

@cbrune cbrune commented Jul 2, 2015

Closes #161

On x86 the /mnt/onie-boot/onie/tools directory houses scripts (and
script fragments) usable by an installed NOS to interact with ONIE.

This patch adds the following:

  • moves the onie-tool tarball creation logic from the images.make
    Makefile fragment into a helper script, called by images.make.
  • adds a new tool, onie-version, for displaying ONIE version
    information from the NOS.

To use the ONIE tools a NOS is expected to:

  • mount the ONIE-BOOT partition somewhere, e.g.

    tmpdir=$(mktemp -d)
    mount LABEL=ONIE-BOOT $tmpdir

  • run the scripts in (ONIE-BOOT)/onie/tools/bin

Testing:

Exercised the new tool using the kvm_x86_64 machine and the demo NOS.

@cbrune
Copy link
Contributor Author

cbrune commented Jul 2, 2015

From my development kvm machine the output of the command looks like:

KVM_X86_64-OS:/ # /mnt/onie-boot/onie/tools/bin/onie-version
  ONIE version        : onie-version-201507011623-dirty
  ONIE vendor_id      : 42623
  ONIE platform       : x86_64-kvm_x86_64-r0
  ONIE machine        : kvm_x86_64
  ONIE machine_rev    : 0
  ONIE arch           : x86_64
  ONIE config_version : 1
  ONIE build_date     : 2015-07-01T16:42-0700
  ONIE partition_type : gpt
  ONIE kernel_version : 4.0.4
  ONIE firmware       : auto

Closes opencomputeproject#161

On x86 the /mnt/onie-boot/onie/tools directory houses scripts (and
script fragments) usable by an installed NOS to interact with ONIE.

This patch adds the following:

- moves the onie-tool tarball creation logic from the images.make
  Makefile fragment into a helper script, called by images.make.

- adds a new tool, onie-version, for displaying ONIE version
  information from the NOS.

To use the ONIE tools a NOS is expected to:

- mount the ONIE-BOOT partition somewhere, e.g.

   tmpdir=$(mktemp -d)
   mount LABEL=ONIE-BOOT $tmpdir

- run the scripts in (ONIE-BOOT)/onie/tools/bin

Testing:

Exercised the new tool using the kvm_x86_64 machine and the demo NOS.
@cobracmder
Copy link
Member

looks good

@cbrune
Copy link
Contributor Author

cbrune commented Jul 6, 2015

pushed to master:

  • 4d3469b x86: Add an onie-tool command to show ONIE version information

@cbrune cbrune closed this Jul 6, 2015
@cbrune cbrune deleted the onie-version branch July 6, 2015 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants