Adding a package to ChromiumOS

130 views
Skip to first unread message

Jupiter

unread,
Mar 20, 2024, 10:20:57 AMMar 20
to ChromiumOS Development
Hello everyone!

I am trying to add a package using https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/add-a-new-package/ article and existed source code. As sample I get 'vtpm' package.
My actions are:
1) Copy 'vtpm' directories in 'third_party' and 'platform2' repositories (my test package has name 'vtpm_check')
2) Change appropriate file names (to avoid name collisions) and file content
3) Build package using command 'cros_sdk cros_workon_make --install --board=${BOARD} vtpm_check'
4) Check package file tree using command 'cros_sdk equery-amd64-generic files --tree vtpm_check' (please see attached 'vtpm_check_tree.png')
5) Build image using commands 'cros build-packages --board=${BOARD} && cros build-image --board=${BOARD} test'
6) Launch image using command 'cros vm --start --image-path=src/build/images/amd64-generic/latest/chromiumos_test_image.bin --board=amd64-generic'
7) Go to board using command 'ssh -p 9222 ro...@127.0.0.1' and password 'test0000'
8) Check package files location using command 'find / -name '*vtpm_check*' -print 2> /dev/null' (please see attached 'real_file_places.png')

As I can see on board the package files have different places than it was displayed by command from point 4 - all files are placed in '/usr/local' directory on board.

Could you plase clarify - why file locations are different and should I additionally do in build procedure for 'right' file location?

Thank you in advance,
Jupiter
real_file_places.png
vtpm_check_tree.png

Raul Rangel

unread,
Mar 20, 2024, 2:28:03 PMMar 20
to ChromiumOS Development, Jupiter

Jupiter

unread,
Mar 20, 2024, 3:50:55 PMMar 20
to ChromiumOS Development, Raul Rangel, Jupiter
Raul Rangel, thank you for your explanation.

I have tried this 'base' variant (the steps from my previous post were performed) and in this case I have got the same results - real file locations were in '/usr/local' as well against the result displayed by '
cros_sdk equery-amd64-generic files --tree <package name>'.

I assume that some package list exists which defines 'package - its location'
accordances but still can not find it.

Could you please re-check the 'base' variant and provide your results if it is possible.

Thank you in advance,
Jupiter
среда, 20 марта 2024 г. в 21:28:03 UTC+3, Raul Rangel:

Jupiter

unread,
Mar 22, 2024, 9:27:59 AMMar 22
to ChromiumOS Development, Jupiter, Raul Rangel
Hello everyone!

Could you please explain/clarify the following moments:

1) What is the difference between 'base' image and 'test' image? I assume that 'test' image = 'base' image + some additional packages for testing

2) If I use 'test' image and need to start my own daemon on system startup then it does not start because the daemon is placed in '/usr/local' instead of '/usr/sbin' - so how can I test it in this case?

3) How can I connect to 'base' image using 'ssh' command?


Thank you in advance,
Jupiter

среда, 20 марта 2024 г. в 22:50:55 UTC+3, Jupiter:

Mike Frysinger

unread,
Mar 22, 2024, 9:29:58 AMMar 22
to Jupiter, ChromiumOS Development, Raul Rangel

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev

Jupiter

unread,
Mar 25, 2024, 9:38:51 AMMar 25
to ChromiumOS Development, Mike Frysinger, ChromiumOS Development, Raul Rangel, Jupiter
Hello everyone!

Could you please clarify the following:

1) If I use 'test'  image and need to start my own daemon on system startup then it does not start because appropriate 'conf' file is placed in '/usr/local/etc/init'  directory instead of '/etc/init' => it leads to inability to auto-start of my daemon on system start up. So how can I auto-start my daemon in this case?

2) What should I configure in 'test' image build (except of 'target-chromium-os-test/target-chromium-os-test-9999.ebuild') so that my package files are placed as it is pointed by command 'cros_sdk equery-amd64-generic files --tree <package name>', placed not in '/usr/local''?


Thank you in advance,
Jupiter
пятница, 22 марта 2024 г. в 16:29:58 UTC+3, Mike Frysinger:

Mike Frysinger

unread,
May 8, 2024, 3:19:22 PMMay 8
to Jupiter, ChromiumOS Development, Raul Rangel
chromeos-base/chromeos-test-root can be used to install an init.d into /etc for test images
-mike
Reply all
Reply to author
Forward
0 new messages