Commit e2e44c6b authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

Yocto 2.1

parent 97962156
......@@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=891e49b3c2a8c133ffe7985e54245aff"
SRC_URI = "git://github.com/Elphel/python-elphel-extensions.git"
#SRCREV = "fbb514aa775b2d07e14403c996810ec1fddb0fa1"
SRCREV = "${AUTOREV}"
SRC_URI[md5sum] = "63120c2923a1dd174dfb7ebaf2d44a76"
SRC_URI[sha256sum] = "b5a0827002a9060e77c55a2e857af4550215c283a3bf94f69f4d7eed22ef1de0"
......@@ -33,3 +35,5 @@ do_install() {
install -m 755 ${B}/libelphel.so ${D}${libdir}/libelphel.so.0
install -m 755 ${S}/elphel.py ${D}${libdir}/python2.7/elphel.py
}
INSANE_SKIP_${PN} = "ldflags"
......@@ -109,18 +109,22 @@ MKUBIFS_ARGS = " -m 2048 -e 126976 -c 2048"
UBINIZE_ARGS = " -m 2048 -p 128KiB -s 2048"
create_symlinks_append(){
DEPLOY_DIR_IMAGE = d.getVar('DEPLOY_DIR_IMAGE', True)
IMAGE_NAME = d.getVar('IMAGE_NAME', True)
PRODUCTION_ROOTFS = d.getVar('PRODUCTION_ROOTFS', True)
rlocs = (d.getVar('PRODUCTION_ROOT_LOCATION', True)).split()
for rloc in rlocs:
if not os.path.isdir("${DEPLOY_DIR_IMAGE}/"+rloc):
os.system("mkdir ${DEPLOY_DIR_IMAGE}/"+rloc)
if not os.path.isdir(DEPLOY_DIR_IMAGE+"/"+rloc):
os.system("mkdir "+DEPLOY_DIR_IMAGE+"/"+rloc)
if (rloc=="mmc"):
image_ext = ".tar.gz"
else:
image_ext = ".ubifs"
if os.path.isfile("${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs"+image_ext):
if os.path.isfile("${DEPLOY_DIR_IMAGE}/"+rloc+"/${PRODUCTION_ROOTFS}"+image_ext):
os.system("rm ${DEPLOY_DIR_IMAGE}/"+rloc+"/${PRODUCTION_ROOTFS}"+image_ext)
os.system("cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs"+image_ext+" ${DEPLOY_DIR_IMAGE}/"+rloc+"/${PRODUCTION_ROOTFS}"+image_ext)
if os.path.isfile(DEPLOY_DIR_IMAGE+"/"+IMAGE_NAME+".rootfs"+image_ext):
if os.path.isfile(DEPLOY_DIR_IMAGE+"/"+rloc+"/"+PRODUCTION_ROOTFS+image_ext):
os.system("rm ${DEPLOY_DIR_IMAGE}/"+rloc+"/"+PRODUCTION_ROOTFS+image_ext)
os.system("cp "+DEPLOY_DIR_IMAGE+"/"+IMAGE_NAME+".rootfs"+image_ext+" "+DEPLOY_DIR_IMAGE+"/"+rloc+"/"+PRODUCTION_ROOTFS+image_ext)
}
......@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293
SRCDATE = "20160530"
PV = "${SRCDATE}"
PR = "r0"
s = "${WORKDIR}"
S = "${WORKDIR}"
SRC_URI = "file://90-elphel-automount.rules \
"
......
......@@ -3,8 +3,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/config:"
SRC_URI_append += " file://xilinx_emacps.c.patch"
SRC_URI_append += " file://xilinx_uartps.c.patch"
SRC_URI_append += " file://si5338_vsc330x.patch"
SRC_URI_append += " file://drivers-elphel.patch"
#SRC_URI_append += " file://si5338_vsc330x.patch"
#SRC_URI_append += " file://drivers-elphel.patch"
SRC_URI_append += " file://${MACHINE}.scc"
KERNEL_FEATURES_append = " ${MACHINE}.scc"
......@@ -86,21 +86,24 @@ do_deploy_append(){
mkdir -p ${DEPLOY_DIR_IMAGE}/${RLOC}
fi
#if [ -f ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin ]; then
if [ -f ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin ]; then
if [ -f ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_KERNEL} ]; then
rm ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_KERNEL}
echo "looking for ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin"
for type in ${KERNEL_IMAGETYPES} ; do
if [ -f ${DEPLOYDIR}/$type-${KERNEL_IMAGE_BASE_NAME}.bin ]; then
if [ -f ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_KERNEL} ]; then
rm ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_KERNEL}
fi
cp ${DEPLOYDIR}/$type-${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_KERNEL}
else
echo "NOT 3 FOUND!"
fi
cp ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_KERNEL}
else
echo "NOT 3 FOUND!"
fi
#copy initramfs image over initramfsless image
if [ -f ${DEPLOYDIR}/${INITRAMFS_BASE_NAME}.bin ]; then
if [ -f ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_KERNEL} ]; then
rm ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_KERNEL}
#copy initramfs image over initramfsless image
if [ -f ${DEPLOYDIR}/$type-${INITRAMFS_BASE_NAME}.bin ]; then
if [ -f ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_KERNEL} ]; then
rm ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_KERNEL}
fi
cp ${DEPLOYDIR}/$type-${INITRAMFS_BASE_NAME}.bin ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_KERNEL}
fi
cp ${DEPLOYDIR}/${INITRAMFS_BASE_NAME}.bin ${DEPLOY_DIR_IMAGE}/${RLOC}/${PRODUCTION_KERNEL}
fi
done
done
}
......@@ -109,17 +112,21 @@ do_bundle_initramfs () {
if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
echo "Creating a kernel image with a bundled initramfs..."
copy_initramfs
#if [ -e ${KERNEL_OUTPUT} ] ; then
# mv -f ${KERNEL_OUTPUT} ${KERNEL_OUTPUT}.bak
#fi
#use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE}-$#{MACHINE}.cpio
#kernel_do_compile
cp ${KERNEL_OUTPUT} ${KERNEL_OUTPUT}.initramfs
#mv -f ${KERNEL_OUTPUT}.bak ${KERNEL_OUTPUT}
# Backing up kernel image relies on its type(regular file or symbolic link)
echo "KERNEL_IMAGETYPES are ${KERNEL_IMAGETYPES}"
for type in ${KERNEL_IMAGETYPES} ; do
if [ -h ${B}/${KERNEL_OUTPUT_DIR}/$type ]; then
cp ${B}/${KERNEL_OUTPUT_DIR}/$type ${B}/${KERNEL_OUTPUT_DIR}/$type.initramfs
elif [ -f ${B}/${KERNEL_OUTPUT_DIR}/$type ]; then
cp ${B}/${KERNEL_OUTPUT_DIR}/$type ${B}/${KERNEL_OUTPUT_DIR}/$type.initramfs
fi
done
# Update install area
echo "There is kernel image bundled with initramfs: ${B}/${KERNEL_OUTPUT}.initramfs"
install -m 0644 ${B}/${KERNEL_OUTPUT}.initramfs ${D}/boot/${KERNEL_IMAGETYPE}-initramfs-${MACHINE}.bin
echo "${B}/${KERNEL_OUTPUT}.initramfs"
for type in ${KERNEL_IMAGETYPES} ; do
echo "There is kernel image bundled with initramfs: ${B}/${KERNEL_OUTPUT_DIR}/$type.initramfs"
install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/$type.initramfs ${D}/boot/$type-initramfs-${MACHINE}.bin
echo "${B}/${KERNEL_OUTPUT_DIR}/$type.initramfs"
done
fi
}
......@@ -134,8 +141,9 @@ kernel_do_compile() {
# different initramfs image. The way to do that in the kernel
# is to specify:
# make ...args... CONFIG_INITRAMFS_SOURCE=some_other_initramfs.cpio
#if [ "$use_alternate_initrd" = "" ] && [ "${INITRAMFS_TASK}" != "" ] ; then
if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ] ; then
echo "ONLY ONE RUN!"
echo "ONLY ONE RUN"
# The old style way of copying an prebuilt image and building it
# is turned on via INTIRAMFS_TASK != ""
copy_initramfs
......@@ -145,9 +153,14 @@ kernel_do_compile() {
else
use_alternate_initrd=CONFIG_INITRAMFS_SOURCE=${B}/usr/${INITRAMFS_IMAGE}-${MACHINE}.cpio
fi
fi
oe_runmake ${KERNEL_IMAGETYPE_FOR_MAKE} ${PARALLEL_MAKE} ${KERNEL_ALT_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd
if test "${KERNEL_IMAGETYPE_FOR_MAKE}.gz" = "${KERNEL_IMAGETYPE}"; then
gzip -9c < "${KERNEL_IMAGETYPE_FOR_MAKE}" > "${KERNEL_OUTPUT}"
fi
for typeformake in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
oe_runmake ${typeformake} ${PARALLEL_MAKE} CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} $use_alternate_initrd
for type in ${KERNEL_IMAGETYPES} ; do
if test "${typeformake}.gz" = "${type}"; then
gzip -9c < "${typeformake}" > "${KERNEL_OUTPUT_DIR}/${type}"
break;
fi
done
done
}
......@@ -8,6 +8,8 @@ SRCDATE = "20160419"
PV = "${SRCDATE}"
PR = "r0"
S = "${WORKDIR}"
SRC_URI = "http://mirror.elphel.com/elphel393_mirror/jquery-2.2.3.min.js;md5sum=33cabfa15c1060aaa3d207c653afb1ee \
http://mirror.elphel.com/elphel393_mirror/jquery-ui-1.11.4.custom.zip;md5sum=ee19e783272a4fc4a04ff78e92694df2 \
http://mirror.elphel.com/elphel393_mirror/bootstrap-3.3.6-dist.zip;md5sum=229936b042baadfc9f167244575ffe12 \
......
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
libexecdir = "/usr/lib/ntp"
EXTRA_OECONF += "--libexecdir=/usr/lib/ntp \
"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment