diff --git a/build_debian.sh b/build_debian.sh index c3e8e945443c..4274041cffec 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -31,7 +31,7 @@ set -x -e CONFIGURED_ARCH=$([ -f .arch ] && cat .arch || echo amd64) ## docker engine version (with platform) -DOCKER_VERSION=5:18.09.8~3-0~debian-$IMAGE_DISTRO +DOCKER_VERSION=5:20.10.6~3-0~debian-$IMAGE_DISTRO LINUX_KERNEL_VERSION=4.19.0-12-2 ## Working directory to prepare the file system diff --git a/files/Aboot/boot0.j2 b/files/Aboot/boot0.j2 index 001db2051b06..fd2ac07a2e55 100644 --- a/files/Aboot/boot0.j2 +++ b/files/Aboot/boot0.j2 @@ -615,8 +615,8 @@ write_image_specific_cmdline() { # disable deterministic interface naming cmdline_add net.ifnames=0 - # disable unified cgroup hierarchy to workaround dockerd limitation - cmdline_add systemd.unified_cgroup_hierarchy=0 + # enable cgroup swap limit capabilities for cgroupv2 + cmdline_add cgroup_enable=memory swapaccount=1 # verbosity cmdline_add quiet diff --git a/installer/x86_64/install.sh b/installer/x86_64/install.sh index d40dedc9a160..9724346cb6ef 100755 --- a/installer/x86_64/install.sh +++ b/installer/x86_64/install.sh @@ -654,7 +654,7 @@ menuentry '$demo_grub_entry' { linux /$image_dir/boot/vmlinuz-4.19.0-12-2-amd64 root=$grub_cfg_root rw $GRUB_CMDLINE_LINUX \ net.ifnames=0 biosdevname=0 \ loop=$image_dir/$FILESYSTEM_SQUASHFS loopfstype=squashfs \ - systemd.unified_cgroup_hierarchy=0 \ + cgroup_enable=memory swapaccount=1 \ apparmor=1 security=apparmor varlog_size=$VAR_LOG_SIZE usbcore.autosuspend=-1 $ONIE_PLATFORM_EXTRA_CMDLINE_LINUX echo 'Loading $demo_volume_label $demo_type initial ramdisk ...' initrd /$image_dir/boot/initrd.img-4.19.0-12-2-amd64 diff --git a/platform/centec-arm64/platform.conf b/platform/centec-arm64/platform.conf index 39dc4b70239a..fbf255346307 100755 --- a/platform/centec-arm64/platform.conf +++ b/platform/centec-arm64/platform.conf @@ -18,7 +18,7 @@ bootloader_menu_config() { if [ "$install_env" = "onie" ]; then fw_setenv -f nos_bootcmd "test -n \$boot_once && setenv do_boot_once \$boot_once && setenv boot_once && saveenv && run do_boot_once; run boot_next" - fw_setenv -f sonic_image_1 "ext4load mmc 0:1 \$loadaddr \$sonic_dir_1/boot/sonic_arm64.fit && setenv bootargs quiet console=\$consoledev,\$baudrate root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 loopfstype=squashfs loop=\$sonic_dir_1/fs.squashfs systemd.unified_cgroup_hierarchy=0 && bootm \$loadaddr" + fw_setenv -f sonic_image_1 "ext4load mmc 0:1 \$loadaddr \$sonic_dir_1/boot/sonic_arm64.fit && setenv bootargs quiet console=\$consoledev,\$baudrate root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 loopfstype=squashfs loop=\$sonic_dir_1/fs.squashfs cgroup_enable=memory swapaccount=1 && bootm \$loadaddr" fw_setenv -f sonic_image_2 "NONE" fw_setenv -f sonic_dir_1 $image_dir fw_setenv -f sonic_dir_2 "NONE" @@ -39,7 +39,7 @@ bootloader_menu_config() { fw_setenv nos_bootcmd "test -n \$boot_once && setenv do_boot_once \$boot_once && setenv boot_once && saveenv && run do_boot_once; run boot_next" - fw_setenv sonic_image_$idx "ext4load mmc 0:1 \$loadaddr \$sonic_dir_$idx/boot/sonic_arm64.fit && setenv bootargs quiet console=\$consoledev,\$baudrate root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 loopfstype=squashfs loop=\$sonic_dir_$idx/fs.squashfs systemd.unified_cgroup_hierarchy=0 && bootm \$loadaddr" + fw_setenv sonic_image_$idx "ext4load mmc 0:1 \$loadaddr \$sonic_dir_$idx/boot/sonic_arm64.fit && setenv bootargs quiet console=\$consoledev,\$baudrate root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 loopfstype=squashfs loop=\$sonic_dir_$idx/fs.squashfs cgroup_enable=memory swapaccount=1 && bootm \$loadaddr" fw_setenv sonic_dir_$idx $image_dir fw_setenv sonic_version_$idx `echo $image_dir | sed "s/^image-/SONiC-OS-/g"` diff --git a/platform/marvell-arm64/platform.conf b/platform/marvell-arm64/platform.conf index 8ecdfa317425..2129b61529de 100644 --- a/platform/marvell-arm64/platform.conf +++ b/platform/marvell-arm64/platform.conf @@ -42,7 +42,7 @@ prepare_boot_menu() { UBOOT_ENV_ERASE_SIZ="0x$(grep uboot-env /proc/mtd | awk '{print $3}')" if [[ -n "$UBOOT_ENV_SIZ" && -n "$UBOOT_ENV_ERASE_SIZ" ]] then - # Env info from DTB + # Env info from DTB FW_ENV_DTB="/dev/$DTB_HAS_ENV_BLK 0x00000000 $UBOOT_ENV_SIZ $UBOOT_ENV_ERASE_SIZ" fi fi @@ -72,8 +72,8 @@ prepare_boot_menu() { fdt_name_old=$(fw_printenv -n fdt_name || true) fit_name_old=$(fw_printenv -n fit_name || true) sonic_version_2=$(fw_printenv -n sonic_version_1 || true) - if [ -z "$demo_dev" ] - then + if [ -z "$demo_dev" ] + then get_install_device if [ $? -ne 0 ]; then echo "Error: Unable to detect $blk_dev $demo_dev" @@ -108,8 +108,8 @@ prepare_boot_menu() { BORDER='echo "---------------------------------------------------";echo;' fw_setenv ${FW_ARG} print_menu $BORDER $BOOT1 $BOOT2 $BOOT3 $BORDER > /dev/null - fw_setenv ${FW_ARG} linuxargs "net.ifnames=0 loopfstype=squashfs loop=$image_dir/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG" > /dev/null - fw_setenv ${FW_ARG} linuxargs_old "net.ifnames=0 loopfstype=squashfs loop=$image_dir_old/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG" > /dev/null + fw_setenv ${FW_ARG} linuxargs "net.ifnames=0 loopfstype=squashfs loop=$image_dir/$FILESYSTEM_SQUASHFS cgroup_enable=memory swapaccount=1 varlog_size=$VAR_LOG" > /dev/null + fw_setenv ${FW_ARG} linuxargs_old "net.ifnames=0 loopfstype=squashfs loop=$image_dir_old/$FILESYSTEM_SQUASHFS cgroup_enable=memory swapaccount=1 varlog_size=$VAR_LOG" > /dev/null sonic_bootargs_old='setenv bootargs root='$demo_dev' rw rootwait rootfstype=ext4 panic=1 console=ttyS0,115200 ${othbootargs} ${mtdparts} ${linuxargs_old}' fw_setenv ${FW_ARG} sonic_bootargs_old $sonic_bootargs_old > /dev/null || true sonic_boot_load_old=$(fw_printenv -n sonic_boot_load || true) @@ -196,7 +196,7 @@ create_partition() { echo "Error: Unable to detect $blk_dev $demo_dev" exit 1 fi - # Platform specific partition + # Platform specific partition create_demo_partition } diff --git a/platform/marvell-armhf/platform.conf b/platform/marvell-armhf/platform.conf index 651b01bea18d..db8c64818f2e 100644 --- a/platform/marvell-armhf/platform.conf +++ b/platform/marvell-armhf/platform.conf @@ -75,7 +75,7 @@ prepare_boot_menu() { UBOOT_ENV_ERASE_SIZ="0x$(grep uboot-env /proc/mtd | awk '{print $3}')" if [[ -n "$UBOOT_ENV_SIZ" && -n "$UBOOT_ENV_ERASE_SIZ" ]] then - # Env info from DTB + # Env info from DTB FW_ENV_DTB="/dev/$DTB_HAS_ENV_BLK 0x00000000 $UBOOT_ENV_SIZ $UBOOT_ENV_ERASE_SIZ" fi fi @@ -146,8 +146,8 @@ prepare_boot_menu() { BORDER='echo "---------------------------------------------------";echo;' fw_setenv ${FW_ARG} print_menu $BORDER $BOOT1 $BOOT2 $BOOT3 $BORDER > /dev/null - fw_setenv ${FW_ARG} linuxargs "net.ifnames=0 loopfstype=squashfs loop=$image_dir/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG loglevel=4" > /dev/null - fw_setenv ${FW_ARG} linuxargs_old "net.ifnames=0 loopfstype=squashfs loop=$image_dir_old/$FILESYSTEM_SQUASHFS systemd.unified_cgroup_hierarchy=0 varlog_size=$VAR_LOG loglevel=4" > /dev/null + fw_setenv ${FW_ARG} linuxargs "net.ifnames=0 loopfstype=squashfs loop=$image_dir/$FILESYSTEM_SQUASHFS cgroup_enable=memory swapaccount=1 varlog_size=$VAR_LOG loglevel=4" > /dev/null + fw_setenv ${FW_ARG} linuxargs_old "net.ifnames=0 loopfstype=squashfs loop=$image_dir_old/$FILESYSTEM_SQUASHFS cgroup_enable=memory swapaccount=1 varlog_size=$VAR_LOG loglevel=4" > /dev/null # Set boot configs fw_setenv ${FW_ARG} kernel_addr $kernel_addr > /dev/null @@ -176,7 +176,7 @@ prepare_boot_menu() { } create_ubi_partition() { - ubidetach /dev/ubi_ctrl -d 0 2>/dev/null || true + ubidetach /dev/ubi_ctrl -d 0 2>/dev/null || true trap_push "${onie_bin} ubidetach -d 0 /dev/ubi_ctrl || true" echo -en "Format mtd partition '$mtd_dev' " @@ -232,7 +232,7 @@ create_gpt_partition() { } create_partition() { - # Platform speicific partition + # Platform speicific partition if [ "$PLATFORM" = "armhf-marvell_et6448m_52x-r0" ]; then echo "Doing UBI partition" create_ubi_partition