mirror of
https://github.com/linux-sunxi/meta-sunxi.git
synced 2024-12-26 04:58:22 +01:00
Merge pull request #4 from RehiveTech/fex-support
Add compiled fex file into the image (just for OLinuXino A10S now)
This commit is contained in:
commit
cff5750359
@ -35,6 +35,12 @@ IMAGE_DEPENDS_a10-sdimg = " \
|
||||
virtual/bootloader \
|
||||
"
|
||||
|
||||
# Compile FEX file
|
||||
# For now it is only available for OLinuXino A10S
|
||||
IMAGE_DEPENDS_a10-sdimg_olinuxino-a10s = " \
|
||||
sunxi-board-fex \
|
||||
"
|
||||
|
||||
# SD card image name
|
||||
SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.a10-sdimg"
|
||||
|
||||
@ -64,6 +70,10 @@ IMAGE_CMD_a10-sdimg () {
|
||||
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::uImage
|
||||
if [[ -e "${DEPLOY_DIR_IMAGE}/fex.bin" ]]
|
||||
then
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/fex.bin ::script.bin
|
||||
fi
|
||||
|
||||
# Add stamp file
|
||||
echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info
|
||||
|
48
recipes-bsp/sunxi-board-fex/sunxi-board-fex.bb
Normal file
48
recipes-bsp/sunxi-board-fex/sunxi-board-fex.bb
Normal file
@ -0,0 +1,48 @@
|
||||
# Copyright (C) 2013 Tomas Novotny <novotny@rehivetech.com>
|
||||
# Released under BSD-2-Clause or MIT license
|
||||
DESCRIPTION = "Handler for Allwinner's FEX files"
|
||||
LICENSE = "CC0-1.0"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/${LICENSE};md5=0ceb3372c9595f0a8067e55da801e4a1"
|
||||
DEPENDS = "sunxi-tools-native"
|
||||
SRCREV = "4016ad7fb6c249c0bd6b6d804c706f9a7a165cc6"
|
||||
PV = "1.0"
|
||||
PR = "r0"
|
||||
|
||||
SRC_URI = "git://github.com/linux-sunxi/sunxi-boards.git;protocol=git"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
SUNXI_FEX_FILE_olinuxino-a10s = "sys_config/a10s/a10s-olinuxino-m.fex"
|
||||
SUNXI_FEX_BIN_IMAGE = "fex-${MACHINE}-${PV}-${PR}.bin"
|
||||
SUNXI_FEX_BIN_IMAGE_SYMLINK = "fex-${MACHINE}.bin"
|
||||
SUNXI_FEX_BIN_IMAGE_SYMLINK_SIMPLE = "fex.bin"
|
||||
|
||||
inherit deploy
|
||||
|
||||
do_compile() {
|
||||
fex2bin "${S}/${SUNXI_FEX_FILE}" > "${B}/${SUNXI_FEX_BIN_IMAGE}"
|
||||
}
|
||||
|
||||
do_deploy() {
|
||||
install -m 0644 ${B}/${SUNXI_FEX_BIN_IMAGE} ${DEPLOYDIR}/
|
||||
cd ${DEPLOYDIR}
|
||||
ln -sf ${SUNXI_FEX_BIN_IMAGE} ${SUNXI_FEX_BIN_IMAGE_SYMLINK}
|
||||
ln -sf ${SUNXI_FEX_BIN_IMAGE} ${SUNXI_FEX_BIN_IMAGE_SYMLINK_SIMPLE}
|
||||
}
|
||||
addtask deploy before do_build after do_compile
|
||||
|
||||
PACKAGES = ""
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
do_install[noexec] = "1"
|
||||
do_package[noexec] = "1"
|
||||
do_packagedata[noexec] = "1"
|
||||
do_package_write[noexec] = "1"
|
||||
do_package_write_ipk[noexec] = "1"
|
||||
do_package_write_rpm[noexec] = "1"
|
||||
do_package_write_deb[noexec] = "1"
|
||||
do_populate_sysroot[noexec] = "1"
|
||||
|
||||
# Remember to add machine entry to IMAGE_DEPENDS in sdcard_image-a10.bbclass
|
||||
# when adding new machines.
|
||||
COMPATIBLE_MACHINE = "(olinuxino-a10s)"
|
@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PKGV = "1.0+git${GITPKGV}"
|
||||
PR = "r2"
|
||||
PR = "r3"
|
||||
SRCREV = "ed6f7969d80b91048b0ed95ccb61cc98f46fead7"
|
||||
|
||||
DEPENDS += "libusb"
|
||||
@ -19,6 +19,7 @@ BBCLASSEXTEND = "native nativesdk"
|
||||
FILES_${PN} = "${bindir}/*"
|
||||
|
||||
CFLAGS = "-std=c99 -D_POSIX_C_SOURCE=200112L -I./include"
|
||||
CFLAGS_class-native = "-std=c99 -D_POSIX_C_SOURCE=200112L -I./include"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}/${bindir}
|
||||
@ -31,4 +32,4 @@ do_install() {
|
||||
install -m 755 ${S}/nand-part ${D}/${bindir}
|
||||
install -m 755 ${S}/pio ${D}/${bindir}
|
||||
install -m 755 ${S}/usb-boot ${D}/${bindir}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user