Add personal package into chromium os bootable image

56 views
Skip to first unread message

Louis Tsai

unread,
Oct 20, 2016, 4:20:33 AM10/20/16
to Chromium OS dev
Hi all,

I try to add a program like "HelloWorld" into bootable USB image. I have follow somebody's suggestion to do the following instructions and can build the "HelloWorld" binary.

1. Create a HelloWorld under platform2 with my HelloWorld.cpp and HelloWorld.gyp
3. Put a new HelloWorld-9999.ebuild file in  src/third_party/chromiumos_overlay/chromeos-base/HelloWorld
4. Use emerge-x86-generic HelloWorld to build my program

Everything is ok now. Then, i use build_image scripts to generate image, but there are no HelloWorld in my image. Please teach me how can i do....

Hung-Te Lin

unread,
Oct 20, 2016, 4:25:39 AM10/20/16
to Louis Tsai, Chromium OS dev
You have to include it in the right package for target image (or board overlay).
See virtual/target-chromium-os and virtual/chromeos-bsp.

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

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

Louis Tsai

unread,
Oct 20, 2016, 5:37:26 AM10/20/16
to Chromium OS dev, tsaimi...@gmail.com
Thanks for your quickly reply, i have added "chromeos-base/Hello" into RDEPEND variable in virtual/target-chromium-os-dev/target-chromium-os-dev-1.ebuild, but still cannot found Hello binary in my usb image. I have tried to add program into image for almost one week, please help me.

Here is my Hello-9999.ebuild,

EAPI=5

CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_DESTDIR="${S}/platform2"

PLATFORM_SUBDIR="Hello" # name of the directory in src/platform2

inherit cros-workon platform

DESCRIPTION="description"
HOMEPAGE="http://www.chromium.org/"

LICENSE="BSD-Google"
SLOT=0
KEYWORDS="x86 amd64"

RDEPEND=""

DEPEND=""

src_install() {
    dobin "${OUT}/Hello" # ${OUT} is the build output directory containing
                         # all your binaries
}

platform_pkg_test() {
    local tests=(
    package_test
   )
  local test_bin
    for test_bin in "${tests[@]}"; do
    platform_test "run" "${OUT}/${test_bin}" # platform_test takes care
                 # of setting up your test environment
    done
}




Hung-Te Lin於 2016年10月20日星期四 UTC+8下午4時25分39秒寫道:
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.

Hung-Te Lin

unread,
Oct 20, 2016, 5:53:59 AM10/20/16
to Louis Tsai, Chromium OS dev
When you make changes to target-chromium-os-dev-1.ebuild, remember to uprev the symlink so portage will know that it's changed.
Or, you can do it explicitly: emerge-$board target-chromium-os-dev
And after that, you have to rebuild packges to make sure dependencies were pulled / prepared, before running build_image.

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

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages