Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
meta-nemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
meta-nemo
Commits
b9622896
Commit
b9622896
authored
Aug 06, 2015
by
Florent Revest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds a boot-img classes that use mkbootimg-tools
parent
99140988
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
0 deletions
+74
-0
boot-img.bbclass
classes/boot-img.bbclass
+54
-0
mkbootimg-tools_git.bb
recipes-core/mkbootimg-tools/mkbootimg-tools_git.bb
+20
-0
No files found.
classes/boot-img.bbclass
0 → 100644
View file @
b9622896
#
# This class is used to create Android device compatible boot.img files with kernel and initrd
# It differs from meta-android/classes/kernel_android.bbclass because it uses mkboot
#
do_compile[depends] += "initramfs-android-image:do_rootfs"
DEPENDS += "mkbootimg-tools-native"
do_compile_append() {
cd ${B}
cp ${WORKDIR}/img_info .
sed -i "s@%%KERNEL%%@${B}/${KERNEL_OUTPUT}@" img_info
sed -i "s@%%RAMDISK%%@${DEPLOY_DIR_IMAGE}/initramfs-android-image-${MACHINE}.cpio.gz@" img_info
mkboot . boot.img
}
do_install_append() {
install -d ${D}/${KERNEL_IMAGEDEST}
install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST}
}
do_deploy_append() {
cp ${B}/boot.img ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.fastboot
ln -sf ${KERNEL_IMAGE_BASE_NAME}.fastboot ${DEPLOYDIR}/${KERNEL_IMAGE_SYMLINK_NAME}.fastboot
}
pkg_postinst_kernel-image_append () {
if [ x"$D" = "x" ] ; then
if [ ! -e /boot/boot.img ] ; then
# if the boot image is not available here something went wrong and we don't
# continue with anything that can be dangerous
exit 1
fi
BOOT_PARTITION_NAMES="LNX boot KERNEL"
for i in $BOOT_PARTITION_NAMES; do
path=$(find /dev -name "*$i*"|grep disk| head -n 1)
[ -n "$path" ] && break
done
if [ -z "$path" ] ; then
echo "Boot partition does not exist!"
exit 1
fi
echo "Flashing the new kernel /boot/boot.img to $path"
dd if=/boot/boot.img of=$path
else
exit 1
fi
}
FILES_kernel-image += "/${KERNEL_IMAGEDEST}/boot.img"
recipes-core/mkbootimg-tools/mkbootimg-tools_git.bb
0 → 100644
View file @
b9622896
SUMMARY = "A tool to read/write/update android boot images"
HOMEPAGE = "https://github.com/xiaolu/mkbootimg_tools"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://mkboot;beginline=1;endline=14;md5=7b23e8b2786c0da7fb7ff74d45637d54"
SRC_URI = "git://github.com/xiaolu/mkbootimg_tools;protocol=https;branch=master"
SRCREV = "60b81702370e0cd1c16a33973eea18365171de80"
S = "${WORKDIR}/git"
PV = "git"
BBCLASSEXTEND = "native"
# TODO: Why are mkbootimg and mkbootfs distributed in binary form? Was it modified by the author? We realy need to check that
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/mkboot ${D}${bindir}
install -m 0755 ${S}/mkbootfs ${D}${bindir}
install -m 0755 ${S}/mkbootimg ${D}${bindir}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment