Commit Graph

23 Commits

Author SHA1 Message Date
Darren Hart bb31c819be bootimg: Fix a math thinko in the block count calculation
Fixes [YOCTO #1852] ... again.

The conversion from sectors to blocks was multiplying by 2 instead
of dividing by 2. Blocks are 1024 bytes, sectors are 512 bytes. The
result was images being much larger than intended.

Reported-by: Tom Zanussi <tom.zanussi@intel.com>
(From OE-Core rev: b35384fa3ca96b31c63d764322215abced2066e4)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Backported to edison by Darren Hart.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-14 23:11:43 +01:00
Darren Hart d1c5de9ccb bootimg: Account for FAT filesystem overhead in image size
Fixes [YOCTO #1852]

The bootimg class wasn't accounting for non-trivial amount of space
required by the directory entries and FATs for the FAT filesystem.

This patch attempts to make an accurate prediction of FAT overhead and
adjusts the image size accordingly. It assumes no more than 16 directory
entries per directory (which fit in a single sector). It also assumes
8.3 filenames. With the ceiling functions rounding up to full sectors
and tracks, these assumptions seem reasonable.

In order to ensure the calculations are accurate, this patch forces the
FAT size to 32, rather than allowing mkdosfs to automatically select 12,
16, or 32 depending on the image being built.

Tested by setting BOOTIMG_EXTRA_SPACE=0 and building core-image-minimal
and core-image-sato for fri2-noemgd from meta-intel.

(From OE-Core rev: 68aa18609c10a3ae2f738930c933fa2a95ce8959)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Backported to edison by Darren Hart.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-14 23:11:38 +01:00
Darren Hart 4274ebdd00 bootimg: Use mcopy to construct the hddimg
Fixes [YOCTO 2138]

The initial directory support (-d) added to mkdosfs has proven to be incomplete
and non-compliant with FAT. Rather than continue to maintain this feature and
work around the various issues, we can use mcopy to construct the image.

bootimg.bbclass already depends on mtools-native (although it may not have
needed to previously). No new dependencies are introduced. The image created
passes dosfsck cleanly. Remove the call to dosfsck.

mcopy reported an error with the image we were creating:
Total number of sectors (107574) not a multiple of sectors per track (32)!

Add some logic to ensure the total sector count is an integral number of sectors
per track, including forcing the logical sector size to 512 in the mkdosfs
command.

The du -bks arguments are contradictory, -b is equivalent to "--apparent-size
--block-size=1" and -k is --block-size=1K. If reordered, -kbs will report the
disk usage in bytes insteadk of 1k blocks. Eliminate the ambiguity by using:
du --apparent-size -ks

(From OE-Core rev: 92d2ea1a306354c6565a1b05b51b5719e481840f)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Nitin A. Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Backported to poky edison by Darren Hart.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-14 23:10:49 +01:00
Dongxiao Xu 7f41f1a888 bitbake: machine specific sysroots implementation
This commit changes the sysroots path to be machine specific.

Changes includes:

1) STAGING_DIR_TARGET and STRAGING_DIR_HOST points to machine specific
paths.

2) task stamp files. Adding ${MACHINE} info into stamp files for
do_populate_sysroots and do_package tasks. Add a BB_STAMPTASK_BLACKLIST
to keep native, nativesdk, crosssdk, and cross-canadian stamp unchanged.

3) siteconfig path. Separate the site config path for different machines
to avoid one machine adopting the cache file of another machine.

4) sstate. Add machine name to sstate manifest file.
Change relocation code for sstate paths since sysroot is machine.
Keep native, nativesdk, crosssdk, and cross-canadian unchanged.

5) toolchain scripts. Change the environment path to point to machine
specific sysroots in toolchain scripts bbclass.

6) Relocate la files when populating to a different machine of the same
architecture.

7) Exclude STAGING_DIR_TARGET and STAGING_DIR_HOST parameter from sstate
siginfo since they contain ${MACHINE} information.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
2011-01-25 12:25:46 +00:00
Richard Purdie c328f161f8 bootimg.bbclass: Fix dependency name
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 17:09:15 +00:00
Richard Purdie f89cd3158a bootimg/boot-directdisk.bbclass: Update afer syslinux changes, fix mbr.bin location and fix dependencies
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 14:09:06 +00:00
Richard Purdie f30bf93e14 bootimg.bbclass: Improve documentation
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-25 11:36:40 +00:00
Richard Purdie b772c8cde5 bitbake.conf/base.bbclass: Rename the staging directory to sysroots and the populate_staging task to populate_sysroot
This change makes the purpose of the staging directory more obvious and
the taskname more true to what it now actually does.

The layout version number is increased due to the change in layout
but code to convert existing directories and insert a symlink for
backwards compatibility is included.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13 12:15:42 +00:00
Samuel Ortiz e437435158 bootimg: Let mkdosfs choose between fat12 and fat16 2008-11-10 19:26:19 +01:00
Samuel Ortiz faae7d38e6 bootimg: As image size grows, we want to switch to FAT16 2008-11-06 11:25:34 +01:00
Samuel Ortiz f19e4350c0 bootimg: copy rootfs to ISO image
We are only copying the initrd right now.
2008-10-27 13:44:20 +01:00
Andrzej Zaborowski 3f93ed6bce syslinux-native: Try to make syslinux cross-compile friendly.
We only had one package for building both the bootloader and the installer,
i.e. target and host code.  It used always the host compiler.  Split the
package into syslinux and syslinux-installer-native, require both for a
cd bootable image.


git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5539 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-10-20 00:22:07 +00:00
Samuel Ortiz e1720d80de bootimg: Add symbolic links to iso and hddimg
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5535 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-10-17 11:04:51 +00:00
Richard Purdie f36ea090d1 bootimg.bbclass: Set nostamp for the bootimg task
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5369 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-10-01 13:56:29 +00:00
Samuel Ortiz 71a2e0d41d bootimg: Adding a rootfs to the disk image
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5172 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-09-10 21:19:19 +00:00
Marcin Juszkiewicz 329e6b5a4d bootimg.bbclass: removed bootsplash task support - we do not have such one
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3989 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-03-11 12:57:09 +00:00
Richard Purdie b17670211a Remove hardcoded staging layout assumptions
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3117 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-12 11:10:08 +00:00
Richard Purdie 03abf8e9c6 bootimg.bbclass: Fix taskname reference
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2867 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-10-11 21:46:11 +00:00
Marcin Juszkiewicz 59470e1d06 bootimg.bbclass: get kernel from proper directory in staging
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1911 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-06-11 10:35:28 +00:00
Marcin Juszkiewicz 95be099de2 bootimg.bbclass: fixed generation of ISO & HDD images
bootimg.bbclass supported creation of FAT filesystem images for usage with
syslinux (kernel and initrd in /boot/) and creation of ISO images with kernel
and initrd on it. ISO images contained also not needed /boot/ directory from
FAT image.

Now still two files are created as result but both contain only needed files.


git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1899 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-06-08 20:45:44 +00:00
Marcin Juszkiewicz 2b22125a85 bootimg: reformatted again
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1898 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-06-08 18:22:19 +00:00
Marcin Juszkiewicz 834b006eb0 bootimg: reformatted
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1897 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-06-08 18:21:18 +00:00
Marcin Juszkiewicz 7fd02840ad bootimg.bbclass: imported from OE, updated to recent BitBake
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1894 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-06-08 08:39:22 +00:00