All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-raspberrypi][PATCH 1/3] linux: Add a Linux 3.6 kernel recipe
@ 2013-01-25 13:33 Jan Schmidt
  2013-01-25 13:33 ` [meta-raspberrypi][PATCH 2/3] bcm2835-bootfiles: Bump the firmware revision Jan Schmidt
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jan Schmidt @ 2013-01-25 13:33 UTC (permalink / raw)
  To: yocto

* Add a recipe to build the linux kernel from the rpi-3.6.y branch at
  https://github.com/raspberrypi/linux
* Since this has a higher version, it will be the preferred linux kernel
  by default.

Signed-off-by: Jan Schmidt <thaytan@noraisin.net>
---
 recipes-kernel/linux/linux-raspberrypi_3.6.11.bb |   34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-raspberrypi_3.6.11.bb

diff --git a/recipes-kernel/linux/linux-raspberrypi_3.6.11.bb b/recipes-kernel/linux/linux-raspberrypi_3.6.11.bb
new file mode 100644
index 0000000..caee7f2
--- /dev/null
+++ b/recipes-kernel/linux/linux-raspberrypi_3.6.11.bb
@@ -0,0 +1,34 @@
+require linux.inc
+
+DESCRIPTION = "Linux kernel for the RaspberryPi board"
+COMPATIBLE_MACHINE = "raspberrypi"
+
+PR = "r6"
+PV_append = "+git${SRCREV}"
+
+SRCREV = "31a951046155b27361127d9cf85a1f58719fe9b3"
+SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.6.y \
+          "
+S = "${WORKDIR}/git"
+
+# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
+KERNEL_DEFCONFIG = "bcmrpi_defconfig"
+
+# CMDLINE for raspberrypi
+CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
+
+UDEV_GE_141 ?= "1"
+
+do_configure_prepend() {
+	install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
+}
+
+do_install_prepend() {
+	install -d ${D}/lib/firmware
+}
+
+do_deploy_append() {
+	# Deploy cmdline.txt
+	install -d ${DEPLOYDIR}/bcm2835-bootfiles
+	echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
+}
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-raspberrypi][PATCH 2/3] bcm2835-bootfiles: Bump the firmware revision
  2013-01-25 13:33 [meta-raspberrypi][PATCH 1/3] linux: Add a Linux 3.6 kernel recipe Jan Schmidt
@ 2013-01-25 13:33 ` Jan Schmidt
  2013-01-27 13:31   ` Andrei Gherzan
  2013-01-25 13:33 ` [meta-raspberrypi][PATCH 3/3] sdcard-image: Use the size of the generated rootfs Jan Schmidt
  2013-01-27 13:29 ` [meta-raspberrypi][PATCH 1/3] linux: Add a Linux 3.6 kernel recipe Andrei Gherzan
  2 siblings, 1 reply; 9+ messages in thread
From: Jan Schmidt @ 2013-01-25 13:33 UTC (permalink / raw)
  To: yocto

* Pull in a newer firmware revision (0ac68c 7th Jan 2013) from
  https://github.com/raspberrypi/firmware for various fixes and
  improvements

Signed-off-by: Jan Schmidt <thaytan@noraisin.net>
---
 recipes-bcm/common/firmware.inc |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/recipes-bcm/common/firmware.inc b/recipes-bcm/common/firmware.inc
index 83f9214..166bb7b 100644
--- a/recipes-bcm/common/firmware.inc
+++ b/recipes-bcm/common/firmware.inc
@@ -1,6 +1,6 @@
-# 31/10/2012 firmware; this can be overridden from distro config
-RPIFW_SRCREV ?= "537c78b113d06e37e2cca90a0b3d3f39a129ee23"
-RPIFW_DATE ?= "20121031"
+# 7/1/2013 firmware; this can be overridden from distro config
+RPIFW_SRCREV ?= "0ac68cce44d4550c251172e8524100090e8211fa"
+RPIFW_DATE ?= "20130107"
 
 SRCREV = "${RPIFW_SRCREV}"
 PV = "${RPIFW_DATE}"
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [meta-raspberrypi][PATCH 3/3] sdcard-image: Use the size of the generated rootfs
  2013-01-25 13:33 [meta-raspberrypi][PATCH 1/3] linux: Add a Linux 3.6 kernel recipe Jan Schmidt
  2013-01-25 13:33 ` [meta-raspberrypi][PATCH 2/3] bcm2835-bootfiles: Bump the firmware revision Jan Schmidt
@ 2013-01-25 13:33 ` Jan Schmidt
  2013-01-26  0:19   ` Andrei Gherzan
  2013-01-27 13:29 ` [meta-raspberrypi][PATCH 1/3] linux: Add a Linux 3.6 kernel recipe Andrei Gherzan
  2 siblings, 1 reply; 9+ messages in thread
From: Jan Schmidt @ 2013-01-25 13:33 UTC (permalink / raw)
  To: yocto

When constructing the SD card image, the code was using
the inherited ROOTFS_SIZE, which is the size of the
rootfs contents. When building (for example) a compressed
rootfs, this allocates a partition much larger than necessary.

Instead, take the size of the generated rootfs file that is
about to be written into the generated image.

Signed-off-by: Jan Schmidt <thaytan@noraisin.net>
---
 classes/sdcard_image-rpi.bbclass |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass
index 421f561..355ff9c 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -60,7 +60,8 @@ IMAGE_CMD_rpi-sdimg () {
 	# Align partitions
 	BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
 	BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
-	SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE + ${IMAGE_ROOTFS_ALIGNMENT})
+	ROOTFS_SIZE=`du -ks ${SDIMG_ROOTFS} | awk '{print $1}'`
+	SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE})
 
 	# Initialize sdcard image file
 	dd if=/dev/zero of=${SDIMG} bs=1 count=0 seek=$(expr 1024 \* ${SDIMG_SIZE})
@@ -71,7 +72,7 @@ IMAGE_CMD_rpi-sdimg () {
 	parted -s ${SDIMG} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT})
 	parted -s ${SDIMG} set 1 boot on
 	# Create rootfs partition
-	parted -s ${SDIMG} unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT} \+ ${ROOTFS_SIZE})
+	parted -s ${SDIMG} unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) $(expr ${SDIMG_SIZE} - 1)
 	parted ${SDIMG} print
 
 	# Create a vfat image with boot files
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [meta-raspberrypi][PATCH 3/3] sdcard-image: Use the size of the generated rootfs
  2013-01-25 13:33 ` [meta-raspberrypi][PATCH 3/3] sdcard-image: Use the size of the generated rootfs Jan Schmidt
@ 2013-01-26  0:19   ` Andrei Gherzan
  2013-01-26  8:53     ` Jan Schmidt
       [not found]     ` <5103997b.a3e8440a.60aa.ffffa1c8SMTPIN_ADDED_BROKEN@mx.google.com>
  0 siblings, 2 replies; 9+ messages in thread
From: Andrei Gherzan @ 2013-01-26  0:19 UTC (permalink / raw)
  To: Jan Schmidt; +Cc: Yocto Project

[-- Attachment #1: Type: text/plain, Size: 1635 bytes --]

On Fri, Jan 25, 2013 at 3:33 PM, Jan Schmidt <thaytan@noraisin.net> wrote:

> When constructing the SD card image, the code was using
> the inherited ROOTFS_SIZE, which is the size of the
> rootfs contents. When building (for example) a compressed
> rootfs, this allocates a partition much larger than necessary.
>
> Instead, take the size of the generated rootfs file that is
> about to be written into the generated image.
>
> Signed-off-by: Jan Schmidt <thaytan@noraisin.net>
> ---
>  classes/sdcard_image-rpi.bbclass |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/classes/sdcard_image-rpi.bbclass
> b/classes/sdcard_image-rpi.bbclass
> index 421f561..355ff9c 100644
> --- a/classes/sdcard_image-rpi.bbclass
> +++ b/classes/sdcard_image-rpi.bbclass
> @@ -60,7 +60,8 @@ IMAGE_CMD_rpi-sdimg () {
>         # Align partitions
>         BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} +
> ${IMAGE_ROOTFS_ALIGNMENT} - 1)
>         BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} -
> ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
> -       SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} +
> ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE + ${IMAGE_ROOTFS_ALIGNMENT})
> +       ROOTFS_SIZE=`du -ks ${SDIMG_ROOTFS} | awk '{print $1}'`
>

This is a good idea but you will have to align the new ROOTFS_SIZE
to IMAGE_ROOTFS_ALIGNMENT.


> +       SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} +
> ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE})


So you are actually removing IMAGE_ROOTFS_ALIGNMENT space at the end of the
sd image. Why are you doing this? Nothing stated in the comment.

ag

[-- Attachment #2: Type: text/html, Size: 2365 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-raspberrypi][PATCH 3/3] sdcard-image: Use the size of the generated rootfs
  2013-01-26  0:19   ` Andrei Gherzan
@ 2013-01-26  8:53     ` Jan Schmidt
       [not found]     ` <5103997b.a3e8440a.60aa.ffffa1c8SMTPIN_ADDED_BROKEN@mx.google.com>
  1 sibling, 0 replies; 9+ messages in thread
From: Jan Schmidt @ 2013-01-26  8:53 UTC (permalink / raw)
  To: Andrei Gherzan; +Cc: Yocto Project

On Sat, 2013-01-26 at 02:19 +0200, Andrei Gherzan wrote:
> On Fri, Jan 25, 2013 at 3:33 PM, Jan Schmidt <thaytan@noraisin.net>
> wrote:

> 
> 
> This is a good idea but you will have to align the new ROOTFS_SIZE
> to IMAGE_ROOTFS_ALIGNMENT.
>  
>         +       SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} +
>         ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE}) 
> 
> 
> So you are actually removing IMAGE_ROOTFS_ALIGNMENT space at the end
> of the sd image. Why are you doing this? Nothing stated in the
> comment.

Sorry, yeah - I forgot to mention it. I removed it because it's
pointless. It's not actually aligning to anything (it doesn't calculate
an alignment based on the difference between the ROOTFS_SIZE and some
target multiple). Instead, it was just arbitrarily padding some
megabytes onto the end of the image file.

J.

> 
> 
> 
> ag

-- 
Jan Schmidt <thaytan@noraisin.net>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-raspberrypi][PATCH 3/3] sdcard-image: Use the size of the generated rootfs
       [not found]     ` <5103997b.a3e8440a.60aa.ffffa1c8SMTPIN_ADDED_BROKEN@mx.google.com>
@ 2013-01-26 10:26       ` Andrei Gherzan
  2013-01-26 11:13         ` Jan Schmidt
  0 siblings, 1 reply; 9+ messages in thread
From: Andrei Gherzan @ 2013-01-26 10:26 UTC (permalink / raw)
  To: Jan Schmidt; +Cc: Yocto Project

[-- Attachment #1: Type: text/plain, Size: 1241 bytes --]

On Jan 26, 2013 10:53 AM, "Jan Schmidt" <thaytan@noraisin.net> wrote:
>
> On Sat, 2013-01-26 at 02:19 +0200, Andrei Gherzan wrote:
> > On Fri, Jan 25, 2013 at 3:33 PM, Jan Schmidt <thaytan@noraisin.net>
> > wrote:
>
> >
> >
> > This is a good idea but you will have to align the new ROOTFS_SIZE
> > to IMAGE_ROOTFS_ALIGNMENT.
> >
> >         +       SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} +
> >         ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE})
> >
> >
> > So you are actually removing IMAGE_ROOTFS_ALIGNMENT space at the end
> > of the sd image. Why are you doing this? Nothing stated in the
> > comment.
>
> Sorry, yeah - I forgot to mention it. I removed it because it's
> pointless. It's not actually aligning to anything (it doesn't calculate
> an alignment based on the difference between the ROOTFS_SIZE and some
> target multiple). Instead, it was just arbitrarily padding some
> megabytes onto the end of the image file.
>

Makes sense. I added that because we had a strange bug where the final
sdimg file size was not enough. Maybe this was fixed now - something
related to parted. Please add your comment and modify the asci partition
layout in the bbclass file too.

Thanks,
Andrei

Thanks,

[-- Attachment #2: Type: text/html, Size: 1648 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-raspberrypi][PATCH 3/3] sdcard-image: Use the size of the generated rootfs
  2013-01-26 10:26       ` Andrei Gherzan
@ 2013-01-26 11:13         ` Jan Schmidt
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Schmidt @ 2013-01-26 11:13 UTC (permalink / raw)
  To: Andrei Gherzan; +Cc: Yocto Project

On Sat, 2013-01-26 at 12:26 +0200, Andrei Gherzan wrote:
> 
> On Jan 26, 2013 10:53 AM, "Jan Schmidt" <thaytan@noraisin.net> wrote:
> >
> > On Sat, 2013-01-26 at 02:19 +0200, Andrei Gherzan wrote:
> > > On Fri, Jan 25, 2013 at 3:33 PM, Jan Schmidt
> <thaytan@noraisin.net>
> > > wrote:
> >
> > >
> > >
> > > This is a good idea but you will have to align the new ROOTFS_SIZE
> > > to IMAGE_ROOTFS_ALIGNMENT.
> > >
> > >         +       SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} +
> > >         ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE})
> > >
> > >
> > > So you are actually removing IMAGE_ROOTFS_ALIGNMENT space at the
> end
> > > of the sd image. Why are you doing this? Nothing stated in the
> > > comment.
> >
> > Sorry, yeah - I forgot to mention it. I removed it because it's
> > pointless. It's not actually aligning to anything (it doesn't
> calculate
> > an alignment based on the difference between the ROOTFS_SIZE and
> some
> > target multiple). Instead, it was just arbitrarily padding some
> > megabytes onto the end of the image file.
> >
> 
> Makes sense. I added that because we had a strange bug where the final
> sdimg file size was not enough. Maybe this was fixed now - something
> related to parted. Please add your comment and modify the asci
> partition layout in the bbclass file too.

It may have been the use of the inherited ROOTFS_SIZE, which will be
slightly smaller than the ext3 fs produced, because it measure the size
of the contents of the fs.

I'll re-send the patch.

> 
> Thanks,
> Andrei
> 
> 
> 
> Thanks,
> 

-- 
Jan Schmidt <thaytan@noraisin.net>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-raspberrypi][PATCH 1/3] linux: Add a Linux 3.6 kernel recipe
  2013-01-25 13:33 [meta-raspberrypi][PATCH 1/3] linux: Add a Linux 3.6 kernel recipe Jan Schmidt
  2013-01-25 13:33 ` [meta-raspberrypi][PATCH 2/3] bcm2835-bootfiles: Bump the firmware revision Jan Schmidt
  2013-01-25 13:33 ` [meta-raspberrypi][PATCH 3/3] sdcard-image: Use the size of the generated rootfs Jan Schmidt
@ 2013-01-27 13:29 ` Andrei Gherzan
  2 siblings, 0 replies; 9+ messages in thread
From: Andrei Gherzan @ 2013-01-27 13:29 UTC (permalink / raw)
  To: Jan Schmidt; +Cc: yocto

On Sat, Jan 26, 2013 at 12:33:23AM +1100, Jan Schmidt wrote:
> * Add a recipe to build the linux kernel from the rpi-3.6.y branch at
>   https://github.com/raspberrypi/linux
> * Since this has a higher version, it will be the preferred linux kernel
>   by default.
>
> Signed-off-by: Jan Schmidt <thaytan@noraisin.net>
> ---
>  recipes-kernel/linux/linux-raspberrypi_3.6.11.bb |   34 ++++++++++++++++++++++
>  1 file changed, 34 insertions(+)
>  create mode 100644 recipes-kernel/linux/linux-raspberrypi_3.6.11.bb

Merged.

Thank you,

--
Andrei Gherzan
m: +40.744.478.414 | f: +40.31.816.28.12



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [meta-raspberrypi][PATCH 2/3] bcm2835-bootfiles: Bump the firmware revision
  2013-01-25 13:33 ` [meta-raspberrypi][PATCH 2/3] bcm2835-bootfiles: Bump the firmware revision Jan Schmidt
@ 2013-01-27 13:31   ` Andrei Gherzan
  0 siblings, 0 replies; 9+ messages in thread
From: Andrei Gherzan @ 2013-01-27 13:31 UTC (permalink / raw)
  To: Jan Schmidt; +Cc: yocto

On Sat, Jan 26, 2013 at 12:33:24AM +1100, Jan Schmidt wrote:
> * Pull in a newer firmware revision (0ac68c 7th Jan 2013) from
>   https://github.com/raspberrypi/firmware for various fixes and
>   improvements
>
> Signed-off-by: Jan Schmidt <thaytan@noraisin.net>
> ---
>  recipes-bcm/common/firmware.inc |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Merged.

Thank you,

--
Andrei Gherzan
m: +40.744.478.414 | f: +40.31.816.28.12



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-01-27 13:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25 13:33 [meta-raspberrypi][PATCH 1/3] linux: Add a Linux 3.6 kernel recipe Jan Schmidt
2013-01-25 13:33 ` [meta-raspberrypi][PATCH 2/3] bcm2835-bootfiles: Bump the firmware revision Jan Schmidt
2013-01-27 13:31   ` Andrei Gherzan
2013-01-25 13:33 ` [meta-raspberrypi][PATCH 3/3] sdcard-image: Use the size of the generated rootfs Jan Schmidt
2013-01-26  0:19   ` Andrei Gherzan
2013-01-26  8:53     ` Jan Schmidt
     [not found]     ` <5103997b.a3e8440a.60aa.ffffa1c8SMTPIN_ADDED_BROKEN@mx.google.com>
2013-01-26 10:26       ` Andrei Gherzan
2013-01-26 11:13         ` Jan Schmidt
2013-01-27 13:29 ` [meta-raspberrypi][PATCH 1/3] linux: Add a Linux 3.6 kernel recipe Andrei Gherzan

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.