Attempting new chromium-os fork, updating grub

98 views
Skip to first unread message

Joshua Warner

unread,
Aug 23, 2016, 5:01:51 PM8/23/16
to Chromium OS discuss
Hi,

Not sure this is the right place to post this; please advise if not.

For background, I'm trying to put together a new chromium-os distro, to accomplish the following:
* Boot into kiosk mode for one particular application
* Be very easy to install, with little to no manual configuration steps (including setting up kiosk mode, if possible)
* Disable/customize boot messaging where possible.
* Our own update server, so we control the frequency of updates
* Our own build infrastructure
* A couple extra services launching at startup

Right now, I'm targeting deploying this on pretty generic intel hardware (basically, an intel NUC).  It boots using UEFI and grub.  (grub being so-far unmodified from the chromium-os master sources)

If it makes a difference, I'm using chromium-os master as of a few days ago, and the instructions from http://www.chromium.org/chromium-os/developer-guide.

----

First, any general advice?  Am I going down a dead-end or incurring huge unforeseen costs?

----

Second, I've been trying to disable grub messaging, first by modifying `set timeout=2` to `set timeout=0` in `src/scripts/build_library/create_legacy_bootloader_templates.sh`.  This still leaves a "Booting `local image A'" message about, which comes from `notify_booting` in `src/third_party/grub2/grub-core/normal/menu.c`.  I commented out those grub_printf statements, and then used the following commands to test:

```
# in the chroot
export BOARD=x86-generic
./build_packages --board=${BOARD}
./build_image --board=${BOARD} --noenable_rootfs_verification dev
```

However, I find that grub isn't updated!  In fact, `chroot/bin/grub-mkimage` has the timestamp of when I first set up the chroot, not of any later builds.

----

Lastly, I'm trying to customize the update server by using `export FACTORY_SERVER=${my_update_server_hostname}` before `./build_packages` and `./build_image`, as seems to be suggested by `third_party/chromiumos-overlay/chromeos-base/chromeos-factoryinstall/chromeos-factoryinstall-*.ebuild`.  

What's the correct way to do this?

----

Thanks,
Joshua

Mike Frysinger

unread,
Aug 23, 2016, 5:52:43 PM8/23/16
to allpow...@gmail.com, Chromium OS discuss
Chrome OS has the ability to be remotely managed and boot into a specific app in kiosk mode already.  if that's really all you need, then perhaps just going the official route via the management console would be better as you wouldn't need any other technical overhead.  plus, it'd be trivial to scale to any of the many official Chromebooks/Chromeboxes/etc... that have been released (and continue to be released), and the hardware security of official Chrome OS devices is likely to be significantly better than anything you can put together with off-the-shelf builds.

if you really want to re-use old hardware you have, there is also Neverware you might want to look into.  installs from them can also be enrolled into the management console and remotely managed/configured and mixed with fleets of official Chrome OS devices.

but let's assume you really really want to do your own builds and manage all your own signing and infrastructure and whatever, and spend money on the server hosting and network bandwidth and engineers to build/maintain all of it.

wrt grub not updating, what you describe is WAI behavior.  you should `cros_workon-$BOARD start grub` first, and then your local changes should get picked up automatically.

wrt customizing the update URL, no, that's not how you want to do it.  export the CHROMEOS_VERSION_AUSERVER and CHROMEOS_VERSION_DEVSERVER variables instead before running build_image.
-mike

--
--
Chromium OS discuss mailing list: chromium-os-discuss@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en


John Holland

unread,
Aug 23, 2016, 5:55:23 PM8/23/16
to vap...@chromium.org, Chromium OS discuss, allpow...@gmail.com

Please stay email this shit man dam tried ask yal


---
You received this message because you are subscribed to the Google Groups "Chromium OS discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-discuss+unsub...@chromium.org.

Joshua Warner

unread,
Aug 23, 2016, 6:27:04 PM8/23/16
to Chromium OS discuss, allpow...@gmail.com

Mike,

On Tuesday, August 23, 2016 at 9:52:43 PM UTC, Mike Frysinger wrote:
Chrome OS has the ability to be remotely managed and boot into a specific app in kiosk mode already.  if that's really all you need, then perhaps just going the official route via the management console would be better as you wouldn't need any other technical overhead.  plus, it'd be trivial to scale to any of the many official Chromebooks/Chromeboxes/etc... that have been released (and continue to be released), and the hardware security of official Chrome OS devices is likely to be significantly better than anything you can put together with off-the-shelf builds.

Yep, we're using stock chromeboxes right now, but we've been running into supply chain problems.  A lot of manufacturers seem to be discontinuing the form-factors we're interested in.

Unfortunately, the management console has also been problematic: these devices end up installed behind our customer's firewalls, and we've had objections to us having managerial control over the devices.  From a technical standpoint, it's a little silly to object to remote management but not automatic updates, but it is what it is.  We've been manually configuring the boxes in dev mode, to enable the kiosk app.

We also have been wanting to use some more advanced bluetooth features that aren't exposed in stock chromeos - basically, broadcasting an iBeacon, Eddystone beacon, and gatt service all at once (and having control over that broadcast from our kiosk app).  My intent is to have a service running locally, based of e.g. github.com/paypal/gatt, and communicate to the kiosk app via the loopback address.
 

if you really want to re-use old hardware you have, there is also Neverware you might want to look into.  installs from them can also be enrolled into the management console and remotely managed/configured and mixed with fleets of official Chrome OS devices.

Thanks for the tip, I'll look into it!
 
but let's assume you really really want to do your own builds and manage all your own signing and infrastructure and whatever, and spend money on the server hosting and network bandwidth and engineers to build/maintain all of it.

wrt grub not updating, what you describe is WAI behavior.  you should `cros_workon-$BOARD start grub` first, and then your local changes should get picked up automatically.

wrt customizing the update URL, no, that's not how you want to do it.  export the CHROMEOS_VERSION_AUSERVER and CHROMEOS_VERSION_DEVSERVER variables instead before running build_image.

Perfect, thanks!

-Joshua

Joshua Warner

unread,
Aug 23, 2016, 7:28:29 PM8/23/16
to Chromium OS discuss, allpow...@gmail.com
Actually, I'm having trouble with the cros_workon command - it claims to correctly start "working on" grub - (`17:20:58: INFO: Started working on 'sys-boot/grub' for 'x86-generic'`).  However, I'm not seeing `./chroot/bin/grub-mkimage` getting updated when I do `./build_packages` or `./build_image`.


In `src/third_party/chromiumos-overlay/sys-boot/grub/grub-9999.ebuild`, I see:

```
5:CROS_WORKON_PROJECT="chromiumos/third_party/grub2"
6:CROS_WORKON_LOCALNAME="grub2"
```
 
However, when using either of those names (`grub2` or `chromiumos/third_party/grub2`, or `sys-boot/grub2`, for that matter) with cros_workon, it complains that those aren't valid projects.

What am I doing wrong?  (Sorry for all the beginner questions!)

Thanks,
Joshua

Mike Frysinger

unread,
Aug 23, 2016, 7:35:47 PM8/23/16
to allpow...@gmail.com, Chromium OS discuss

the files in chroot/bin/ are host packages, not board packages. you'll want to run `cros_workon --host start grub` too in order to rebuild that file.
-mike


--

John Holland

unread,
Aug 23, 2016, 10:03:50 PM8/23/16
to Mike Frysinger, Chromium OS discuss, Joshua Warner

Y'all got the wrong Mike where y'all please quit sending emails to me I don't know what you're doing and how you're doing what you're doing please stop sending this s*** to my phone I'm tired of looking at it please stop


Mike Frysinger

unread,
Aug 23, 2016, 10:08:00 PM8/23/16
to John Holland, Chromium OS discuss
no one is e-mailing you.  if you decided to subscribe to this group, then that is something you did.  if you don't want to be subscribed anymore, then unsubscribe yourself using the directions in the footer of every e-mail.  we can't fix your account settings for you.
-mike

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-discuss+unsubscribe...@chromium.org.

茜茜 江

unread,
Aug 23, 2016, 11:58:50 PM8/23/16
to vap...@chromium.org, John Holland, Chromium OS discuss

😔😔😔
我該如何超作
--
傳送自 Android 版 Hotmail Email App App

星期三, 24 8月 2016, 10:07上午 +08:00 寄件人 Mike Frysinger vap...@chromium.org:

Chromium OS discuss mailing list: chromium-...@chromium.org

View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en

--
--
Chromium OS discuss mailing list: chromium-...@chromium.org

View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Chromium OS discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dis...@chromium.org.

--
--
Chromium OS discuss mailing list: chromium-...@chromium.org

View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Chromium OS discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-dis...@chromium.org.
Reply all
Reply to author
Forward
0 new messages