* [PATCH v2 0/3] Rewrite sdcard_image.bbclass
@ 2011-11-29 12:41 Otavio Salvador
2011-11-29 12:41 ` [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount Otavio Salvador
` (2 more replies)
0 siblings, 3 replies; 20+ messages in thread
From: Otavio Salvador @ 2011-11-29 12:41 UTC (permalink / raw)
To: meta-ti
The following changes since commit 08b559c4da61c8514808c2dad3b65217a8e73041:
linux 3.0: update to 3.0.12 (2011-11-29 09:05:54 +0100)
are available in the git repository at:
git://github.com/OSSystems/meta-ti master
https://github.com/OSSystems/meta-ti/tree/master
Otavio Salvador (3):
sdcard_image: rewrote to avoid using loopback and mount/unmount
ti-hw-bringup-image: adapt to newer sdcard_image class
cloud9-image: adapt to newer sdcard_image class
classes/sdcard_image.bbclass | 181 ++++++++++------------------
recipes-misc/images/cloud9-image.bb | 6 +-
recipes-misc/images/ti-hw-bringup-image.bb | 3 +
3 files changed, 70 insertions(+), 120 deletions(-)
--
1.7.2.5
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-11-29 12:41 [PATCH v2 0/3] Rewrite sdcard_image.bbclass Otavio Salvador
@ 2011-11-29 12:41 ` Otavio Salvador
2011-11-29 12:53 ` Otavio Salvador
2011-11-29 12:41 ` [PATCH v2 2/3] ti-hw-bringup-image: adapt to newer sdcard_image class Otavio Salvador
2011-11-29 12:41 ` [PATCH v2 3/3] cloud9-image: " Otavio Salvador
2 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2011-11-29 12:41 UTC (permalink / raw)
To: meta-ti
Allow generation by regular users without fancy setup requirements and
use of loopback and mount/unmount. Besides, this also includes
following improvements:
* use of megabytes when specifying SDIMG_SIZE
* remove restriction of filesystem to rootfs
Images that use this class needs to generate the rootfs filesystem and
set ROOTFS variable according.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
classes/sdcard_image.bbclass | 181 +++++++++++++++---------------------------
1 files changed, 64 insertions(+), 117 deletions(-)
diff --git a/classes/sdcard_image.bbclass b/classes/sdcard_image.bbclass
index 519bd9a..158648e 100644
--- a/classes/sdcard_image.bbclass
+++ b/classes/sdcard_image.bbclass
@@ -1,99 +1,43 @@
+# Copyright (C) 2011 O.S. Systems Software LTDA.
+#
+# Create an image that can by written onto a SD card using dd.
+#
+# External variables needed:
+# ${ROOTFS} - the rootfs image to incorporate
+
inherit image
# Add the fstypes we need
-IMAGE_FSTYPES_append = " tar.bz2 sdimg"
+IMAGE_FSTYPES += "sdimg"
# Ensure required utilities are present
-IMAGE_DEPENDS_sdimg = "genext2fs-native e2fsprogs-native"
-
-# Change this to match your host distro
-LOSETUP ?= "/sbin/losetup"
-
-# Since these need to go in /etc/fstab we can hardcode them
-# Since the vars are weakly assigned, you can override them from your local.conf
-LOOPDEV ?= "/dev/loop1"
-LOOPDEV_BOOT ?= "/dev/loop2"
-LOOPDEV_FS ?= "/dev/loop3"
+IMAGE_DEPENDS_sdimg = "dosfstools-native parted-native"
-# Default to 4GiB images
-SDIMG_SIZE ?= "444"
+# Default to 3.4GiB images
+SDIMG_SIZE ?= "3400"
-# FS type for rootfs
-ROOTFSTYPE ?= "ext3"
+# Boot partition volume id
+BOOTDD_VOLUME_ID_beaglebone = "BEAGLE_BONE"
+BOOTDD_VOLUME_ID ?= "${MACHINE}"
-BOOTPARTNAME_beaglebone = "BEAGLE_BONE"
-BOOTPARTNAME ?= "${MACHINE}"
-
-IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}"
+# Addional space for boot partition
+BOOTDD_EXTRA_SPACE ?= "16384"
# Files and/or directories to be copied into the vfat partition
FATPAYLOAD ?= ""
IMAGE_CMD_sdimg () {
- SDIMG=${WORKDIR}/sd.img
-
- # sanity check fstab entry for boot partition mounting
- if [ "x$(cat /etc/fstab | grep ${LOOPDEV_BOOT} | grep ${WORKDIR}/tmp-mnt-boot | grep user || true)" = "x" ]; then
- echo "/etc/fstab entries need to be created with the user flag for the loop devices like:"
- echo "${LOOPDEV_BOOT} ${WORKDIR}/tmp-mnt-boot vfat user 0 0"
- false
- fi
-
- # cleanup loops
- for loop in ${LOOPDEV} ${LOOPDEV_BOOT} ${LOOPDEV_FS} ; do
- ${LOSETUP} -d $loop || true
- done
-
- # If an SD image is already present, reuse and reformat it
- if [ ! -e ${SDIMG} ] ; then
- dd if=/dev/zero of=${SDIMG} bs=$(echo '255 * 63 * 512' | bc) count=${SDIMG_SIZE}
- fi
-
- ${LOSETUP} ${LOOPDEV} ${SDIMG}
-
- # Create partition table
- dd if=/dev/zero of=${LOOPDEV} bs=1024 count=1024
- SIZE=$(/sbin/fdisk -l ${LOOPDEV} | grep Disk | grep bytes | awk '{print $5}')
- CYLINDERS=$(echo $SIZE/255/63/512 | bc)
- {
- echo ,9,0x0C,*
- echo ,,,-
- } | /sbin/sfdisk -D -H 255 -S 63 -C ${CYLINDERS} ${LOOPDEV}
-
- # Prepare loop devices for boot and filesystem partitions
- BOOT_OFFSET=32256
- FS_OFFSET_SECT=$(/sbin/fdisk -l -u ${LOOPDEV} 2>&1 | grep Linux | perl -p -i -e "s/\s+/ /"|cut -d " " -f 2)
- FS_OFFSET=$(echo "$FS_OFFSET_SECT * 512" | bc)
- FS_SIZE_BLOCKS=$(/sbin/fdisk -l -u ${LOOPDEV} 2>&1 | grep Linux | perl -p -i -e "s/\s+/ /g" \
- |cut -d " " -f 4 | cut -d "+" -f 1)
-
- LOOPDEV_BLOCKS=$(/sbin/fdisk -l -u ${LOOPDEV} 2>&1 | grep FAT | perl -p -i -e "s/\s+/ /g"|cut -d " " -f 5)
- LOOPDEV_BYTES=$(echo "$LOOPDEV_BLOCKS * 1024" | bc)
-
- ${LOSETUP} -d ${LOOPDEV}
-
- ${LOSETUP} ${LOOPDEV_BOOT} ${SDIMG} -o ${BOOT_OFFSET}
-
- /sbin/mkfs.vfat ${LOOPDEV_BOOT} -n ${BOOTPARTNAME} $LOOPDEV_BLOCKS
-
- # Prepare filesystem partition
- # Copy ubi used by flashing scripts
- if [ -e ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ] ; then
- echo "Copying UBIFS image to file system"
- cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${IMAGE_ROOTFS}/boot/fs.ubi
- fi
+ TMP=${WORKDIR}/tmp
+ SDIMG=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.sdimg
- # Prepare boot partion. First mount the boot partition, and copy the boot loader and supporting files
- # from the root filesystem
-
- mkdir -p ${WORKDIR}/tmp-mnt-boot
- mount $LOOPDEV_BOOT ${WORKDIR}/tmp-mnt-boot
+ # Prepare boot filesystem
+ install -d $TMP/boot
echo "Copying bootloaders into the boot partition"
if [ -e ${IMAGE_ROOTFS}/boot/MLO ] ; then
- cp -v ${IMAGE_ROOTFS}/boot/MLO ${WORKDIR}/tmp-mnt-boot
+ cp -v ${IMAGE_ROOTFS}/boot/MLO $TMP/boot
else
- cp -v ${DEPLOY_DIR_IMAGE}/MLO ${WORKDIR}/tmp-mnt-boot
+ cp -v ${DEPLOY_DIR_IMAGE}/MLO $TMP/boot
fi
# Check for u-boot SPL
@@ -103,54 +47,57 @@ IMAGE_CMD_sdimg () {
suffix=bin
fi
- cp -v ${IMAGE_ROOTFS}/boot/uEnv.txt ${WORKDIR}/tmp-mnt-boot || true
- cp -v ${IMAGE_ROOTFS}/boot/user.txt ${WORKDIR}/tmp-mnt-boot || true
- cp -v ${IMAGE_ROOTFS}/boot/uImage ${WORKDIR}/tmp-mnt-boot || true
-
if [ -e ${IMAGE_ROOTFS}/boot/u-boot.$suffix ] ; then
- cp -v ${IMAGE_ROOTFS}/boot/{u-boot.$suffix} ${WORKDIR}/tmp-mnt-boot || true
+ cp -v ${IMAGE_ROOTFS}/boot/u-boot.$suffix $TMP/boot || true
else
- cp -v ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.$suffix ${WORKDIR}/tmp-mnt-boot/u-boot.$suffix
+ cp -v ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.$suffix $TMP/boot/u-boot.$suffix
+ fi
+
+ if [ -e ${IMAGE_ROOTFS}/boot/uImage ]; then
+ cp -v ${IMAGE_ROOTFS}/boot/uImage $TMP/boot || true
+ else
+ cp -v ${DEPLOY_DIR_IMAGE}/uImage-${MACHINE}.$suffix $TMP/boot/uImage
+ fi
+
+ cp -v ${IMAGE_ROOTFS}/boot/uEnv.txt $TMP/boot || true
+ cp -v ${IMAGE_ROOTFS}/boot/user.txt $TMP/boot || true
+
+ # Copy ubi used by flashing scripts
+ if [ -e ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ] ; then
+ echo "Copying UBIFS image to file system"
+ cp ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${IMAGE_ROOTFS}/boot/fs.ubi
fi
if [ -n ${FATPAYLOAD} ] ; then
echo "Copying payload into VFAT"
for entry in ${FATPAYLOAD} ; do
# add the || true to stop aborting on vfat issues like not supporting .~lock files
- cp -av ${IMAGE_ROOTFS}$entry ${WORKDIR}/tmp-mnt-boot || true
+ cp -av ${IMAGE_ROOTFS}$entry $TMP/boot || true
done
fi
- echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${IMAGE_ROOTFS}/etc/image-version-info
-
- # Cleanup VFAT mount
- echo "Cleaning up VFAT mount"
- umount ${WORKDIR}/tmp-mnt-boot
- ${LOSETUP} -d ${LOOPDEV_BOOT} || true
-
- # Prepare rootfs parition
- echo "Creating rootfs loopback"
- ${LOSETUP} ${LOOPDEV_FS} ${SDIMG} -o ${FS_OFFSET}
-
- FS_NUM_INODES=$(echo $FS_SIZE_BLOCKS / 4 | bc)
-
- case "${ROOTFSTYPE}" in
- ext3)
- genext2fs -z -N $FS_NUM_INODES -b $FS_SIZE_BLOCKS -d ${IMAGE_ROOTFS} ${LOOPDEV_FS}
- tune2fs -L ${IMAGE_NAME} -j ${LOOPDEV_FS}
- ;;
- ext4)
- genext2fs -z -N $FS_NUM_INODES -b $FS_SIZE_BLOCKS -d ${IMAGE_ROOTFS} ${LOOPDEV_FS}
- tune2fs -L ${IMAGE_NAME} -j -O extents,uninit_bg,dir_index ${LOOPDEV_FS}
- ;;
- *)
- echo "Please set ROOTFSTYPE to something supported"
- exit 1
- ;;
- esac
-
- ${LOSETUP} -d ${LOOPDEV_FS} || true
-
- gzip -c ${WORKDIR}/sd.img > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-${IMAGEDATESTAMP}.img.gz
- rm -f ${WORKDIR}/sd.img
+ dd if=/dev/zero of=${SDIMG} bs=$(expr 1000 \* 1000) count=${SDIMG_SIZE}
+
+ # Create the boot filesystem
+ BOOT_OFFSET=32256
+ BOOT_BLOCKS=$(du -bks $TMP/boot | cut -f 1)
+ BOOT_SIZE=$(expr $BOOT_BLOCKS + ${BOOTDD_EXTRA_SPACE})
+ mkfs.vfat -n ${BOOTDD_VOLUME_ID} -d $TMP/boot -C $TMP/boot.img $BOOT_SIZE
+
+ # Create partition table
+ END1=$(expr $BOOT_SIZE \* 1024)
+ END2=$(expr $END1 + 512)
+ parted -s ${SDIMG} mklabel msdos
+ parted -s ${SDIMG} mkpart primary fat16 ${BOOT_OFFSET}B ${END1}B
+ parted -s ${SDIMG} mkpart primary ext3 ${END2}B 100%
+ parted -s ${SDIMG} set 1 boot on
+ parted ${SDIMG} print
+
+ OFFSET1=$(expr $BOOT_OFFSET / 512)
+ OFFSET2=$(expr $END2 / 512)
+ dd if=$TMP/boot.img of=${SDIMG} conv=notrunc seek=$OFFSET1 bs=512
+ dd if=${ROOTFS} of=${SDIMG} conv=notrunc seek=$OFFSET2 bs=512
+
+ cd ${DEPLOY_DIR_IMAGE}
+ ln -sf ${IMAGE_NAME}.sdimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.sdimg
}
--
1.7.2.5
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 2/3] ti-hw-bringup-image: adapt to newer sdcard_image class
2011-11-29 12:41 [PATCH v2 0/3] Rewrite sdcard_image.bbclass Otavio Salvador
2011-11-29 12:41 ` [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount Otavio Salvador
@ 2011-11-29 12:41 ` Otavio Salvador
2011-11-29 12:41 ` [PATCH v2 3/3] cloud9-image: " Otavio Salvador
2 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2011-11-29 12:41 UTC (permalink / raw)
To: meta-ti
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
recipes-misc/images/ti-hw-bringup-image.bb | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/recipes-misc/images/ti-hw-bringup-image.bb b/recipes-misc/images/ti-hw-bringup-image.bb
index 4e708bb..4c16301 100644
--- a/recipes-misc/images/ti-hw-bringup-image.bb
+++ b/recipes-misc/images/ti-hw-bringup-image.bb
@@ -38,4 +38,7 @@ IMAGE_LOGIN_MANAGER = "tinylogin shadow"
export IMAGE_BASENAME = "TI-hw-bringup"
+ROOTFS = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3"
+IMAGE_FSTYPES = "ext3"
+
inherit sdcard_image
--
1.7.2.5
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 3/3] cloud9-image: adapt to newer sdcard_image class
2011-11-29 12:41 [PATCH v2 0/3] Rewrite sdcard_image.bbclass Otavio Salvador
2011-11-29 12:41 ` [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount Otavio Salvador
2011-11-29 12:41 ` [PATCH v2 2/3] ti-hw-bringup-image: adapt to newer sdcard_image class Otavio Salvador
@ 2011-11-29 12:41 ` Otavio Salvador
2 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2011-11-29 12:41 UTC (permalink / raw)
To: meta-ti
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
recipes-misc/images/cloud9-image.bb | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/recipes-misc/images/cloud9-image.bb b/recipes-misc/images/cloud9-image.bb
index 826dc93..7214d91 100644
--- a/recipes-misc/images/cloud9-image.bb
+++ b/recipes-misc/images/cloud9-image.bb
@@ -4,8 +4,6 @@ require ti-hw-bringup-image.bb
FATPAYLOAD = "${datadir}/beaglebone-getting-started/*"
-ROOTFSTYPE_beaglebone = "ext4"
-
IMAGE_INSTALL += " \
cloud9 \
task-sdk-target \
@@ -27,5 +25,7 @@ IMAGE_INSTALL += " \
nodejs-dev \
"
-export IMAGE_BASENAME = "Cloud9-IDE"
+ROOTFS_beaglebone = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4"
+IMAGE_FSTYPES_beaglebone= "ext4"
+export IMAGE_BASENAME = "Cloud9-IDE"
--
1.7.2.5
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-11-29 12:41 ` [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount Otavio Salvador
@ 2011-11-29 12:53 ` Otavio Salvador
2011-11-29 13:22 ` Koen Kooi
0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2011-11-29 12:53 UTC (permalink / raw)
To: meta-ti
[-- Attachment #1: Type: text/plain, Size: 687 bytes --]
On Tue, Nov 29, 2011 at 10:41, Otavio Salvador <otavio@ossystems.com.br>wrote:
> ...
+# Copyright (C) 2011 O.S. Systems Software LTDA.
> +#
> +# Create an image that can by written onto a SD card using dd.
> +#
> +# External variables needed:
> +# ${ROOTFS} - the rootfs image to incorporate
>
I added Joel in copyright noticed as he did the first version of it. You
can look at
https://github.com/OSSystems/meta-ti/commit/cc8f9eeb2e73c77cdb24f8d8eb2398ea12d660b3
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
[-- Attachment #2: Type: text/html, Size: 1376 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-11-29 12:53 ` Otavio Salvador
@ 2011-11-29 13:22 ` Koen Kooi
2011-11-29 13:32 ` William Mills
0 siblings, 1 reply; 20+ messages in thread
From: Koen Kooi @ 2011-11-29 13:22 UTC (permalink / raw)
To: Otavio Salvador; +Cc: meta-ti
[-- Attachment #1: Type: text/plain, Size: 700 bytes --]
Op 29 nov. 2011, om 13:53 heeft Otavio Salvador het volgende geschreven:
> On Tue, Nov 29, 2011 at 10:41, Otavio Salvador <otavio@ossystems.com.br> wrote:
> ...
> +# Copyright (C) 2011 O.S. Systems Software LTDA.
> +#
> +# Create an image that can by written onto a SD card using dd.
> +#
> +# External variables needed:
> +# ${ROOTFS} - the rootfs image to incorporate
>
> I added Joel in copyright noticed as he did the first version of it. You can look at https://github.com/OSSystems/meta-ti/commit/cc8f9eeb2e73c77cdb24f8d8eb2398ea12d660b3
And I wrote the original and then rewrote Joels version. So lets leave out any copyright statement from the class.
regards,
Koen
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 169 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-11-29 13:22 ` Koen Kooi
@ 2011-11-29 13:32 ` William Mills
2011-11-29 13:38 ` Otavio Salvador
0 siblings, 1 reply; 20+ messages in thread
From: William Mills @ 2011-11-29 13:32 UTC (permalink / raw)
To: Koen Kooi; +Cc: meta-ti
On 11/29/2011 08:22 AM, Koen Kooi wrote:
>
> Op 29 nov. 2011, om 13:53 heeft Otavio Salvador het volgende geschreven:
>
>> On Tue, Nov 29, 2011 at 10:41, Otavio Salvador<otavio@ossystems.com.br> wrote:
>> ...
>> +# Copyright (C) 2011 O.S. Systems Software LTDA.
>> +#
>> +# Create an image that can by written onto a SD card using dd.
>> +#
>> +# External variables needed:
>> +# ${ROOTFS} - the rootfs image to incorporate
>>
>> I added Joel in copyright noticed as he did the first version of it. You can look at https://github.com/OSSystems/meta-ti/commit/cc8f9eeb2e73c77cdb24f8d8eb2398ea12d660b3
>
> And I wrote the original and then rewrote Joels version. So lets leave out any copyright statement from the class.
>
A copyright notice in a file without an explicit statement of license
(in the same file) should always be rejected as it will cause major
problems with all license review processes (including TI's).
I agree with Koen that it is best to just drop the (c) notice.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-11-29 13:32 ` William Mills
@ 2011-11-29 13:38 ` Otavio Salvador
2011-11-29 17:12 ` Koen Kooi
0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2011-11-29 13:38 UTC (permalink / raw)
To: William Mills; +Cc: meta-ti
[-- Attachment #1: Type: text/plain, Size: 1533 bytes --]
On Tue, Nov 29, 2011 at 11:32, William Mills <wmills@ti.com> wrote:
>
> On 11/29/2011 08:22 AM, Koen Kooi wrote:
>>
>> Op 29 nov. 2011, om 13:53 heeft Otavio Salvador het volgende geschreven:
>>
>>> On Tue, Nov 29, 2011 at 10:41, Otavio Salvador<otavio@ossystems.com.**br<otavio@ossystems.com.br>>
>>> wrote:
>>> ...
>>> +# Copyright (C) 2011 O.S. Systems Software LTDA.
>>> +#
>>> +# Create an image that can by written onto a SD card using dd.
>>> +#
>>> +# External variables needed:
>>> +# ${ROOTFS} - the rootfs image to incorporate
>>>
>>> I added Joel in copyright noticed as he did the first version of it. You
>>> can look at https://github.com/OSSystems/**meta-ti/commit/**
>>> cc8f9eeb2e73c77cdb24f8d8eb2398**ea12d660b3<https://github.com/OSSystems/meta-ti/commit/cc8f9eeb2e73c77cdb24f8d8eb2398ea12d660b3>
>>>
>>
>> And I wrote the original and then rewrote Joels version. So lets leave
>> out any copyright statement from the class.
>>
>>
> A copyright notice in a file without an explicit statement of license (in
> the same file) should always be rejected as it will cause major problems
> with all license review processes (including TI's).
>
> I agree with Koen that it is best to just drop the (c) notice.
>
No problem; I will wait for more comments and do that for a v3 version.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
[-- Attachment #2: Type: text/html, Size: 2323 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-11-29 13:38 ` Otavio Salvador
@ 2011-11-29 17:12 ` Koen Kooi
2011-11-29 17:48 ` Koen Kooi
0 siblings, 1 reply; 20+ messages in thread
From: Koen Kooi @ 2011-11-29 17:12 UTC (permalink / raw)
To: Otavio Salvador; +Cc: meta-ti
[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]
Op 29 nov. 2011, om 14:38 heeft Otavio Salvador het volgende geschreven:
> On Tue, Nov 29, 2011 at 11:32, William Mills <wmills@ti.com> wrote:
> On 11/29/2011 08:22 AM, Koen Kooi wrote:
> Op 29 nov. 2011, om 13:53 heeft Otavio Salvador het volgende geschreven:
> On Tue, Nov 29, 2011 at 10:41, Otavio Salvador<otavio@ossystems.com.br> wrote:
> ...
> +# Copyright (C) 2011 O.S. Systems Software LTDA.
> +#
> +# Create an image that can by written onto a SD card using dd.
> +#
> +# External variables needed:
> +# ${ROOTFS} - the rootfs image to incorporate
>
> I added Joel in copyright noticed as he did the first version of it. You can look at https://github.com/OSSystems/meta-ti/commit/cc8f9eeb2e73c77cdb24f8d8eb2398ea12d660b3
>
> And I wrote the original and then rewrote Joels version. So lets leave out any copyright statement from the class.
>
>
> A copyright notice in a file without an explicit statement of license (in the same file) should always be rejected as it will cause major problems with all license review processes (including TI's).
>
> I agree with Koen that it is best to just drop the (c) notice.
>
> No problem; I will wait for more comments and do that for a v3 version.
I'm testing the latest version from your github, I should have more feedback tomorrow.
regars,
Koen
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 169 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-11-29 17:12 ` Koen Kooi
@ 2011-11-29 17:48 ` Koen Kooi
2011-11-29 17:51 ` Otavio Salvador
0 siblings, 1 reply; 20+ messages in thread
From: Koen Kooi @ 2011-11-29 17:48 UTC (permalink / raw)
To: Otavio Salvador; +Cc: meta-ti
[-- Attachment #1: Type: text/plain, Size: 1526 bytes --]
Op 29 nov. 2011, om 18:12 heeft Koen Kooi het volgende geschreven:
>
> Op 29 nov. 2011, om 14:38 heeft Otavio Salvador het volgende geschreven:
>
>> On Tue, Nov 29, 2011 at 11:32, William Mills <wmills@ti.com> wrote:
>> On 11/29/2011 08:22 AM, Koen Kooi wrote:
>> Op 29 nov. 2011, om 13:53 heeft Otavio Salvador het volgende geschreven:
>> On Tue, Nov 29, 2011 at 10:41, Otavio Salvador<otavio@ossystems.com.br> wrote:
>> ...
>> +# Copyright (C) 2011 O.S. Systems Software LTDA.
>> +#
>> +# Create an image that can by written onto a SD card using dd.
>> +#
>> +# External variables needed:
>> +# ${ROOTFS} - the rootfs image to incorporate
>>
>> I added Joel in copyright noticed as he did the first version of it. You can look at https://github.com/OSSystems/meta-ti/commit/cc8f9eeb2e73c77cdb24f8d8eb2398ea12d660b3
>>
>> And I wrote the original and then rewrote Joels version. So lets leave out any copyright statement from the class.
>>
>>
>> A copyright notice in a file without an explicit statement of license (in the same file) should always be rejected as it will cause major problems with all license review processes (including TI's).
>>
>> I agree with Koen that it is best to just drop the (c) notice.
>>
>> No problem; I will wait for more comments and do that for a v3 version.
>
> I'm testing the latest version from your github, I should have more feedback tomorrow.
mkfs.vfat keeps segfaulting at different points, I'll try to find out why.
regards,
Koen
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 169 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-11-29 17:48 ` Koen Kooi
@ 2011-11-29 17:51 ` Otavio Salvador
2011-12-05 11:30 ` Koen Kooi
0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2011-11-29 17:51 UTC (permalink / raw)
To: Koen Kooi; +Cc: meta-ti
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
On Tue, Nov 29, 2011 at 15:48, Koen Kooi <koen@dominion.thruhere.net> wrote:
> mkfs.vfat keeps segfaulting at different points, I'll try to find out why.
>
It works fine here.
Maybe a change in your layer?
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
[-- Attachment #2: Type: text/html, Size: 929 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-11-29 17:51 ` Otavio Salvador
@ 2011-12-05 11:30 ` Koen Kooi
2011-12-05 11:39 ` Otavio Salvador
2011-12-05 19:13 ` William Mills
0 siblings, 2 replies; 20+ messages in thread
From: Koen Kooi @ 2011-12-05 11:30 UTC (permalink / raw)
To: Otavio Salvador; +Cc: meta-ti
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
Op 29 nov. 2011, om 18:51 heeft Otavio Salvador het volgende geschreven:
> On Tue, Nov 29, 2011 at 15:48, Koen Kooi <koen@dominion.thruhere.net> wrote:
> mkfs.vfat keeps segfaulting at different points, I'll try to find out why.
>
> It works fine here.
>
> Maybe a change in your layer?
I did some more tests (MACHINE=beaglebone bitbake cloud9-image) and with your patches mkfs.vfat segfaults, without the patches it works. I don't know why that is.
I do want to get rid of the loopdevices, so if other people on this list can test these patches as well...
regards,
Koen
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 169 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-12-05 11:30 ` Koen Kooi
@ 2011-12-05 11:39 ` Otavio Salvador
2011-12-05 11:59 ` Koen Kooi
2011-12-05 19:13 ` William Mills
1 sibling, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2011-12-05 11:39 UTC (permalink / raw)
To: Koen Kooi; +Cc: meta-ti
[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]
On Mon, Dec 5, 2011 at 09:30, Koen Kooi <koen@dominion.thruhere.net> wrote:
> Op 29 nov. 2011, om 18:51 heeft Otavio Salvador het volgende geschreven:
> > On Tue, Nov 29, 2011 at 15:48, Koen Kooi <koen@dominion.thruhere.net>
> wrote:
> > mkfs.vfat keeps segfaulting at different points, I'll try to find out
> why.
> >
> > It works fine here.
> >
> > Maybe a change in your layer?
>
> I did some more tests (MACHINE=beaglebone bitbake cloud9-image) and with
> your patches mkfs.vfat segfaults, without the patches it works. I don't
> know why that is.
> I do want to get rid of the loopdevices, so if other people on this list
> can test these patches as well...
>
I will try to reproduce your issue here.
I didn't test with cloud9-image but one image from us that is a small one.
Will try this case and see if I can reproduce it.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
[-- Attachment #2: Type: text/html, Size: 1642 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-12-05 11:39 ` Otavio Salvador
@ 2011-12-05 11:59 ` Koen Kooi
2011-12-06 13:43 ` Otavio Salvador
0 siblings, 1 reply; 20+ messages in thread
From: Koen Kooi @ 2011-12-05 11:59 UTC (permalink / raw)
To: Otavio Salvador; +Cc: meta-ti
[-- Attachment #1: Type: text/plain, Size: 1185 bytes --]
Op 5 dec. 2011, om 12:39 heeft Otavio Salvador het volgende geschreven:
> On Mon, Dec 5, 2011 at 09:30, Koen Kooi <koen@dominion.thruhere.net> wrote:
> Op 29 nov. 2011, om 18:51 heeft Otavio Salvador het volgende geschreven:
> > On Tue, Nov 29, 2011 at 15:48, Koen Kooi <koen@dominion.thruhere.net> wrote:
> > mkfs.vfat keeps segfaulting at different points, I'll try to find out why.
> >
> > It works fine here.
> >
> > Maybe a change in your layer?
>
> I did some more tests (MACHINE=beaglebone bitbake cloud9-image) and with your patches mkfs.vfat segfaults, without the patches it works. I don't know why that is.
> I do want to get rid of the loopdevices, so if other people on this list can test these patches as well...
>
> I will try to reproduce your issue here.
>
> I didn't test with cloud9-image but one image from us that is a small one. Will try this case and see if I can reproduce it.
my suspicion is that it segfaults on the cloud9-image because we copy over a lot of files into the vfat partition.
Somewhat related, do you know a way to create an ext4 fs that doesn't require an fsck to setup the dirhashes and friends?
regards,
Koen
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 169 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-12-05 11:30 ` Koen Kooi
2011-12-05 11:39 ` Otavio Salvador
@ 2011-12-05 19:13 ` William Mills
2011-12-05 20:00 ` Tom Rini
1 sibling, 1 reply; 20+ messages in thread
From: William Mills @ 2011-12-05 19:13 UTC (permalink / raw)
To: Koen Kooi; +Cc: meta-ti
On 12/05/2011 06:30 AM, Koen Kooi wrote:
>
> Op 29 nov. 2011, om 18:51 heeft Otavio Salvador het volgende geschreven:
>
>> On Tue, Nov 29, 2011 at 15:48, Koen Kooi<koen@dominion.thruhere.net> wrote:
>> mkfs.vfat keeps segfaulting at different points, I'll try to find out why.
>>
>> It works fine here.
>>
>> Maybe a change in your layer?
>
> I did some more tests (MACHINE=beaglebone bitbake cloud9-image) and with your patches mkfs.vfat segfaults, without the patches it works. I don't know why that is.
> I do want to get rid of the loopdevices, so if other people on this list can test these patches as well...
>
Do you guys know if a similar method will be available for non-extN
file-systems? btrfs is the most likely case to come up first.
If the answer is no, could we keep both methods and just default to the
no-loop method?
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-12-05 19:13 ` William Mills
@ 2011-12-05 20:00 ` Tom Rini
0 siblings, 0 replies; 20+ messages in thread
From: Tom Rini @ 2011-12-05 20:00 UTC (permalink / raw)
To: William Mills; +Cc: meta-ti
On Mon, Dec 5, 2011 at 12:13 PM, William Mills <wmills@ti.com> wrote:
> On 12/05/2011 06:30 AM, Koen Kooi wrote:
>>
>>
>> Op 29 nov. 2011, om 18:51 heeft Otavio Salvador het volgende geschreven:
>>
>>> On Tue, Nov 29, 2011 at 15:48, Koen Kooi<koen@dominion.thruhere.net>
>>> wrote:
>>> mkfs.vfat keeps segfaulting at different points, I'll try to find out
>>> why.
>>>
>>> It works fine here.
>>>
>>> Maybe a change in your layer?
>>
>>
>> I did some more tests (MACHINE=beaglebone bitbake cloud9-image) and with
>> your patches mkfs.vfat segfaults, without the patches it works. I don't know
>> why that is.
>> I do want to get rid of the loopdevices, so if other people on this list
>> can test these patches as well...
>>
>
> Do you guys know if a similar method will be available for non-extN
> file-systems? btrfs is the most likely case to come up first.
>
> If the answer is no, could we keep both methods and just default to the
> no-loop method?
It all depends on which filesystem. For btrfs, 30sec of googling says
we could probably chain btrfs-convert to turn a genext2fs'd image into
btrfs. Or get someone to write a utility that does this from scratch.
--
Tom
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-12-05 11:59 ` Koen Kooi
@ 2011-12-06 13:43 ` Otavio Salvador
2011-12-06 14:10 ` Otavio Salvador
0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2011-12-06 13:43 UTC (permalink / raw)
To: Koen Kooi; +Cc: meta-ti
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
On Mon, Dec 5, 2011 at 09:59, Koen Kooi <koen@dominion.thruhere.net> wrote:
> ...
my suspicion is that it segfaults on the cloud9-image because we copy over
> a lot of files into the vfat partition.
>
This is dependent on how many files are copied onto the fat filesystem.
This is also dependent on use of -d option that copies a directory onto the
fs instead of just creating a filesystem.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
[-- Attachment #2: Type: text/html, Size: 1168 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-12-06 13:43 ` Otavio Salvador
@ 2011-12-06 14:10 ` Otavio Salvador
2011-12-15 9:19 ` Koen Kooi
0 siblings, 1 reply; 20+ messages in thread
From: Otavio Salvador @ 2011-12-06 14:10 UTC (permalink / raw)
To: Koen Kooi; +Cc: meta-ti
[-- Attachment #1: Type: text/plain, Size: 792 bytes --]
On Tue, Dec 6, 2011 at 11:43, Otavio Salvador <otavio@ossystems.com.br>wrote:
> On Mon, Dec 5, 2011 at 09:59, Koen Kooi <koen@dominion.thruhere.net>wrote:
>
>> ...
>
> my suspicion is that it segfaults on the cloud9-image because we copy over
>> a lot of files into the vfat partition.
>>
>
> This is dependent on how many files are copied onto the fat filesystem.
> This is also dependent on use of -d option that copies a directory onto the
> fs instead of just creating a filesystem.
>
This is a know issue, as shown at
http://bugzilla.pokylinux.org/show_bug.cgi?id=1783
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
[-- Attachment #2: Type: text/html, Size: 1687 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-12-06 14:10 ` Otavio Salvador
@ 2011-12-15 9:19 ` Koen Kooi
2011-12-15 10:46 ` Otavio Salvador
0 siblings, 1 reply; 20+ messages in thread
From: Koen Kooi @ 2011-12-15 9:19 UTC (permalink / raw)
To: Otavio Salvador; +Cc: meta-ti
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]
Op 6 dec. 2011, om 15:10 heeft Otavio Salvador het volgende geschreven:
> On Tue, Dec 6, 2011 at 11:43, Otavio Salvador <otavio@ossystems.com.br> wrote:
> On Mon, Dec 5, 2011 at 09:59, Koen Kooi <koen@dominion.thruhere.net> wrote:
> ...
> my suspicion is that it segfaults on the cloud9-image because we copy over a lot of files into the vfat partition.
>
> This is dependent on how many files are copied onto the fat filesystem. This is also dependent on use of -d option that copies a directory onto the fs instead of just creating a filesystem.
>
> This is a know issue, as shown at http://bugzilla.pokylinux.org/show_bug.cgi?id=1783
There's a fix pending for that in OE-core: http://patches.openembedded.org/patch/16951/
Could you rebase and resend your patches after that goes in?
regards,
Koen
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 169 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount
2011-12-15 9:19 ` Koen Kooi
@ 2011-12-15 10:46 ` Otavio Salvador
0 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2011-12-15 10:46 UTC (permalink / raw)
To: Koen Kooi; +Cc: meta-ti
[-- Attachment #1: Type: text/plain, Size: 602 bytes --]
On Thu, Dec 15, 2011 at 07:19, Koen Kooi <koen@dominion.thruhere.net> wrote:
> > This is a know issue, as shown at
> http://bugzilla.pokylinux.org/show_bug.cgi?id=1783
>
> There's a fix pending for that in OE-core:
> http://patches.openembedded.org/patch/16951/
>
> Could you rebase and resend your patches after that goes in?
>
Yes; IIRC I did minor fixes on this patch after sending it.
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
[-- Attachment #2: Type: text/html, Size: 1245 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2011-12-15 10:47 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-29 12:41 [PATCH v2 0/3] Rewrite sdcard_image.bbclass Otavio Salvador
2011-11-29 12:41 ` [PATCH v2 1/3] sdcard_image: rewrote to avoid using loopback and mount/unmount Otavio Salvador
2011-11-29 12:53 ` Otavio Salvador
2011-11-29 13:22 ` Koen Kooi
2011-11-29 13:32 ` William Mills
2011-11-29 13:38 ` Otavio Salvador
2011-11-29 17:12 ` Koen Kooi
2011-11-29 17:48 ` Koen Kooi
2011-11-29 17:51 ` Otavio Salvador
2011-12-05 11:30 ` Koen Kooi
2011-12-05 11:39 ` Otavio Salvador
2011-12-05 11:59 ` Koen Kooi
2011-12-06 13:43 ` Otavio Salvador
2011-12-06 14:10 ` Otavio Salvador
2011-12-15 9:19 ` Koen Kooi
2011-12-15 10:46 ` Otavio Salvador
2011-12-05 19:13 ` William Mills
2011-12-05 20:00 ` Tom Rini
2011-11-29 12:41 ` [PATCH v2 2/3] ti-hw-bringup-image: adapt to newer sdcard_image class Otavio Salvador
2011-11-29 12:41 ` [PATCH v2 3/3] cloud9-image: " Otavio Salvador
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.