| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Merge btrfs_read_adv and xfs_read_adv into a single generic function
ext_read_adv and split ext_write_adv_offset out of ext_write_adv.
Use those new functions in rewrite_boot_image and btrfs_install_file
where it is actually hardcoded.
Signed-off-by: Nicolas Cornu <nicolac76@yahoo.fr>
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
|
|
|
|
|
|
|
|
|
| |
Spaces, ASCII 0x20, have been
* moved
* inserted
* deleted
Signed-off-by: Geert Stappers <stappers@stappers.nl>
|
|
|
|
|
|
|
| |
As of commit ID 37eef640 (before 6.03-pre12, before 6.03), it is now in
Boot Area B.
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
|
|
|
|
|
|
| |
Some typo fixes in extlinux/main.c.
None of them affects code execution.
Signed-off-by: Geert Stappers <stappers@stappers.nl>
|
|
|
|
|
|
|
|
| |
Due to size constraints on DOS systems, do not include whole syslxcom
into DOS-based installer for using xpread() and xpwrite() functions,
instead make them part of another separate library and include it only.
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
|
|
|
|
|
|
|
|
| |
devname is put on heap for all cases to avoid memory
leak, and ease of use in future as well
Signed-off-by: Imran Zaman <imran.zaman@intel.com>
Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
| |
It's needed to enumerate both UFS1 and UFS2 as they have different magic numbers
and super block offsets.
Neither UFS1 nor UFS2 move files around, therefore, ldlinux.sys can be
installed as a regular file.
Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
| |
Correct the macros used in BTRFS_ADV_OFFSET.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
ldlinux.sys is frequently too big to fit into Boot Area A (64K). Per
a recent ruling by Chris Mason, we have a 768K Boot Area B at offset
256K, so use that to store ldlinux.sys. In theory we could split it
up and make it slightly larger, however, ldlinux.sys is loaded below
the 640K mark so it has to be smaller than that size anyway.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
Add sparse address space annotations for the syslinux boot image, to
make it easier to catch errors that break the DOS installer build
again. Use "make CC=cgcc" to run sparse.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Makefile
NEWS
com32/cmenu/Makefile
com32/elflink/ldlinux/Makefile
com32/gfxboot/Makefile
com32/gpllib/Makefile
com32/include/sys/module.h
com32/lib/Makefile
com32/lib/sys/module/elf_module.c
com32/menu/Makefile
com32/rosh/Makefile
com32/samples/Makefile
core/init.c
mk/elf.mk
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| | |
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit a126f17f663c ("EXTLINUX: Initial XFS filesystem support") broke
the code that inserts the installation subdirectory into the Extended
Patch Area (EPA). The EPA entry is used to set the initial working
directory on boot.
This caused boot failures for users that chose an install directory
other than /boot/syslinux (technically, it failed for any path not in
'search_directories' in load_env32()) due to ldlinux.c32 failing to
load because the initial working directory was not set correctly.
Cc: Paulo Alcantara <pcacjr@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Due to delayed allocation feature on XFS filesystems, a write is not
guaranteed to flushed out to the underlying file system after crash or
something else - so we need to make sure that ldlinux.sys is installed
correctly in the mounted filesystem.
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Makefile
com32/elflink/ldlinux/Makefile
com32/lib/sys/module/elf_module.c
core/cleanup.c
core/comboot.inc
core/conio.c
core/fs/fs.c
core/init.c
core/mem/free.c
core/mem/malloc.c
core/timer.inc
diag/geodsp/Makefile
extlinux/main.c
mk/embedded.mk
modules/Makefile
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
merge/elflink/xfs
Pull XFS filesystem driver from Paulo Alcantara,
* 'xfs-for-hpa' of git://zytor.com/users/pcacjr/syslinux: (60 commits)
xfs: Fix the way we check di_mode of an inode
xfs: Cleanup previous commit
xfs: Add xfs_readlink()
xfs: Cleanup and remove some trailing whitespaces
xfs: Add XFS_DINODE_FMT_BTREE support in xfs_next_extent()
xfs: Cleanup and remove some trailing whitespaces
xfs: Rework xfs_dir2_get_right_blk()
xfs: cleanup unused structure
xfs: Remove some trailing whitespaces
xfs: Add full B+tree search support in xfs_dir2_node_find_entry()
xfs: Add xfs_fmt_btree_find_entry()
xfs: Fix memory leak in xfs_dir2_node_find_entry() function
xfs: Cleanup xfs_readdir_dir2_leaf() function
xfs: Implement xfs_readdir_dir2_node() function
EXTLINUX: Add sanity check for XFS filesystems
xfs: Add xfs_fmt_local_readdir() function
xfs: Add xfs_fmt_local_find_entry() function
xfs: Move readdir functions to another source file
xfs: Remove trailing whitespace in xfs_dir2_isleaf() function
xfs: Move dir2 functions to another source file
...
Conflicts:
extlinux/main.c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Syslinux won't work on >4 KiB filesystem block sizes since there is no
left space in MBR to determine where to install Syslinux bootsector.
If one is trying to install Syslinux in a XFS partition with a
filesystem block size different of 4 KiB, a proper error will be
returned to the user informing that the current filesystem block size
isn't supported by Syslinux.
Reported-by: Gene Cumm <gene.cumm@gmail.com>
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
rewrite_boot_image() wraps the logic from previous
ext2_fat_install_file(). The deleted lines includes
the set_attributes(), while it is actually not
within the rewrite_boot_image().
We add set_attributes() and some helper judgement just
as what we do in xfs_install_file().
Signed-off-by: Chen Baozi <baozich@gmail.com>
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
XFS filesystems are divided into a number of equally sized chunks called
Allocation Groups (AGs). Each AG can almost be thought of as an
individual filesystem that maintains its own's space usage.
Each AG has the following structure:
- A super block describing the overall filesystem info
- Free space management
- Inode allocation and tracking
So, due to historical reasons (SGI IRIX's design of disk layouts), the
first sector in the primary AG on XFS filesystems contains the
superblock, which is a problem with bootloaders that rely on BIOSes (that
load VBRs which are located in the first sector of the partition).
This patch adds support to the EXTLINUX installer to be able to install
Syslinux in an XFS partition, but with a limitation (temporarily) of
relying on the filesystem block size being 4+ KiB, otherwise there won't
be enough space to store the Syslinux boot sector in the blank area around
the 2048 to 4096 bytes of the primary AG/superblock.
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Pull in the latest prerelease that includes some bug fixes for ldlinux
and a realloc() bug in core/.
Conflicts:
com32/cmenu/Makefile
com32/elflink/ldlinux/Makefile
com32/lib/Makefile
core/pxelinux.asm
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If opt.reset_adv is set the call to ext_read_adv() is skipped which
would have initialised 'filename'. This means that a pointer
containing random data from the stack is passed to ext_write_adv().
Just delete the opt.reset_adv logic since modify_adv() handles that
case anyway.
Reported-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This merge also includes the Syslinux-4.06 release.
Conflicts:
Makefile
com32/hdt/Makefile
com32/modules/Makefile
com32/samples/hello.c
mtools/Makefile
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The following conflict is a result of the fact comapi_chainboot was
only stubbed out on the 'elflink' branch but was properly marked as
obsolete in 'master'.
Conflicts:
core/comboot.inc
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | | |
Just some minor cleanup
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Because ldlinux.c32 is required for Syslinux to function correctly, we
should be installing it automatically much like ldlinux.sys.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |/
| |
| |
| |
| |
| |
| | |
find_mount() may return NULL, so we'd really better check for that
*before* dereferencing the pointer.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we have multiple firmware backends it no longer makes sense
to write object files to the same directory as their source. A better
solution is to write the object files to a per-firmware directory
under a top-level object directory.
The top-level object directory can be specified on the command-line
with the O= variable, e.g. make O=/tmp/obj. If no top-level object
directory is specified an 'obj' directory is created in the top-level
of the Syslinux source repository.
All the existing make targets continue to work as before, however now
they apply to all firmware backends, e.g. 'make installer' will build
the BIOS, 32-bit EFI and 64-bit EFI installers and place them under
$(OBJ)/bios, $(OBJ)/efi32 and $(OBJ)/efi64 respectively.
Note unlike every other bit of Syslinux, the gpxe objects are still
kept in the src directory, e.g. gpxe/src, since gpxe is only required
by the BIOS backend.
It is possible to specify a make target for a specific firmware or
list of firmware with the following syntax,
make [firmware[,firmware]] [target[,target]]
To clean the object directory for just the BIOS firmware type,
'make bios clean'
To build both the 32-bit and 64-bit EFI installers type,
'make efi32 efi64 installer'
Since the Syslinux make infrastructure is now more complex a new file
doc/building.txt has been created to explain how to build Syslinux.
The top-level Makefile now exports some make variables for use in
module Makefiles,
- topdir - the top-level source directory of the Syslinux
repository, e.g. /usr/src/syslinux
- objdir - the top-level object directory for the firmware
backend currently being built, e.g. /obj/syslinux/bios
- SRC - the source directory in the Syslinux repository for the
module currently being built,
e.g. /usr/src/syslinux/com32/libupload
- OBJ - the object directory for the module currently being
built, e.g. /obj/syslinux/bios/com32/libupload
Since we're rewriting the Makefile infrastructure anyway it seemed
like a good idea to add parallel support. By writing subdirectories as
prequisites for make targets the objects in those subdirectories can
be built in parallel.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
|
|
|
|
|
| |
Add a --device option for scripts and expert users to override the
device detection.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
We can re-use btrfs device validation now.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
1. Support parsing /proc/self/mountinfo for devices;
2. For btrfs, query the device names from btrfs itself.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
If neither /proc/mounts nor /etc/mtab contains a functional pointer to
the device node for the installer, try to see if we can find the
device node by looking for a symlink in /sys/dev/block.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Clean up some ugly formatting in main.c.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Remove stray x bit.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
|
|
|
|
|
|
| |
Remove some dead code in the installer, which caused build error with
gcc 4.6 and -Werror.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
There are multiple ways to set up subvolumes in btrfs. Use a general
determination method which works for all schemes.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
| |
strstr() is only used for zero-terminated strings, so OEM Name is not
guaranteed to be zero-terminated. Instead, use fat_check_sb_fields() to
sanity check FAT superblock.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
|
|
|
|
|
|
|
|
| |
1) ioctl HDIO_GETGEO expects a pointer to a struct hd_geometry
2) struct stat's st_dev is the parent file used; st_rdev is what we want
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Tested-By: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
|
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
|
|
|
| |
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
|
|
|
|
|
|
| |
gcc 4.6 warns on variables set but not used, so remove them.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
| |
It is possible(?) that HDIO_GETGEO can't return the full offset, and
in either case it is too small -- only 32 bits on 32-bit platforms.
Thus query sysfs for the real value, if available.
sysfs also contains information for slave devices -- this is going to
really matter for the md/lvm issues.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Previous commits described this behaviour, but did not
actually implement it. :)
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to consolidate the installer option-parsing system,
we add the --mbr (-m), --active (-a), and --force (-f)
options from the DOS, Win32, and mtools installers to
libinstaller.
Since the -m and -a options are not currently valid for the
Linux 'syslinux' and 'extlinux' installers, we add error
messages to both of these. The -f option is allowed but
does nothing for them.
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It appears that the glibc version of asprintf() is braindamaged, and
doesn't set the target pointer to NULL in the event of an error (only
returns -1). Therefore we need to check the return value. Just in
case someone else made the *opposite* error, also check the pointer.
Bleh. The glibc documentation states that *BSD sets the pointer to
NULL, but instead of following that, the glibc people put
warn_unused_result on asprintf. Sigh.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
If we are on a loop device, set bsHidden based on the loopback device
offset.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
| |
Put the btrfs boot code right after the boot sector (they are really
one image anyway). Align the ADV with the end of the boot region, so
we can locate it for modification as necessary, and the offset don't
end up shifting with different boot image sizes.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Do the appropriate thing for various error cases, so that the
migration code actually does the right thing.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
- Be able to modify the ADV either in extlinux.sys or ldlinux.sys
- Be able to preserve the ADV from extlinux.sys
- Remove extlinux.sys when installing ldlinux.sys
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|