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

Does sonic support new format of /etc/machine.conf which is from ONIE? #1404

Closed
fillmorechen0928 opened this issue Feb 21, 2018 · 10 comments
Closed

Comments

@fillmorechen0928
Copy link

ONIE page description about machine.conf:
https://opencomputeproject.github.io/onie/developers/multiple_cpu.html

======================================================
It cause sonic_installer fail to install sonic image.

root@sonic:/tmp# sonic_installer install ./sonic-broadcom.bin
New image will be installed, continue? [y/N]: y
Command: ././sonic-broadcom.bin
/tmp/tmp.ISY9gRmCsy/installer/install.sh: 8: .: Can't open /etc/machine-build.conf
Verifying image checksum ... OK.
Preparing image archive ... OK.
Installing SONiC in SONiC
ONIE Installer: platform: x86_64-broadcom-r0

root@sonic:/tmp#

@lguohan
Copy link
Collaborator

lguohan commented Feb 28, 2018

@fillmorechen0928, can you dump /etc/machine.conf, /etc/machine-live.conf, /etc/machine-build.conf in your new onie? We'll take a look and see how to adapt sonic installer to the new onie machine.conf format.

@fillmorechen0928
Copy link
Author

Dear lguohan,

Please refer to the attached files.
onie_machine.zip

@lguohan
Copy link
Collaborator

lguohan commented Mar 7, 2018

#1468

Can you load the PR build image to test?

You need to use onie installer to install the new image. In the new image, it will have static machine.conf under /host directory, and then you can upgrade to a newer image using sonic to sonic upgrade.

@fillmorechen0928
Copy link
Author

I don't know how to get PR build image?

Currently, we only use this command to get latest code of sonic.
#git clone https://github.com/Azure/sonic-buildimage.git

@fillmorechen0928
Copy link
Author

Any SOP ?

We use use this command to get latest code of sonic.
#git clone https://github.com/Azure/sonic-buildimage.git

Then we add our modified files to build image.

@lguohan
Copy link
Collaborator

lguohan commented Mar 9, 2018

In case you need to build your own, then can you take the patch in PR #1468

@fillmorechen0928
Copy link
Author

Dear lguohan,

We verify the patch in PR #1468 on our device is correct.

The sonic_installer command can install sonic image successfully.

Thanks for your help.

@lguohan lguohan closed this as completed Mar 18, 2018
@fillmorechen0928
Copy link
Author

/host/machine.conf is incorrent for other application.

Please remove quote.

@fillmorechen0928
Copy link
Author

Original /host/machine.conf:

onie_version=master-201802221653.0.1-dirty
onie_vendor_id=31874
onie_build_machine=alphanetworks_snh60b0_640f
onie_machine_rev=0
onie_arch=x86_64
onie_build_platform=x86_64-alphanetworks_snh60b0_640f-r0
onie_config_version=1
onie_build_date="2018-02-22T16:53+0800"
onie_partition_type=gpt
onie_kernel_version=3.14.27
onie_firmware=bios
onie_switch_asic=bcm
onie_skip_ethmgmt_macs=no
onie_grub_image_name=grubx64.efi
onie_machine=alphanetworks_snh60b0_640f
onie_platform=x86_64-alphanetworks_snh60b0_640f-r0

Current /host/machine.conf:
onie_arch='x86_64'
onie_bin=''
onie_boot_reason='rescue'
onie_build_date='2018-01-23T19:05+0800'
onie_build_machine='alphanetworks_snh60b0_640f'
onie_cli_static_parms=''
onie_cli_static_url='sonic-broadcom.bin'
onie_config_version='1'
onie_dev='/dev/sda2'
onie_exec_url='sonic-broadcom.bin'
onie_firmware='bios'
onie_grub_image_name='grubx64.efi'
onie_initrd_tmp='/'
onie_installer='/var/tmp/installer'
onie_kernel_version='3.14.27'
onie_machine='alphanetworks_snh60b0_640f'
onie_machine_rev='0'
onie_partition_type='gpt'
onie_platform='x86_64-alphanetworks_snh60b0_640f-r0'
onie_root_dir='/mnt/onie-boot/onie'
onie_skip_ethmgmt_macs='no'
onie_switch_asic='bcm'
onie_vendor_id='31874'
onie_version='master-201801231905.0.1-dirty'

Please remove quote.

It cause path add more quotes for other APP in SONIC.

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

No branches or pull requests

2 participants