On Mon, Jul 18, 2016 at 12:25:27PM +0200, Mark Kettenis wrote:
> > Date: Mon, 18 Jul 2016 11:52:15 +0300
> > From: Artturi Alm <[email protected]>
> > 
> > iHi,
> > 
> > optimistic as always, this would be one item off the list making me own
> > this shit.:) octeon might benefit also, but haven't tested on one.
> > didn't figure out how to make a proper diff for ports/sysutils/u-boot/
> > against cvs, so here is diff to be applied directly on top of recent
> > u-boot master. whacked out of sys/lib/libsa/.
> 
> Having ffs support in u-boot would indeed be useful.  That said, the
> recommended way to load OpenBSD kernels is through the efiboot
> bootloader as it will provide the kernel with initial entropy.
> 
> Ultimately this code should be contributed back upstream.  We don't
> really want to maintain large patches like this in the ports tree.
> 
> Cheers,
> 
> Mark
> 
> 

i haven't looked at u-boot sources with concentration on efiboot yet, but is it
in some standard that efiboot is to be loaded from fat partition or something?
code in the diff does work like rest of 'std' filesystems in u-boot so that:
"load usb 0:4 ${kernel_addr} /efi/boot/bootarm.efi && bootefi ${kernel_addr}"
will do the right thing leaving out the detail about which filesystem there
is @ usb0:4, and afaict. u-boot doesnt respect mbr type and ie. will try to
'mount' 0xa6-partitions with ext2 too.

There's still things i'd like to add/change/remove before trying to 'mainline'
it. ofc now anyone is free to do what they want with it, im unlikely to spend
time on this anytime soon:)


-Artturi


"while here:"

diff --git a/sys/lib/libsa/readdir.c b/sys/lib/libsa/readdir.c
index 76ff973..e118be1 100644
--- a/sys/lib/libsa/readdir.c
+++ b/sys/lib/libsa/readdir.c
@@ -68,7 +68,7 @@ readdir(int fd, char *dest)
        struct open_file *f = &files[fd];
 
        if (fd < 0 || fd >= SOPEN_MAX ||
-           !((f = &files[fd])->f_flags & F_READ)) {
+           !(f->f_flags & F_READ)) {
                errno = EBADF;
                return (-1);
        }

Reply via email to