429254cb2d
Refactors the SONiC Installer to support greater flexibility in building for a given architecture and bootloader. #### Why I did it Currently the SONiC installer assumes that if a platform is ARM based that it uses the `uboot` bootloader and uses the `grub` bootloader otherwise. This is not a correct assumption to make as ARM is not strictly tied to uboot and x86 is not strictly tied to grub. #### How I did it To implement this I introduce the following changes: * Remove the different arch folders from the `installer/` directory * Merge the generic components of the ARM and x86 installer into `installer/installer.sh` * Refactor x86 + grub specific functions into `installer/default_platform.conf` * Modify installer to call `default_platform.conf` file and also call `platform/[platform]/patform.conf` file as well to override as needed * Update references to the installer in the `build_image.sh` script * Add `TARGET_BOOTLOADER` variable that is by default `uboot` for ARM devices and `grub` for x86 unless overridden in `platform/[platform]/rules.mk` * Update bootloader logic in `build_debian.sh` to be based on `TARGET_BOOTLOADER` instead of `TARGET_ARCH` and to reference the grub package in a generic manner #### How to verify it This has been tested on a ARM test platform as well as on Mellanox amd64 switches as well to ensure there was no impact. #### Description for the changelog [arm] Refactor installer and build to allow arm builds targeted at grub platforms #### Link to config_db schema for YANG module changes N/A
16 lines
414 B
Plaintext
16 lines
414 B
Plaintext
# sample_machine.conf for onie
|
|
# A space in front of comment line
|
|
# One blank line below
|
|
|
|
onie_machine_rev=0
|
|
onie_arch=x86_64# some comment after declaration
|
|
# no value declaration
|
|
onie_config_version=
|
|
onie_build_date="2021-02-03T01:50+0800"
|
|
onie_partition_type=gpt
|
|
onie_disco_ntpsrv=192.168.0.1 192.168.0.2
|
|
onie_firmware=auto
|
|
# another blank line below
|
|
|
|
onie_skip_ethmgmt_macs=no
|
|
onie_grub_image_name=grubx64.efi |