summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/initrdscripts
AgeCommit message (Collapse)AuthorFilesLines
2020-09-01mmc-init: Run fsck.ext4 on the rwfs deviceAdriana Kobylak1-1/+4
It's a good practice to run fsck before mounting a device. Call fsck.ext4 -p on the read-write device, this option attempts to fix any error that can be fixed safely without user intervention. No need to check for the return code, if it fails then the mount command will likely fail. It also takes no time to run: mount read-only -> fsck read-write -> mount read-write: [ 4.174115] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: (null) rwfs: clean, 11/917504 files, 81919/1835008 blocks [ 4.185143] EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null) (From meta-phosphor rev: c3d695892ef990f70cb851b5613dee68068471b3) Change-Id: I946791233a06da0c8ee16585d92f64039a845879 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
2020-09-01phosphor-mmc-init: Add fsck.ext4Adriana Kobylak1-0/+1
Add fsck.ext4 to the eMMC initramfs to be able to manually correct ext4 errors, fsck.ext4 already exists in user space. Tested: Verified it was added to the initramfs: / # which fsck.ext4 /sbin/fsck.ext4 / # fsck.ext4 /dev/mmcblk0p2 e2fsck 1.45.6 (20-Mar-2020) boot-a: clean, 12/8192 files, 12464/65536 blocks (From meta-phosphor rev: d6b1a2682168006ad8445b300b2cca1edc6fcbfc) Change-Id: If5931bea4da7485109aff64cba5d37722abd3dc9 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
2020-08-21mmc-init.sh: Wait for mmc deviceAdriana Kobylak1-2/+14
The initramfs was accessing the mmc device before it was probed in some cases, leading to this error message: [ 4.412464] mmcblk0rpmb: mmc0:0001 R1J56L partition 3 128 KiB, chardev (248:0) tail: can't open '/dev/mmcblk0': No such file or directory tail: no files [ 5.471158] mmcblk0: p1 p2 p3 p4 p5 p6 p7 Implement a wait loop of up to 5s to wait for the device, similar to what the kernel would do with rootwait. Tested: Verified the error is not longer seen. Printing the count value as debug, it took one sleep iteration to appear: [ 4.396492] mmcblk0boot1: mmc0:0001 R1J56L partition 2 16.0 MiB 0 [ 4.403500] mmcblk0rpmb: mmc0:0001 R1J56L partition 3 128 KiB, chardev (248:0) [ 4.416176] mmcblk0: p1 p2 p3 p4 p5 p6 p7 1 [ 6.159693] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: (null) (From meta-phosphor rev: b7dccc1c380431f4cc96e0228fb9975d33df1f88) Change-Id: I625a879882311285dbdeaa2ea271c379366f4b9b Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
2020-07-15obmc-init.sh: Use u-boot env instead of password for emergency consoleAdriana Kobylak1-7/+19
The password prompt doesn't work anymore. Since it relied on the default password, remove the password prompt and just drop into a shell if a new enable-initrd-debug-sh u-boot environment value is set. The security implications are the same since the default password is public and there is a need to have access to u-boot to set the environment value. If the environment value is not set, kernel panic the system. Closes openbmc/openbmc#3649 Tested: Verified kernel panic if environment value was not set, and if it was set the emergency console dropped into a shell and basic linux commands worked: Mounting read-write /dev/mtdblock5 filesystem failed. Please fix and run mount /dev/mtdblock5 run/initramfs/rw -t jffs2 -o rw or perform a factory reset with the clean-rwfs-filesystem option. Try to manually fix. After fixing run exit to continue this script, or reboot -f to retry, or touch /takeover and exit to become PID 1 allowing editing of this script. /bin/sh: can't access tty; job control turned off / # (From meta-phosphor rev: 368550b2d259ac8d08c993b0d695f38aec8992fa) Change-Id: I0431690b3b4facadbe224fc822d6bd06f35b51f5 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
2020-07-15initramfs: Add init script for eMMCAdriana Kobylak2-0/+77
This init script mounts the rootfs based on the root u-boot env variable, mounts the read-write filesystem and sets up the overlay. (From meta-phosphor rev: 86164b2e072cc6cebc9caf1614e2b1fa0e0884a0) Change-Id: If9121048b6223d5391e5f6a8b7d6cd7d22707969 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
2019-09-20meta-phosphor: Remove references to PHOSPHORBASEBrad Bishop1-1/+1
PHOSPHORBASE is only used for pointing at licenses...point at the licenses in oe-core in meta/files/common-licenses instead. to match the defacto convention used in other oe layers like meta-openembedded. (From meta-phosphor rev: a1cee09419cb1467c3d2b7bf996b40089f0d06f4) Change-Id: If136d24638a8022671988cf0a01620e7fffc545f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
2018-09-06meta-phosphor: Move layer content from common/Brad Bishop5-0/+850
Adopt a more conventional directory hierarchy. meta-phosphor is still a _long_ way from suitable for hosting on yoctoproject.org but things like this don't help. (From meta-phosphor rev: 471cfcefa74b8c7ceb704cb670e6d915cf27c63b) Change-Id: I3f106b2f6cdc6cec734be28a6090800546f362eb Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>