Commit Graph

33 Commits

Author SHA1 Message Date
bfe2307cc4 sdcard_image-rpi.bbclass: Allocate more space for boot partition
The boot partition currently has a size of 20 MiB but just the start elf
binaries account almost 12 MiB, which means that only 8 MiB is left for
the kernel image. A recent kernel with many of its options built-in can
easily be more than 4 MiB so let's double the boot partition size to 40
MiB to make sure that it has enough room for the kernel image, the DTBs
and possible even a backup kernel.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
[javier: Extended the commit message]
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
2015-08-09 23:55:55 +02:00
d676d54f04 sdcard_image: Fix sdcard image generation
Recent updates to the MSDOS tools (OE-core is now at 3.0.28) have made
it an error to overwrite an image using mkfs.vfat.  This patch fixes
that problem by removing any old/stale images, thus starting from scratch.

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
2015-08-09 23:51:06 +02:00
4a4373c02d devicetree: auto-disable dts for old kernels
After '6392a63 rpi-base.inc: Use KERNEL_DEVICETREE by default' was
introduced, kernel versions < 3.18 might not be buildable. Since full
device tree support was introduced in 3.18 this change ensures that all
kernel < 3.18 will automatically disable device tree.

Signed-off-by: Petter Mabäcker <petter@technux.se>
2015-06-05 14:49:46 +02:00
54c5451a04 Add support for Raspberry PI 2
Add machine configuration file.
Change the kernel image name on SD card.
Use the defconfig for this machine (bcm2709_defconfig).

Change-Id: I6549d5f49b1ed32ef4d44aca6f7af4234618c1a8
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-08 14:46:42 +02:00
dedd45f4f8 Use variable for kernel image deployed name on SD card
Change-Id: I4a55b53d337930aae3351629a902dbac832ac958
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2015-02-08 00:30:40 +02:00
2dbc974596 devicetree: Add support for DT overlays with RPi bootloader
Compile overlay device trees and put them in 'overlays/' folder
on sdcard RPi boot partition.

Change-Id: I3da0032b3c2618165008eec1fc94e97824d09099
Signed-off-by: Francois Muller <francois@concept-embarque.fr>
2015-02-07 20:54:37 +01:00
4dc75cedf7 devicetree: Add minimal support with RPi bootloader
[RPi DT info] https://github.com/raspberrypi/documentation/blob/master/configuration/device-tree.md#part-3-using-device-trees-on-raspberry-pi

RPi bootloader detects a DT-ready kernel by checking for a specific trailer in kernel.img.
Using latest raspberrypi/firmware (firmware.inc) enables this check ability.
Using latest raspberrypi/tools (rpi-mkimage.bb) gives access to mkknlimg for adding the
required trailer to kernel image.


If KERNEL_DEVICETREE is filled in, the trailer is added to the kernel image before
kernel install task. While creating the SDCard image, this modified kernel is
put on boot partition (as kernel.img) as well as DeviceTree blobs (.dtb files).
If KERNEL_DEVICETREE is empty, this new process isn't operated, legacy one does.

KERNEL_DEVICETREE for RPi is really supported only starting from linux-rapsberry 3.18+
kernels, so as for now it defaults to empty (in machine config file).

Change-Id: Ifea71bbda729b8f3c47be7ba0ba03be5ad2ceeaa
Signed-off-by: Francois Muller <francois@concept-embarque.fr>
2015-02-05 14:07:00 +01:00
f638f7cf38 sdcard_image-rpi: make rpi-sdimg image dependent on rootfs type
The rootfs may be using a filesystem type other than ext3 so it should
not be hardcoded.

Change-Id: I71c1a96831ce4617b24de7743fe3b70ec5822a33
Signed-off-by: Jonathan Liu <net147@gmail.com>
2014-03-06 00:29:13 +11:00
a760ea5fa2 sdcard_image-rpi: Make rpi-sdimg image dependent on ext3
Change-Id: Ib48c8fd941be5ceb8fe2bcc087f53fb4ef1c0eb5
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2014-02-25 17:47:07 +02:00
c2102292fa sdcard_image-rpi.bbclass: use absolute path to rootfs
Change-Id: Ib513f195351b379dbb9f503dc5927f2018169b95
Signed-off-by: Jonathan Liu <net147@gmail.com>
2014-02-18 22:39:47 +11:00
5e62146ae3 Add initramfs support
Permit to build an image with initramfs.
Add information in README to build with initramfs.

Change-Id: Icb812151a22771717805ec0a82feb7993f462b47
Signed-off-by: Sébastien Mennetrier <s.mennetrier@innotis.org>
2014-02-14 01:23:33 +02:00
d9ce376660 sdcard_image-rpi: Add support for u-boot and uImage
If KERNEL_IMAGETYPE is uImage, use u-boot image as kernel.img and copy uImage
too. Otherwise, use kernel image as kernel.img (as we did until now
unconditionally).

Change-Id: Iac46a57e4266299f2fe5746cb6957dcfc0e90443
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2014-02-09 03:05:13 +02:00
164e87c291 sdcard_image-rpi.bbclass: Allow optional compression
Image files will typically contain lots of null blocks and should compress well.
This will help with distribution of images over slow network links.

Change-Id: Icec7454ff61cd81a2872037037a93ce01191ece5
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2013-11-12 17:17:46 +02:00
770b88b2ce sdcard_image-rpi.bbclass: Fix error in conditional test
When the shell tests for rootfs type I was seeing "[[: not found".  I
use echo and egrep to test for the xz rootfs type to work around this
error.

Signed-off-by: Seth Bollinger <seth.boll@gmail.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-05-02 14:11:32 +02:00
c5f81306b5 sdcard_image-rpi: Use the size of the generated rootfs
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, and round it
up to the IMAGE_ROOTFS_ALIGNMENT size.

Fix some comments - the alignment is 4MiB, not 4KiB.

Signed-off-by: Jan Schmidt <thaytan@noraisin.net>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-05-02 13:10:14 +02:00
fe5cd81d27 sdcard_image-rpi.bbclass: Copy startup files required for 16MB GPU operation.
start_cd.elf and fixup_cd.dat are required when running the system with
a 16MB GPU memory configuration.  This change copies all files contained
in bcm2835-bootfiles instead of cherry picking.

Signed-off-by: Seth Bollinger <seth.boll@gmail.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2013-05-01 21:20:42 +02:00
cf62711b7c sdcard_image-rpi: Remove RPI_GPU_FIRMWARE and add/remove files to boot partition
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-11-27 22:42:43 +02:00
4ed04f4073 sdcard_image-rpi: Use the partition table as described in comments
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-10-18 00:40:50 +03:00
e0f7145000 sdcard_image-rpi: Ship config.txt from RPi-config recipe
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-09-18 19:16:04 +03:00
ce41133438 sdcard_image-rpi: Fix xzcat command while writing rootfs partition
[GITHUB #74]

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-09-18 19:13:55 +03:00
29f4242ad0 sdcard_image-rpi: Ship cmdline.txt file
Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-09-16 21:36:53 +03:00
b5d53c70f0 sdcard_image-rpi.bbclass: Inherit image_types as this class will be in IMAGE_CLASSES
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-09-16 20:55:02 +03:00
b1331fce45 README: Move RPI_GPU_FIRMWARE instructions to README
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-09-16 20:55:01 +03:00
280c217470 sdcard_image-rpi: Fix SDIMG_SIZE
The final SDIMG_SIZE was missing a IMAGE_ROOTFS_ALIGNMENT padding.

[GITHUB #65]

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-09-16 03:17:34 +03:00
b059c59f71 sdcard_image-rpi: Align SD partition and optimize final SD image
SD image file was 4G in size but actually the rootfs partition was only
60MB (ex.: rpi-basic-image).
The image file size is not fixed anymore but calculated inside this
class. In this way we will setup the partition for rootfs to fit the
ext file used as SDIMG_ROOTFS. By default the free space is calculated
with IMAGE_OVERHEAD_FACTOR which is by default 1.3. If more free space
is needed this can be overwritten.
IMAGE_ROOTFS_ALIGNMENT set at 4096. This should be the best value for a
SD card.

[GITHUB #20]
[GITHUB #59]

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-09-12 23:21:28 +03:00
ce246f83d6 sdcard_image-rpi.bbclass: Add sysctl.d config to set vm.min_free_kbytes to 8192
[GITHUB #49]

Signed-off-by: Sander van Grieken <sander@outrightsolutions.nl>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-09-06 19:19:31 +03:00
32d2d1bcde sdcard_image-rpi.bbclass: Add support for 240M/16M GPU memory split
Signed-off-by: Sander van Grieken <sander@outrightsolutions.nl>
2012-08-29 00:01:23 +03:00
9317527ce1 sdcard_image-rpi: Use xzcat if SDIMG_ROOTFS_TYPE is a .xz file
When burning the rootfs partition we use dd if rootfs file is not
compressed and xzcat piped with dd if rootfs file is a .xz file.

[GITHUB #39]

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-08-28 23:59:28 +03:00
7b8df50613 sdcard_image-rpi: Use ${KERNEL_IMAGETYPE}-${MACHINE} as kernel source from deploy dir
${KERNEL_IMAGETYPE} symlink was introduced after denzil so we use
${KERNEL_IMAGETYPE}-${MACHINE} to be able to satisfy the existence in denzil and master
as well.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-07-10 11:57:05 +03:00
94d69f8533 sdcard_image-rpi: Copy the kernel specified with KERNEL_FSTYPE
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-07-06 02:22:28 +03:00
a95712d8e7 sdcard_image-rpi.bbclass: Change to be usable with any image
Instead of being inherited by a specific image recipe, this class can
now be inherited globally in the machine configuration, allowing it to
be used with any image. This means we can remove "inherit image", and
we can also remove the IMAGE_FSTYPES modification since the machine
config does this already.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-07-02 18:30:28 +03:00
2567ba074c sdcard_image-rpi.bbclass: Rewrite sdimage creation class - implemented with parted
This implementation doesn't use loop mounts, it uses mcopy to copy files to partitions.
The partition creation is done with parted. Because of using these tools the
IMAGE_DEPENDS was modified accordingly.
Added a way of selecting the desired GPU firmware.
Because we don't create the rootfs image but we rely on an already created rootfs
image, the stamp is available only in the boot partition.
By default the class needs an ext3 rootfs image. This is because we don't have yet
a way of generating cmdline.txt in order to pass the partition type to the kernel.
By default ext3 is mounted so we use this fs type until this will be selectable while
generating a cmdline file.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
2012-07-02 18:30:15 +03:00
1cc562d9d3 sdcard_image-rpi: Add 1st cut at a class to build an SD card image for the RPi. 2012-04-23 15:16:08 +01:00