Commit Graph

17 Commits

Author SHA1 Message Date
Sabareesh-Kumar-Anandan
fe524c37e7
[platform][marvell] Arm 32-bit Arch support changes (#5749)
- Added Arm 32-bit arch build fixes
- Added marvell armhf platform specific changes

Signed-off-by: Sabareesh Kumar Anandan <sanandan@marvell.com>
2020-12-03 12:38:50 -08:00
Samuel Angebault
f7d43173a2 [secureboot] only remove exec bit in secureboot
Address issue #4832
2020-06-23 11:34:07 -07:00
Samuel Angebault
67987e9c0e
[secureboot] Add secureboot support for Arista devices (#4741)
* Add secureboot support in boot0
* Initramfs changes for secureboot on Aboot devices
* Do not compress squashfs and gz in fs.zip
It doesn't make much sense to do so since these files are already
compressed.
Also not compressing the squashfs has the advantage of making it
mountable via a loop device.
* Add loopoffset parameter to initramfs-tools
2020-06-22 09:30:31 -07:00
padmanarayana
95e3cda5da
[DELL]: FTOS to SONiC fast conversion fixes (#4807)
While migrating to SONiC 20181130, identified a couple of issues:
1. union-mount needs /host/machine.conf parameters for vendor specific checks : however, in case of migration, the /host/machine.conf is extracted from ONIE only in https://github.com/Azure/sonic-buildimage/blob/master/files/image_config/platform/rc.local#L127. 
2. Since grub.cfg is updated to have net.ifnames=0 biosdevname=0, 70-persistent-net.rules changes are no longer required.
2020-06-19 11:02:08 -07:00
xumia
76a395cdbf
[secure boot] Support rw files allowlist (#4585)
* Support rw files allowlist for Sonic Secure Boot
* Improve the performance
* fix bug
* Move the config description into a md file
* Change to use a simple way to remove the blank line
* Support chmod a-x in rw folder
* Change function name
* Change some unnecessary words
2020-06-13 00:10:13 -07:00
Olivier Singla
799f22d4c7
[baseimage]: Run fsck filesystem check support prior mounting filesystem (#4431)
* Run fsck filesystem check support prior mounting filesystem

If the filesystem become non clean ("dirty"), SONiC does not run fsck to
repair and mark it as clean again.

This patch adds the functionality to run fsck on each boot, prior to the
filesystem being mounted. This allows the filesystem to be repaired if
needed.

Note that if the filesystem is maked as clean, fsck does nothing and simply
return so this is perfectly fine to call fsck every time prior to mount the
filesystem.

How to verify this patch (using bash):

Using an image without this patch:

Make the filesystem "dirty" (not clean)
[we are making the assumption that filesystem is stored in /dev/sda3 - Please adjust depending of the platform]
[do this only on a test platform!]

dd if=/dev/sda3 of=superblock bs=1 count=2048
printf "$(printf '\\x%02X' 2)" | dd of="superblock" bs=1 seek=1082 count=1 conv=notrunc &> /dev/null
dd of=/dev/sda3 if=superblock bs=1 count=2048

Verify that filesystem is not clean
tune2fs -l /dev/sda3 | grep "Filesystem state:"

reboot and verify that the filesystem is still not clean
Redo the same test with an image with this patch, and verify that at next reboot the filesystem is repaired and becomes clean.

fsck log is stored on syslog, using the string FSCK as markup.
2020-04-30 00:33:20 -07:00
Samuel Angebault
5b0ec7afe6
[Arista] Update drivers submodules (#4317)
* Update arista drivers submodules

* Add device configs for 7060CX2-32S

* Update boot0 and union-mount for 7060CX2-32S

* Add 7170-32C and 7170-32CD support in boot0

* Sync after writting boot configs

* Add 7170-32C and 7170-32CD device configurations

Co-authored-by: Boyang Yu <byu@arista.com>
2020-03-27 17:28:27 -07:00
arheneus@marvell.com
6bd17d4780 [initramfs] Updated required tools for initramfs (#3734)
* [initramfs] Updated reuired tools for initramfs

Signed-off-by: Antony Rheneus <arheneus@marvell.com>

* [initramfs] Updated required tools for initramfs

Signed-off-by: Antony Rheneus <arheneus@marvell.com>

* [Platform] [Marvell] Platform specific debian package for et6448m device

Signed-off-by: Antony Rheneus <arheneus@marvell.com>

* Removed auto-generated files

Signed-off-by: Antony Rheneus <arheneus@marvell.com>

* [initramfs] Added mtd and uboot firmware tools package required for arm arch
Its been enabled to all arch including amd64

Signed-off-by: Antony Rheneus <arheneus@marvell.com>

* [initramfs] Added mtd and uboot firmware tools package required for arm arch
Its been enabled to all arch including amd64

Signed-off-by: Antony Rheneus <arheneus@marvell.com>

* [initramfs] Marvell arm modules update and platform config update

Signed-off-by: Antony Rheneus <arheneus@marvell.com>

* [iniramfs] add initramfs uboot-utils hook script only for ARM

Signed-off-by: Antony Rheneus <arheneus@marvell.com>
2020-01-15 08:25:01 -08:00
lguohan
2b28d55853
[build]: enable docker in ram option for small disk device (#3279)
when device disk is small, do not unzip dockerfs.tar.gz on disk.
keep the tar file on the disk, unzip to tmpfs in the initrd phase.

enabled this for 7050-qx32

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-08-06 23:04:00 -07:00
Michel Moriniaux
dc747247d1 [ARISTA] adding 7060_cs32s to eMMC exclusions (#2982)
* [ARISTA] adding 7060_cs32s to eMMC exclusions

Following PR 2774 we added the 7060-cx32s according to the guidelines of
PR 2780

This adds the 7060-cx32s to the list f devices that mount /var/log as a
tmpfs to mitigate eMMC wearout

Signed-off-by: Michel Moriniaux <m.moriniaux@criteo.com>

* [ARISTA] adding 7060_cs32s to eMMC exclusions

Following PR 2774 we added the 7060-cx32s according to the guidelines of
PR 2780

This adds the 7060-cx32s to the list f devices that mount /var/log as a
tmpfs to mitigate eMMC wearout

Signed-off-by: Michel Moriniaux <m.moriniaux@criteo.com>
2019-07-02 11:52:43 -07:00
Ying Xie
8bf9247c5e
[tmpfs var/log] mount /var/log as tmpfs for some platforms (#2780)
SONiC is a heavy writer to /var/log partition, we noticed that this
behavior causes certain flash drive to become read-only over time.
To avoid this issue, we mount /var/log parition on these devices as
tmpfs.

- Mount /var/log as tmpfs
- /var/log default size is 128M
- Adjust size according to existing var-log.ext4 file size.
- Adjust size to between 5% to 10% of total memory size.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2019-04-14 22:46:26 -07:00
Guohan Lu
f64ffe8571 [baseimage]: build root filesystem via overlay fs instead of aufs 2018-08-11 09:07:59 +00:00
lguohan
116ba4b180 [baseimage]: allocate varlog disk in the initramfs stage (#936)
moving to initramfs unifies disk allocate on different platforms.
use fallocate instead of dd to speed up the disk allocation.

By default, mkfs.ext4 has -E discard option which discards the blocks
at the mkfs time, also speed up the initialization time.
2017-09-06 20:07:32 -07:00
Andriy Moroz
b549adc36c [image]: SONiC-to-SONiC update (#464) 2017-04-21 17:23:36 -07:00
Marian Pritsak
f9f31ed296 [installer]: limit size of /var/log (#284)
Create loop device during installation of
size soecified in config file for machine

Signed-off-by: marian-pritsak <marianp@mellanox.com>
2017-02-16 23:28:09 -08:00
Samuel Angebault
89a695a5e7 [union-mount] Rescan dev if root partition disapear (#298)
On some platforms after the initramfs init scripts have mounted the root device its
block device disapear from /dev. The union-mount script therefore can't mount the
root device over the aufs. If this case happen, issue a rescan of the devices to
repopulate the /dev filesystem.
2017-02-15 23:18:02 -08:00
lguohan
8826beb597 [docker]: change hardcoded value to DOCKERFS_DIR for docker directory on the disk (#269) 2017-02-06 08:17:16 -08:00