Change factory install shims from framebuffer to frecon |
|||||||||||
Issue descriptionCurrently all factory install shims use framebuffer, due to various limitations in initramfs (size, lack of userland and services). As the recovery (also using initramfs) is going to be changed to frecon-based, factory install shim should set that as a long term goal. Recovery initramfs changes: https://chromium-review.googlesource.com/#/c/366034 Quoting my discussion with Dominik: - should we do --enable-vt1 or --enable-vts or both just like recovery shim? - it possible we'd like to have VT1, VT2, and VT3 with the ability to write message into them. Can that be done and how? - during the execution we have to invoke switch_root. Will that be a problem to running frecon_lite daemon? vt1 by default does not have getty, --enable-vt1 enables login on vt1, so i do not think you need it. you do need --enable-vts which enables more than one virtual terminal (VT). you will probably want --pre-create-vts from this change https://chromium-review.googlesource.com/#/c/365563/ so you can log to VT2 and VT3 from the very beginning I suspect you will need 3 terms like recovery with little different options, so probably you will want: frecon --enable-vts --no-login --max-vts=3 --pre-create-vts --daemon which will start frecon with 3 VTs, available from the start, with login disabled (you can still output to /dev/pts) if you want to be able to display png images via escape codes like recovery you will need --enable-gfx
,
Aug 11 2016
Assign to chuntsen. chuntsen, this is a more tricky issue that you may need some debug effort. In short, you have to apply the udev changes from CL 366034 to factory_shim, merge frecon changes from the issue http://crosbug.com/p/55250 to build the image without framebuffer (find the build scripts in src/scripts and remove the fbconsole and vtconsole flags in build_image for target-os-factory-shim), invoke frecon-lite as what Dominik recommends, and see if you can get factory install shim to output text UI correctly. Note: you can use any recent Chromebooks to work on this. Feel free to ask questions here if you see problems.
,
Aug 11 2016
hungte, please use this CL and then you can just open symlinks in /var/run/frecon for instance first vt is going to be /var/run/frecon/vt0
,
Aug 11 2016
,
Aug 12 2016
re#3: thanks so much for the CL. However I do have a question: which VT is mapped to 0? The one for Chrome? So text terminals are starting as VT1, VT2, ... maps to 1, 2... ?
,
Sep 2 2016
vt0 is the splash screen. the first usable vt that you switch from chrome using ctrl-alt-f2 is going to be /var/run/frecon/vt1
,
Sep 2 2016
hmm, but we used to call ctrl-alt-f2 as "VT2". This may be confusing in future. Anyway I'm ok with that.
,
Oct 11 2016
The migration of recovery shim seems incomplete - there are still bugs. See https://code.google.com/p/chrome-os-partner/issues/detail?id=57809 and issue 646039
,
Oct 13 2016
,
Oct 13 2016
Because it will move /dev to /newroot/dev, I can't use /var/run/frecon/vt0. Maybe I have to use /dev/pts/0, or I can use other way?
,
Oct 13 2016
Re#10 Can we also bind + move /var/run (or /var/run/frecon) ? Meanwhile, I think there're some ongoing discussion about what/how tty should be used - see https://chromium-review.googlesource.com/#/c/392789/ .
,
Oct 13 2016
We have to also change the links in /var/run/frecon if we move /var/run. And change it back after boot. I think we can use /dev/pts/0 directly as they do.
,
Oct 19 2016
I can't move "/run" or "/run/frecon". I tried to cp/mount "/run/frecon" to "/newroot/run/frecon", but /run will be overwrite after switch_root. I fount that switch_root has different version, and I think it can't move "/run" to "/newroot/run". Can we mount "/run/frecon" on "/newroot/frecon" or somewhere? Or just pass arguments?
,
Oct 19 2016
marcheu/dbehr, can you look at comment #13? Seems like frecon has some problem when we want to do switch_root that /run/frecon would have problem after switch_root in initramfs stage.
,
Oct 19 2016
do we have to start frecon before pivoting root?
,
Oct 19 2016
Re#15 yes, if possible. It's really hard to debug in initramfs world, so we want to get messages as early as possible.
,
Oct 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/initramfs/+/631f9b50901138e7524cba508cf5728ad1f5ff31 commit 631f9b50901138e7524cba508cf5728ad1f5ff31 Author: chuntsen <chuntsen@google.com> Date: Fri Oct 14 08:54:37 2016 factory_shim: Change factory install shims from framebuffer to frecon Currently all factory install shims use framebuffer, due to various limitations in initramfs. Change factory install shim and factory netboot to frecon. BUG= chromium:636671 TEST=none Change-Id: I74d7eb3b084d1e77080f917b2f19cd9733e34a5c Reviewed-on: https://chromium-review.googlesource.com/401061 Commit-Ready: Chun-Tsen Kuo <chuntsen@chromium.org> Tested-by: Chun-Tsen Kuo <chuntsen@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/631f9b50901138e7524cba508cf5728ad1f5ff31/factory_netboot/Makefile [modify] https://crrev.com/631f9b50901138e7524cba508cf5728ad1f5ff31/factory_shim/init [modify] https://crrev.com/631f9b50901138e7524cba508cf5728ad1f5ff31/factory_shim/Makefile [modify] https://crrev.com/631f9b50901138e7524cba508cf5728ad1f5ff31/factory_shim/bootstrap.sh [modify] https://crrev.com/631f9b50901138e7524cba508cf5728ad1f5ff31/factory_netboot/init
,
Oct 20 2016
,
Oct 20 2016
Oh, I didn't get email notice since I'm not in cc list. We try to move /run/frecon/vt# to /dev/tty(#+1), and the problem solved.
,
Oct 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/ff16f290848ebf387fded4fc0954fdfe7ca47058 commit ff16f290848ebf387fded4fc0954fdfe7ca47058 Author: chuntsen <chuntsen@google.com> Date: Fri Oct 21 02:51:21 2016 chromeos-initramfs: Change lvm2 from RECOVER_DEPENDS to DEPEND lvm2 is required by frecon-lite, which will be enabled on all types of initramfs so we should move it from recovery kernel dependency (RECOVER_DEPENDS) to all targets (DEPEND). BUG= chromium:636671 TEST=emerge-${BOARD} chromeos-initramfs build_packages; build_image factory_install Change-Id: I2baccd6accfa27f8dc040de865e1b6e8ee97bf84 Reviewed-on: https://chromium-review.googlesource.com/401264 Commit-Ready: Chun-Tsen Kuo <chuntsen@chromium.org> Tested-by: Chun-Tsen Kuo <chuntsen@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/ff16f290848ebf387fded4fc0954fdfe7ca47058/chromeos-base/chromeos-initramfs/chromeos-initramfs-9999.ebuild
,
Nov 1 2016
ToT has deprecated FB_DEV ( issue 655820 ) and now all shims are broken. I think we have to reopen this and see what needs to be fixed.
,
Nov 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/1b0f0e9c0ca31ae08b0a4c2c6651d89c16251828 commit 1b0f0e9c0ca31ae08b0a4c2c6651d89c16251828 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Nov 02 09:13:29 2016 Change factory initramfs to use new TTY init module from factory_installer. The factory initramfs modules (factory_shim, factory_netboot) have very similar logic in finding best TTY, and implemented in several places (initramfs and factory_installer). The new factory_tty.sh provides an unified way to detect and setup TTY environment for factory programs so initramfs should use it instead of having its own TTY code. BUG= chromium:636671 TEST=manual: USE=factory_shim_ramfs emerge-link chromeos-initramfs CQ-DEPEND=CL:406747 Change-Id: I2f6d99e491b6b35950b470caefa78d90bd2fb28e Reviewed-on: https://chromium-review.googlesource.com/406847 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Chun-Tsen Kuo <chuntsen@chromium.org> [modify] https://crrev.com/1b0f0e9c0ca31ae08b0a4c2c6651d89c16251828/chromeos-base/chromeos-initramfs/chromeos-initramfs-9999.ebuild [modify] https://crrev.com/1b0f0e9c0ca31ae08b0a4c2c6651d89c16251828/chromeos-base/factory_installer/factory_installer-9999.ebuild
,
Nov 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory_installer/+/eaf463e262e347d4307b4afce9cb76a42736ed7d commit eaf463e262e347d4307b4afce9cb76a42736ed7d Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Nov 01 09:05:44 2016 Add a new factory_tty.sh to unify TTY init code. The factory shim and netboot both need to setup TTY, but the init code lives in several places, including factory_install and initramfs. The new script tries to unify the initialization so we don't need to duplicate the code multiple times. The new TTY init code has merged logic from factory_install_service.sh and initramfs/factory_shim/bootstrap.sh. BUG= chromium:636671 TEST=build_image factory_install; Boots and displays menu on Link. Change-Id: I5a66fd3451ebe7bb083c6397ed0865ed835b89dc Reviewed-on: https://chromium-review.googlesource.com/406747 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Chun-Tsen Kuo <chuntsen@chromium.org> [add] https://crrev.com/eaf463e262e347d4307b4afce9cb76a42736ed7d/factory_tty.sh [modify] https://crrev.com/eaf463e262e347d4307b4afce9cb76a42736ed7d/factory_install_service.sh
,
Nov 4 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/initramfs/+/50e962c29b1a05fff647d86b7cf6b8d95aa7affa commit 50e962c29b1a05fff647d86b7cf6b8d95aa7affa Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Nov 02 07:33:11 2016 factory_{shim,netboot}: Use the new factory_tty.sh for TTY init. The TTY initialization code has been too complicated that we should unify them in a single place, provided by factory_installer package. BUG= chromium:636671 TEST=USE=factory_shim_ramfs emerge-link chromeos-initramfs CQ-DEPEND=CL:406747 Change-Id: I82698922683d1548ad51466fb41cabf643638ce6 Reviewed-on: https://chromium-review.googlesource.com/406768 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Chun-Tsen Kuo <chuntsen@chromium.org> [modify] https://crrev.com/50e962c29b1a05fff647d86b7cf6b8d95aa7affa/factory_netboot/Makefile [modify] https://crrev.com/50e962c29b1a05fff647d86b7cf6b8d95aa7affa/factory_shim/init [modify] https://crrev.com/50e962c29b1a05fff647d86b7cf6b8d95aa7affa/factory_shim/Makefile [modify] https://crrev.com/50e962c29b1a05fff647d86b7cf6b8d95aa7affa/factory_shim/bootstrap.sh [modify] https://crrev.com/50e962c29b1a05fff647d86b7cf6b8d95aa7affa/factory_netboot/init
,
Nov 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory_installer/+/aa15b87da7490749262510c965b3bb9a4da72684 commit aa15b87da7490749262510c965b3bb9a4da72684 Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Nov 01 09:05:44 2016 Add a new factory_tty.sh to unify TTY init code. The factory shim and netboot both need to setup TTY, but the init code lives in several places, including factory_install and initramfs. The new script tries to unify the initialization so we don't need to duplicate the code multiple times. The new TTY init code has merged logic from factory_install_service.sh and initramfs/factory_shim/bootstrap.sh. BUG= chromium:636671 TEST=build_image factory_install; Boots and displays menu on Link. Reviewed-on: https://chromium-review.googlesource.com/406747 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Chun-Tsen Kuo <chuntsen@chromium.org> (cherry picked from commit eaf463e262e347d4307b4afce9cb76a42736ed7d) Change-Id: I3e91add88cc620ff900fd9d732ed4540c05676b5 Reviewed-on: https://chromium-review.googlesource.com/407751 Reviewed-by: Chun-Tsen Kuo <chuntsen@chromium.org> Commit-Queue: Chun-Tsen Kuo <chuntsen@chromium.org> Tested-by: Chun-Tsen Kuo <chuntsen@chromium.org> [add] https://crrev.com/aa15b87da7490749262510c965b3bb9a4da72684/factory_tty.sh [modify] https://crrev.com/aa15b87da7490749262510c965b3bb9a4da72684/factory_install_service.sh
,
Nov 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/factory_installer/+/aa15b87da7490749262510c965b3bb9a4da72684 commit aa15b87da7490749262510c965b3bb9a4da72684 Author: Hung-Te Lin <hungte@chromium.org> Date: Tue Nov 01 09:05:44 2016 Add a new factory_tty.sh to unify TTY init code. The factory shim and netboot both need to setup TTY, but the init code lives in several places, including factory_install and initramfs. The new script tries to unify the initialization so we don't need to duplicate the code multiple times. The new TTY init code has merged logic from factory_install_service.sh and initramfs/factory_shim/bootstrap.sh. BUG= chromium:636671 TEST=build_image factory_install; Boots and displays menu on Link. Reviewed-on: https://chromium-review.googlesource.com/406747 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Chun-Tsen Kuo <chuntsen@chromium.org> (cherry picked from commit eaf463e262e347d4307b4afce9cb76a42736ed7d) Change-Id: I3e91add88cc620ff900fd9d732ed4540c05676b5 Reviewed-on: https://chromium-review.googlesource.com/407751 Reviewed-by: Chun-Tsen Kuo <chuntsen@chromium.org> Commit-Queue: Chun-Tsen Kuo <chuntsen@chromium.org> Tested-by: Chun-Tsen Kuo <chuntsen@chromium.org> [add] https://crrev.com/aa15b87da7490749262510c965b3bb9a4da72684/factory_tty.sh [modify] https://crrev.com/aa15b87da7490749262510c965b3bb9a4da72684/factory_install_service.sh
,
Nov 8 2016
Factory install shim looked fine on Gru, Elm and Reef with official build 8968.0.0.
,
Nov 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/initramfs/+/5236fc8d41498bb9702864b8be5f0705b4858b6b commit 5236fc8d41498bb9702864b8be5f0705b4858b6b Author: chuntsen <chuntsen@google.com> Date: Fri Oct 14 08:54:37 2016 factory_shim: Change factory install shims from framebuffer to frecon Currently all factory install shims use framebuffer, due to various limitations in initramfs. Change factory install shim and factory netboot to frecon. BUG= chromium:636671 TEST=none Reviewed-on: https://chromium-review.googlesource.com/401061 Commit-Ready: Chun-Tsen Kuo <chuntsen@chromium.org> Tested-by: Chun-Tsen Kuo <chuntsen@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit 631f9b50901138e7524cba508cf5728ad1f5ff31) Change-Id: I1365e43aa222dc4754b5274b974e5df8ee5096b5 Reviewed-on: https://chromium-review.googlesource.com/413366 Reviewed-by: Chun-Tsen Kuo <chuntsen@chromium.org> Commit-Queue: Chun-Tsen Kuo <chuntsen@chromium.org> Tested-by: Chun-Tsen Kuo <chuntsen@chromium.org> [modify] https://crrev.com/5236fc8d41498bb9702864b8be5f0705b4858b6b/factory_netboot/Makefile [modify] https://crrev.com/5236fc8d41498bb9702864b8be5f0705b4858b6b/factory_shim/init [modify] https://crrev.com/5236fc8d41498bb9702864b8be5f0705b4858b6b/factory_shim/Makefile [modify] https://crrev.com/5236fc8d41498bb9702864b8be5f0705b4858b6b/factory_shim/bootstrap.sh [modify] https://crrev.com/5236fc8d41498bb9702864b8be5f0705b4858b6b/factory_netboot/init
,
Nov 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/initramfs/+/654019b03bcf5530802031214ff6f765394e6833 commit 654019b03bcf5530802031214ff6f765394e6833 Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Nov 02 07:33:11 2016 factory_{shim,netboot}: Use the new factory_tty.sh for TTY init. The TTY initialization code has been too complicated that we should unify them in a single place, provided by factory_installer package. BUG= chromium:636671 TEST=USE=factory_shim_ramfs emerge-link chromeos-initramfs CQ-DEPEND=CL:406747 Reviewed-on: https://chromium-review.googlesource.com/406768 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Chun-Tsen Kuo <chuntsen@chromium.org> (cherry picked from commit 50e962c29b1a05fff647d86b7cf6b8d95aa7affa) Change-Id: I242a751cb3a59ab9863094c54d4a471438c1d20e Reviewed-on: https://chromium-review.googlesource.com/413367 Reviewed-by: Chun-Tsen Kuo <chuntsen@chromium.org> Commit-Queue: Chun-Tsen Kuo <chuntsen@chromium.org> Tested-by: Chun-Tsen Kuo <chuntsen@chromium.org> [modify] https://crrev.com/654019b03bcf5530802031214ff6f765394e6833/factory_netboot/Makefile [modify] https://crrev.com/654019b03bcf5530802031214ff6f765394e6833/factory_shim/init [modify] https://crrev.com/654019b03bcf5530802031214ff6f765394e6833/factory_shim/Makefile [modify] https://crrev.com/654019b03bcf5530802031214ff6f765394e6833/factory_shim/bootstrap.sh [modify] https://crrev.com/654019b03bcf5530802031214ff6f765394e6833/factory_netboot/init
,
Nov 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/initramfs/+/f97cc5973c80721dcfa2091c185b687f933eb9dd commit f97cc5973c80721dcfa2091c185b687f933eb9dd Author: chuntsen <chuntsen@google.com> Date: Fri Oct 14 08:54:37 2016 factory_shim: Change factory install shims from framebuffer to frecon Currently all factory install shims use framebuffer, due to various limitations in initramfs. Change factory install shim and factory netboot to frecon. BUG= chromium:636671 TEST=none Change-Id: I74d7eb3b084d1e77080f917b2f19cd9733e34a5c Reviewed-on: https://chromium-review.googlesource.com/401061 Commit-Ready: Chun-Tsen Kuo <chuntsen@chromium.org> Tested-by: Chun-Tsen Kuo <chuntsen@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit 631f9b50901138e7524cba508cf5728ad1f5ff31) Reviewed-on: https://chromium-review.googlesource.com/414662 Commit-Queue: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/f97cc5973c80721dcfa2091c185b687f933eb9dd/factory_netboot/Makefile [modify] https://crrev.com/f97cc5973c80721dcfa2091c185b687f933eb9dd/factory_shim/init [modify] https://crrev.com/f97cc5973c80721dcfa2091c185b687f933eb9dd/factory_shim/Makefile [modify] https://crrev.com/f97cc5973c80721dcfa2091c185b687f933eb9dd/factory_shim/bootstrap.sh [modify] https://crrev.com/f97cc5973c80721dcfa2091c185b687f933eb9dd/factory_netboot/init
,
Nov 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/initramfs/+/193f630c3f2c5d6ec29635b18ec6434f58211dfd commit 193f630c3f2c5d6ec29635b18ec6434f58211dfd Author: Hung-Te Lin <hungte@chromium.org> Date: Wed Nov 02 07:33:11 2016 factory_{shim,netboot}: Use the new factory_tty.sh for TTY init. The TTY initialization code has been too complicated that we should unify them in a single place, provided by factory_installer package. BUG= chromium:636671 TEST=USE=factory_shim_ramfs emerge-link chromeos-initramfs CQ-DEPEND=CL:406747 Change-Id: I82698922683d1548ad51466fb41cabf643638ce6 Reviewed-on: https://chromium-review.googlesource.com/406768 Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Chun-Tsen Kuo <chuntsen@chromium.org> (cherry picked from commit 50e962c29b1a05fff647d86b7cf6b8d95aa7affa) Reviewed-on: https://chromium-review.googlesource.com/414663 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/193f630c3f2c5d6ec29635b18ec6434f58211dfd/factory_netboot/Makefile [modify] https://crrev.com/193f630c3f2c5d6ec29635b18ec6434f58211dfd/factory_shim/init [modify] https://crrev.com/193f630c3f2c5d6ec29635b18ec6434f58211dfd/factory_shim/Makefile [modify] https://crrev.com/193f630c3f2c5d6ec29635b18ec6434f58211dfd/factory_shim/bootstrap.sh [modify] https://crrev.com/193f630c3f2c5d6ec29635b18ec6434f58211dfd/factory_netboot/init
,
Jan 13 2017
|
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by hungte@chromium.org
, Aug 11 2016