File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,6 +125,9 @@ if [ "$install_env" = "onie" ]; then
125125 onie_initrd_tmp=/
126126fi
127127
128+ enable_kdump=" %%ENABLE_KDUMP%%"
129+ KDUMP_PARAM=" crashkernel=256M"
130+
128131# The build system prepares this script by replacing %%DEMO-TYPE%%
129132# with "OS" or "DIAG".
130133demo_type=" %%DEMO_TYPE%%"
@@ -536,7 +539,11 @@ trap_push "rm $grub_cfg || true"
536539[ -r ./platform.conf ] && . ./platform.conf
537540
538541DEFAULT_GRUB_SERIAL_COMMAND=" serial --port=${CONSOLE_PORT} --speed=${CONSOLE_SPEED} --word=8 --parity=no --stop=1"
539- DEFAULT_GRUB_CMDLINE_LINUX=" console=tty0 console=ttyS${CONSOLE_DEV} ,${CONSOLE_SPEED} n8 quiet"
542+ if [ $enable_kdump = " y" ]; then
543+ DEFAULT_GRUB_CMDLINE_LINUX=" console=tty0 console=ttyS${CONSOLE_DEV} ,${CONSOLE_SPEED} n8 ${KDUMP_PARAM} quiet"
544+ else
545+ DEFAULT_GRUB_CMDLINE_LINUX=" console=tty0 console=ttyS${CONSOLE_DEV} ,${CONSOLE_SPEED} n8 quiet"
546+ fi
540547GRUB_SERIAL_COMMAND=${GRUB_SERIAL_COMMAND:- " $DEFAULT_GRUB_SERIAL_COMMAND " }
541548GRUB_CMDLINE_LINUX=${GRUB_CMDLINE_LINUX:- " $DEFAULT_GRUB_CMDLINE_LINUX " }
542549export GRUB_SERIAL_COMMAND
Original file line number Diff line number Diff line change @@ -89,10 +89,8 @@ output_raw_image=$(cat onie-image.conf | grep OUTPUT_RAW_IMAGE | cut -f2 -d"=")
8989output_raw_image=$( eval echo $output_raw_image )
9090
9191# Tailor the demo installer for OS mode or DIAG mode
92- if [ $sonic_kdump_enable = " y" ]; then
93- sed -i " s/[^M] quiet/ crashkernel=256M quiet/" $tmp_installdir /install.sh
94- fi
95- sed -i -e " s/%%DEMO_TYPE%%/$demo_type /g" \
92+ sed -i -e " s/%%ENABLE_KDUMP%%/$sonic_kdump_enable /g" \
93+ -e " s/%%DEMO_TYPE%%/$demo_type /g" \
9694 -e " s/%%IMAGE_VERSION%%/$image_version /g" \
9795 -e " s/%%ONIE_IMAGE_PART_SIZE%%/$onie_image_part_size /" \
9896 -e " s/%%EXTRA_CMDLINE_LINUX%%/$EXTRA_CMDLINE_LINUX /" \
You can’t perform that action at this time.
0 commit comments