Tony Breeds [Tue, 18 Oct 2011 04:03:51 +0000 (15:03 +1100)]
yaboot-1.3.17
Benjamin Herrenschmidt [Tue, 18 Oct 2011 01:33:25 +0000 (12:33 +1100)]
Make: We must build with -fno-strict-aliasing
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Benjamin Herrenschmidt [Tue, 18 Oct 2011 01:09:23 +0000 (12:09 +1100)]
Add support for the PowerNV platform
While there correct the detection for IBM pSeries.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Tue, 18 Oct 2011 00:52:47 +0000 (11:52 +1100)]
make: Update CFLAGS to for -Werror.
Should stop warnings creeping in.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Tue, 18 Oct 2011 00:50:55 +0000 (11:50 +1100)]
warnings: Add explict casts to silence many compiler warnings about sign comparisions.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Tue, 18 Oct 2011 00:47:38 +0000 (11:47 +1100)]
warnings: Update scopy() to explictly throw away computed value.
Also update the comment to match the code.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Tue, 18 Oct 2011 00:19:23 +0000 (11:19 +1100)]
warnings: Add explict prototype for prom_vfprintf()
Also update GCC format attributes
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Tue, 10 Feb 2009 03:11:23 +0000 (14:11 +1100)]
Be explicit in order of evaluation in the reiserfs code
GCC Has helpfully pointed out that we're doing some strange things:
second/fs_reiserfs.c: In function ‘block_read’:
second/fs_reiserfs.c:219: warning: operation on ‘journal_table’ may be undefined
second/fs_reiserfs.c:219: warning: operation on ‘journal_table’ may be undefined
second/fs_reiserfs.c:219: warning: operation on ‘journal_table’ may be undefined
second/fs_reiserfs.c: In function ‘next_key’:
second/fs_reiserfs.c:619: warning: operation on ‘depth’ may be undefined
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Tue, 10 Feb 2009 03:00:28 +0000 (14:00 +1100)]
Use explicit casts when dumping config data
GCC pointes out that we're in a gray area
second/cfg.c: In function ‘cfg_reset’:
second/cfg.c:437: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘void *’
second/cfg.c:442: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘void *’
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Tue, 10 Feb 2009 02:54:17 +0000 (13:54 +1100)]
phandle != int in prom.c
GCC this pointed out:
second/prom.c: In function ‘prom_get_netinfo’:
second/prom.c:692: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘prom_handle’
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Tue, 10 Feb 2009 03:37:44 +0000 (14:37 +1100)]
Add/Correct libgcc function prototypes
Add a prototype for ffs() from libgcc.
Instead of using log2 in reisrfs which has a different prototype to the
one libgcc, call the function reiser_log2()
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Paul Mackerras [Thu, 13 Oct 2011 18:01:12 +0000 (18:01 +0000)]
Save arguments as well as image name for CAS reboot
We were saving the image name that the user had typed (or had been
selected by default) in the "boot-last-label" property, but we were
losing any extra arguments that the user had typed after the image
name. On a pSeries machine, if the firmware decides to do a reboot
at the client-architecture-support call, we were then rebooting to
the right image but without any extra arguments that the user typed.
This fixes the problem by saving the arguments in boot-last-label,
separated from the image name by a space. When we use the value
of boot-last-label, we now call word_split to separate it into the
image name and arguments again.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Tue, 18 Oct 2011 04:06:08 +0000 (15:06 +1100)]
make: Add correct quotes to the VERSION define to allow spaces in the version.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Thu, 4 Aug 2011 05:02:04 +0000 (15:02 +1000)]
Force yaboot to always build 32-bit.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Thu, 6 Jan 2011 17:32:13 +0000 (17:32 +0000)]
yaboot does not compile against new e2fsprogs release
Add some "hacky" workarounds for missing libc functions required by
e2fsprogs.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Roman Rakus [Thu, 5 Aug 2010 05:04:46 +0000 (15:04 +1000)]
Treat iSCSI targets as block devices.
Currently iSCSI targets are treated as network devices, this doesn't always
work firmware is capable of treating them like block devices which seems more
reliable.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Fri, 16 Jul 2010 06:16:20 +0000 (16:16 +1000)]
Avoid stack smash in parseing the vendor specific options.
For yaboot we only really care about DHCP options that are alos IPv4
addresses. Limit the memcpy() to 32bits.
Also we don't use the DHCP_DNS tag so remove it from the enum.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Fri, 16 Jul 2010 06:02:23 +0000 (16:02 +1000)]
Remove old '0arch-timestamps0' file
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:44 +0000 (19:03 +0000)]
Link yaboot at 1MB
Give ourselves another 1MB of available space by moving yaboot
down to 1MB. With load-base at 0x4000, our yaboot image would have to
be 1MB-0x4000 before we should encounter problems (because firmware
would have issues relocating us from 0x4000 to 1MB).
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:43 +0000 (19:03 +0000)]
Allocate kernel and ramdisk as low as possible
We currently start the search for free memory for the kernel at
12MB. This made sense back when firmware (real-base) was always
12MB, but it doesn't now it is often at 32MB.
In light of this and now we have fixed the initrd load issues,
just try and allocate the kernel as low as possible.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:42 +0000 (19:03 +0000)]
Allocate tftp temporary buffer from top of address space
We want the kernel and initrd to be as low as possible in the
address space. Allocate the temporary tftp region at the top
of the address space.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:41 +0000 (19:03 +0000)]
Allocate malloc region with prom_claim_chunk_top
We want the kernel and initrd to be as low as possible in the
address space. Allocate the temporary malloc region at the top
of the address space.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:40 +0000 (19:03 +0000)]
Add prom_claim_chunk_top
We want temporary allocations to be taken from the top of our address
space so the kernel and initrd can be loaded as low as possible. The
very early kernel code uses the top of the initrd as the low watermark
for memory allocations so the lower this is the better.
We currently see a number of fails where a large initrd causes us
to run out of space in a 128MB RMO region. Allocating the temporary
areas up high and therefore the initrd lower fixes it.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:39 +0000 (19:03 +0000)]
Bump PROM_CLAIM_MAX_ADDR to 256MB
A number of machines are failing to boot because firmware takes up a
significant amount of the first 128MB. Bump our maximum to 256MB since these
boxes almost always have a 256MB RMO region.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:38 +0000 (19:03 +0000)]
Add claim/release runtime debug output
Create prom_debug and use it in the claim and release routines.
Clean up the debug and error messages in the area.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:37 +0000 (19:03 +0000)]
print available ranges under control of linux, yaboot-debug property
Debugging yaboot failures is difficult because we often have to retest with a
yaboot built with debug enabled. As a first step to fixing this, look for a
linux,yaboot-debug property and dump the available ranges when it is non zero.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:36 +0000 (19:03 +0000)]
Use ino_size if available
If ino_size is available and returns > 0, then use it to allocate
the initrd. This allows us to claim it in one chunk and avoid
all the issues around requiring back to back claims to be
contiguous.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:35 +0000 (19:03 +0000)]
Add optional ino_size filesystem backend function
Our initrd loader is very fragile and the main reason is that it doesn't
know the size of the initrd. We end up claiming 1MB at a time and failing
completely if the new region isn't contiguous with the previous one.
Now that firmware is often at 32MB (real-base), and kernels have grown
much bigger (CONFIG_FUNCTION_TRACER and CONFIG_RELOCATABLE are two big
reasons), we see this failure a lot.
Create a function ino_size (similar to the silo bootloader) and
implement it for tftp and ext2 backends.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:34 +0000 (19:03 +0000)]
Remove second zero of BSS
We zero the BSS in two places: once in _start() and then
again in yaboot_start(). The second time we actually get
it wrong and zero 1/4 of the BSS (since we subtract two
pointers).
Since this second zeroing is superfluous and buggy, remove
it.
While here, fix the comments in _start. It claims we aren't
clearing the BSS when we are.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:33 +0000 (19:03 +0000)]
Use prom_claim_chunk to allocate malloc area
prom_claim_chunk does the same thing as this loop, so we can
use it instead.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 8 Jul 2010 19:03:31 +0000 (19:03 +0000)]
Remove unused MAX_VAR_NAME define
MAX_VAR_NAME isn't used anywhere, remove it.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Sat, 10 Apr 2010 18:06:57 +0000 (18:06 +0000)]
Fix incorrect comparision in get_params
We were comparing the first character of manualinitrd with a string. Not sure
how this ever worked.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Sat, 10 Apr 2010 18:06:34 +0000 (18:06 +0000)]
Avoid gcc j_len unused warning
gcc is spewing an unused warning about j_len. We initialise it in both
cases of the if statement, but initialise it to 0 anyway to avoid the warning.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Sat, 10 Apr 2010 18:06:15 +0000 (18:06 +0000)]
Remove unused variable
ignore_entry isn't used, remove it to avoid a compiler warning.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Sat, 10 Apr 2010 18:05:59 +0000 (18:05 +0000)]
prom_getchar eats characters
This bug has been annoying me for a long time. If you copy and paste a
string into the yaboot prompt, or even type too fast, characters get
dropped.
It turns out we were asking OF for 4 characters, but only using the first one.
There is strange logic to look for \e[, and then oring the third character with
0x100. I haven't been able to find anyone that knows why that was there in the
first place, so just remove it and fix this bug once and for all.
Automated test infrastructures the world over will thank us for fixing this
bug!
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Sat, 10 Apr 2010 18:05:21 +0000 (18:05 +0000)]
Remove MAX_HEADERS check
The comparison against MAX_HEADERS doesn't match the error message and
we are dynamically allocating memory for the program headers, so there
should not be a limit.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Sat, 10 Apr 2010 18:04:48 +0000 (18:04 +0000)]
Remove some stale code
Remove some old commented out code.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Sat, 10 Apr 2010 18:04:27 +0000 (18:04 +0000)]
Remove magic numbers in print_message_file
Create a define instead of using a magic number in print_message_file.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Sat, 10 Apr 2010 18:03:21 +0000 (18:03 +0000)]
Remove some DEBUG code.
The test_bss and test_data debug printfs are of little use, so remove them.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Sat, 10 Apr 2010 18:02:56 +0000 (18:02 +0000)]
Remove quik bootloader code
Has booting yaboot out of quik ever worked? The fact we do nothing with
quik_fip makes me suspect it hasn't. Remove the code.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Sat, 10 Apr 2010 18:02:26 +0000 (18:02 +0000)]
Remove sysmap support
We have had in kernel kallsyms for years, and the less code that has to deal
with our fragile memory map the better.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Fri, 16 Jul 2010 05:11:38 +0000 (15:11 +1000)]
Merge branch 'devel'
Tony Breeds [Sat, 6 Mar 2010 03:59:04 +0000 (14:59 +1100)]
extract_netinfo_args() should be a void function.
If there is no "netinfo" packet, extract_netinfo_args() will fail and cause
parse_device_path() to abort. This basically meant that yaboot will fail to
load any kernel/initrd under those circumstances.
This fix changes extract_netinfo_args() to be a void function.
Signed-off-by: Tony Breeds <tonyb@au1.ibm.com>
Tony Breeds [Fri, 16 Jul 2010 04:56:12 +0000 (14:56 +1000)]
Merge branch 'netboot'
Tony Breeds [Fri, 9 Jul 2010 02:18:17 +0000 (12:18 +1000)]
Yaboot 1.3.16
Tony Breeds [Fri, 9 Jul 2010 02:16:35 +0000 (12:16 +1000)]
Add "Developers Certificate of Origin"
All further patch contributions will need to adhere to this document,
based on the linux kernel's process.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Fri, 9 Jul 2010 02:14:10 +0000 (12:14 +1000)]
Version 1.3.15
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Fri, 23 Oct 2009 03:05:50 +0000 (14:05 +1100)]
Check each partition for swapspace before other filesystems.
Swapspace isn't guaranteed to be on a partition tagged as such, add a
little defensive programming in that case.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Thu, 22 Oct 2009 05:20:47 +0000 (16:20 +1100)]
Do not of_open() LINUX_NATIVE partitions.
If for some reason a partition is LINUX_NATIVE but is not handled by one
of the existing filesystem drivers, of_open() /may/ appear to succeed,
but infact the ihandle is garbage.
Make sure we skip LINUX_NATIVE partitions.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Thu, 22 Oct 2009 05:17:10 +0000 (16:17 +1100)]
Merge branch 'birecs' into devel
Tony Breeds [Thu, 22 Oct 2009 04:53:00 +0000 (15:53 +1100)]
Handle ipv6 boot parameters for POWER architecture.
This is implementation derived.
This follows the semantics defined in section 4.3.1 of
http://www.power.org/apps/org/workgroup/parch/download.php/2380/latest
(It is under the Members area of TSC - Platform Architecture committee).
[ Fixed merge conflicts in second/file.c and second/fs_of.c ]
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Thu, 22 Oct 2009 04:46:37 +0000 (15:46 +1100)]
Parse the subnetmask from bootpath and DHCP options
Some power6 machines need to have the subnetmask to correctly open()
the network device.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Thu, 7 May 2009 03:07:21 +0000 (13:07 +1000)]
Use an empty server address for "older" firmwares.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Wed, 6 May 2009 06:05:46 +0000 (16:05 +1000)]
Check for valid "looking" IPs before saving them.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Tue, 5 May 2009 06:14:20 +0000 (16:14 +1000)]
Add parseing for Vendor options aka DHCP options.
If we have DHCP options process them.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Fri, 2 Oct 2009 05:55:33 +0000 (15:55 +1000)]
Remove Bootinfo (BIRECS).
The are not used and can scribble on kernel memory.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Tue, 5 May 2009 00:52:02 +0000 (10:52 +1000)]
Up LOAD_BUFFER_SIZE to 25Mb.
20MB is already too small for some distro installers.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Thu, 5 Mar 2009 04:04:47 +0000 (15:04 +1100)]
Enhance the parseing of IPv4 information.
Pull information out of the bootp-reply (or similar) property. This
successfully netboots in a wider variety of OF "boot" lines.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Chandra Seetharaman [Fri, 9 Jan 2009 13:59:18 +0000 (05:59 -0800)]
Move ipv4 arguments handling to a separate function. No fucntional change.
This is just in preparation for the next patch which adds supports for
ipv6.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
---
Chandra Seetharaman [Fri, 9 Jan 2009 13:57:44 +0000 (05:57 -0800)]
Fix netboot fucntionality to use the parameters specified.
Currently, yaboot works properly when there is a tftp boot server serving
the broadcast requests sent in the network.
If the user specifies siaddr, ciaddr, and other arguments in the command
line, it is not handled appropriately.
This patch changes that behavior and make yaboot work properly in both cases.
The semantics specified in section 4.1 of
http://playground.sun.com/1275/practice/obp-tftp/tftp1_0.pdf is followed.
([bootp,]siaddr,filename,ciaddr,giaddr,bootp-retries,tftp-retries)
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
---
Chandra Seetharaman [Fri, 9 Jan 2009 13:56:40 +0000 (05:56 -0800)]
Prepare for netboot fix(following patch). No Functional change.
This patch just replaces the arguments "char *dev_name" and "char *file_name"
with "struct boot_fspec_t fspec".
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
---
Tony Breeds [Tue, 17 Feb 2009 23:20:12 +0000 (10:20 +1100)]
Increase the LOAD_BUFFER_SIZE to 20MiB.
As installers add more features initrd's get bigger. Lets try to
accommodate them.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Will Woods [Thu, 13 Nov 2008 00:59:43 +0000 (00:59 +0000)]
long append="..." causes yaboot to reject entire yaboot.conf (MAX_TOKEN too small)
yaboot's second/cfg.c has:
#define MAX_TOKEN 200
When yaboot parses its config file, if it encounters a quoted string (like
append="...") longer than MAX_TOKEN, it rejects the entire config.
Typical preupgrade usage uses ~250 chars, which means preupgrade currently
renders ppc systems unbootable without this patch.
Suggest increasing MAX_TOKEN to.. let's say 511. cfg.c does "char
buf[MAX_TOKEN+1]", and everyone loves powers of 2.
Signed-off-by: Roman Rakus <rrakus@redhat.com>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Will Woods [Fri, 14 Nov 2008 04:55:53 +0000 (04:55 +0000)]
ybin --bootonce doesn't work
1) It inverts the logic of a test to see if nvram is available, and
2) It assumes the output of 'nvsetenv VARNAME' will be 'VARNAME=VALUE', rather
than just 'VALUE' (as it is when using the "nvram" utility).
From bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=471425
The attached patch fixes these problems and makes --bootonce work as expected.
Signed-off-by: Roman Rakus <rrakus@redhat.com>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tony Breeds [Fri, 13 Feb 2009 02:51:03 +0000 (13:51 +1100)]
Revert "Let prom_claim_chunk do the work for tftp images to support larger images."
This reverts commit
c8b04c614770870d75825c19bcd4729cc779b84a.
This fixes the regression described in:
https://bugzilla.redhat.com/show_bug.cgi?id=468492
Signed-off-by: Roman Rakus <rrakus@redhat.com>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Anton Blanchard [Thu, 5 Feb 2009 14:19:26 +0000 (14:19 +0000)]
ybin succeeds but returns error code
Hi,
On a System p box, ybin returns an error even though it succeeds:
# ybin
# echo $?
1
The patch below fixes it:
# ybin
# echo $?
0
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Mohan Kumar M [Fri, 12 Dec 2008 03:31:38 +0000 (03:31 +0000)]
Allow yaboot to load relocatable kernel
PPC64 relocatable kernels (built with CONFIG_RELOCATABLE=y) have the type of
ET_DYN. But yaboot code won't load the kernel if the ELF type is not
ET_EXEC. Attached patch adds support to yaboot to load relocatable kernels
also (ie load ET_DYN type also)
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
David Woodhouse [Fri, 28 Mar 2008 00:04:02 +0000 (00:04 +0000)]
Pegasos and partition numbering
The whole bplan partition numbering thing is a clusterfuck, but it
shouldn't be as crappy as it is.
We can _cope_ with the fact that firmware is broken and has an
off-by-one in its partition numbering. All we need to do in yaboot is
add 1 to the partition numbers we infer from in /chosen/boot-device, if
we detect that we're on an afflicted machine. That's all we need to do,
and all we ever _should_ have done. And is already in yaboot. Yaboot
does its own block device handling, including partitions, and doesn't
ever care about the firmware's problems (in that respect, at least).
It doesn't affect the installer at _all_, because the installer can't
set up the firmware's boot-device anyway and it has to be done by hand.
All it affects is the release notes telling the user how to make it
bootable.
Unfortunately, we didn't make it that simple when we first supported the
Pegasos. For reasons which aren't entirely clear to me, we ended up with
Amiga partition table support in yaboot with the _same_ off-by-one
error, to match the firmware. And thus we have hacks in the installer to
use amiga partitions for Pegasos, and to cope with the off-by-one crap.
It's only after avoiding all this crap purely by accident on Efika, by
using DOS partition tables, that I realise how stupid I was to blindly
copy the crap that other people were doing, and to believe that Pegasos
would only work with Amiga partition tables.
I'd like to get rid of the off-by-one bug in yaboot's Amiga partition
handling. At the moment, our simple 'if bplan, partition++' in
yaboot_main() is wrong when we have Amiga partitions, although it's fine
for other partition types.
Actually, I'd also like to make that same increment conditional on
!conf_given, so that if someone specifies 'conf=hd:1,/yaboot.conf' on
the command line, that partition number _isn't_ incremented.
So any time you see a proper path specified as 'dev:part,/path/name' you
know it's a real one with proper partition numbers. Remember, the bplan
firmware doesn't allow that form, and takes a space between the
'dev:part' bit and the filename:
boot hd:0 /yaboot/yaboot conf=hd:1,/yaboot/yaboot.conf
Fixing the off-by-one bug in the Amiga partition handling means that
upgrades might break. I suppose we could have a 'noamigaoffbyone'
configuration option which all newly-written yaboot.conf files would
have, which controls this behaviour. But to be honest I just don't think
it's worth it.
Mike Wolf [Tue, 15 Jan 2008 20:33:51 +0000 (14:33 -0600)]
use public interface to detect CAS reboots (take 2)
This is the second pass of this patch. The fw variable name is changed
to use ibm,client-architecture-support-reboot field which is already present
in the firmware. Please disregard the previous patch.
The firmware field used to detect CAS reboots (ibm,fw-nbr-reboots) is
really a private field that could change without warning. A new field
ibm,#reconfig-reboots will be added as a public interface intended to
be used for this detection. The patch will first check for
ibm,client-architecture-support-reboot if that is not found it will see
if ibm,fw-nbr-reboots is present and will use that instead.
-------
Paul Nasrat [Fri, 4 Jan 2008 13:00:19 +0000 (13:00 +0000)]
The CAS (Client-Architecture Support) call tells firmware what capabilities the
OS has. These capabilities result in different modes which the device-tree is
configured in, as well as what processor capabilities are presented. So, if
the capabilities are different from what was previously booted, firmware has to
reboot to reconfigure the device-tree. The second boot will have the updated
device-tree and we can boot as normal.
When this firmware initiated reboot occurs yaboot will now boot the same kernel
as the previous boot attempt with no action by the user needed. I have
successfully booted on POWER5 and POWER6 machines using various levels of the
kernel.
Patch from: Mike Wolf <mjw@linux.vnet.ibm.com>
Paul Nasrat [Thu, 3 Jan 2008 19:21:44 +0000 (19:21 +0000)]
Revert "The attached patch adds support for writing the nvram using the nvram"
This reverts commit
ac8fbd5ad52b43b820973f1828a29f85bed13a1d.
Paul Nasrat [Thu, 3 Jan 2008 19:21:22 +0000 (19:21 +0000)]
Revert "Fix shell syntax"
This reverts commit
24679e706305e0910f181a9640b8b88a30662d03.
Paul Nasrat [Thu, 3 Jan 2008 19:07:50 +0000 (19:07 +0000)]
Fix shell syntax
Paul Nasrat [Tue, 4 Dec 2007 08:43:32 +0000 (08:43 +0000)]
The attached patch adds support for writing the nvram using the nvram
utility from the new powerpc-utils pkg from IBM; it also simplify a bit
the code.
Patch from: Emanuele Giaquinta (exg@gentoo.org)
Paul Nasrat [Mon, 3 Dec 2007 14:21:11 +0000 (14:21 +0000)]
Force build to be ppc32
Paul Nasrat [Mon, 3 Dec 2007 14:14:42 +0000 (14:14 +0000)]
Fix typo
Paul Nasrat [Mon, 3 Dec 2007 14:13:54 +0000 (14:13 +0000)]
Fix typo in patch porting
Paul Nasrat [Mon, 3 Dec 2007 14:05:48 +0000 (14:05 +0000)]
Fix partition numbering handling with bplan firmware
Patch based on Fedora patch by dwmw2@infradead.org
Paul Nasrat [Mon, 3 Dec 2007 13:17:33 +0000 (13:17 +0000)]
Try harder to allocate malloc region
Patch from dwmw2@infradead.org
Paul Nasrat [Mon, 3 Dec 2007 13:13:23 +0000 (13:13 +0000)]
Print version-release of yaboot
Patch from dwmw2@infradead.org
Paul Nasrat [Mon, 3 Dec 2007 13:04:19 +0000 (13:04 +0000)]
Let prom_claim_chunk do the work for tftp images to support larger images.
Patch from: Leonardo Rangel <lrangel@linux.vnet.ibm.com>
Paul Nasrat [Mon, 3 Dec 2007 12:41:42 +0000 (12:41 +0000)]
These patch provides the function of load a alternative initrd file
specified by the user via Yaboot prompt. To load the new file, just use
the "initrd=<name_of_file>" command. The <name_of_file> could include
all the directory path to the file.
Using only the "initrd" command, Yaboot will load the default kernel
specified in the configuration file and the initrd file specified by the
user. The user can, also, specify an initrd file to any other label of
the configuration file, just adding the "initrd" command before the
label's name.
Signed-off-by: Paulo Ricardo Paz Vital <vital@br.ibm.com>
Paul Nasrat [Mon, 3 Dec 2007 12:39:06 +0000 (12:39 +0000)]
move the tftp load space and use prom_claim_chunk to claim the memory.
Growing kernels mean that the 6MB that was allotted is not enough.
Patch from Scott Moser
Paul Nasrat [Mon, 3 Dec 2007 12:37:10 +0000 (12:37 +0000)]
The patch from Scott Moser moves the "search-for-prom_claim'able" routine that
was present in load_elf64 and load_elf32 to a function named
prom_claim_chunk. This reduces the code-snippit duplication and makes
the function available for of_net_open.
Scott Moser ssmoser@us.ibm.com
Paul Nasrat [Fri, 17 Aug 2007 14:29:26 +0000 (15:29 +0100)]
Release 1.3.14
Paul Nasrat [Fri, 17 Aug 2007 14:22:00 +0000 (15:22 +0100)]
On some of the larger kernels we are starting to see a space squeeze.
The kernel is currently being put at 20MBs and on some of the newer
pSeries systems we are getting real-bases at 32MBs (plus AIX 5.3 has
real-base at 32MB, so if AIX is ever booted, everything gets shifted).
If the uncompressed kernel+initrd is larger than 12MBs then we see
truncation (typical on install kernels).
This patch moves the KERNELADDR to 0x00C00000 (12MB). If real-base is
12MB and is loaed there, yaboot will keep going up by a megabyte until
prom_claim finds space. And the uncompressed kernel should be
indifferent where it's loaded because there's nothing at 32MB (ie it
will operate as it does today). If OF is loaded at 32MB then the 12MB
region is free and the uncompressed kernel will have more space to grow.
I have tested this on numerous pSeries boxes. I have not tested on
anything else.
Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com>
Paul Nasrat [Thu, 26 Jul 2007 08:27:58 +0000 (09:27 +0100)]
Fix typo courtesy of Kenichi Nagai
Paul Nasrat [Thu, 19 Jul 2007 13:16:30 +0000 (14:16 +0100)]
Prepare 1.3.14
Paul Nasrat [Thu, 17 May 2007 12:54:20 +0000 (13:54 +0100)]
Netboot fixes:
- the ARRAY_SIZE macro is no more needed here,
- use of cfgpath to have the actual config path to apply for mac *and* ip
lookup,
- no need to free a buffer big enough, and besides malloc(9) was not
enough ("/etc/" missed),
- use of intermediate length variables to avoid unneeded calls to strlen()
and strrchr().
benoit.guillon <benoit.guillon@tele2.fr>
Paul Nasrat [Thu, 17 May 2007 10:30:59 +0000 (11:30 +0100)]
Correct return type
Leonardo Rangel <lrangel@linux.vnet.ibm.com>
Paul Nasrat [Thu, 17 May 2007 10:29:29 +0000 (11:29 +0100)]
Add missing includes
Leonardo Rangel <lrangel@linux.vnet.ibm.com>
Paul Nasrat [Thu, 17 May 2007 10:28:19 +0000 (11:28 +0100)]
Fix compilation warnings by using return not exit.
Leonardo Rangel <lrangel@linux.vnet.ibm.com>
Paul Nasrat [Thu, 17 May 2007 10:27:23 +0000 (11:27 +0100)]
Now we stop truncating characters for pxelinux style boot at the directory seperator.
Leonardo Rangel <lrangel@linux.vnet.ibm.com>
Paul Nasrat [Wed, 16 May 2007 09:22:59 +0000 (10:22 +0100)]
Update ChangeLog from git
Paul Nasrat [Tue, 15 May 2007 13:28:02 +0000 (14:28 +0100)]
use of cfg_set_default_by_mac() function in yaboot.c
This last part calls the cfg_set_default_by_mac() function in yaboot.c
by load_config_file() function.
Signed-off-by: Paulo Ricardo Paz Vital <vital@br.ibm.com>
Paul Nasrat [Tue, 15 May 2007 13:25:55 +0000 (14:25 +0100)]
This part creates the cfg_set_default_by_mac() function.
This function sets the default cf_option if there is an image label if
the same MAC address of the machine is netbooting.
Signed-off-by: Paulo Ricardo Paz Vital <vital@br.ibm.com>
Paul Nasrat [Tue, 15 May 2007 13:24:06 +0000 (14:24 +0100)]
load_my_config_file() modifications in yaboot.c
This second part, deletes the netbooting like PXE algorithm from
yaboot.c (reallocated in prom.c) and sets the use of prom_get_netinfo(),
prom_get_mac (), prom_get_ip () functions in load_my_config_file()
function to netbooting work like before the changes.
Signed-off-by: Paulo Ricardo Paz Vital <vital@br.ibm.com>
Paul Nasrat [Tue, 15 May 2007 13:23:26 +0000 (14:23 +0100)]
prom functions
This first part creates the prom_get_netinfo (), prom_get_mac (),
prom_get_ip () functions, and some structures to get the necessary
information about the MAC and IP addresses.
Actually, this is a reallocation of netbooting like PXE algorithm wrote
by Benoit Guillon [1], to be used by any other part of Yaboot to get the
netbooting information.
[1] http://ozlabs.org/pipermail/yaboot-devel/2006-December/000062.html
Signed-off-by: Paulo Ricardo Paz Vital <vital@br.ibm.com>
Paul Nasrat [Tue, 15 May 2007 13:18:33 +0000 (14:18 +0100)]
This patch fixes OF netbooting on pSeries
Signed-off-by: Paulo Ricardo Paz Vital <vital@br.ibm.com>
Paul Nasrat [Tue, 15 May 2007 13:14:43 +0000 (14:14 +0100)]
User-specified config file on Yaboot's prompt
This patch clears out the kernel image list before loading a new config file.
Leonardo Rangel lrangel at linux.vnet.ibm.com