Resolving issues building chromium OS for the kukui board

225 views
Skip to first unread message

Colin Williams

unread,
Aug 10, 2021, 9:08:30 AM8/10/21
to chromiu...@chromium.org
Hello again,

I spent the past week following the developer guide for building
Chromium OS for the kukui board. I have gone through the process
another time to make sure I was following the steps outlined in the
guide. I am writing images but have not been able to start them from a
virtual machine or the krane device. I think there may be a problem
attaching the appropriate kernel or otherwise. In order to expedite
the discussion, I have recorded the output of most commands to a git
repository which I will reference here.


___________________________________________________________________________________________________________________________________

Step 1. cros_sdk

The first message that may relate to my issues are the log lines below
from the cros_sdk installation output:

* Could not find "/mnt/host/source/src/third_party/../aosp/external/perfetto".
* The CROS_WORKON_LOCALNAME for this ebuild should be updated
* to be relative to "/mnt/host/source/src/third_party".

https://github.com/drocsid/chromium-build-output/blob/1d27ba8cb2ddec19bd4121473f6d2f1639b4968b/cros_sdk_out#L618

I believe this is a suggestion to set an environment variable to a
specific kernel path relative to /mnt/host/source/src/third_party . It
wasn't clear if this is absolutely necessary since I saw no mention
in the developer guide. Then I'm currently assuming it should be
provided by the other build steps. Perhaps a krane overlay needs to be
created which is not provided?

___________________________________________________________________________________________________________________________________

Step 2. setup_board

The next message that may relate to my issues are the log lines from
setup_board --board=${BOARD}

!!! WARNING - Cannot auto-configure CHOST arm-none-eabi;
!!! You should edit /usr/arm-none-eabi/etc/portage/make.conf
!!! by hand to complete your configuration.
!!! No LIBC is known for this target.

https://github.com/drocsid/chromium-build-output/blob/1d27ba8cb2ddec19bd4121473f6d2f1639b4968b/setup_board_kukui_Google-TOS#L100

and * has a category that is not listed in /etc/portage/categories on
https://github.com/drocsid/chromium-build-output/blob/main/setup_board_kukui_Google-TOS#L184
- L#228


Again, is this due to a missing krane profile?

I read some of the board porting documentation. But it wasn't clear
I'd need to port my board for a shipping device.

____________________________________________________________________________________________________________________________________

Step 3. build_packages

The next messages we see of concern are from the build packages step

* Linux kernel version:
* Could not find a Makefile in the kernel source directory.
* Please ensure that points to a complete set of Linux sources
* Unable to calculate Linux Kernel version for build, attempting to
use running version

We see in https://raw.githubusercontent.com/drocsid/chromium-build-output/main/build_packages_out

However earlier in the build output we see packages

* Messages for package sys-kernel/chromeos-kernel-4_19-4.19.201-r2087
merged to /build/kukui/:
* Log file: /build/kukui/tmp/portage/logs/sys-kernel:chromeos-kernel-4_19-4.19.201-r2087:20210809-131921.log

Why is a kernel package merged but we receive this error. And the
attempting to use running version is slightly alarming also. Hopefully
not trying to use my host kernel.
_____________________________________________________________________________________________________________________________________

Step 4. build_image dev

When building the dev image we see IE

WARNING: unable to compute the size of
/mnt/host/source/src/build/images/kukui/R94-14142.0.2021_08_09_1307-a1/rootfs/boot/vmlinuz-4.19.201-12105-gf2651dc864f6
(skipping): [Errno 2] No such file or directory:
'/mnt/host/source/src/build/images/kukui/R94-14142.0.2021_08_09_1307-a1/rootfs/boot/vmlinuz-4.19.201-12105-gf2651dc864f6'

Along with other concerning messages from
https://github.com/drocsid/chromium-build-output/blob/1d27ba8cb2ddec19bd4121473f6d2f1639b4968b/build_image_dev#L4727
to L4743

There are further warnings sprinkled across the file but these are the
most concerning.


Why are these files missing?

But regardless the image has been built successfully.

_______________________________________________________________________________________________________________________________________

Step 5. launch image in VM

It doesn't boot. Not terribly suprised given all the warnings and quirks above.

https://github.com/drocsid/chromium-build-output/blob/main/cros_vm_start

_______________________________________________________________________________________________________________________________________

Step 6. cros_flash

Finally I flash the image to USB and there are some things that look
slightly concerning. It doesn't boot the chromebook either.

_______________________________________________________________________________________________________________________________________


I have gone through the build process 2X following the developer guide
and there's too many unanswered questions.

It seems like there might be a missing profile for the krane board.

If so, why doesn't that profile exist like the others?

Shouldn't there be a warning somewhere?

Can someone experienced help me to create a working build for my device?

Brian Norris

unread,
Aug 11, 2021, 2:11:12 PM8/11/21
to Colin Williams, chromium-os-dev
On Tue, Aug 10, 2021 at 6:08 AM Colin Williams <colin.willi...@gmail.com> wrote:
Step 1. cros_sdk

The first message that may relate to my issues are the log lines below
from the cros_sdk installation output:

 * Could not find "/mnt/host/source/src/third_party/../aosp/external/perfetto".
 * The CROS_WORKON_LOCALNAME for this ebuild should be updated
 * to be relative to "/mnt/host/source/src/third_party".

https://github.com/drocsid/chromium-build-output/blob/1d27ba8cb2ddec19bd4121473f6d2f1639b4968b/cros_sdk_out#L618


If I'm reading right, that "error" you highlight is actually just a warning from 1 package that was installed. It wasn't fatal, and it's not the source of any problems you have, I believe. It's more of a janitorial/housekeeping thing.

Your actual termination is because of a KeyboardInterrupt -- i.e., you pressed CTRL-C or similar, I think.
 

I believe this is a suggestion to set an environment variable to a
specific kernel path relative to /mnt/host/source/src/third_party . It
wasn't clear if this is absolutely necessary since  I saw no mention
in the developer guide. Then I'm currently assuming it should be
provided by the other build steps. Perhaps a krane overlay needs to be
created which is not provided?

___________________________________________________________________________________________________________________________________

Step 2. setup_board

The next message that may relate to my issues are the log lines from
setup_board --board=${BOARD}

!!! WARNING - Cannot auto-configure CHOST arm-none-eabi;
!!! You should edit /usr/arm-none-eabi/etc/portage/make.conf
!!! by hand to complete your configuration.
!!!  No LIBC is known for this target.

I'm not sure about that one, but I don't think that's a problem either.
 
https://github.com/drocsid/chromium-build-output/blob/1d27ba8cb2ddec19bd4121473f6d2f1639b4968b/setup_board_kukui_Google-TOS#L100

and * has a category that is not listed in /etc/portage/categories on
https://github.com/drocsid/chromium-build-output/blob/main/setup_board_kukui_Google-TOS#L184
- L#228


Again, is this due to a missing krane profile?

I read some of the board porting documentation. But it wasn't clear
I'd need to port my board for a shipping device.

____________________________________________________________________________________________________________________________________

Step 3. build_packages

The next messages we see of concern are from the build packages step

 * Linux kernel version:
 * Could not find a Makefile in the kernel source directory.
 * Please ensure that  points to a complete set of Linux sources
 * Unable to calculate Linux Kernel version for build, attempting to
use running version

That's coming from strongswan, which is looking for kernel-related info in a way that CrOS kernel packages don't provide. It's mostly harmless, and expected.
 
We see in https://raw.githubusercontent.com/drocsid/chromium-build-output/main/build_packages_out

However earlier in the build output we see packages

 * Messages for package sys-kernel/chromeos-kernel-4_19-4.19.201-r2087
merged to /build/kukui/:
 * Log file: /build/kukui/tmp/portage/logs/sys-kernel:chromeos-kernel-4_19-4.19.201-r2087:20210809-131921.log

Why is a kernel package merged but we receive this error. And the
attempting to use running version is slightly alarming also. Hopefully
not trying to use my host kernel.
_____________________________________________________________________________________________________________________________________

Step 4. build_image dev

When building the dev image we see IE

WARNING: unable to compute the size of
/mnt/host/source/src/build/images/kukui/R94-14142.0.2021_08_09_1307-a1/rootfs/boot/vmlinuz-4.19.201-12105-gf2651dc864f6
(skipping): [Errno 2] No such file or directory:
'/mnt/host/source/src/build/images/kukui/R94-14142.0.2021_08_09_1307-a1/rootfs/boot/vmlinuz-4.19.201-12105-gf2651dc864f6'

Also probably not a problem.
 
Along with other concerning messages from
https://github.com/drocsid/chromium-build-output/blob/1d27ba8cb2ddec19bd4121473f6d2f1639b4968b/build_image_dev#L4727
to L4743

There are further warnings sprinkled across the file but these are the
most concerning.


Why are these files missing?

But regardless the image has been built successfully.

_______________________________________________________________________________________________________________________________________

Step 5. launch image in VM

It doesn't boot. Not terribly suprised given all the warnings and quirks above.

https://github.com/drocsid/chromium-build-output/blob/main/cros_vm_start

I think this is your first real problem. What makes you think a kukui image will run in a VM? Kukui is an ARM board, and you're using qemu-system-x86_64.

To refer to the docs:
"Some boards do not generate VM images. amd64-generic and betty (for ARC, internal only) are recommended. Using cros_vm for non-X86 boards is currently not supported."


_______________________________________________________________________________________________________________________________________

Step 6. cros_flash

Finally I flash the image to USB and there are some things that look
slightly concerning. It doesn't boot the chromebook either.

It's not super surprising that any given public overlay doesn't result in a fully working system. There are often private bits that are missing, by accident or by design. If you provide some more info on how *this* is failing, perhaps you could get somewhere.

_______________________________________________________________________________________________________________________________________


I have gone through the build process 2X following the developer guide
and there's too many unanswered questions.

Admittedly, the developer guide doesn't guarantee that:
(a) the build process will be totally smooth, with no warnings, etc.
(b) any given BOARD will actually work out of the box.
 
It seems like there might be a missing profile for the krane board.

If so, why doesn't that profile exist like the others?

Krane is just a "model" of the Kukui family. BOARD=kukui is correct.

See also:
Particularly, under "code name = krane", you'll find "board name = kukui".
 
Shouldn't there be a warning somewhere?

Can someone experienced help me to create a working build for my device?

Perhaps someone lurking here has direct advice for Krane, but otherwise, you'll have to provide a little more info about step 6 to get to the bottom of this. e.g., can you get any sort of logs? So far, I don't think you've pinpointed what's actually going wrong.

Regards,
Brian 

Colin Williams

unread,
Aug 15, 2021, 5:46:26 AM8/15/21
to Chromium OS Development, Brian Norris, chromium-os-dev, Colin Williams
Hi Brian,

Thanks for the response. On a hunch I decided to build the R94 release branch. I am able to boot this release. 

Colin 
Reply all
Reply to author
Forward
0 new messages