1 Commits
dizzy ... danny

Author SHA1 Message Date
Andrei Gherzan
1ad98cf651 README: Modify dependencies for danny branch
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-10-29 20:18:20 +02:00
69 changed files with 1459 additions and 1475 deletions

253
README
View File

@@ -24,107 +24,110 @@
.... ....
OpenEmbedded BSP Layer - RaspberryPi
Contents: --------------------------------------
=========
1. Description
2. Yocto BSP Layer - RaspberryPi
2.A. Compressed deployed files
2.B. GPU memory
2.C. Add purchased license codecs
2.D. Disable overscan
2.E. Set overclocking options
2.F. Optional - Video camera support with V4L2 drivers
2.G. Optional - Enable offline compositing support
2.H. Images
2.I. Boot to U-Boot
2.J. Image with Initramfs
3. Extra apps
3.A. omxplayer
4. Source code and mirrors
5. Contribution
5.A. Mailing List
5.B. Gerrit Review Server
5.C. Trello Board
6. Maintainers
1. Description
==============
This is the general hardware specific BSP overlay for the RaspberryPi device. This is the general hardware specific BSP overlay for the RaspberryPi device.
It should be used with openembedded-core (not old-style org.openembedded.dev).
More information can be found at: More information can be found at:
http://www.raspberrypi.org/ (Official Site) http://www.raspberrypi.org/ (Official Site)
http://www.distant-earth.com/ (My Site)
Build scripts patched to support making a firmware image for the RaspberryPi with Angstrom can be found at:
http://github.com/Angstrom-distribution/setup-scripts
When not depending on meta-openembedded and not using systemd, you may need to
mask few recipes requiring systemd or other recipes not included in your distribution of choice.
You can achieve this by adding something like the following to local.conf:
BBMASK = "meta-raspberrypi/recipes-multimedia/libav|meta-raspberrypi/recipes-core/systemd"
You can adjust the BBMASK for any .bbappends that your distribution does not contain recipes for.
The core BSP part of meta-raspberrypi should work with different OpenEmbedded/Yocto
distributions and layer stacks, such as:
The core BSP part of meta-raspberrypi should work with different
OpenEmbedded/Yocto distributions and layer stacks, such as:
* Distro-less (only with OE-Core). * Distro-less (only with OE-Core).
* Angstrom. * Angstrom (main focus of testing).
* Yocto/Poky (main focus of testing). * Yocto/Poky.
2. Yocto BSP Layer - RaspberryPi This layer in its entirety depends on:
================================
This layer depends on: URI: git://git.openembedded.org/openembedded-core
URI: git://git.yoctoproject.org/poky
branch: master branch: master
revision: HEAD revision: HEAD
URI: git://git.openembedded.org/meta-openembedded URI: git://git.openembedded.org/meta-openembedded
layers: meta-multimedia
branch: master branch: master
revision: HEAD revision: HEAD
It is preferred that people raise pull requests using GIThub by forking the appropriate tree:
https://github.com/djwillis/
(More info on achieving this can be found at http://help.github.com/send-pull-requests/)
Yocto BSP Layer - RaspberryPi
-------------------------------
This layer depends on:
URI: git://git.yoctoproject.org/poky
branch: danny
revision: HEAD
URI: git://git.openembedded.org/meta-openembedded
branch: master
revision: 1571c2c566c51799eceea2aabe13d1c3116f36b3
How to use it: How to use it:
1. source poky/oe-init-build-env rpi-build 1. source poky/oe-init-build-env rpi-build
2. Add needed layer to bblayers.conf: 2. Add needed layers to bblayers.conf:
- meta-raspberrypi - meta-raspberrypi
- meta-openembedded/meta-oe
3 Set MACHINE to raspberrypi in local.conf 3 Set MACHINE to raspberrypi in local.conf
4. bitbake rpi-hwup-image 4. bitbake rpi-hwup-image
5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used) 5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
6. Boot your RPI. 6. Boot your RPI.
2.A. Optional - compressed deployed files: Optional - compressed deployed files:
========================================== =====================================
1. Overwrite IMAGE_FSTYPES in local.conf 1. Overwrite IMAGE_FSTYPES in local.conf
IMAGE_FSTYPES = "tar.bz2 ext3.xz" IMAGE_FSTYPES = "tar.bz2 ext3.xz rpi-sdimg.xz
2. Overwrite SDIMG_ROOTFS_TYPE in local.conf 2. Overwrite SDIMG_ROOTFS_TYPE in local.conf
SDIMG_ROOTFS_TYPE = "ext3.xz" SDIMG_ROOTFS_TYPE = "ext3.xz"
3. Overwrite SDIMG_COMPRESSION in local.conf
SDIMG_COMPRESSION = "xz"
*Accommodate the values above to your own needs (ex: ext3 / ext4). *Accommodate the values above to your own needs (ex: ext3 / ext4).
2.B. Optional - GPU memory: Optional - GPU firmware:
=========================== ========================
Variable : Details By default the GPU firmware shipped is arm192. You can overwrite this using the
GPU_MEM : GPU memory in megabyte. Sets the memory split between the ARM and variable RPI_GPU_FIRMWARE with one of the values below.
GPU. ARM gets the remaining memory. Min 16. Default 64. # arm128 : 128M ARM, 128M GPU split
GPU_MEM_256 : GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by the # arm192 : 192M ARM, 64M GPU split
512MB RP. Overrides gpu_mem. Max 192. Default not set. # arm224 : 224M ARM, 32M GPU split
GPU_MEM_512 : GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by the # arm240 : 240M ARM, 16M GPU split
256MB RP. Overrides gpu_mem. Max 448. Default not set.
2.C.Optional - Add purchased license codecs: Optional - Add purchased license codecs:
============================================ ========================================
To add you own licenses use variables KEY_DECODE_MPG2 and KEY_DECODE_WVC1 in To add you own licenses use variables KEY_DECODE_MPG2 and KEY_DECODE_WVC1 in local.conf. Example:
local.conf. Example:
KEY_DECODE_MPG2 = "12345678" KEY_DECODE_MPG2 = "12345678"
KEY_DECODE_WVC1 = "12345678" KEY_DECODE_WVC1 = "12345678"
You can supply more licenses separated by comma. Example: You can supply more licenses separated by comma. Example:
KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321" KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321"
2.D. Optional - Disable overscan: Optional - Disable overscan:
================================= ============================
By default the GPU adds a black border around the video output to compensate for By default the GPU adds a black border around the video output to compensate for TVs
TVs which cut off part of the image. To disable this set this variable in which cut off part of the image. To disable this set this variable in
local.conf: local.conf:
DISALE_OVERSCAN = "0" DISALE_OVERSCAN = "0"
2.E. Optional - Set overclocking options: Optional - Set overclocking options:
========================================= ====================================
The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo
Mode" is officially supported by the raspbery and does not void warranty. Mode" is officially supported by the raspbery and does not void warranty.
Check the config.txt for a detailed description of options and modes. Example: Check the config.txt for a detailed description of options and modes. Example:
@@ -134,130 +137,6 @@ CORE_FREQ = "500"
SDRAM_FREQ = "500" SDRAM_FREQ = "500"
OVER_VOLTAGE = "6" OVER_VOLTAGE = "6"
2.F. Optional - Video camera support with V4L2 drivers
======================================================
Set this variable to enable support for the video camera (Linux 3.12.4+ required)
VIDEO_CAMERA = "1"
2.G. Optional - Enable offline compositing support Layer maintainer: John Willis <John.Willis at distant-earth.com>
==================================================
Set this variable to enable support for dispmanx offline compositing
DISMANX_OFFLINE = "1"
This will enable the firmware to fall back to off-line compositing of
Dispmanx elements. Normally the compositing is done on-line, during scanout,
but cannot handle too many elements. With off-line enabled, an off-screen
buffer is allocated for compositing. When scene complexity (number and sizes
of elements) is high, compositing will happen off-line into the buffer.
Heavily recommended for Wayland/Weston.
See: http://wayland.freedesktop.org/raspberrypi.html
2.H. Images
===========
* rpi-hwup-image
Hardware up image
* rpi-basic-image
Based on rpi-hwup-image with some added features (ex: splash)
* rpi-test-image
Image based on rpi-basic-image which includes most of the packages in this
layer and some media samples.
2.I. Boot to U-Boot
===================
To have u-boot load kernel image, set in your local.conf
KERNEL_IMAGETYPE = "uImage"
This will make kernel.img be u-boot image which will load uImage.
By default, kernel.img is the actual kernel image (ex. Image).
2.J. Image with Initramfs
=========================
To build an initramfs image :
* Set this 3 kernel variables (in linux-raspberrypi.inc for example)
- kernel_configure_variable BLK_DEV_INITRD y
- kernel_configure_variable INITRAMFS_SOURCE ""
- kernel_configure_variable RD_GZIP y
* Set the yocto variables (in linux-raspberrypi.inc for example)
- INITRAMFS_IMAGE = "<a name for your initramfs image>"
- INITRAMFS_IMAGE_BUNDLE = "1"
* Set the meta-rasberrypi variable (in raspberrypi.conf for example)
- KERNEL_INITRAMFS = "-initramfs"
3. Extra apps
=============
3.A. omxplayer
==============
omxplayer depends on libav which has a commercial license. So in order to be
able to compile omxplayer you will need to whiteflag the commercial license
adding to you local.conf:
LICENSE_FLAGS_WHITELIST = "commercial"
4. Source code and mirrors
==========================
Main repo:
git://git.yoctoproject.org/meta-raspberrypi
http://git.yoctoproject.org/git/meta-raspberrypi
Github mirror:
https://github.com/djwillis/meta-raspberrypi
Gerrit review repo:
https://review.gherzan.ro:8443/meta-raspberrypi
5. Contributing
===============
5.A. Mailing list
=================
To contribute to this layer you should send the patches for review to the
mailing list.
The patches should be compliant with the openembedded patch guidelines:
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Mailing list:
https://lists.yoctoproject.org/listinfo/yocto
To send changes to mailing list use something like:
git send-email --to yocto@yoctoproject.org \
--subject-prefix='meta-raspberrypi][PATCH'
OPTIONALLY push changes to gerrit (help maintainers merge and review patches
easier in this way).
git push ssh://<username>@review.gherzan.ro:29418/meta-raspberrypi
<local-branch>:refs/for/master
See 5.B. Gerrit Review Server.
5.B. Gerrit Review Server
=========================
We have a gerrit server configured at review.gherzan.ro. Changes made in gerrit
are merged in git.yoctoproject.org/meta-raspberrypi.
You can setup a gerrit account in less than 2 minutes:
A) Login / Register on https://review.gherzan.ro:8443.
B) Add your PUBLIC key in Settings/SSH Public Keys.
C) Add remote in your local repo:
git remote add gherzan ssh://<username>@review.gherzan.ro:29418/meta-raspberrypi
D) Push changes to gerrit using:
git push gherzan <local-branch>:refs/for/master
Please check your spam folder for gerrit messages. Sometimes they end up there.
5.C. Trello Board
=================
A public Trello board is set to manage tasks and bugs. Join us there:
https://trello.com/b/QsYeVjVe/meta-raspberrypi
6. Maintainers
==============
John Willis <John.Willis at distant-earth.com>
Andrei Gherzan <andrei at gherzan.ro> Andrei Gherzan <andrei at gherzan.ro>

View File

@@ -13,28 +13,23 @@ inherit image_types
# Default Free space = 1.3x # Default Free space = 1.3x
# Use IMAGE_OVERHEAD_FACTOR to add more space # Use IMAGE_OVERHEAD_FACTOR to add more space
# <---------> # <--------->
# 4MiB 20MiB SDIMG_ROOTFS # 4KiB 20MiB SDIMG_ROOTFS
# <-----------------------> <----------> <----------------------> # <-----------------------> <----------> <---------------------->
# ------------------------ ------------ ------------------------ # ------------------------ ------------ ------------------------ -------------------------------
# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE | # | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE | IMAGE_ROOTFS_ALIGNMENT |
# ------------------------ ------------ ------------------------ # ------------------------ ------------ ------------------------ -------------------------------
# ^ ^ ^ ^ # ^ ^ ^ ^ ^
# | | | | # | | | | |
# 0 4MiB 4MiB + 20MiB 4MiB + 20Mib + SDIMG_ROOTFS # 0 4096 4KiB + 20MiB 4KiB + 20Mib + SDIMG_ROOTFS 4KiB + 20MiB + SDIMG_ROOTFS + 4KiB
# This image depends on the rootfs image
IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}"
# Set kernel and boot loader # Set kernel and boot loader
IMAGE_BOOTLOADER ?= "bcm2835-bootfiles" IMAGE_BOOTLOADER ?= "bcm2835-bootfiles"
# Set initramfs extension
KERNEL_INITRAMFS ?= ""
# Boot partition volume id # Boot partition volume id
BOOTDD_VOLUME_ID ?= "${MACHINE}" BOOTDD_VOLUME_ID ?= "${MACHINE}"
# Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT) # Boot partition size [in KiB]
BOOT_SPACE ?= "20480" BOOT_SPACE ?= "20480"
# Set alignment to 4MB [in KiB] # Set alignment to 4MB [in KiB]
@@ -42,7 +37,9 @@ IMAGE_ROOTFS_ALIGNMENT = "4096"
# Use an uncompressed ext3 by default as rootfs # Use an uncompressed ext3 by default as rootfs
SDIMG_ROOTFS_TYPE ?= "ext3" SDIMG_ROOTFS_TYPE ?= "ext3"
SDIMG_ROOTFS = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}" SDIMG_ROOTFS = "${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}"
RPI_GPU_FIRMWARE ?= "arm192"
IMAGE_DEPENDS_rpi-sdimg = " \ IMAGE_DEPENDS_rpi-sdimg = " \
parted-native \ parted-native \
@@ -50,19 +47,11 @@ IMAGE_DEPENDS_rpi-sdimg = " \
dosfstools-native \ dosfstools-native \
virtual/kernel \ virtual/kernel \
${IMAGE_BOOTLOADER} \ ${IMAGE_BOOTLOADER} \
${@base_contains("KERNEL_IMAGETYPE", "uImage", "u-boot", "",d)} \
" "
# SD card image name # SD card image name
SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg" SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg"
# Compression method to apply to SDIMG after it has been created. Supported
# compression formats are "gzip", "bzip2" or "xz". The original .rpi-sdimg file
# is kept and a new compressed file is created if one of these compression
# formats is chosen. If SDIMG_COMPRESSION is set to any other value it is
# silently ignored.
#SDIMG_COMPRESSION ?= ""
# Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS. # Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS.
FATPAYLOAD ?= "" FATPAYLOAD ?= ""
@@ -73,40 +62,39 @@ IMAGE_CMD_rpi-sdimg () {
# Align partitions # Align partitions
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
ROOTFS_SIZE=`du -bks ${SDIMG_ROOTFS} | awk '{print $1}'` SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE + ${IMAGE_ROOTFS_ALIGNMENT})
# Round up RootFS size to the alignment size as well
ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} - ${ROOTFS_SIZE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED})
echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS ${ROOTFS_SIZE_ALIGNED} KiB"
# Initialize sdcard image file # Initialize sdcard image file
dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE} dd if=/dev/zero of=${SDIMG} bs=1 count=0 seek=$(expr 1024 \* ${SDIMG_SIZE})
# Create partition table # Create partition table
parted -s ${SDIMG} mklabel msdos parted -s ${SDIMG} mklabel msdos
# Create boot partition and mark it as bootable # Create boot partition and mark it as bootable
parted -s ${SDIMG} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) parted -s ${SDIMG} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT})
parted -s ${SDIMG} set 1 boot on parted -s ${SDIMG} set 1 boot on
# Create rootfs partition to the end of disk # Create rootfs partition
parted -s ${SDIMG} -- unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) -1s parted -s ${SDIMG} unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT} \+ ${ROOTFS_SIZE})
parted ${SDIMG} print parted ${SDIMG} print
# Create a vfat image with boot files # Create a vfat image with boot files
BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ case "${RPI_GPU_FIRMWARE}" in
case "${KERNEL_IMAGETYPE}" in "arm128" | "arm192" | "arm224" | "arm240")
"uImage") mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/${RPI_GPU_FIRMWARE}_start.elf ::start.elf
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.img ::kernel.img
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
;; ;;
*) *)
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::kernel.img bberror "RPI_GPU_FIRMWARE is undefined or value not recognised. Possible values: arm128, arm192, arm224 or arm240."
exit 1
;; ;;
esac esac
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt ::
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/cmdline.txt ::
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/bootcode.bin ::
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/loader.bin ::
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::kernel.img
if [ -n ${FATPAYLOAD} ] ; then if [ -n ${FATPAYLOAD} ] ; then
echo "Copying payload into VFAT" echo "Copying payload into VFAT"
for entry in ${FATPAYLOAD} ; do for entry in ${FATPAYLOAD} ; do
@@ -122,25 +110,12 @@ IMAGE_CMD_rpi-sdimg () {
# Burn Partitions # Burn Partitions
dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
# If SDIMG_ROOTFS_TYPE is a .xz file use xzcat # If SDIMG_ROOTFS_TYPE is a .xz file use xzcat
if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz" if [[ "$SDIMG_ROOTFS_TYPE" == *.xz ]]
then then
xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
else else
dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
fi fi
# Optionally apply compression
case "${SDIMG_COMPRESSION}" in
"gzip")
gzip -k9 "${SDIMG}"
;;
"bzip2")
bzip2 -k9 "${SDIMG}"
;;
"xz")
xz -k "${SDIMG}"
;;
esac
} }
ROOTFS_POSTPROCESS_COMMAND += " rpi_generate_sysctl_config ; " ROOTFS_POSTPROCESS_COMMAND += " rpi_generate_sysctl_config ; "

View File

@@ -2,13 +2,9 @@
BBPATH .= ":${LAYERDIR}" BBPATH .= ":${LAYERDIR}"
# We have a recipes directory containing .bb and .bbappend files, add to BBFILES # We have a recipes directory containing .bb and .bbappend files, add to BBFILES
BBFILES += "${LAYERDIR}/recipes*/*/*.bb \ BBFILES := "${BBFILES} ${LAYERDIR}/recipes*/*/*.bb \
${LAYERDIR}/recipes*/*/*.bbappend" ${LAYERDIR}/recipes*/*/*.bbappend"
BBFILE_COLLECTIONS += "raspberrypi" BBFILE_COLLECTIONS += "raspberrypi"
BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/" BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
BBFILE_PRIORITY_raspberrypi = "6" BBFILE_PRIORITY_raspberrypi = "6"
# Additional license directories.
LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"

View File

@@ -1,10 +1,7 @@
# RaspberryPi BSP default providers # RaspberryPi BSP default providers
PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi" PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi"
PREFERRED_PROVIDER_u-boot = "u-boot-rpi"
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
PREFERRED_PROVIDER_virtual/egl ?= "userland" PREFERRED_PROVIDER_virtual/egl ?= "vc-graphics-hardfp"
PREFERRED_PROVIDER_virtual/libgles2 ?= "userland" PREFERRED_PROVIDER_virtual/libgles2 ?= "vc-graphics-hardfp"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl" PREFERRED_PROVIDER_virtual/libgl ?= "vc-graphics-hardfp"
PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl"
PREFERRED_PROVIDER_jpeg = "jpeg"

View File

@@ -1,3 +1,3 @@
# RaspberryPi BSP default versions # RaspberryPi BSP default versions
PREFERRED_VERSION_linux-raspberrypi ?= "3.12.%" PREFERRED_VERSION_udev = "164"

View File

@@ -1,18 +1,10 @@
DEFAULTTUNE ?= "armv6" DEFAULTTUNE ?= "arm1176jzfs"
require conf/machine/include/arm/arch-armv6.inc require conf/machine/include/arm/arch-armv6.inc
TUNEVALID[arm1176jzfs] = "Enable arm1176jzfs specific processor optimizations" TUNEVALID[arm1176jzfs] = "Enable arm1176jzfs specific processor optimizations"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "arm1176jzfs", "-mtune=arm1176jzf-s", "", d)}" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "arm1176jzfs", "-mtune=arm1176jzf-s", "", d)}"
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "vfp", "-mfpu=vfp", "", d)}"
AVAILTUNES += "arm1176jzfs" AVAILTUNES += "arm1176jzfs"
TUNE_FEATURES_tune-arm1176jzfs = "${TUNE_FEATURES_tune-armv6} arm1176jzfs" TUNE_FEATURES_tune-arm1176jzfs = "${TUNE_FEATURES_tune-armv6} arm1176jzfs"
ARMPKGARCH_tune-arm1176jzfs = "arm1176jzfs"
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfs = "${PACKAGE_EXTRA_ARCHS_tune-armv6}" PACKAGE_EXTRA_ARCHS_tune-arm1176jzfs = "${PACKAGE_EXTRA_ARCHS_tune-armv6}"
AVAILTUNES += "arm1176jzfshf"
TUNE_FEATURES_tune-arm1176jzfshf = "${TUNE_FEATURES_tune-arm1176jzfs} callconvention-hard"
ARMPKGARCH_tune-arm1176jzfshf = "arm1176jzfs"
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfshf = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf-vfp} arm1176jzfshf-vfp"

View File

@@ -12,7 +12,7 @@ IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
SERIAL_CONSOLE = "115200 ttyAMA0" SERIAL_CONSOLE = "115200 ttyAMA0"
MACHINE_KERNEL_PR = "r5" MACHINE_KERNEL_PR = "r4"
XSERVER = " \ XSERVER = " \
xserver-xorg \ xserver-xorg \
@@ -22,9 +22,9 @@ XSERVER = " \
xf86-video-fbdev \ xf86-video-fbdev \
" "
KERNEL_IMAGETYPE ?= "Image" KERNEL_IMAGETYPE = "Image"
MACHINE_FEATURES = "kernel26 apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio" MACHINE_FEATURES = "kernel26 apm usbgadget usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
#RaspberryPi has no hardware clock #RaspberryPi has no hardware clock
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc" MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
@@ -33,7 +33,5 @@ MACHINE_EXTRA_RRECOMMENDS += " \
kernel-modules \ kernel-modules \
" "
# Set raspberrypi splash image # Set default GPU firmware image to be shipped
SPLASH = "psplash-raspberrypi" RPI_GPU_FIRMWARE ?= "arm192"
IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};kernel.img"

View File

@@ -1,25 +0,0 @@
Copyright (c) 2012, Broadcom Europe Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -5,36 +5,38 @@ SECTION = "base"
HOMEPAGE = "http://www.open.com.au/mikem/bcm2835" HOMEPAGE = "http://www.open.com.au/mikem/bcm2835"
AUTHOR = "Mike McCauley (mikem@open.com.au)" AUTHOR = "Mike McCauley (mikem@open.com.au)"
LICENSE = "GPLv2" LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PR = "r0"
COMPATIBLE_MACHINE = "raspberrypi" COMPATIBLE_MACHINE = "raspberrypi"
SRC_URI = "http://www.open.com.au/mikem/bcm2835/bcm2835-${PV}.tar.gz" SRC_URI = "http://www.open.com.au/mikem/bcm2835/bcm2835-1.8.tar.gz"
SRC_URI[md5sum] = "3299ddaef60f80b7f85de3318f08dee7" SRC_URI[md5sum] = "cca8500049d4ebf9087de4bd1601d185"
SRC_URI[sha256sum] = "b4dfcdb453d44ba9ff55634ce7e0ddca21b96355ab61e40b4c3afb9406d4b8d2" SRC_URI[sha256sum] = "64be77b10aaf48ecb2a9022e13057f3b564093916875c0fc56373b4142dd5cae"
inherit autotools
do_compile_append() {
# Now compiling the examples provided by the package
mkdir -p ${B}/examples
for file in `ls ${S}/examples`; do
${CC} ${S}/examples/${file}/${file}.c -o ${B}/examples/${file} -Bstatic -L${B}/src -lbcm2835 -I${S}/src
done
}
do_install_append() {
install -d ${D}/${libdir}/${BPN}
for file in ${B}/examples/*
do
install -m 0755 ${file} ${D}/${libdir}/${BPN}
done
}
PACKAGES += "${PN}-tests" PACKAGES += "${PN}-tests"
FILES_${PN} = "" FILES_${PN} = ""
FILES_${PN}-tests = "${libdir}/${BPN}" FILES_${PN}-tests = "${libdir}/${BPN}"
FILES_${PN}-dbg += "${libdir}/${BPN}/.debug" FILES_${PN}-dbg += "${libdir}/${BPN}/.debug"
inherit autotools
do_compile_append() {
#Now compiling the examples provided by the package
for file in examples/*
do
${CC} ${file}/${file##*/}.c -o ${file}/${file##*/} -Bstatic -L${S}/src -lbcm2835 -I${S}/src
done
}
do_install_append() {
install -d ${D}/${libdir}/${BPN}
for file in examples/*
do
install -m 0755 ${file}/${file##*/} ${D}/${libdir}/${BPN}
done
}

View File

@@ -3,37 +3,32 @@ LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=e86e693d19572ee64cc8b17fb062faa9" LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=e86e693d19572ee64cc8b17fb062faa9"
inherit deploy
include ../common/firmware.inc include ../common/firmware.inc
RDEPENDS_${PN} = "rpi-config" RDEPENDS_${PN} = "rpi-config"
COMPATIBLE_MACHINE = "raspberrypi" COMPATIBLE_MACHINE = "raspberrypi"
S = "${RPIFW_S}/boot" SRC_URI = " \
git://github.com/raspberrypi/firmware.git;protocol=git;branch=master \
"
PR = "r3" S = "${WORKDIR}/git/boot"
do_deploy() { PR = "r2"
install -d ${DEPLOYDIR}/${PN}
for i in ${S}/*.elf ; do
cp $i ${DEPLOYDIR}/${PN}
done
for i in ${S}/*.dat ; do
cp $i ${DEPLOYDIR}/${PN}
done
for i in ${S}/*.bin ; do
cp $i ${DEPLOYDIR}/${PN}
done
# Add stamp in deploy directory
touch ${DEPLOYDIR}/${PN}/${PN}-${PV}.stamp
}
addtask deploy before do_package after do_install addtask deploy before do_package after do_install
do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
do_deploy() {
install -d ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
for i in *.elf ; do
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
done
for i in *.bin ; do
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
done
# Add stamp in deploy directory
touch ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/${PN}-${PV}.stamp
}
PACKAGE_ARCH = "${MACHINE_ARCH}" PACKAGE_ARCH = "${MACHINE_ARCH}"

View File

@@ -0,0 +1,46 @@
DESCRIPTION = "Commented config.txt file for the Raspberry Pi. \
The Raspberry Pi config.txt file is read by the GPU before \
the ARM core is initialised. It can be used to set various \
system configuration parameters."
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
COMPATIBLE_MACHINE = "raspberrypi"
SRCREV = "afeaed02ba5f01298dec3ac4e1bd98f27bcd876e"
SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
"
S = "${WORKDIR}/git"
PR = "r1"
addtask deploy before do_package after do_install
do_deploy() {
install -d ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
cp config.txt ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/
if [ -n "${KEY_DECODE_MPG2}" ]; then
sed -i '/#decode_MPG2/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
if [ -n "${KEY_DECODE_WVC1}" ]; then
sed -i '/#decode_WVC1/ c\decode_MVC1=${KEY_DECODE_WVC1}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
if [ -n "${DISABLE_OVERSCAN}" ]; then
sed -i '/#disable_overscan/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
if [ -n "${ARM_FREQ}" ]; then
sed -i '/#arm_freq/ c\arm_freq=${ARM_FREQ}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
if [ -n "${CORE_FREQ}" ]; then
sed -i '/#core_freq/ c\core_freq=${CORE_FREQ}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
if [ -n "${SDRAM_FREQ}" ]; then
sed -i '/#sdram_freq/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
if [ -n "${OVER_VOLTAGE}" ]; then
sed -i '/#over_voltage/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
fi
}
PACKAGE_ARCH = "${MACHINE_ARCH}"

View File

@@ -1,74 +0,0 @@
DESCRIPTION = "Commented config.txt file for the Raspberry Pi. \
The Raspberry Pi config.txt file is read by the GPU before \
the ARM core is initialised. It can be used to set various \
system configuration parameters."
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
COMPATIBLE_MACHINE = "raspberrypi"
SRCREV = "5d2ca5f9bcb1b239c051e20c05a233fd79cf09d5"
SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
"
S = "${WORKDIR}/git"
PR = "r4"
inherit deploy
do_deploy() {
install -d ${DEPLOYDIR}/bcm2835-bootfiles
cp ${S}/config.txt ${DEPLOYDIR}/bcm2835-bootfiles/
if [ -n "${KEY_DECODE_MPG2}" ]; then
sed -i '/#decode_MPG2/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${KEY_DECODE_WVC1}" ]; then
sed -i '/#decode_WVC1/ c\decode_MVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${DISABLE_OVERSCAN}" ]; then
sed -i '/#disable_overscan/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${ARM_FREQ}" ]; then
sed -i '/#arm_freq/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${CORE_FREQ}" ]; then
sed -i '/#core_freq/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${SDRAM_FREQ}" ]; then
sed -i '/#sdram_freq/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${OVER_VOLTAGE}" ]; then
sed -i '/#over_voltage/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# GPU memory
if [ -n "${GPU_MEM}" ]; then
sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${GPU_MEM_256}" ]; then
sed -i '/#gpu_mem_256/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${GPU_MEM_512}" ]; then
sed -i '/#gpu_mem_512/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# Video camera support
if [ -n "${VIDEO_CAMERA}" ]; then
echo "# Enable video camera" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "start_x=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# Offline compositing support
if [ -n "${DISPMANX_OFFLINE}" ]; then
echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
}
addtask deploy before do_package after do_install
do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles"
PACKAGE_ARCH = "${MACHINE_ARCH}"

View File

@@ -1,8 +1,6 @@
RPIFW_SRCREV ?= "43c5b2fc9bdb0a43ba67661b8677445e71ae9e82" # 13/09/2012 firmware; this can be overridden from distro config
RPIFW_DATE ?= "20140817" RPIFW_SRCREV ?= "b616053edb93713efa25299cb4ea7efa439dcb61"
RPIFW_SRC_URI ?= "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master" RPIFW_DATE ?= "20120913"
RPIFW_S ?= "${WORKDIR}/git"
SRC_URI = "${RPIFW_SRC_URI}"
SRCREV = "${RPIFW_SRCREV}" SRCREV = "${RPIFW_SRCREV}"
PV = "${RPIFW_DATE}" PV = "${RPIFW_DATE}"

View File

@@ -1,6 +1,8 @@
CONFLICTS = "vc-graphics" CONFLICTS = "vc-graphics"
VCDIR = "hardfp/opt/vc" VCDIR = "hardfp/opt/vc"
require vc-graphics.inc require vc-graphics.inc
PR = "${INCPR}.0" PR = "${INCPR}.0"

View File

@@ -1,6 +1,8 @@
CONFLICTS = "vc-graphics-hardfp" CONFLICTS = "vc-graphics-hardfp"
VCDIR = "opt/vc" VCDIR = "opt/vc"
require vc-graphics.inc require vc-graphics.inc
PR = "${INCPR}.0" PR = "${INCPR}.0"

View File

@@ -3,19 +3,18 @@ LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780" LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780"
PROVIDES = "virtual/libgles2 virtual/egl" PROVIDES = "virtual/libgl virtual/libgles2 virtual/egl"
COMPATIBLE_MACHINE = "raspberrypi" COMPATIBLE_MACHINE = "raspberrypi"
include ../common/firmware.inc include ../common/firmware.inc
SRC_URI += " \ SRC_URI = "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master\
file://egl.pc \ file://egl.pc \
file://vchiq.sh \ file://vchiq.sh"
"
S = "${RPIFW_S}/${VCDIR}" S = "${WORKDIR}/git/${VCDIR}"
INCPR = "r1" INCPR = "r0"
inherit pkgconfig update-rc.d inherit pkgconfig update-rc.d

View File

@@ -1 +1,2 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
PRINC = "1"

View File

@@ -1,25 +0,0 @@
Copyright (c) 2012, Broadcom Europe Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,17 +0,0 @@
When using open, use path relative to imagetool-uncompressed.py
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Index: git/mkimage/imagetool-uncompressed.py
===================================================================
--- a/mkimage/imagetool-uncompressed.py
+++ b/mkimage/imagetool-uncompressed.py
@@ -18,7 +18,7 @@ re_line = re.compile(r"0x(?P<value>[0-9a
mem = [0 for i in range(32768)]
def load_to_mem(name, addr):
- f = open(name)
+ f = open(os.path.dirname(__file__) + '/' + name)
for l in f.readlines():
m = re_line.match(l)

View File

@@ -1,22 +0,0 @@
SUMMARY = "RaspberryPi tool to produce kernel.img"
LICENSE = "Broadcom"
LIC_FILES_CHKSUM = "file://${WORKDIR}/License;md5=957f6640d5e2d2acfce73a36a56cb32f"
SECTION = "bootloader"
DEPENDS = "python"
SRCREV = "330c72c2412f75a32932c4d9b51c9c678bce4180"
SRC_URI = " \
git://github.com/raspberrypi/tools.git;branch=master;protocol=git \
file://License \
file://open-files-relative-to-script.patch \
"
S = "${WORKDIR}/git"
do_install () {
install -d ${D}${libexecdir}
cp ./mkimage/* ${D}${libexecdir}
}
BBCLASSEXTEND = "native"

View File

@@ -1,29 +0,0 @@
DESCRIPTION = "U-Boot port for RaspberryPi"
require recipes-bsp/u-boot/u-boot.inc
DEPENDS += "rpi-mkimage-native"
PROVIDES += "u-boot"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
SRCREV = "6709570cdc947c2a546f96d571551acf4474778c"
SRC_URI = "git://github.com/gonzoua/u-boot-pi.git;branch=rpi"
S = "${WORKDIR}/git"
UBOOT_MACHINE = "rpi_b"
UBOOT_MAKE_TARGET = "u-boot.bin"
UBOOT_SUFFIX = "img"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "raspberrypi"
do_compile_append() {
# Create kernel.img from uboot.bin and name it u-boot.img
${STAGING_DIR_NATIVE}/usr/lib/rpi-mkimage/imagetool-uncompressed.py u-boot.bin
mv kernel.img u-boot.img
}

View File

@@ -0,0 +1,9 @@
# stock fstab for the RaspberryPi - you may want to tweak this to suit.
rootfs / auto defaults,noatime 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
usbfs /proc/bus/usb usbfs defaults 0 0
tmpfs /var/volatile tmpfs defaults 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /media/ram tmpfs defaults 0 0

View File

@@ -0,0 +1,33 @@
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
PATH="/usr/local/bin:/usr/bin:/bin"
EDITOR="/bin/vi" # needed for packages like cron
test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html
# for an explanation of how to set this to your local timezone.
export TZ
fi
if [ "`id -u`" -eq 0 ]; then
PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:
fi
if [ "$PS1" ]; then
# works for bash and ash (no other shells known to be in use here)
PS1='\u@\h:\w\$ '
fi
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
umask 022

View File

@@ -0,0 +1,3 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
# Don't forget to bump PRINC if you update the extra files.
PRINC = "1"

View File

@@ -1,4 +0,0 @@
# Base this image on rpi-basic-image
include rpi-basic-image.bb
IMAGE_INSTALL_append = " packagegroup-rpi-test"

View File

@@ -0,0 +1,2 @@
127.0.0.1 localhost.localdomain localhost raspberrypi rpi

View File

@@ -0,0 +1,15 @@
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# Wireless interfaces
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid any
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
# Bluetooth networking
iface bnep0 inet dhcp

View File

@@ -0,0 +1,3 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
# Don't forget to bump PRINC if you update the extra files.
PRINC = "1"

View File

@@ -1,19 +0,0 @@
DESCRIPTION = "RaspberryPi Test Packagegroup"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
inherit packagegroup
RDEPENDS_${PN} = "\
omxplayer \
bcm2835-tests \
wiringpi \
rpio \
rpi-gpio \
"
RRECOMMENDS_${PN} = "\
bigbuckbunny-1080p \
bigbuckbunny-480p \
bigbuckbunny-720p \
"

View File

@@ -1,2 +1,2 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:" FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SPLASH_IMAGES += "file://psplash-raspberrypi-img.h;outsuffix=raspberrypi" SPLASH_IMAGES = "file://psplash-raspberrypi-img.h;outsuffix=default"

View File

@@ -1,77 +0,0 @@
Add autotools configuration files to simplify cross-compilation
Upstream-Status: Submitted [https://github.com/sarfata/pi-blaster/pull/25]
Signed-off-by: Alex Lennon <ajlennon@dynamicdevices.co.uk>
diff -Nur git.org/Makefile git.new/Makefile
--- git.org/Makefile 2014-06-11 15:42:26.490930706 +0100
+++ git.new/Makefile 1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-.PHONY: all
-all: pi-blaster
-
-REVISION=$(shell egrep -q '000f$$' /proc/cpuinfo && echo 2 || echo 1)
-
-pi-blaster: pi-blaster.c
- gcc -Wall -g -O2 -o $@ $< -DREVISION=$(REVISION)
-
-clean:
- rm -f pi-blaster
-
-install: pi-blaster
- cp -f pi-blaster.boot.sh /etc/init.d/pi-blaster
- chmod +x /etc/init.d/pi-blaster
- cp -f pi-blaster /usr/sbin/pi-blaster
- update-rc.d pi-blaster defaults
- /etc/init.d/pi-blaster start
-
-uninstall:
- -/etc/init.d/pi-blaster stop
- rm /usr/sbin/pi-blaster
- rm /etc/init.d/pi-blaster
- update-rc.d pi-blaster remove
diff -Nur git.org/Makefile.am git.new/Makefile.am
--- git.org/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ git.new/Makefile.am 2014-06-11 15:40:16.562930372 +0100
@@ -0,0 +1,9 @@
+AUTOMAKE_OPTIONS = foreign
+
+CFLAGS = -Wall -pedantic
+
+sbin_PROGRAMS = pi-blaster
+pi_blaster_SOURCES = pi-blaster.c
+
+init_ddir = $(sysconfdir)/init.d
+init_d_SCRIPTS = pi-blaster.boot.sh
diff -Nur git.org/autogen.sh git.new/autogen.sh
--- git.org/autogen.sh 1970-01-01 01:00:00.000000000 +0100
+++ git.new/autogen.sh 2014-06-11 15:35:57.798929684 +0100
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+echo "Generating configure files... may take a while."
+
+autoreconf --install --force && \
+ echo "Preparing was successful if there was no error messages above." && \
+ echo "Now type:" && \
+ echo " ./configure && make" && \
+ echo "Run './configure --help' for more information"
diff -Nur git.org/configure.ac git.new/configure.ac
--- git.org/configure.ac 1970-01-01 01:00:00.000000000 +0100
+++ git.new/configure.ac 2014-06-11 15:35:53.154929717 +0100
@@ -0,0 +1,14 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT(pi-blaster, 0.1.0)
+AC_CONFIG_SRCDIR([pi-blaster.c])
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE
+
+# Checks for programs.
+AC_PROG_CC
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT

View File

@@ -1,77 +0,0 @@
Remove dependencies on LSB functions
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Alex Lennon <ajlennon@dynamicdevices.co.uk>
diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh
--- git.org/pi-blaster.boot.sh 2014-05-20 14:49:44.378582168 +0100
+++ git/pi-blaster.boot.sh 2014-05-20 14:51:08.330582386 +0100
@@ -28,12 +28,12 @@
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
-. /lib/init/vars.sh
+#. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
-. /lib/lsb/init-functions
+#. /lib/lsb/init-functions
#
# Function that starts the daemon/service
@@ -77,48 +77,23 @@
case "$1" in
start)
- [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ [ "$VERBOSE" != no ] && echo "Starting $DESC" "$NAME"
do_start
- case "$?" in
- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
- esac
;;
stop)
- [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ [ "$VERBOSE" != no ] && echo "Stopping $DESC" "$NAME"
do_stop
- case "$?" in
- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
- esac
- ;;
- status)
- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
- log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
+ do_start
;;
*)
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
exit 3
;;
esac

View File

@@ -1,22 +0,0 @@
DESCRIPTION = "This project enables PWM on the GPIO pins you request of a Raspberry Pi."
HOMEPAGE = "https://github.com/sarfata/pi-blaster/"
SECTION = "devel/libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://README.md;beginline=138;endline=151;md5=e0f0f92050a87a160939707c60940307"
SRC_URI = "git://github.com/sarfata/pi-blaster \
file://enable-autotools-support.patch \
file://remove-initscript-lsb-dependency.patch \
"
S = "${WORKDIR}/git"
inherit update-rc.d autotools
INITSCRIPT_PACKAGES = "${PN}"
INITSCRIPT_NAME_${PN} = "${PN}.boot.sh"
INITSCRIPT_PARAMS_${PN} = "defaults 15 85"
COMPATIBLE_MACHINE = "raspberrypi"
PACKAGE_ARCH = "${MACHINE_ARCH}"

View File

@@ -1,3 +0,0 @@
require pi-blaster.inc
SRCREV = "177cef81774d6df5c6284c198ff818515281db14"

View File

@@ -0,0 +1,16 @@
We already have setuptools python module so we will use that and not the
one provided in this package.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Index: RPi.GPIO-0.2.0/setup.py
===================================================================
--- RPi.GPIO-0.2.0.orig/setup.py 2012-05-24 13:17:31.000000000 +0300
+++ RPi.GPIO-0.2.0/setup.py 2012-08-22 00:56:59.049001018 +0300
@@ -1,6 +1,4 @@
#!/usr/bin/env python
-import distribute_setup
-distribute_setup.use_setuptools()
from setuptools import setup, find_packages
import platform

View File

@@ -2,18 +2,20 @@ DESCRIPTION = "A module to control Raspberry Pi GPIO channels"
HOMEPAGE = "http://code.google.com/p/raspberry-gpio-python/" HOMEPAGE = "http://code.google.com/p/raspberry-gpio-python/"
SECTION = "devel/python" SECTION = "devel/python"
LICENSE = "MIT" LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=35af90ff2a10e8bdc967653b9dfcb22a" LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=ee5754ae9d5f8061d6d4ccd9c9fe0061"
SRCNAME = "RPi.GPIO" SRCNAME = "RPi.GPIO"
PR = "r0"
SRC_URI = "\ SRC_URI = "\
http://pypi.python.org/packages/source/R/RPi.GPIO/${SRCNAME}-${PV}.tar.gz \ http://pypi.python.org/packages/source/R/RPi.GPIO/${SRCNAME}-${PV}.tar.gz \
file://don-t-install-setuptools.patch \
" "
S = "${WORKDIR}/${SRCNAME}-${PV}" S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit distutils inherit setuptools
COMPATIBLE_MACHINE = "raspberrypi" COMPATIBLE_MACHINE = "raspberrypi"
SRC_URI[md5sum] = "cbdff15871230ceef29bb407d31da485" SRC_URI[md5sum] = "0fc4bfa6aabc856b0b75252a40ac75cc"
SRC_URI[sha256sum] = "36b64a9485d6a0dc8f24cfca6af45759ee367ce412b952ebcf0409364e05813a" SRC_URI[sha256sum] = "fcfd97dc9687dde76b13b9d12c122e71b13e2ba09a62913d7b8d9ddbb3e8cabf"

View File

@@ -1,20 +0,0 @@
DESCRIPTION = "Advanced GPIO for the Raspberry Pi. Extends RPi.GPIO with PWM, \
GPIO interrups, TCP socket interrupts, command line tools and more"
HOMEPAGE = "https://github.com/metachris/RPIO"
SECTION = "devel/python"
LICENSE = "LGPLv3+"
LIC_FILES_CHKSUM = "file://README.rst;beginline=41;endline=53;md5=d5d95d7486a4d98c999675c23196b25a"
SRCNAME = "RPIO"
SRC_URI = "\
http://pypi.python.org/packages/source/R/RPIO/${SRCNAME}-${PV}.tar.gz \
"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
COMPATIBLE_MACHINE = "raspberrypi"
SRC_URI[md5sum] = "cefc45422833dcafcd59b78dffc540f4"
SRC_URI[sha256sum] = "b89f75dec9de354681209ebfaedfe22b7c178aacd91a604a7bd6d92024e4cf7e"

View File

@@ -1,202 +0,0 @@
diff --git a/examples/Makefile b/examples/Makefile
index defd510..b84f3de 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -26,10 +26,10 @@
#DEBUG = -g -O0
DEBUG = -O3
CC = gcc
-INCLUDE = -I/usr/local/include
+INCLUDE = -I../wiringPi
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
-LDFLAGS = -L/usr/local/lib
+LDFLAGS = -L../wiringPi
LDLIBS = -lwiringPi -lpthread -lm
# Should not alter anything below this line
diff --git a/gpio/Makefile b/gpio/Makefile
index a043962..b1539d9 100644
--- a/gpio/Makefile
+++ b/gpio/Makefile
@@ -23,13 +23,16 @@
#################################################################################
+DESTDIR?=/usr
+PREFIX?=/local
+
#DEBUG = -g -O0
-DEBUG = -O2
-CC = gcc
-INCLUDE = -I/usr/local/include
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
+DEBUG ?= -O2
+CC ?= gcc
+INCLUDE ?= -I../wiringPi
+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
-LDFLAGS = -L/usr/local/lib
+LDFLAGS ?= -L../wiringPi
LIBS = -lwiringPi -lpthread -lm
# May not need to alter anything below this line
@@ -61,17 +64,16 @@ tags: $(SRC)
.PHONEY: install
install:
@echo "[Install]"
- @cp gpio /usr/local/bin
- @chown root.root /usr/local/bin/gpio
- @chmod 4755 /usr/local/bin/gpio
- @mkdir -p /usr/local/man/man1
- @cp gpio.1 /usr/local/man/man1
+ @install -d $(DESTDIR)$(PREFIX)/bin
+ @install -m 4755 -o root -g root gpio $(DESTDIR)$(PREFIX)/bin
+ @install -d $(DESTDIR)$(PREFIX)/share/man/man1
+ @install -m 644 -o root -g root gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1
.PHONEY: uninstall
uninstall:
@echo "[UnInstall]"
- @rm -f /usr/local/bin/gpio
- @rm -f /usr/local/man/man1/gpio.1
+ @rm -f $(DESTDIR)$(PREFIX)/bin/gpio
+ @rm -f $(DESTDIR)$(PREFIX)/share/man/man1/gpio.1
.PHONEY: depend
depend:
diff --git a/wiringPi/Makefile b/wiringPi/Makefile
index c6a4555..2c7ae82 100644
--- a/wiringPi/Makefile
+++ b/wiringPi/Makefile
@@ -25,17 +25,20 @@ DYN_VERS_MAJ=1
DYN_VERS_MIN=0
VERSION=$(DYN_VERS_MAJ).$(DYN_VERS_MIN)
-DESTDIR=/usr
-PREFIX=/local
+DESTDIR?=/usr
+PREFIX?=/local
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
-STATIC=libwiringPi.a
-DYNAMIC=libwiringPi.so.$(VERSION)
+BASE_NAME=libwiringPi
+STATIC=$(BASE_NAME).a
+DYNAMIC=$(BASE_NAME).so.$(VERSION)
#DEBUG = -g -O0
-DEBUG = -O2
-CC = gcc
-INCLUDE = -I.
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -fPIC
+DEBUG ?= -O2
+CC ?= gcc
+INCLUDE ?= -I.
+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -fPIC
LIBS =
@@ -67,19 +70,19 @@ $(STATIC): $(OBJ)
$(DYNAMIC): $(OBJ)
@echo "[Link (Dynamic)]"
- @$(CC) -shared -Wl,-soname,libwiringPi.so.1 -o libwiringPi.so.1.0 -lpthread $(OBJ)
+ @$(CC) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ)
i2c: $(OBJ) $(OBJ_I2C)
@echo "[Link (Dynamic + I2C)]"
- @$(CC) -shared -Wl,-soname,libwiringPi.so.1 -o libwiringPi.so.1.0 -lpthread $(OBJ) $(OBJ_I2C)
+ @$(CC) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ) $(OBJ_I2C)
.c.o:
@echo [Compile] $<
- @$(CC) -c $(CFLAGS) $< -o $@
+ @$(CC) -c $(CFLAGS) -fPIC $< -o $@
.PHONEY: clean
clean:
- rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.*
+ rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a
.PHONEY: tags
tags: $(SRC)
@@ -89,45 +92,46 @@ tags: $(SRC)
.PHONEY: install
install: $(DYNAMIC)
@echo "[Install]"
- @install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
- @install -m 0755 -d $(DESTDIR)$(PREFIX)/include
- @install -m 0644 wiringPi.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 wiringSerial.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 wiringShift.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 gertboard.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 piNes.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 softPwm.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 softServo.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 softTone.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 lcd.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 wiringPiSPI.h $(DESTDIR)$(PREFIX)/include
- @install -m 0644 wiringPiI2C.h $(DESTDIR)$(PREFIX)/include
- @install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib
- @ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so
- @ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so.1
- @ldconfig
+ @install -m 0755 -d $(LIB_DIR)
+ @install -m 0755 -d $(INCLUDE_DIR)
+ @install -m 0644 wiringPi.h $(INCLUDE_DIR)
+ @install -m 0644 wiringSerial.h $(INCLUDE_DIR)
+ @install -m 0644 wiringShift.h $(INCLUDE_DIR)
+ @install -m 0644 gertboard.h $(INCLUDE_DIR)
+ @install -m 0644 piNes.h $(INCLUDE_DIR)
+ @install -m 0644 softPwm.h $(INCLUDE_DIR)
+ @install -m 0644 softServo.h $(INCLUDE_DIR)
+ @install -m 0644 softTone.h $(INCLUDE_DIR)
+ @install -m 0644 lcd.h $(INCLUDE_DIR)
+ @install -m 0644 wiringPiSPI.h $(INCLUDE_DIR)
+ @install -m 0644 wiringPiI2C.h $(INCLUDE_DIR)
+ @install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC)
+ @ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so
+ @ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
.PHONEY: install-static
install-static: $(STATIC)
@echo "[Install Static]"
- @install -m 0755 libwiringPi.a $(DESTDIR)$(PREFIX)/lib
+ @install -m 0644 $(STATIC) $(LIB_DIR)
.PHONEY: uninstall
uninstall:
@echo "[UnInstall]"
- @rm -f $(DESTDIR)$(PREFIX)/include/wiringPi.h
- @rm -f $(DESTDIR)$(PREFIX)/include/wiringSerial.h
- @rm -f $(DESTDIR)$(PREFIX)/include/wiringShift.h
- @rm -f $(DESTDIR)$(PREFIX)/include/gertboard.h
- @rm -f $(DESTDIR)$(PREFIX)/include/piNes.h
- @rm -f $(DESTDIR)$(PREFIX)/include/softPwm.h
- @rm -f $(DESTDIR)$(PREFIX)/include/softServo.h
- @rm -f $(DESTDIR)$(PREFIX)/include/softTone.h
- @rm -f $(DESTDIR)$(PREFIX)/include/lcd.h
- @rm -f $(DESTDIR)$(PREFIX)/include/wiringPiSPI.h
- @rm -f $(DESTDIR)$(PREFIX)/include/wiringPiI2C.h
- @rm -f $(DESTDIR)$(PREFIX)/lib/libwiringPi.*
- @ldconfig
+ @rm -f $(INCLUDE_DIR)/wiringPi.h
+ @rm -f $(INCLUDE_DIR)/wiringSerial.h
+ @rm -f $(INCLUDE_DIR)/wiringShift.h
+ @rm -f $(INCLUDE_DIR)/gertboard.h
+ @rm -f $(INCLUDE_DIR)/piNes.h
+ @rm -f $(INCLUDE_DIR)/softPwm.h
+ @rm -f $(INCLUDE_DIR)/softServo.h
+ @rm -f $(INCLUDE_DIR)/softTone.h
+ @rm -f $(INCLUDE_DIR)/lcd.h
+ @rm -f $(INCLUDE_DIR)/wiringPiSPI.h
+ @rm -f $(INCLUDE_DIR)/wiringPiI2C.h
+ @rm -f $(LIB_DIR)/$(STATIC)
+ @rm -f $(LIB_DIR)/$(DYNAMIC)
+ @rm -f $(LIB_DIR)/$(BASE_NAME).so
+ @rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
.PHONEY: depend

View File

@@ -1,31 +0,0 @@
DESCRIPTION = "A library to control Raspberry Pi GPIO channels"
HOMEPAGE = "https://projects.drogon.net/raspberry-pi/wiringpi/"
SECTION = "devel/libs"
LICENSE = "LGPLv3+"
LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
SRCREV = "98bcb20d9391ebde24f9eb1244f0d238fb1a1dab"
S = "${WORKDIR}/git"
SRC_URI = "\
git://git.drogon.net/wiringPi \
file://Makefiles-install.patch \
"
COMPATIBLE_MACHINE = "raspberrypi"
CFLAGS_prepend = "-I${S}/wiringPi"
EXTRA_OEMAKE += "'INCLUDE_DIR=${D}${includedir}' 'LIB_DIR=${D}${libdir}'"
EXTRA_OEMAKE += "'DESTDIR=${D}/usr' 'PREFIX=""'"
do_compile() {
oe_runmake -C wiringPi
oe_runmake -C gpio 'LDFLAGS=${LDFLAGS} -L${S}/wiringPi'
}
do_install() {
oe_runmake -C wiringPi install
oe_runmake -C gpio install
}

View File

@@ -0,0 +1,37 @@
DESCRIPTION = "Scripts to support a first run wizard on the Raspberry Pi."
LICENSE = "GPLV2"
LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS = "zenity dbus"
RDEPENDS = "slim sudo zenity dbus"
COMPATIBLE_MACHINE = "raspberrypi"
PR = "r1"
SRC_URI = " \
file://LICENSE \
file://first-run-wizard.sh \
file://rpi_startup.sh \
file://rc.firstrun \
"
inherit update-rc.d
INITSCRIPT_NAME = "rpi-run-init"
INITSCRIPT_PARAMS = "start 29 2 3 4 5 . stop 29 2 3 4 5 ."
do_install() {
install -d ${D}${prefix}/rpi/scripts/
install -m 0755 ${WORKDIR}/first-run-wizard.sh ${D}${prefix}/rpi/scripts/
install -m 0755 ${WORKDIR}/rpi_startup.sh ${D}${prefix}/rpi/scripts/
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/rc.firstrun ${D}${sysconfdir}/init.d/rpi-run-init
install -d ${D}${sysconfdir}/rpi/
}
PACKAGE_ARCH = "${MACHINE_ARCH}"
FILES_${PN} += "${prefix} ${sysconfdir}"

View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@@ -0,0 +1,213 @@
#!/bin/sh
# Initially based on the scripts by JohnX/Mer Project - http://wiki.maemo.org/Mer/
# Reworked for the OpenPandora - John Willis/Michael Mrozek
# Quickly 'hacked' for the Raspberry Pi to provide a simple 1st boot wizard.
# You can start the wizard from the shell using 'xinit ./first-boot-init.sh'
export LANG=en_GB.UTF-8
export GTK2_RC_FILES=/usr/share/themes/Xfce/gtk-2.0/gtkrc
# Ensure there is a wheel group for sudoers to be put into.
# TODO: Do this somewhere better.
groupadd wheel
# Default error message (should a user hit cancel, validation fail etc.).
ERROR_WINDOW='zenity --title="Error" --error --text="Sorry! Please try again." --timeout 6'
RESET_ROOT="yes"
DISPLAY=:0 xset s off
# Greet the user.
if zenity --question --title="Pandoras Box has been opened." --text="Welcome!\n\nPandora's Box has been opened.\n\nThis wizard will help you setting up your new OpenPandora handheld before the first use.\n\nYou will be asked a few simple questions to personalise and configure your device.\n\nDo you want to set up your unit now or shut the unit down and do it later?" --ok-label="Start now" --cancel-label="Shutdown" ; then
# ----
# Reset ROOT's password to something random
# (I know the image build sets the password to something pusdo-random)
# (ok, urandom is not 100% secure but it's good enough for our needs)
if [ $RESET_ROOT == "yes" ]; then
rootpwd=$(cat /dev/urandom|tr -dc "a-zA-Z0-9-_\$\?"|fold -w 30|head -n 1)
passwd "root" <<EOF
$rootpwd
$rootpwd
EOF
rootpwd=""
fi
# ----
# Setup swap partition if the user has placed an SD with a swap partition on it.
swap_part=$(sfdisk -l /dev/mmcblk? | grep swap | cut -d" " -f1)
if [ x$swap_part != x ] ; then
use_swap=$(zenity --title="Enable swap?" --text "Swap partition found on SD card. Would you like to use it?\n\nWarning: This SD must remain in the system to use the swap." --list --radiolist --column " " --column "Answer" TRUE "Use swap on $swap_part" FALSE "Do not use swap")
if [ "$use_swap" = "Use swap on $swap_part" ] ; then
swapon $swap_part
echo "$swap_part none swap sw 0 0" >> /etc/fstab
fi
fi
# ----
# Setup the full name and username.
while ! name=$(zenity --title="Please enter your full name" --entry --text "Please enter your full name.") || [ "x$name" = "x" ] ; do
zenity --title="Error" --error --text="Please try again." --timeout 6
done
username_guess=$(echo "$name" | cut -d" " -f1 | tr A-Z a-z)
while ! username=$(zenity --title="Enter your username" --entry --text "Please choose a short username.\n\nIt should be all lowercase and contain only letters and numbers." --entry-text "$username_guess") || [ "x$username" = "x" ] ; do
zenity --title="Error" --error --text="Please try again." --timeout 6
done
while ! useradd -c "$name,,," -G adm,audio,video,netdev,wheel,plugdev,users "$username" ; do
username=$(zenity --title="Please check username" --entry --text "Please ensure that your username consists of only\nletters and numbers and is not already in use on the system." --entry-text "$username")
done
# ----
# Setup the users password.
password=""
while [ x$password = x ] ; do
password1=$(zenity --title=Password --entry --text="Please choose a new password." --hide-text)
password2=$(zenity --title=Confirm --entry --text="Confirm your new password." --hide-text)
if [ $password1 != $password2 ] ; then
zenity --title="Error" --error --text="The passwords do not match.\n\nPlease try again." --timeout 6
else
if [ x$password1 = x ] ; then
zenity --title="Error" --error --text="Password cannot be blank!\n\nPlease try again." --timeout 6
else
password=$password1
fi
fi
done
passwd "$username" <<EOF
$password
$password
EOF
# ----
# Pick a name for the OpenPandora.
while ! hostname=$(zenity --title="Name your Pandora" --entry --text "Please choose a name for your OpenPandora.\n\nIt should only contain letters, numbers and dashes, no spaces." --entry-text "$username-openpandora") || [ "x$hostname" = "x" ]; do
zenity --title="Error" --error --text="Please try again."
done
echo $hostname > /etc/hostname
hostname =$(sed 's/ /_/g' /etc/hostname)
echo $hostname > /etc/hostname
echo "127.0.0.1 localhost.localdomain localhost $hostname" > /etc/hosts
hostname -F /etc/hostname
# Set the correct user for Autologin and enable / disable it.
if zenity --question --title="Autologin" --text="Do you wish to automatically login at startup?\n\nSecurity warning: This skips the password check on startup" --ok-label="Yes" --cancel-label="No"; then
# echo "PREFERED_USER=$username" > /etc/default/autologin
sed -i "s/.*default_user.*/default_user $username/g" /etc/slim.conf
sed -i 's/.*auto_login.*/auto_login yes/g' /etc/slim.conf
else
if zenity --question --title="User" --text="Do you wish to have your username automatically populated in the login screen?\n\nNote: This is ideal if you're the only user of the OpenPandora but wish to disable autologin and use a password." --ok-label="Yes" --cancel-label="No"; then
sed -i "s/.*default_user.*/default_user $username/g" /etc/slim.conf
sed -i 's/.*auto_login.*/auto_login no/g' /etc/slim.conf
else
sed -i "s/.*default_user.*/default_user/g" /etc/slim.conf
sed -i 's/.*auto_login.*/auto_login no/g' /etc/slim.conf
fi
fi
# ----
# Select the default interface and setup SLiM to pass that as a sesion to ~./.xinitrc
selection=""
while [ x$selection = x ]; do
selection=$(cat /etc/pandora/conf/gui.conf | awk -F\; '{print $1 "\n" $2 }' | zenity --width=500 --height=300 --title="Select the Default GUI" --list --column "Name" --column "Description" --text "Please select the Default GUI" )
if [ x$selection = x ]; then
zenity --title="Error" --error --text="Please select a GUI." --timeout=6
fi
done
echo $selection
gui=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $3}')
stopcommand=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $4}')
echo $gui
if [ $gui ]; then
sed -i "s/.*DEFAULT_SESSION=.*/DEFAULT_SESSION=$gui/g" /home/$username/.xinitrc
echo $selection selected as default interface
zenity --info --title="Selected session" --text "You selected $selection as default setting. You can always change your default GUI later." --timeout 6
else
sed -i 's/.*DEFAULT_SESSION=.*/DEFAULT_SESSION=startxfce4/g' /home/$username/.xinitrc
fi
# ----
# Set the timezone and date/time
while ! area=$(zenity --list --title "Select your time zone" --text="Please select your area" --column="Select your area" --print-column=1 "Africa" "America" "Asia" "Australia" "Europe" "Pacific" --width=500 --height=260) || [ "x$area" = "x" ] ; do
zenity --title="Error" --error --text="Please select your area." --timeout=6
done
while ! timezone=$(ls -1 /usr/share/zoneinfo/$area | zenity ---width=500 --height=200 --title="Select your closest location" --list --column "Closest Location" --text "Please select the location closest to you") || [ "x$timezone" = "x" ] ; do
zenity --title="Error" --error --text="Please select your location." --timeout=6
done
echo $timezone
rm /etc/localtime && ln -s /usr/share/zoneinfo/$area/$timezone /etc/localtime
# Make sure we clean up any leading zeros in the day (as Zenity freaks out)
date_d=`date +%d | sed 's/^0//'`
date_m=`date +%m | sed 's/^0//'`
date_y=`date +%Y`
while ! date=$(zenity --calendar --text="Please select the current date" --title "Please select the current date" --day=$date_d --month=$date_m --year=$date_y --date-format="%Y%m%d" --width=500) || [ "x$date" = "x" ] ; do
zenity --title="Error" --error --text="Please select the date." --timeout 6
done
echo $date
time_h=`date +%H`
time_m=`date +%M`
while ! time=$(zenity --title="Enter actual time" --entry --text "Please enter the time in 24hour format (HH:MM):" --entry-text "$time_h:$time_m") || [ "x$time" = "x" ] ; do
zenity --title="Error" --error --text="Please input the time." --timeout 6
done
while ! date -d $time ; do
time=$(zenity --title="Enter actual time" --entry --text "Please enter the time in 24hour format (HH:MM):" --entry-text "$time_h:$time_m")
done
date +%Y%m%d -s $date
date +%H:%M -s $time
# ----
# Finsh up and boot the system.
zenity --info --title="Finished" --text "This concludes the First Boot Wizard.\n\nYour chosen interface will start in a few seconds\n\nThankyou for buying the OpenPandora. Enjoy using the device!" --timeout 6
# ----
# Write the control file so this script is not run on next boot
# (hackish I know but I want the flexability to drop a new script in later esp. in the early firmwares).
touch /etc/rpi/first-boot
# Make the control file writeable by all to allow the user to delete to rerun the wizard on next boot.
chmod 0666 /etc/rpi/first-boot
# ----
else
poweroff
fi

View File

@@ -0,0 +1,73 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: rpiruninit
# Required-Start: #adjust
# Required-Stop: #adjust
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
DESC="Raspberry Pi Startup Script Deamon"
NAME="rpiruninit"
PID=`pidof -o %PPID -x rpi_startup.sh`
OPRUNINIT='/usr/rpi/scripts/rpi_startup.sh'
d_stop() {
if [ $PID ]
then
kill $PID
else
echo "$DESC: $NAME not running."
fi
}
d_start() {
if [ $PID ]
then
echo "$DESC: $NAME already running."
else
$OPRUNINIT
fi
}
d_reload() {
if [ $PID ]
then
kill -HUP $PID
else
echo "$DESC: $NAME not running."
fi
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
reload)
echo -n "Reloading $DESC: $NAME"
d_reload
echo "."
;;
restart|force-reload)
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,6 @@
#!/bin/sh
OP_CHECKFILE='/etc/rpi/first-boot'
OP_FIRSTRUN='xinit /usr/rpi/scripts/first-run-wizard.sh'
[ -f $OP_CHECKFILE ] && echo -e "\nOP_STARTUP: $OP_CHECKFILE exists, not first boot." || $OP_FIRSTRUN

View File

@@ -1,41 +0,0 @@
DESCRIPTION = "This repository contains the source code for the ARM side \
libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib \
and includes source for the ARM side code to interface to: EGL, mmal, GLESv2,\
vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG."
LICENSE = "Broadcom"
LIC_FILES_CHKSUM = "file://LICENCE;md5=957f6640d5e2d2acfce73a36a56cb32f"
PR = "r4"
PROVIDES = "virtual/libgles2 \
virtual/egl"
COMPATIBLE_MACHINE = "raspberrypi"
SRCBRANCH = "master"
SRCFORK = "raspberrypi"
SRCREV = "85441185e653347e6b3c2bbc7494f5e29a6ca4a2"
SRC_URI = "git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \
"
S = "${WORKDIR}/git"
inherit cmake
EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed'"
# The compiled binaries don't provide sonames.
SOLIBS = "${SOLIBSDEV}"
do_install_append() {
mkdir -p ${D}/${prefix}
mv ${D}/opt/vc/* ${D}/${prefix}
rm -rf ${D}/opt
}
FILES_${PN} += "${libdir}/*${SOLIBS}"
FILES_${PN}-dev = "${includedir} \
${prefix}/src"
FILES_${PN}-doc += "${datadir}/install"
PACKAGE_ARCH = "${MACHINE_ARCH}"

View File

@@ -1,6 +1,12 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append_raspberrypi = " file://xorg.conf.d/10-evdev.conf " # Don't forget to bump PRINC if you update the extra files.
PRINC := "${@int(PRINC) + 5}"
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
FILESPATH =. "${@base_set_filespath(["${THISDIR}/${PN}"], d)}:"
SRC_URI_append_raspberrypi = " file://xorg.conf.d/* "
do_install_append_raspberrypi () { do_install_append_raspberrypi () {
install -d ${D}/${sysconfdir}/X11/xorg.conf.d/ install -d ${D}/${sysconfdir}/X11/xorg.conf.d/

View File

@@ -1,36 +0,0 @@
require linux.inc
DESCRIPTION = "Linux Kernel for Raspberry Pi"
SECTION = "kernel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
SRC_URI += " \
file://defconfig \
"
COMPATIBLE_MACHINE = "raspberrypi"
PV_append = "+git${SRCREV}"
# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
KERNEL_DEFCONFIG = "bcmrpi_defconfig"
# CMDLINE for raspberrypi
CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
UDEV_GE_141 ?= "1"
do_kernel_configme_prepend() {
install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
}
do_install_prepend() {
install -d ${D}/lib/firmware
}
do_deploy_append() {
# Deploy cmdline.txt
install -d ${DEPLOYDIR}/bcm2835-bootfiles
echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
}

View File

@@ -1 +0,0 @@
# Dummy file to get through do_kernel_configme.

View File

@@ -1,32 +0,0 @@
Fix i2c timing errors.
When Transmitting: Make SDA valid quarter of a cycle after the falling edge of SCL.
When Receiving: Sample SDA Quarter of a cycle after the rising edge of SCL.
Upstream-Status: Pending
RP 2013/04/21
Index: git/drivers/i2c/busses/i2c-bcm2708.c
===================================================================
--- git.orig/drivers/i2c/busses/i2c-bcm2708.c 2013-01-06 17:15:00.754954587 +0000
+++ git/drivers/i2c/busses/i2c-bcm2708.c 2013-01-06 17:50:09.794905741 +0000
@@ -150,6 +150,7 @@
unsigned long bus_hz;
u32 cdiv;
u32 c = BSC_C_I2CEN | BSC_C_INTD | BSC_C_ST | BSC_C_CLEAR_1;
+ u32 cdel;
bus_hz = clk_get_rate(bi->clk);
cdiv = bus_hz / baudrate;
@@ -163,6 +164,10 @@
bcm2708_wr(bi, BSC_A, bi->msg->addr);
bcm2708_wr(bi, BSC_DLEN, bi->msg->len);
bcm2708_wr(bi, BSC_C, c);
+
+ cdel = (cdiv / 4) & 0xffff;
+ cdel = cdel << 16 | cdel;
+ bcm2708_wr(bi, BSC_DEL, cdel);
}
static irqreturn_t bcm2708_i2c_interrupt(int irq, void *dev_id)

View File

@@ -1,6 +0,0 @@
SRCREV = "1b49b450222df26e4abf7abb6d9302f72b2ed386"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.10.y \
file://sl030raspberrypii2ckernel.patch \
"
require linux-raspberrypi.inc

View File

@@ -1,6 +0,0 @@
SRCREV = "f03cd5e1012d3fe8314a944879308cf0f3d9e29b"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.12.y \
file://sl030raspberrypii2ckernel.patch \
"
require linux-raspberrypi.inc

View File

@@ -1,6 +0,0 @@
SRCREV = "377c82aa1d31b37f1096096b0e4c65beb0bc5c49"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.16.y \
file://sl030raspberrypii2ckernel.patch \
"
require linux-raspberrypi.inc

View File

@@ -1,6 +1,44 @@
SRCREV = "ada8b4415ff44d535d63e4291a0eca733bc2ad0f" COMPATIBLE_MACHINE = "raspberrypi"
require linux.inc
DESCRIPTION = "Linux kernel for the RaspberryPi board"
PR = "r4"
# Bump MACHINE_KERNEL_PR in the machine config if you update the kernel.
# This is on the rpi-3.2.27 branch
SRCREV = "e33263e7eab2d05349b438f6a4a8d1924686a824"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.2.27 \ SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.2.27 \
file://sl030raspberrypii2ckernel.patch \
" "
require linux-raspberrypi.inc LINUX_VERSION ?= "3.2.27-rpi"
PV = "${LINUX_VERSION}+git${SRCREV}"
S = "${WORKDIR}/git"
# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
KERNEL_DEFCONFIG = "bcmrpi_defconfig"
# CMDLINE for raspberrypi
CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
PARALLEL_MAKEINST = ""
UDEV_GE_141 ?= "1"
do_configure_prepend() {
install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
}
do_install_prepend() {
install -d ${D}/lib/firmware
}
do_deploy_append() {
# Deploy cmdline.txt
install -d ${DEPLOYDIR}/bcm2835-bootfiles
echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
}

View File

@@ -1,6 +0,0 @@
SRCREV = "2a8d45ec0883e3cbdce920855b3461ac77308a5f"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.6.y \
file://sl030raspberrypii2ckernel.patch \
"
require linux-raspberrypi.inc

View File

@@ -1,6 +0,0 @@
SRCREV = "d996a1b91b2bf3dc06f4f4f822a56f4496457aa1"
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.8.y \
file://sl030raspberrypii2ckernel.patch \
"
require linux-raspberrypi.inc

View File

@@ -5,113 +5,266 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
inherit kernel siteinfo inherit kernel siteinfo
require recipes-kernel/linux/linux-yocto.inc
RPSRC = "http://www.rpsys.net/openzaurus/patches/archive"
# Enable OABI compat for people stuck with obsolete userspace # Enable OABI compat for people stuck with obsolete userspace
ARM_KEEP_OABI ?= "1" ARM_KEEP_OABI ?= "1"
# Quirk for udev greater or equal 141 # Quirk for udev greater or equal 141
UDEV_GE_141 ?= "1" UDEV_GE_141 ?= "0"
# Specify the commandline for your device
# Boot from mmc
CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=/dev/mmcblk0p1 rootfstype=ext2 rootdelay=5"
# Boot from nfs
#CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=301 root=/dev/nfs nfsroot=172.20.3.1:/data/at91 ip=172.20.0.5:::255.255.0.0"
# Set the verbosity of kernel messages during runtime # Set the verbosity of kernel messages during runtime
# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour # You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour
CMDLINE_DEBUG ?= '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug", d)}' CMDLINE_DEBUG ?= '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug", d)}'
CMDLINE_append = " ${CMDLINE_DEBUG}" CMDLINE_append = " ${CMDLINE_DEBUG} "
# Set a variable in .configure # Kernel bootlogo is distro-specific (default is OE logo).
# $1 - Configure variable to be set # Logo resolution (qvga, vga, ...) is machine-specific.
# $2 - value [n/y/value] LOGO_SIZE ?= "."
kernel_configure_variable() {
# Remove the config # Support for binary device tree generation
CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
if test "$2" = "n" FILES_kernel-devicetree = "/boot/devicetree*"
then
echo "# CONFIG_$1 is not set" >> ${B}/.config KERNEL_DEVICETREE_boc01 = "${WORKDIR}/boc01.dts"
else KERNEL_DEVICETREE_calamari = "arch/${ARCH}/boot/dts/mpc8536ds.dts"
echo "CONFIG_$1=$2" >> ${B}/.config KERNEL_DEVICETREE_canyonlands = "arch/${ARCH}/boot/dts/canyonlands.dts"
fi KERNEL_DEVICETREE_kilauea = "arch/${ARCH}/boot/dts/kilauea.dts"
KERNEL_DEVICETREE_lite5200 = "arch/${ARCH}/boot/dts/lite5200.dts"
KERNEL_DEVICETREE_lsppchd = "arch/${ARCH}/boot/dts/kuroboxHD.dts"
KERNEL_DEVICETREE_lsppchg = "arch/${ARCH}/boot/dts/kuroboxHG.dts"
KERNEL_DEVICETREE_mpc8313e-rdb = "arch/${ARCH}/boot/dts/mpc8313erdb.dts"
KERNEL_DEVICETREE_mpc8315e-rdb = "arch/${ARCH}/boot/dts/mpc8315erdb.dts"
KERNEL_DEVICETREE_mpc8323e-rdb = "arch/${ARCH}/boot/dts/mpc832x_rdb.dts"
KERNEL_DEVICETREE_mpc8544ds = "arch/${ARCH}/boot/dts/mpc8544ds.dts"
KERNEL_DEVICETREE_mpc8641-hpcn = "arch/${ARCH}/boot/dts/mpc8641_hpcn.dts"
KERNEL_DEVICETREE_p1020rdb = "arch/${ARCH}/boot/dts/p1020rdb.dts"
KERNEL_DEVICETREE_p2020ds = "arch/${ARCH}/boot/dts/p2020ds.dts"
KERNEL_DEVICETREE_sequoia = "arch/${ARCH}/boot/dts/sequoia.dts"
KERNEL_DEVICETREE_tqm8540 = "arch/${ARCH}/boot/dts/tqm8540.dts"
KERNEL_DEVICETREE_xilinx-ml507 = "arch/${ARCH}/boot/dts/virtex440-ml507.dts"
KERNEL_DEVICETREE_FLAGS = "-R 8 -S 0x3000"
CORTEXA8FIXUP ?= "yes"
python __anonymous () {
import bb
devicetree = bb.data.getVar('KERNEL_DEVICETREE', d, 1) or ''
if devicetree:
depends = bb.data.getVar("DEPENDS", d, 1)
bb.data.setVar("DEPENDS", "%s dtc-native" % depends, d)
packages = bb.data.getVar("PACKAGES", d, 1)
bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d)
} }
do_configure_prepend() { do_configure_prepend() {
# Clean .config
echo "" > ${B}/.config
CONF_SED_SCRIPT=""
# Rename getline in ./scripts/unifdef.c
# Kernels up to 2.6.29 are currently failing to build unifdef.c,
# clashing with exposed getline() from <stdio.h>
# see https://patchwork.kernel.org/patch/11166/
# committed in 2.6.29 (commit d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7)
sed -i -e 's/getline/parseline/g' ${S}/scripts/unifdef.c
echo "" > ${S}/.config
#
# logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it's going to be used
#
if [ -e ${WORKDIR}/${LOGO_SIZE}/logo_linux_clut224.ppm ]; then
install -m 0644 ${WORKDIR}/${LOGO_SIZE}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
echo "CONFIG_LOGO=y" >> ${S}/.config
echo "CONFIG_LOGO_LINUX_CLUT224=y" >> ${S}/.config
fi
#
# oabi / eabi support # oabi / eabi support
#
if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
kernel_configure_variable AEABI y echo "CONFIG_AEABI=y" >> ${S}/.config
if [ "${ARM_KEEP_OABI}" = "1" ] ; then if [ "${ARM_KEEP_OABI}" = "1" ] ; then
kernel_configure_variable OABI_COMPAT y echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config
else else
kernel_configure_variable OABI_COMPAT n echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
fi fi
else else
kernel_configure_variable AEABI n echo "# CONFIG_AEABI is not set" >> ${S}/.config
kernel_configure_variable OABI_COMPAT n echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
fi fi
# Set cmdline # When enabling thumb for userspace we also need thumb support in the kernel
kernel_configure_variable CMDLINE "\"${CMDLINE}\"" if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then
sed -i -e /CONFIG_ARM_THUMB/d ${WORKDIR}/defconfig
echo "CONFIG_ARM_THUMB=y" >> ${S}/.config
fi
# Localversion # Enable thumb2 fixup for specific issue in angstrom toolchains when used on A8 r1p[012] silicon
kernel_configure_variable LOCALVERSION "\"\"" if [ "${CORTEXA8FIXUP}" = "yes" ] ; then
kernel_configure_variable LOCALVERSION_AUTO n sed -i -e /CONFIG_ARM_ERRATA_430973/d ${WORKDIR}/defconfig
echo "CONFIG_ARM_ERRATA_430973=y" >> ${S}/.config
fi
#
# endian support
#
if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then
echo "CONFIG_CPU_BIG_ENDIAN=y" >> ${S}/.config
fi
echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
sed -e '/CONFIG_AEABI/d' \
-e '/CONFIG_OABI_COMPAT=/d' \
-e '/CONFIG_CMDLINE=/d' \
-e '/CONFIG_CPU_BIG_ENDIAN/d' \
-e '/CONFIG_LOGO=/d' \
-e '/CONFIG_LOGO_LINUX_CLUT224=/d' \
-e '/CONFIG_LOCALVERSION/d' \
-e '/CONFIG_LOCALVERSION_AUTO/d' \
< '${WORKDIR}/defconfig' >>'${S}/.config'
echo 'CONFIG_LOCALVERSION=""' >>${S}/.config
echo '# CONFIG_LOCALVERSION_AUTO is not set' >>${S}/.config
#
# Udev quirks # Udev quirks
#
# Newer versions of udev mandate that sysfs doesn't have deprecated entries # Newer versions of udev mandate that sysfs doesn't have deprecated entries
if [ "${UDEV_GE_141}" = "1" ] ; then if [ "${UDEV_GE_141}" = "1" ] ; then
kernel_configure_variable SYSFS_DEPRECATED n sed -e /CONFIG_SYSFS_DEPRECATED/d \
kernel_configure_variable SYSFS_DEPRECATED_V2 n -e /CONFIG_SYSFS_DEPRECATED_V2/d \
kernel_configure_variable HOTPLUG y -e /CONFIG_HOTPLUG/d \
kernel_configure_variable UEVENT_HELPER_PATH "\"\"" -e /CONFIG_UEVENT_HELPER_PATH/d \
kernel_configure_variable UNIX y -e /CONFIG_UNIX/d \
kernel_configure_variable SYSFS y -e /CONFIG_SYSFS/d \
kernel_configure_variable PROC_FS y -e /CONFIG_PROC_FS/d \
kernel_configure_variable TMPFS y -e /CONFIG_TMPFS/d \
kernel_configure_variable INOTIFY_USER y -e /CONFIG_INOTIFY_USER/d \
kernel_configure_variable SIGNALFD y -e /CONFIG_SIGNALFD/d \
kernel_configure_variable TMPFS_POSIX_ACL y -e /CONFIG_TMPFS_POSIX_ACL/d \
kernel_configure_variable BLK_DEV_BSG y -e /CONFIG_BLK_DEV_BSG/d \
kernel_configure_variable DEVTMPFS y -i '${S}/.config'
kernel_configure_variable DEVTMPFS_MOUNT y
echo '# CONFIG_SYSFS_DEPRECATED is not set' >> ${S}/.config
echo '# CONFIG_SYSFS_DEPRECATED_V2 is not set' >> ${S}/.config
echo 'CONFIG_HOTPLUG=y' >> ${S}/.config
echo 'CONFIG_UEVENT_HELPER_PATH=""' >> ${S}/.config
echo 'CONFIG_UNIX=y' >> ${S}/.config
echo 'CONFIG_SYSFS=y' >> ${S}/.config
echo 'CONFIG_PROC_FS=y' >> ${S}/.config
echo 'CONFIG_TMPFS=y' >> ${S}/.config
echo 'CONFIG_INOTIFY_USER=y' >> ${S}/.config
echo 'CONFIG_SIGNALFD=y' >> ${S}/.config
echo 'CONFIG_TMPFS_POSIX_ACL=y' >> ${S}/.config
echo 'CONFIG_BLK_DEV_BSG=y' >> ${S}/.config
echo 'CONFIG_DEVTMPFS=y' >> ${S}/.config
echo 'CONFIG_DEVTMPFS_MOUNT=y' >> ${S}/.config
fi fi
# Newer inits like systemd need cgroup support # Newer inits like systemd need cgroup support
if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then
kernel_configure_variable CGROUP_SCHED y sed -e /CONFIG_CGROUP_SCHED/d \
kernel_configure_variable CGROUPS y -e /CONFIG_CGROUPS/d \
kernel_configure_variable CGROUP_NS y -i '${S}/.config'
kernel_configure_variable CGROUP_FREEZER y
kernel_configure_variable CGROUP_DEVICE y echo 'CONFIG_CGROUP_SCHED=y' >> ${S}/.config
kernel_configure_variable CPUSETS y echo 'CONFIG_CGROUPS=y' >> ${S}/.config
kernel_configure_variable PROC_PID_CPUSET y echo 'CONFIG_CGROUP_NS=y' >> ${S}/.config
kernel_configure_variable CGROUP_CPUACCT y echo 'CONFIG_CGROUP_FREEZER=y' >> ${S}/.config
kernel_configure_variable RESOURCE_COUNTERS y echo 'CONFIG_CGROUP_DEVICE=y' >> ${S}/.config
echo 'CONFIG_CPUSETS=y' >> ${S}/.config
echo 'CONFIG_PROC_PID_CPUSET=y' >> ${S}/.config
echo 'CONFIG_CGROUP_CPUACCT=y' >> ${S}/.config
echo 'CONFIG_RESOURCE_COUNTERS=y' >> ${S}/.config
fi fi
# root-over-nfs-over-usb-eth support. Limited, but should cover some cases #
# root-over-nfs-over-usb-eth support. Limited, but should cover some cases.
# Enable this by setting a proper CMDLINE_NFSROOT_USB. # Enable this by setting a proper CMDLINE_NFSROOT_USB.
#
if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then
oenote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}" oenote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}"
kernel_configure_variable INET y sed -e '/CONFIG_INET/d' \
kernel_configure_variable IP_PNP y -e '/CONFIG_IP_PNP=/d' \
kernel_configure_variable USB_GADGET y -e '/CONFIG_USB_GADGET=/d' \
kernel_configure_variable USB_GADGET_SELECTED y -e '/CONFIG_USB_GADGET_SELECTED=/d' \
kernel_configure_variable USB_ETH y -e '/CONFIG_USB_ETH=/d' \
kernel_configure_variable NFS_FS y -e '/CONFIG_NFS_FS=/d' \
kernel_configure_variable ROOT_NFS y -e '/CONFIG_ROOT_NFS=/d' \
kernel_configure_variable ROOT_NFS y -e '/CONFIG_CMDLINE=/d' \
kernel_configure_variable CMDLINE "\"${CMDLINE_NFSROOT_USB}\"" -i ${S}/.config
echo "CONFIG_INET=y" >> ${S}/.config
echo "CONFIG_IP_PNP=y" >> ${S}/.config
echo "CONFIG_USB_GADGET=y" >> ${S}/.config
echo "CONFIG_USB_GADGET_SELECTED=y" >> ${S}/.config
echo "CONFIG_USB_ETH=y" >> ${S}/.config
echo "CONFIG_NFS_FS=y" >> ${S}/.config
echo "CONFIG_ROOT_NFS=y" >> ${S}/.config
echo "CONFIG_CMDLINE=\"${CMDLINE_NFSROOT_USB}\"" >> ${S}/.config
fi fi
# Activate CONFIG_LEGACY_PTYS
kernel_configure_variable LEGACY_PTYS y
# Keep this the last line
# Remove all modified configs and add the rest to .config
sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
yes '' | oe_runmake oldconfig yes '' | oe_runmake oldconfig
#
# Activate CONFIG_LEGACY_PTYS
#
sed -e '/CONFIG_LEGACY_PTYS/d' -i ${S}/.config
echo "CONFIG_LEGACY_PTYS=y" >> ${S}/.config
}
do_configure_append() {
if test -e scripts/Makefile.fwinst ; then
sed -i -e "s:-m0644:-m 0644:g" scripts/Makefile.fwinst
fi
}
# bitbake.conf only prepends PARALLEL make in tasks called do_compile, which isn't the case for compile_modules
# So explicitly enable it for that in here
EXTRA_OEMAKE = "${PARALLEL_MAKE} "
do_install_append() {
oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix}/src/linux-${KERNEL_VERSION} ARCH=$ARCH
}
PACKAGES =+ "kernel-headers"
FILES_kernel-headers = "${exec_prefix}/src/linux*"
do_devicetree_image() {
if test -n "${KERNEL_DEVICETREE}" ; then
dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE}
install -d ${D}/boot
install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION}
install -d ${DEPLOY_DIR_IMAGE}
install -m 0644 devicetree ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb
package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb
cd ${DEPLOY_DIR_IMAGE}
rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_SYMLINK_NAME}.dtb
fi
}
addtask devicetree_image after do_install before do_package do_deploy
pkg_postinst_kernel-devicetree () {
cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/devicetree devicetree devicetree-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
}
pkg_postrm_kernel-devicetree () {
cd /${KERNEL_IMAGEDEST}; update-alternatives --remove devicetree devicetree-${KERNEL_VERSION} || true
} }
# Automatically depend on lzop-native if CONFIG_KERNEL_LZO is enabled # Automatically depend on lzop-native if CONFIG_KERNEL_LZO is enabled

View File

@@ -1,3 +0,0 @@
EXTRA_OECONF_append_raspberrypi = " CPPFLAGS='-I${STAGING_DIR_TARGET}/usr/include/interface/vcos/pthreads \
-I${STAGING_DIR_TARGET}/usr/include/interface/vmcs_host/linux' \
--with-egl-window-system=rpi"

View File

@@ -1,77 +0,0 @@
From a2a28fb7c4e8354cc0f90454e9bd151c16a6bf8b Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei@gherzan.ro>
Date: Tue, 20 Aug 2013 16:10:51 +0300
Subject: [PATCH] Remove Makefile.include which includes hardcoded
Remove Makefile.include which includes hardcoded paths and rely on
variables provided by build system.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Updated patch to apply to c0dd9502ed2c43c487674939195c69680f3d98b0 revision
diff --git a/Makefile b/Makefile
index f348465..65f7637 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,3 @@
-include Makefile.include
CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg
index 083e214..3b31a82 100644
--- a/Makefile.ffmpeg
+++ b/Makefile.ffmpeg
@@ -1,4 +1,3 @@
-include Makefile.include
CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT
diff --git a/Makefile.include b/Makefile.include
deleted file mode 100644
index 58e9560..0000000
--- a/Makefile.include
+++ /dev/null
@@ -1,40 +0,0 @@
-USE_BUILDROOT=0
-FLOAT=hard
-
-ifeq ($(USE_BUILDROOT), 1)
-BUILDROOT :=/opt/xbmc-bcm/buildroot
-SDKSTAGE :=$(BUILDROOT)/output/staging
-TARGETFS :=$(BUILDROOT)/output/target
-TOOLCHAIN :=$(BUILDROOT)/output/host/usr/
-HOST :=arm-unknown-linux-gnueabi
-SYSROOT :=$(BUILDROOT)/output/host/usr/arm-unknown-linux-gnueabi/sysroot
-else
-BUILDROOT :=/opt/bcm-rootfs
-SDKSTAGE :=/opt/bcm-rootfs
-TARGETFS :=/opt/bcm-rootfs
-TOOLCHAIN :=/home/dc4/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/
-HOST :=arm-linux-gnueabihf
-#SYSROOT :=$(TOOLCHAIN)/arm-bcm2708hardfp-linux-gnueabi/sysroot
-SYSROOT :=/opt/bcm-rootfs
-endif
-
-JOBS=7
-
-CFLAGS := -isystem$(PREFIX)/include
-CXXFLAGS := $(CFLAGS)
-CPPFLAGS := $(CFLAGS)
-LDFLAGS := -L$(BUILDROOT)/lib
-LD := $(TOOLCHAIN)/bin/$(HOST)-ld --sysroot=$(SYSROOT)
-CC := $(TOOLCHAIN)/bin/$(HOST)-gcc --sysroot=$(SYSROOT)
-CXX := $(TOOLCHAIN)/bin/$(HOST)-g++ --sysroot=$(SYSROOT)
-OBJDUMP := $(TOOLCHAIN)/bin/$(HOST)-objdump
-RANLIB := $(TOOLCHAIN)/bin/$(HOST)-ranlib
-STRIP := $(TOOLCHAIN)/bin/$(HOST)-strip
-AR := $(TOOLCHAIN)/bin/$(HOST)-ar
-CXXCP := $(CXX) -E
-PATH := $(PREFIX)/bin:$(BUILDROOT)/output/host/usr/bin:$(PATH)
-
-CFLAGS += -pipe -mfloat-abi=$(FLOAT) -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -mno-apcs-stack-check -g -mstructure-size-boundary=32 -mno-sched-prolog
-LDFLAGS += -L$(SDKSTAGE)/lib -L$(SDKSTAGE)/usr/lib -L$(SDKSTAGE)/opt/vc/lib/ -Lpcre/build
-#INCLUDES += -isystem$(SDKSTAGE)/usr/include -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -isystem$(SDKSTAGE)/usr/include/freetype2
-INCLUDES += -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -Ipcre/build -Iboost-trunk -Ifreetype2/include

View File

@@ -1,51 +0,0 @@
From 1e92da659375eae1622984d4cc0ffd2a7b082fcf Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei@gherzan.ro>
Date: Sun, 24 Aug 2014 00:13:13 +0200
Subject: [PATCH] Libraries and headers from ffmpeg are installed in /usr.
Don't search for libraries and headers in /usr/local.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
Makefile | 6 +++---
Makefile.ffmpeg | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 38e1400..1b15999 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
-LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz
+LDFLAGS+=-L./ -Lffmpeg_compiled/usr/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz
-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I /usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include
+INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/include/ -I=/usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include
DIST ?= omxplayer-dist
@@ -87,5 +87,5 @@ dist: omxplayer.bin omxplayer.1
cp COPYING $(DIST)/usr/share/doc/omxplayer
cp README.md $(DIST)/usr/share/doc/omxplayer/README
cp omxplayer.1 $(DIST)/usr/share/man/man1
- cp -a ffmpeg_compiled/usr/local/lib/*.so* $(DIST)/usr/lib/omxplayer/
+ cp -a ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/
cd $(DIST); tar -czf ../$(DIST).tgz *
diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg
index 4d2d720..9d66a85 100644
--- a/Makefile.ffmpeg
+++ b/Makefile.ffmpeg
@@ -256,5 +256,5 @@ checkout:
.PHONY : install
install:
cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install
- $(HOST)-strip ffmpeg_compiled/usr/local/lib/*.so
+ $(HOST)-strip ffmpeg_compiled/usr/lib/*.so
--
1.9.3

View File

@@ -1,39 +0,0 @@
From b738724c6ca45ee5fecebed01c7ac91c92446123 Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei@gherzan.ro>
Date: Sun, 24 Aug 2014 00:18:05 +0200
Subject: [PATCH] Remove strip step in Makefile
Build system will strip binaries so remove strip step in Makefile.
Avoid warnings/errors like:
WARNING: File '/usr/lib/omxplayer/libavutil.so.51.56.100' from
omxplayer was already stripped, this will prevent future debugging!
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
Makefile.ffmpeg | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg
index 9d66a85..00df197 100644
--- a/Makefile.ffmpeg
+++ b/Makefile.ffmpeg
@@ -243,7 +243,8 @@ configure:
--disable-decoder=xbin \
--disable-decoder=idf \
--enable-decoder=opus \
- --cross-prefix=$(HOST)-
+ --cross-prefix=$(HOST)- \
+ --disable-stripping
.PHONY : clean
clean:
@@ -256,5 +257,3 @@ checkout:
.PHONY : install
install:
cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install
- $(HOST)-strip ffmpeg_compiled/usr/lib/*.so
-
--
1.9.3

View File

@@ -1,31 +0,0 @@
From 100982ee1fc1cb571c7453d14f9acd60e67d4765 Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei.gherzan@windriver.com>
Date: Sun, 25 Jan 2015 11:13:51 +0200
Subject: [PATCH] Add FFMPEG_EXTRA_CFLAGS and FFMPEG_EXTRA_LDFLAGS
In this way we can inject flags to LD and CC using
--extra-cflags and --extra-ldflags.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
---
Makefile.ffmpeg | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg
index abe4b26..c9d42d7 100644
--- a/Makefile.ffmpeg
+++ b/Makefile.ffmpeg
@@ -22,7 +22,8 @@ configure:
CFLAGS="$(CFLAGS) ${INCLUDES}" \
LDFLAGS="" \
./configure \
- --extra-cflags="-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog" \
+ --extra-cflags="-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog $(FFMPEG_EXTRA_CFLAGS)" \
+ --extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \
--enable-cross-compile \
--enable-shared \
--disable-static \
--
2.1.0

View File

@@ -0,0 +1,28 @@
Build system will strip binaries so remove strip step in Makefile.
Avoid warnings/errors like:
WARNING: File '/usr/lib/omxplayer/libavutil.so.51.56.100' from
omxplayer was already stripped, this will prevent future debugging!
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Index: git/Makefile.ffmpeg
===================================================================
--- git.orig/Makefile.ffmpeg 2012-08-26 15:38:45.099379852 +0300
+++ git/Makefile.ffmpeg 2012-08-26 15:46:51.913055176 +0300
@@ -52,7 +52,8 @@
--enable-hardcoded-tables \
--disable-runtime-cpudetect \
--disable-debug \
- --cross-prefix=$(HOST)-
+ --cross-prefix=$(HOST)- \
+ --disable-stripping
clean:
@rm -rf ffmpeg
@@ -63,5 +64,4 @@
install:
cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install
- $(HOST)-strip ffmpeg_compiled/usr/lib/*.so

View File

@@ -1,18 +0,0 @@
Revert the tar command change introduced in:
https://github.com/popcornmix/omxplayer/commit/201c77973155861e60492e45d35467b19b69c1c4
This fails if DIST is an absolute path. The old command was working just fine.
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Index: git/Makefile
===================================================================
--- git.orig/Makefile
+++ git/Makefile
@@ -71,4 +71,4 @@ dist: omxplayer.bin
cp COPYING $(DIST)/usr/share/doc/
cp README.md $(DIST)/usr/share/doc/README
cp -a ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/
- cd $(DIST); tar -czf ../$(DIST).tgz *
+ tar -czf omxplayer-dist.tar.gz $(DIST)
\ No newline at end of file

View File

@@ -0,0 +1,37 @@
Libraries and headers from ffmpeg are installed in usr/lib.
Upstream-Status: Pending
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Index: git/Makefile.ffmpeg
===================================================================
--- git.orig/Makefile.ffmpeg 2012-08-26 02:46:40.380518313 +0300
+++ git/Makefile.ffmpeg 2012-08-26 02:46:40.512511177 +0300
@@ -63,5 +63,5 @@
install:
cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install
- $(HOST)-strip ffmpeg_compiled/usr/local/lib/*.so
+ $(HOST)-strip ffmpeg_compiled/usr/lib/*.so
Index: git/Makefile
===================================================================
--- git.orig/Makefile 2012-08-26 02:52:11.578611542 +0300
+++ git/Makefile 2012-08-26 02:52:53.952320465 +0300
@@ -1,7 +1,7 @@
CFLAGS+=-std=c++0x -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
-LDFLAGS+=-L./ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -Lffmpeg_compiled/usr/local/lib/
-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/
+LDFLAGS+=-L./ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -Lffmpeg_compiled/usr/lib/
+INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/include/
SRC=linux/XMemUtils.cpp \
utils/log.cpp \
@@ -63,5 +63,5 @@
cp omxplayer omxplayer.bin omxplayer-dist/usr/usr/bin
cp COPYING omxplayer-dist/usr/share/doc/
cp README.md omxplayer-dist/usr/share/doc/README
- cp -a ffmpeg_compiled/usr/local/lib/*.so* omxplayer-dist/usr/lib/omxplayer/
+ cp -a ffmpeg_compiled/usr/lib/*.so* omxplayer-dist/usr/lib/omxplayer/
tar -czf omxplayer-dist.tar.gz omxplayer-dist

View File

@@ -0,0 +1,32 @@
Modify install rule to use /usr/bin path and not /usr/usr/bin for
installing omxplayer binary and script.
As well, add a variable to let the user specify where to install
the files.
Upstream-Status: Pending
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Index: git/Makefile
===================================================================
--- git.orig/Makefile 2012-08-26 05:03:31.710678243 +0300
+++ git/Makefile 2012-08-26 05:03:11.000000000 +0300
@@ -59,11 +57,11 @@
make -f Makefile.ffmpeg install
dist: omxplayer.bin
- mkdir -p omxplayer-dist/usr/lib/omxplayer
- mkdir -p omxplayer-dist/usr/usr/bin
- mkdir -p omxplayer-dist/usr/share/doc
- cp omxplayer omxplayer.bin omxplayer-dist/usr/usr/bin
- cp COPYING omxplayer-dist/usr/share/doc/
- cp README.md omxplayer-dist/usr/share/doc/README
- cp -a ffmpeg_compiled/usr/lib/*.so* omxplayer-dist/usr/lib/omxplayer/
- tar -czf omxplayer-dist.tar.gz omxplayer-dist
+ mkdir -p $(DEST)/usr/lib/omxplayer
+ mkdir -p $(DEST)/usr/bin
+ mkdir -p $(DEST)/usr/share/doc
+ cp omxplayer omxplayer.bin $(DEST)/usr/bin
+ cp COPYING $(DEST)/usr/share/doc/
+ cp README.md $(DEST)/usr/share/doc/README
+ cp -a ffmpeg_compiled/usr/lib/*.so* $(DEST)/usr/lib/omxplayer/
+ tar -czf omxplayer-dist.tar.gz $(DEST)

View File

@@ -0,0 +1,69 @@
Remove Makefile.include which includes hardcoded paths and rely on
variables provided by build system.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Index: git/Makefile.ffmpeg
===================================================================
--- git.orig/Makefile.ffmpeg 2012-08-26 01:04:27.208235775 +0300
+++ git/Makefile.ffmpeg 2012-08-26 01:05:03.958245731 +0300
@@ -1,5 +1,3 @@
-include Makefile.include
-
CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT
WORK=$(PWD)
Index: git/Makefile
===================================================================
--- git.orig/Makefile 2012-08-25 21:46:44.771745783 +0300
+++ git/Makefile 2012-08-25 21:48:59.220406089 +0300
@@ -1,5 +1,3 @@
-include Makefile.include
-
CFLAGS+=-std=c++0x -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
LDFLAGS+=-L./ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -Lffmpeg_compiled/usr/local/lib/
Index: git/Makefile.include
===================================================================
--- git.orig/Makefile.include 2012-08-25 21:46:44.771745783 +0300
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,38 +0,0 @@
-USE_BUILDROOT=1
-FLOAT=hard
-
-ifeq ($(USE_BUILDROOT), 1)
-BUILDROOT :=/opt/xbmc-bcm/buildroot
-SDKSTAGE :=$(BUILDROOT)/output/staging
-TARGETFS :=$(BUILDROOT)/output/target
-TOOLCHAIN :=$(BUILDROOT)/output/host/usr/
-HOST :=arm-unknown-linux-gnueabi
-SYSROOT :=$(BUILDROOT)/output/host/usr/arm-unknown-linux-gnueabi/sysroot
-else
-BUILDROOT :=/opt/bcm-rootfs
-SDKSTAGE :=/opt/bcm-rootfs
-TARGETFS :=/opt/bcm-rootfs
-TOOLCHAIN :=/usr/local/bcm-gcc
-HOST :=bcm2708
-SYSROOT :=$(TOOLCHAIN)/arm-bcm2708-linux-gnueabi/sys-root
-endif
-
-JOBS=7
-
-CFLAGS := -isystem$(PREFIX)/include
-CXXFLAGS := $(CFLAGS)
-CPPFLAGS := $(CFLAGS)
-LDFLAGS := -L$(BUILDROOT)/lib
-LD := $(TOOLCHAIN)/bin/$(HOST)-ld --sysroot=$(SYSROOT)
-CC := $(TOOLCHAIN)/bin/$(HOST)-gcc --sysroot=$(SYSROOT)
-CXX := $(TOOLCHAIN)/bin/$(HOST)-g++ --sysroot=$(SYSROOT)
-OBJDUMP := $(TOOLCHAIN)/bin/$(HOST)-objdump
-RANLIB := $(TOOLCHAIN)/bin/$(HOST)-ranlib
-STRIP := $(TOOLCHAIN)/bin/$(HOST)-strip
-AR := $(TOOLCHAIN)/bin/$(HOST)-ar
-CXXCP := $(CXX) -E
-PATH := $(PREFIX)/bin:$(BUILDROOT)/output/host/usr/bin:$(PATH)
-
-CFLAGS += -pipe -mfloat-abi=$(FLOAT) -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -mno-apcs-stack-check -O3 -mstructure-size-boundary=32 -mno-sched-prolog
-LDFLAGS += -L$(SDKSTAGE)/lib -L$(SDKSTAGE)/usr/lib -L$(SDKSTAGE)/opt/vc/lib/
-INCLUDES += -isystem$(SDKSTAGE)/usr/include -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -isystem$(SDKSTAGE)/usr/include/freetype2

View File

@@ -1,52 +1,48 @@
SUMMARY = "A commandline OMX player for the Raspberry Pi" DESCRIPTION = "OMXPlayer is a commandline OMX player for the Raspberry Pi"
DESCRIPTION = "This player was developed as a testbed for the XBMC \ HOMEPAGE = "https://github.com/huceke/omxplayer"
Raspberry PI implementation and is quite handy to use standalone"
HOMEPAGE = "https://github.com/popcornmix/omxplayer"
SECTION = "console/utils" SECTION = "console/utils"
LICENSE = "GPLv2" LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl" DEPENDS = "libpcre libav virtual/egl boost freetype"
PR = "r3"
SRCREV = "1817503430b8f195bef12bd7a3542bdd251f8389" PR = "r0"
SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master \
file://0001-Remove-Makefile.include-which-includes-hardcoded.patch \ SRCREV = "231c08b42005e3de565013bc1cee18bd5a349c1f"
file://0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch \ SRC_URI = "git://github.com/huceke/omxplayer.git;protocol=git;branch=master \
file://0003-Remove-strip-step-in-Makefile.patch \ file://remove-makefile-include.patch \
file://0004-Add-FFMPEG_EXTRA_CFLAGS-and-FFMPEG_EXTRA_LDFLAGS.patch \ file://libraries-are-installed-in-usr-lib.patch \
file://fix-tar-command-with-DIST.patch \ file://remove-hardcoded-directory-omxplayer-dist.patch \
file://don-t-strip-while-installing.patch \
" "
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
COMPATIBLE_MACHINE = "raspberrypi" COMPATIBLE_MACHINE = "raspberrypi"
inherit autotools-brokensep inherit autotools
# Needed in ffmpeg configure # Variable added in Makefile to INCLUDE
export TEMPDIR = "${S}/tmp" export ADD_INCDIR = "-I${STAGING_INCDIR}/interface/vcos/pthreads -I${STAGING_INCDIR}/freetype2"
# Needed in Makefile.ffmpeg # Needed in configure from Makefile.ffmpeg
export HOST = "${HOST_SYS}" export HOST = "${HOST_SYS}"
export WORK = "${S}" export WORK = "${S}"
export FLOAT = "${@bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "hard", "softfp", d)}" export TEMPDIR = "${S}/tmp"
export FFMPEG_EXTRA_CFLAGS = "--sysroot=${STAGING_DIR_TARGET}" export FLOAT = "softfp"
export FFMPEG_EXTRA_LDFLAGS = "--sysroot=${STAGING_DIR_TARGET}"
# Needed in top Makefile
export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \ export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \
-L${STAGING_DIR_HOST}/lib \ -L${STAGING_DIR_HOST}/lib \
-L${STAGING_DIR_HOST}/usr/lib \ -L${STAGING_DIR_HOST}/usr/lib \
" "
export INCLUDES = "-isystem${STAGING_DIR_HOST}/usr/include \ export INCLUDES = "-isystem${STAGING_DIR_HOST}/usr/include \
-isystem${STAGING_DIR_HOST}/usr/include/interface/vcos/pthreads \ -isystem${STAGING_DIR_HOST}/usr/include/interface/vcos/pthreads \
-isystem${STAGING_DIR_HOST}/usr/include/freetype2 \ -isystem${STAGING_DIR_HOST}/usr/include/freetype2 \
-isystem${STAGING_DIR_HOST}/usr/include/interface/vmcs_host/linux \
-isystem${STAGING_DIR_HOST}/usr/include/dbus-1.0 \
-isystem${STAGING_DIR_HOST}/usr/lib/dbus-1.0/include \
" "
export DIST = "${D}"
# Install in ${D}
export DEST = "${D}"
do_compile() { do_compile() {
# Needed for compiler test in ffmpeg's configure # Needed for compiler test in ffmpeg's configure
@@ -57,15 +53,10 @@ do_compile() {
} }
do_install() { do_install() {
oe_runmake STRIP='echo skipping strip' dist oe_runmake dist
mkdir -p ${D}${datadir}/fonts/truetype/freefont/
install ${S}/fonts/* ${D}${datadir}/fonts/truetype/freefont/
} }
FILES_${PN} = "${bindir}/omxplayer* \ FILES_${PN} = "${bindir}/omxplayer* \
${libdir}/omxplayer/lib*${SOLIBS} \ ${libdir}/omxplayer/lib*${SOLIBS}"
${datadir}/fonts"
FILES_${PN}-dev += "${libdir}/omxplayer/*.so" FILES_${PN}-dev += "${libdir}/omxplayer/*.so"
RDEPENDS_${PN} += "bash procps"

9
recipes.txt Normal file
View File

@@ -0,0 +1,9 @@
recipes-bcm - Broadcom specific recipes and tweaks (including binary only bootloader).
recipes-bsp - Anything with links to the RaspberryPi hardware configuration information.
recipes-core - Extensions to existing upstream core recipes.
recipes-devtools - Extensions to existing upstream devtools recipes and other RaspberryPi specific devtools recipes.
recipes-devices - Device drivers/Init scripts.
recipes-graphics - XOrg Config and such.
recipes-kernel - The RaspberryPi kernel recipes and anything with strong kernel dependencies.
recipes-multimedia - Extensions to existing upstream multimedia recipes and other RaspberryPi specific multimedia recipes.

View File

@@ -1,6 +0,0 @@
# short-description: Create Raspberry Pi SD card image
# long-description: Creates a partitioned SD card image for use with
# Raspberry Pi. Boot files are located in the first vfat partition.
part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4096 --size 20
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4096