[Buildroot] [PATCH 2/3] rpi-userland: new package

Samuel Martin s.martin49 at gmail.com
Sat Jan 5 15:18:34 UTC 2013


Hi Maxime,

2013/1/5 Maxime Hadjinlian <maxime.hadjinlian at gmail.com>:
> Introducing a package to build the userland part of the Raspberry,
> needed by anyone who would want to build a rootfs for a RaspberryPi.
>
> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian at gmail.com>
> ---
>  package/Config.in                    |    1 +
>  package/rpi-userland/Config.in       |   12 ++++++++++++
>  package/rpi-userland/rpi-userland.mk |   25 +++++++++++++++++++++++++
>  3 files changed, 38 insertions(+)
>  create mode 100644 package/rpi-userland/Config.in
>  create mode 100644 package/rpi-userland/rpi-userland.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index a3530d7..604ed1b 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -579,6 +579,7 @@ source "package/collectd/Config.in"
>  source "package/empty/Config.in"
>  source "package/googlefontdirectory/Config.in"
>  source "package/mobile-broadband-provider-info/Config.in"
> +source "package/rpi-userland/Config.in"
>  source "package/shared-mime-info/Config.in"
>  source "package/snowball-init/Config.in"
>  source "package/sound-theme-borealis/Config.in"
> diff --git a/package/rpi-userland/Config.in b/package/rpi-userland/Config.in
> new file mode 100644
> index 0000000..3d4585f
> --- /dev/null
> +++ b/package/rpi-userland/Config.in
> @@ -0,0 +1,12 @@
> +config BR2_PACKAGE_RPI_USERLAND
> +       bool "rpi-userland"
> +       select BR2_PACKAGE_LIBCOFI
> +       help
> +         Raspberry Pi Userland contains the necessary library to use the
> +         VideoCore driver.
> +
> +         Includes source for the ARM side code to interface to:
> +         EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG.
> +
> +         https://github.com/raspberrypi/userland/
> +
> diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk
> new file mode 100644
> index 0000000..5bae06d
> --- /dev/null
> +++ b/package/rpi-userland/rpi-userland.mk
> @@ -0,0 +1,25 @@
> +#############################################################
> +#
> +# rpi-userland
> +#
> +#############################################################
> +RPI_USERLAND_VERSION = 9852ce28826889e50c4d6786b942f51bccccac54
> +RPI_USERLAND_SITE = http://github.com/raspberrypi/userland/tarball/master
> +RPI_USERLAND_LICENSE = FOSS
> +RPI_USERLAND_LICENSE_FILE = LICENCE
> +RPI_USERLAND_INSTALL_STAGING = YES
> +
> +define RPI_USERLAND_POST_TARGET_CLEANUP
> +    rm -Rf $(TARGET_DIR)/opt/vc/include
> +    rm -Rf $(TARGET_DIR)/opt/vc/share
> +    rm -Rf $(TARGET_DIR)/opt/vc/src
> +    rm -f  $(TARGET_DIR)/etc/init.d/vcfiled
> +    rm -f  $(TARGET_DIR)/opt/vc/lib/*.a
> +    rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/etc/init.d || true
Since you use the --ignore-fail-on-non-empty option, i think "|| true"
is useless.

> +    mv $(TARGET_DIR)/opt/vc/lib/* $(TARGET_DIR)/usr/lib/
> +    rm -Rf $(TARGET_DIR)/opt/vc/
> +endef

Also, since you set RPI_USERLAND_INSTALL_STAGING = YES, don't you need
to do some cleanup/fixup hook for the staging area as well?

> +
> +RPI_USERLAND_POST_INSTALL_TARGET_HOOKS += RPI_USERLAND_POST_TARGET_CLEANUP

BTW, it is possible to avoid this cleanup hook  (or at least reduce it
to the example source) with this patch:
http://code.bulix.org/3fo6ye-82780
and by adding "-DVMCS_INSTALL_PREFIX=/usr" to the
RPI_USERLAND_CONF_OPT variable.

> +
> +$(eval $(cmake-package))
> --
> 1.7.10.4

Regards,

-- 
Samuel


More information about the buildroot mailing list