Re: pledge(2) problems on 18/x/ octeon snapshot
Miod Vallat wrote: > > > Might be a stupid question, but I haven't found an answer to it yet > > > - how does one update to a new snapshot/kernel on an octeon system? > > > > boot bsd.rd and select upgrade in the installer. (i hope.) > > > I'm afraid this is not as simple as this, yet. You will also need to > copy your kernel to the fat16 partition created during the install, > since this is the only filesystem #$%^@# u-boot can read. the md_installboot part of install.sh does that on octeon, no? it looks like we run installboot after an upgrade, too.
Re: pledge(2) problems on 18/x/ octeon snapshot
Might be a stupid question, but I haven't found an answer to it yet - how does one update to a new snapshot/kernel on an octeon system? boot bsd.rd and select upgrade in the installer. (i hope.) I'm afraid this is not as simple as this, yet. You will also need to copy your kernel to the fat16 partition created during the install, since this is the only filesystem #$%^@# u-boot can read. Wouldn't this be a sensible addition to the INSTALL.octeon readme? Something along the lines of: --- INSTALL.octeon.new Wed Oct 21 09:29:17 2015 +++ INSTALL.octeon Wed Oct 21 09:34:50 2015 @@ -816,7 +816,8 @@ helper script, since all components of your system may not function correctly until your files in `/etc' are updated. - +Note: Due to the limitations of U-Boot scripts/bootloader you need to +copy your new bsd and bsd.rd to the MSDOS partition. Getting source code for your OpenBSD System:
Re: pledge(2) problems on 18/x/ octeon snapshot
Hello On 10/19/15 19:58, Sebastien Marie wrote: RELEASE 5.8 returns ENOSYS ("Function not implemented") on tame(2) call (which is the old name for pledge, so with the same syscall number). I pulled the kernel down from the same URL path as the tgz I used. Before reinstalling the system I noticed, the Kernel login string having an older date than the snapshot. I would be great if you can grab the kernel version echoed at boot time. You could use `boot -c' in the boot loader, in order to enter in config mode, and have the time to read the OpenBSD version. Sadly EdgeRouterLite have no 'real bootloader' but use U-Boot. Which I guess is part of the problem. My steps where as followed: mv bsd obsd mv /tmp/bsd /bsd mv /tmp/bsd.rd /bsd.rd reboot Can i be, that U-boot does not cleanly reload the new kernel on reboot? Cheers, Kim
Re: pledge(2) problems on 18/x/ octeon snapshot
On Tue, Oct 20, 2015 at 12:10:39PM +0200, Sebastien Marie wrote: > On Tue, Oct 20, 2015 at 11:09:58AM +0200, Kim Zeitler wrote: > > Hello > > > > On 10/19/15 19:58, Sebastien Marie wrote: > > > > > >RELEASE 5.8 returns ENOSYS ("Function not implemented") on tame(2) call > > >(which is the old name for pledge, so with the same syscall number). > > I pulled the kernel down from the same URL path as the tgz I used. > > Before reinstalling the system I noticed, the Kernel login string having an > > older date than the snapshot. > > > > >I would be great if you can grab the kernel version echoed at boot time. > > >You could use `boot -c' in the boot loader, in order to enter in config > > >mode, and have the time to read the OpenBSD version. > > > > > Sadly EdgeRouterLite have no 'real bootloader' but use U-Boot. Which I guess > > is part of the problem. > > > > My steps where as followed: > > > > mv bsd obsd > > mv /tmp/bsd /bsd > > mv /tmp/bsd.rd /bsd.rd > > reboot > > > > Can i be, that U-boot does not cleanly reload the new kernel on reboot? > > As I don't know U-boot, I couldn't say anything... > > As you told previously that you have problem when running command, I > think you have a valid shell ? If it is the case, could you run: > # sysctl kern.version > > sysctl(8) isn't pledged, so it should be runnable (if you have a shell). > > after, if the running bsd is a too old version (without pledge(2) > support), you will need to change the booted kernel to something else. > > Reading the INSTALL.octeon file, it seems it should be possible to > choose at boottime the image you want to boot. The more simple should be > to try booting bsd.rd: it is self-contained so inside the RAMDISK the > userland will be compatible with the kernel. > > And after you will have to download another bsd file, and try to boot it. > > For checking the version of an arbitrary bsd file, you could use > what(1): > > # what /bsd > /bsd > OpenBSD 5.8-current (GENERIC.MP) #27: Tue Oct 20 09:23:20 CEST 2015 > > I will try to get more information about U-boot. There is no OpenBSD bootloader for armv7 or octeon, in part because u-boot by default provides no interface for enumerating disks, reading blocks or putc/getc equivalents unlike firmware shipped with almost every other system. As a result the kernel has to live on filesystems u-boot understands, fat32 or ext2 not ffs. So /bsd will not be the kernel that is loaded. kernel arguments like -c to get into ukc can be set via setenv bootargs though it seems the octeon code may not use that while armv7 does.
Re: pledge(2) problems on 18/x/ octeon snapshot
On Tue, Oct 20, 2015 at 11:09:58AM +0200, Kim Zeitler wrote: > Hello > > On 10/19/15 19:58, Sebastien Marie wrote: > > > >RELEASE 5.8 returns ENOSYS ("Function not implemented") on tame(2) call > >(which is the old name for pledge, so with the same syscall number). > I pulled the kernel down from the same URL path as the tgz I used. > Before reinstalling the system I noticed, the Kernel login string having an > older date than the snapshot. > > >I would be great if you can grab the kernel version echoed at boot time. > >You could use `boot -c' in the boot loader, in order to enter in config > >mode, and have the time to read the OpenBSD version. > > > Sadly EdgeRouterLite have no 'real bootloader' but use U-Boot. Which I guess > is part of the problem. > > My steps where as followed: > > mv bsd obsd > mv /tmp/bsd /bsd > mv /tmp/bsd.rd /bsd.rd > reboot > > Can i be, that U-boot does not cleanly reload the new kernel on reboot? As I don't know U-boot, I couldn't say anything... As you told previously that you have problem when running command, I think you have a valid shell ? If it is the case, could you run: # sysctl kern.version sysctl(8) isn't pledged, so it should be runnable (if you have a shell). after, if the running bsd is a too old version (without pledge(2) support), you will need to change the booted kernel to something else. Reading the INSTALL.octeon file, it seems it should be possible to choose at boottime the image you want to boot. The more simple should be to try booting bsd.rd: it is self-contained so inside the RAMDISK the userland will be compatible with the kernel. And after you will have to download another bsd file, and try to boot it. For checking the version of an arbitrary bsd file, you could use what(1): # what /bsd /bsd OpenBSD 5.8-current (GENERIC.MP) #27: Tue Oct 20 09:23:20 CEST 2015 I will try to get more information about U-boot. -- Sebastien Marie
Re: pledge(2) problems on 18/x/ octeon snapshot
Sorry for the last empty answer - you shouldnt try to multi-task boot bsd.rd and select upgrade in the installer. (i hope.) Thanks for the answer Ted, I will try it with the next snapshot and will give feedback Cheers Kim
Re: pledge(2) problems on 18/x/ octeon snapshot
On 10/20/15 15:30, Ted Unangst wrote: Kim Zeitler wrote: Hello Sebastien, hello Jonathan @Sebastien thank you for your valuable hints and advice, I did learn quite a bit from it. The machine has been reinstalled to the latest snapshot, as it is needed. On 10/20/15 12:30, Jonathan Gray wrote: There is no OpenBSD bootloader for armv7 or octeon, in part because u-boot by default provides no interface for enumerating disks, reading blocks or putc/getc equivalents unlike firmware shipped with almost every other system. As a result the kernel has to live on filesystems u-boot understands, fat32 or ext2 not ffs. So /bsd will not be the kernel that is loaded. Might be a stupid question, but I haven't found an answer to it yet - how does one update to a new snapshot/kernel on an octeon system? boot bsd.rd and select upgrade in the installer. (i hope.) -- Kim Zeitler Bachlor of Science (Hons) Konzept Informationssysteme GmbH Am Weiher 13 • 88709 Meersburg Fon: +49 7532 4466-240 Fax: +49 7532 4466-66 kim.zeit...@konzept-is.de www.konzept-is.de Amtsgericht Freiburg 581491 • Geschäftsführer: Heinz Grötzinger, Dr. Udo Konzack, Hans-Peter Zimmermann
Re: pledge(2) problems on 18/x/ octeon snapshot
Hello Sebastien, hello Jonathan @Sebastien thank you for your valuable hints and advice, I did learn quite a bit from it. The machine has been reinstalled to the latest snapshot, as it is needed. On 10/20/15 12:30, Jonathan Gray wrote: There is no OpenBSD bootloader for armv7 or octeon, in part because u-boot by default provides no interface for enumerating disks, reading blocks or putc/getc equivalents unlike firmware shipped with almost every other system. As a result the kernel has to live on filesystems u-boot understands, fat32 or ext2 not ffs. So /bsd will not be the kernel that is loaded. Might be a stupid question, but I haven't found an answer to it yet - how does one update to a new snapshot/kernel on an octeon system? kernel arguments like -c to get into ukc can be set via setenv bootargs though it seems the octeon code may not use that while armv7 does. This was the part I was missing, ta. Cheers, Kim
Re: pledge(2) problems on 18/x/ octeon snapshot
> > Might be a stupid question, but I haven't found an answer to it yet > > - how does one update to a new snapshot/kernel on an octeon system? > > boot bsd.rd and select upgrade in the installer. (i hope.) > I'm afraid this is not as simple as this, yet. You will also need to copy your kernel to the fat16 partition created during the install, since this is the only filesystem #$%^@# u-boot can read.
Re: pledge(2) problems on 18/x/ octeon snapshot
Kim Zeitler wrote: > Hello Sebastien, hello Jonathan > > @Sebastien thank you for your valuable hints and advice, I did learn > quite a bit from it. The machine has been reinstalled to the latest > snapshot, as it is needed. > > On 10/20/15 12:30, Jonathan Gray wrote: > > There is no OpenBSD bootloader for armv7 or octeon, in part because > > u-boot by default provides no interface for enumerating disks, reading > > blocks > > or putc/getc equivalents unlike firmware shipped with almost every > > other system. > > > > As a result the kernel has to live on filesystems u-boot understands, > > fat32 or ext2 not ffs. So /bsd will not be the kernel that is loaded. > Might be a stupid question, but I haven't found an answer to it yet > - how does one update to a new snapshot/kernel on an octeon system? boot bsd.rd and select upgrade in the installer. (i hope.)
Re: pledge(2) problems on 18/x/ octeon snapshot
On Mon, Oct 19, 2015 at 07:02:44PM +0200, Kim Zeitler wrote: > I just tried updating an EdgeRouterLite to the latest octeon snapshot > after replacing the kernel and unpacking base58.tgz > Literally all commands lead to > > : pledge: Function not implemented > Do you try to run a bsd kernel from RELEASE 5.8 with a userland from -current ? RELEASE 5.8 returns ENOSYS ("Function not implemented") on tame(2) call (which is the old name for pledge, so with the same syscall number). Programs who call pledge(2), generally exit with error on errno. I would be great if you can grab the kernel version echoed at boot time. You could use `boot -c' in the boot loader, in order to enter in config mode, and have the time to read the OpenBSD version. -- Sebastien Marie
pledge(2) problems on 18/x/ octeon snapshot
I just tried updating an EdgeRouterLite to the latest octeon snapshot after replacing the kernel and unpacking base58.tgz Literally all commands lead to : pledge: Function not implemented I would offer a ktrace/kdump but sadly my kdump also returns with said error. Cheers, Kim