diff options
| author | Daniil Baturin <daniil@vyos.io> | 2026-04-03 14:25:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-03 14:25:20 +0100 |
| commit | a03ba5a8a61d2d68b0827ba98fa15863a4e1a5f9 (patch) | |
| tree | 0eecc1554358b1d75cd8b03bb68c2fdce4ecb2de | |
| parent | aa0c2475ce87c8f1026e869cb6f3bce773cecf4b (diff) | |
| parent | 52c3ea6742aed4058464c8c9cc690b2acadd7cb0 (diff) | |
| download | vyos-build-a03ba5a8a61d2d68b0827ba98fa15863a4e1a5f9.tar.gz vyos-build-a03ba5a8a61d2d68b0827ba98fa15863a4e1a5f9.zip | |
Merge pull request #1152 from c-po/kernel-serial-activation
flavor: T8375: add flavor.json during build into resulting image
| -rw-r--r-- | data/architectures/amd64.toml | 4 | ||||
| -rw-r--r-- | data/architectures/arm64.toml | 5 | ||||
| -rwxr-xr-x | scripts/image-build/build-vyos-image | 12 |
3 files changed, 17 insertions, 4 deletions
diff --git a/data/architectures/amd64.toml b/data/architectures/amd64.toml index 784d77ad..4a864d7c 100644 --- a/data/architectures/amd64.toml +++ b/data/architectures/amd64.toml @@ -12,4 +12,6 @@ packages = [ "amd64-microcode" ] -serial_interface = "ttyS0,115200"
\ No newline at end of file +console_type = "ttyS" +console_num = "0" +console_speed = "115200" diff --git a/data/architectures/arm64.toml b/data/architectures/arm64.toml index 6837232f..452e3e1e 100644 --- a/data/architectures/arm64.toml +++ b/data/architectures/arm64.toml @@ -5,4 +5,7 @@ packages = [ ] bootloaders = "grub-efi" squashfs_compression_type = "xz -b 256k -always-use-fragments -no-recovery" -serial_interface = "ttyAMA0,115200" + +console_type = "ttyAMA" +console_num = "0" +console_speed = "115200" diff --git a/scripts/image-build/build-vyos-image b/scripts/image-build/build-vyos-image index a311c2d8..ee7905b4 100755 --- a/scripts/image-build/build-vyos-image +++ b/scripts/image-build/build-vyos-image @@ -439,6 +439,12 @@ def build(): build_config['version'] = version + flavor_data = { + 'console_type': build_config["console_type"], + 'console_num': build_config["console_num"], + 'console_speed': build_config["console_speed"] + } + version_data = { 'version': version, 'flavor': build_config["build_flavor"], @@ -479,6 +485,8 @@ DOCUMENTATION_URL="{build_config['documentation_url']}" os.makedirs(vyos_data_dir, exist_ok=True) with open(os.path.join(vyos_data_dir, 'version.json'), 'w') as f: json.dump(version_data, f) + with open(os.path.join(vyos_data_dir, 'flavor.json'), 'w') as f: + json.dump(flavor_data, f) with open(os.path.join(binary_includes_dir, 'version.json'), 'w') as f: json.dump(version_data, f) @@ -631,8 +639,8 @@ DOCUMENTATION_URL="{build_config['documentation_url']}" --archive-areas "{{debian_archive_areas}}" \ --backports true \ --binary-image iso-hybrid \ - --bootappend-live "boot=live components hostname=vyos username=live nopersistence noautologin nonetworking union=overlay console="{{serial_interface}}" console=tty0 net.ifnames=0 biosdevname=0" \ - --bootappend-live-failsafe "live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal console="{{serial_interface}}" console=tty0 net.ifnames=0 biosdevname=0" \ + --bootappend-live "boot=live components hostname=vyos username=live nopersistence noautologin nonetworking union=overlay console="{{console_type}}{{console_num}},{{console_speed}}" console=tty0 net.ifnames=0 biosdevname=0" \ + --bootappend-live-failsafe "live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal console="{{console_type}}{{console_num}},{{console_speed}}" console=tty0 net.ifnames=0 biosdevname=0" \ --bootloaders "{{bootloaders}}" \ --checksums "sha256" \ --chroot-squashfs-compression-type "{{squashfs_compression_type}}" \ |
