Replace ply-image with frecon |
||||||||||||||||
Issue descriptionWe'd like to get rid of the frame buffer, but ply-image uses it. So, replace all remaining use of ply-image with frecon, then remove ply-image from chrome OS entirely. Note that ply-image is used in initramfs, which is very space-limited. This may require some refactoring of frecon (and/or creation of a frecon-tiny variant). It might also be nice if frecon could do screen scaling, so that recovery images don't need to carry around extra bitmaps.
,
Mar 29 2016
Also, emailed Hung-Te, who originally attempted to get frecon into initramfs. Here's his response: - Currently frecon needs dbus, which we don't have in initramfs - Need API to open and configure VTs (which frecon supports now, but only via dbus) so we can write text to it - Need a more flexible way to dynamically render something on screen without destroying frecon context (just like ply-image) (this is for recovery mode - it tries to render a progress bar during execution) - Size and dependency. initramfs size is very limited. Frecon has too much dependency: libdrm, libtsm, libudev, libdbus, libpng12, libpthread that will run out of initramfs space in kernel partition
,
Mar 29 2016
,
Mar 29 2016
It would be really great if there can be a ply-image compatible executable, say freon-image, that will talk to frecon internally and do the right thing so we don't have to write complicated dbus commands for just displaying an image on screen.
,
Mar 29 2016
I've attached the recovery log. You should be able to do a search for frecon to see where I've called it. RE: Domink's question in https://chromium-review.googlesource.com/#/c/335463/: Frecon --clear was called once before I tried to display the boot_message.png file. Does that keep running until I manually kill it? Can you give me instructions on how to run frecon properly (I can't find much documentation searching on Moma)? I just assumed that I could call it again and again much like ply-image.
,
Mar 29 2016
No it doesn't. Try to find my discussion with dsodman in frecon related issues. - If you kill frecon, anything on screen is destroyed and becomes black screen. - You can't run it again and again since next session won't start (or automatically kill previous one). - Depends on frecon settings, some option may leave it keep running and some may just terminate once the display is finished. Frecon is totally different from ply-image (for now) - and that's why I added comment #4.
,
Mar 29 2016
Please find an owner and estimated time to fix for these issues. Thanks
,
Mar 29 2016
ply-image also needs libdrm and libpng12, how else would it talk to display or load png images? libtsm and udev are necessary, libtsm provides console functionality and udev device discovery we can work on a version of frecon for initramfs without dbus, it would be separate ebuild then.
,
Mar 29 2016
for now the only way to display images while frecon is running is to use dbus interface. we could consider implementing something like console escape sequences, where one could write to frecon console escape seq with image path and location and frecon display it on screen?
,
Mar 29 2016
,
Mar 30 2016
Summary of design discussion with shchen and dbehr: 1. Make a frecon variant which doesn't use dbus, since that's not available in the recovery image and libdbus is huge compared with our size constraints in the initramfs. 2. We need persistent screen where we can overlay images. So start frecon and keep it running (since when it exits, the screen goes black). Add console output escape sequence to display an image. For security, may want to have this capability enabled via a command line option. (as suggested in comment#9) 3. Add support for simple scaling by an integer multiple (pixel-doubling/tripling). This removes need for multiple images (keeps initramfs small) and will look good enough on a high-dpi screen. No need to do fancier (bilinear/bicubic) scaling; code is small enough, but scaling low-stroke-width fonts doesn't look good. 4. If frecon + new *.so files are too big, explore static linking with libs only used by frecon. 5. Thanks, Dominik!
,
Mar 30 2016
If we're going to support "console output escape sequence to display an image", does that mean it'll be something like # somewhere in system init terminals=$(frecon --daemon --enable-escape-sequence --create-terminals "1,2,3") # echo $terminals should give something like /dev/ttyS2 /dev/ttyS3 /dev/ttyS4 so we know where to access them # somewhere when we want to display something to first terminal... printf "\027[img:/usr/share/assets/boot_message.png,+100-200\027" >>/dev/ttyS2
,
Mar 31 2016
something like that, but frecon terms are under /dev/pts/0, 1, 2 etc display_boot_message creates a link to /dev/pts/1 from /dev/tty1 for some backward compatibility. Do you need multiple terminals? I'd rather disable terminal switching in this mode so it will not be possible to switch them. I think we should support +X,+Y for left and top alignment, -X and -Y for right and bottom and "center" for automatic centering of the image. Also additional argument with integer scale? Possibly extra commands like clear with color and box/rect for simple drawing?
,
Mar 31 2016
> Do you need multiple terminals? Currently the recovery image supports having debug messages on other terminals (VT2, VT3). It would be great if that can be still provided. > I think we should support +X,+Y for left and top alignment, -X and -Y for right and bottom and "center" for automatic centering of the image Hmm, I think we need (1) absolute location like +x, +y, -x, -y (2) offset from center (or if we can get the screen dimension in other approach while the daemon is already running) > Possibly extra commands like clear with color I think "what ply-image supports" would be all what we need.
,
Apr 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/frecon/+/f50c98fa671058a0bd5c33ad41b4b2de8ddd5155 commit f50c98fa671058a0bd5c33ad41b4b2de8ddd5155 Author: Dominik Behr <dbehr@chromium.org> Date: Thu Mar 31 21:05:29 2016 frecon: make dbus dependency in frecon optional This change allows building frecon with dbus calls stubbed out. So a light-weight version of frecon can be built for use in ramdisk. BUG= chromium:598480 TEST=export DBUS=0 emerge-$BOARD frecon, deploy it and verify it doesnt link\ with dbus with ldd /sbin/frecon Change-Id: I03d46ebd7e1943edcb38ce40dbb406a1845cdf37 Signed-off-by: Dominik Behr <dbehr@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/336867 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> [modify] https://crrev.com/f50c98fa671058a0bd5c33ad41b4b2de8ddd5155/dbus.c [modify] https://crrev.com/f50c98fa671058a0bd5c33ad41b4b2de8ddd5155/dbus.h [modify] https://crrev.com/f50c98fa671058a0bd5c33ad41b4b2de8ddd5155/Makefile
,
Apr 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/frecon/+/563793266fc813dc2db3fee28414499bcf58880a commit 563793266fc813dc2db3fee28414499bcf58880a Author: Dominik Behr <dbehr@chromium.org> Date: Thu Mar 31 21:05:29 2016 frecon: make dbus dependency in frecon optional This change allows building frecon with dbus calls stubbed out. So a light-weight version of frecon can be built for use in ramdisk. BUG= chromium:598480 TEST=export DBUS=0 emerge-$BOARD frecon, deploy it and verify it doesnt link\ with dbus with ldd /sbin/frecon Signed-off-by: Dominik Behr <dbehr@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/336867 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> (cherry picked from commit f50c98fa671058a0bd5c33ad41b4b2de8ddd5155) Change-Id: If60cc4e64e97a6949a606ec36c2a8e57f899015b Signed-off-by: Dominik Behr <dbehr@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/338612 Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> Tested-by: Dominik Behr <dbehr@google.com> [modify] https://crrev.com/563793266fc813dc2db3fee28414499bcf58880a/dbus.c [modify] https://crrev.com/563793266fc813dc2db3fee28414499bcf58880a/dbus.h [modify] https://crrev.com/563793266fc813dc2db3fee28414499bcf58880a/Makefile
,
May 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/f6d1779507e32a0928ba7b1e2d1f40447f22a33b commit f6d1779507e32a0928ba7b1e2d1f40447f22a33b Author: Dominik Behr <dbehr@chromium.org> Date: Sat Apr 30 03:31:09 2016 libtsm: add a patch for OSC string callback For frecon to be able to implement custom escape codes. This change patches libtsm with functional OSC escape processing which calls library user provided callback for every encountered OSC escape. This allows terminals using libtsm to implement OSC escapes. BUG= chromium:598480 TEST=none, see frecon change that depends on it Change-Id: Ia71f31dd69ed89454eb13d37ef4403a746391f1e Signed-off-by: Dominik Behr <dbehr@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/341514 Reviewed-by: Haixia Shi <hshi@chromium.org> [rename] https://crrev.com/f6d1779507e32a0928ba7b1e2d1f40447f22a33b/sys-apps/libtsm/libtsm-3-r1.ebuild [add] https://crrev.com/f6d1779507e32a0928ba7b1e2d1f40447f22a33b/sys-apps/libtsm/files/0001-libtsm-add-OSC-string-callback.patch
,
May 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/frecon/+/92d9e318350c5a8d493a3b32ef66138367db82e9 commit 92d9e318350c5a8d493a3b32ef66138367db82e9 Author: Dominik Behr <dbehr@chromium.org> Date: Thu May 05 03:10:48 2016 frecon: add image scaling functionality All images displayed by frecon can be now scaled by integer factor. This allows reuse of lower resolution assets on high resolution screen. Added --scale=N (where N is positive integer) command line option to set scaling of splash images. 0 is a special value which uses scale=1 for framebuffers below 1920 pixels wide and scale=2 over 1920. Scale also affects image offset. As added bonus the image is now clipped to framebuffer size so trying to display image which is too big or extending outside buffer does not cause a crash. BUG= chromium:598480 TEST=edit /etc/init/boot-splash.conf and add --scale=4 to frecon command line Change-Id: I7918d7257cb522bec2fd8f4940e026da11abe9c1 Signed-off-by: Dominik Behr <dbehr@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/342773 Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> [modify] https://crrev.com/92d9e318350c5a8d493a3b32ef66138367db82e9/splash.c [modify] https://crrev.com/92d9e318350c5a8d493a3b32ef66138367db82e9/splash.h [modify] https://crrev.com/92d9e318350c5a8d493a3b32ef66138367db82e9/main.c [modify] https://crrev.com/92d9e318350c5a8d493a3b32ef66138367db82e9/image.c [modify] https://crrev.com/92d9e318350c5a8d493a3b32ef66138367db82e9/image.h
,
May 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/frecon/+/222936d5eee2971482b68b09b04b781762e865a3 commit 222936d5eee2971482b68b09b04b781762e865a3 Author: Dominik Behr <dbehr@chromium.org> Date: Thu May 05 20:50:50 2016 frecon: add command line option to disable login on terminals Ramdisk/recovery would like for frecon to provide extra terminals beside splash screen to display debugging and diagnostic logs but they should not allow login prompt for security reasons. BUG= chromium:598480 TEST=from shell, stop ui; killall -9 frecon; frecon --enable-vts --no-login;\ and there should be no login prompt on any terminal Change-Id: I560f3f348f3bddbb9c12cdf27f893535a6d1c104 Signed-off-by: Dominik Behr <dbehr@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/342775 Reviewed-by: Haixia Shi <hshi@chromium.org> [modify] https://crrev.com/222936d5eee2971482b68b09b04b781762e865a3/term.c [modify] https://crrev.com/222936d5eee2971482b68b09b04b781762e865a3/main.c [modify] https://crrev.com/222936d5eee2971482b68b09b04b781762e865a3/main.h
,
May 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/frecon/+/d253090f71dfb6f7b8f379775d31277b40eec490 commit d253090f71dfb6f7b8f379775d31277b40eec490 Author: Dominik Behr <dbehr@chromium.org> Date: Thu May 05 21:01:06 2016 frecon: add image/drawing escapes This change adds OSC escapes image: and box: that allows anyone controlling the terminal to display PNG images on it or draw single color boxes. BUG= chromium:598480 TEST=swith to frecon terminal, and from ssh window run echo -ne "\033]image:file=/usr/share/chromeos-assets/images_100_percent/boot_splash_frame18.png\033\\" > /dev/pts/1 echo -ne "\033]box:color=0xFFFFFFFF;size=100,100\033\\" > /dev/pts/1 CQ-DEPEND=Ia71f31dd69ed89454eb13d37ef4403a746391f1e Change-Id: Ie2332e7c96d969ac8b11083f6f393fc88a79ad10 Signed-off-by: Dominik Behr <dbehr@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/342774 Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> [modify] https://crrev.com/d253090f71dfb6f7b8f379775d31277b40eec490/term.c [modify] https://crrev.com/d253090f71dfb6f7b8f379775d31277b40eec490/main.c [modify] https://crrev.com/d253090f71dfb6f7b8f379775d31277b40eec490/fb.c [modify] https://crrev.com/d253090f71dfb6f7b8f379775d31277b40eec490/main.h
,
Aug 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/frecon/+/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d commit da6df41a4ba404c0ad0afe5d0f46a99e2be6164d Author: Dominik Behr <dbehr@chromium.org> Date: Tue Aug 02 19:56:42 2016 frecon: clean up terminal management Increase number of possible terminals to 12 and make it configurable via command line option. Make splash term always term 0 to simplify terminals switching logic. Fixed wait for child process for vt0. Save pts file name for each frecon vt to /var/run/frecon/vtX. Save frecon pid to /var/run/frecon/pid. Add command line option to pre-create all the terminals so their pts names can be read in advance. Fix VT0 child exiting causing frecon to exit main loop. BUG= chromium:598480 TEST=boot daisy Change-Id: I156882c2ecfe5e9c4437b2a187440026f6063813 Signed-off-by: Dominik Behr <dbehr@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/365563 Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> [modify] https://crrev.com/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d/util.h [modify] https://crrev.com/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d/term.c [modify] https://crrev.com/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d/main.c [modify] https://crrev.com/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d/input.c [modify] https://crrev.com/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d/main.h [modify] https://crrev.com/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d/util.c [modify] https://crrev.com/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d/splash.c [modify] https://crrev.com/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d/splash.h [modify] https://crrev.com/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d/shl_pty.c [modify] https://crrev.com/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d/README [modify] https://crrev.com/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d/term.h [modify] https://crrev.com/da6df41a4ba404c0ad0afe5d0f46a99e2be6164d/shl_pty.h
,
Sep 22 2016
,
Oct 7 2016
,
Nov 19 2016
,
Jan 21 2017
,
Mar 4 2017
,
Apr 17 2017
,
May 30 2017
,
Jun 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/assets/+/065cd391f5cd332d46fa87ab08ce4b2cbc55a6e1 commit 065cd391f5cd332d46fa87ab08ce4b2cbc55a6e1 Author: Stéphane Marchesin <marcheu@chromium.org> Date: Tue Jun 27 06:33:20 2017 assets: display_boot_message: Remove x11 remnants ply-image has been replaced by frecon, so remove ply-image. BUG= chromium:655820 , chromium:598480 TEST=trybots Change-Id: Ib6ac26c8222204eef4bb45a0870945ffccc73eb7 Reviewed-on: https://chromium-review.googlesource.com/443585 Commit-Ready: Drew Davenport <ddavenport@chromium.org> Tested-by: Stéphane Marchesin <marcheu@chromium.org> Reviewed-by: Dominik Behr <dbehr@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/549524 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Trybot-Ready: Hung-Te Lin <hungte@chromium.org> [modify] https://crrev.com/065cd391f5cd332d46fa87ab08ce4b2cbc55a6e1/text/display_boot_message
,
Jul 5 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/assets/+/d0b647e93aa1c57afe88f9fc1394c72624ce5ad5 commit d0b647e93aa1c57afe88f9fc1394c72624ce5ad5 Author: Stéphane Marchesin <marcheu@chromium.org> Date: Wed Jul 05 18:11:30 2017 assets: display_boot_message: Remove x11 remnants ply-image has been replaced by frecon, so remove ply-image. BUG= chromium:655820 , chromium:598480 TEST=trybots Change-Id: Ib6ac26c8222204eef4bb45a0870945ffccc73eb7 Reviewed-on: https://chromium-review.googlesource.com/443585 Commit-Ready: Drew Davenport <ddavenport@chromium.org> Tested-by: Stéphane Marchesin <marcheu@chromium.org> Reviewed-by: Dominik Behr <dbehr@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/559911 Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> [modify] https://crrev.com/d0b647e93aa1c57afe88f9fc1394c72624ce5ad5/text/display_boot_message
,
Aug 1 2017
,
Oct 14 2017
|
||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||
Comment 1 by shchen@chromium.org
, Mar 29 2016