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
5dc1eac2
Commit
5dc1eac2
authored
Aug 13, 2016
by
Florent Revest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaces 'boot-img' and 'kernel_android' classes with abootimg, mkboot and mkbootimg
parent
e3eed2a3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
118 additions
and
8 deletions
+118
-8
abootimg.bbclass
classes/abootimg.bbclass
+55
-0
mkboot.bbclass
classes/mkboot.bbclass
+8
-8
mkbootimg.bbclass
classes/mkbootimg.bbclass
+55
-0
No files found.
classes/abootimg.bbclass
0 → 100644
View file @
5dc1eac2
#
# This class is used to create Android device compatible boot.img files with kernel and initrd using abootimg
#
ABOOTIMG_ARGS ?= ""
do_compile[depends] += "initramfs-android-image:do_rootfs"
DEPENDS += "abootimg-native"
do_compile_append() {
abootimg --create ${B}/boot.img \
-k ${B}/${KERNEL_OUTPUT} \
-r ${DEPLOY_DIR_IMAGE}/initramfs-android-image-${MACHINE}.cpio.gz \
${ABOOTIMG_ARGS}
}
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
}
# Update mechanism
do_install_append() {
install -d ${D}/${KERNEL_IMAGEDEST}
install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST}
}
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"
classes/
boot-img
.bbclass
→
classes/
mkboot
.bbclass
View file @
5dc1eac2
#
#
# This class is used to create Android device compatible boot.img files with kernel and initrd
# This class is used to create Android device compatible boot.img files with kernel and initrd using mkboot
# It differs from meta-android/classes/kernel_android.bbclass because it uses mkboot
#
#
do_compile[depends] += "initramfs-android-image:do_rootfs"
do_compile[depends] += "initramfs-android-image:do_rootfs"
...
@@ -14,16 +13,18 @@ do_compile_append() {
...
@@ -14,16 +13,18 @@ do_compile_append() {
mkboot . boot.img
mkboot . boot.img
}
}
do_install_append() {
install -d ${D}/${KERNEL_IMAGEDEST}
install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST}
}
do_deploy_append() {
do_deploy_append() {
cp ${B}/boot.img ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.fastboot
cp ${B}/boot.img ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.fastboot
ln -sf ${KERNEL_IMAGE_BASE_NAME}.fastboot ${DEPLOYDIR}/${KERNEL_IMAGE_SYMLINK_NAME}.fastboot
ln -sf ${KERNEL_IMAGE_BASE_NAME}.fastboot ${DEPLOYDIR}/${KERNEL_IMAGE_SYMLINK_NAME}.fastboot
}
}
# Update mechanism
do_install_append() {
install -d ${D}/${KERNEL_IMAGEDEST}
install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST}
}
pkg_postinst_kernel-image_append () {
pkg_postinst_kernel-image_append () {
if [ x"$D" = "x" ] ; then
if [ x"$D" = "x" ] ; then
if [ ! -e /boot/boot.img ] ; then
if [ ! -e /boot/boot.img ] ; then
...
@@ -51,4 +52,3 @@ pkg_postinst_kernel-image_append () {
...
@@ -51,4 +52,3 @@ pkg_postinst_kernel-image_append () {
}
}
FILES_kernel-image += "/${KERNEL_IMAGEDEST}/boot.img"
FILES_kernel-image += "/${KERNEL_IMAGEDEST}/boot.img"
classes/mkbootimg.bbclass
0 → 100644
View file @
5dc1eac2
#
# This class is used to create Android device compatible boot.img files with kernel and initrd using mkbootimg
#
MKBOOTIMG_ARGS ?= ""
do_compile[depends] += "initramfs-android-image:do_rootfs"
DEPENDS += "mkbootimg-tools-native"
do_compile_append() {
mkbootimg -o ${B}/boot.img \
--kernel ${KERNEL_OUTPUT} \
--ramdisk ${DEPLOY_DIR_IMAGE}/initramfs-android-image-${MACHINE}.cpio.gz \
${MKBOOTIMG_ARGS}
}
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
}
# Update mechanism
do_install_append() {
install -d ${D}/${KERNEL_IMAGEDEST}
install -m 0644 ${B}/boot.img ${D}/${KERNEL_IMAGEDEST}
}
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"
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