|
NetBSD Installation and Upgrading Have trouble getting NetBSD on your toaster? |
|
Thread Tools | Display Modes |
|
|||
sysupgrade fails on evbarm7hf (rasperry pi 2)
Hello everyone
I tried to upgrade NetBSD from 7.0.1 to 7.0.2 but it fails. Code:
sysupgrade kernel sysupgrade: I: Skipping kernel installation (KERNEL not set) Next try: Code:
sysupgrade auto ftp://ftp.NetBSD.org/pub/NetBSD/NetB...vbarm-earmv7hf Code:
uname -a NetBSD berlin 7.0.1 NetBSD 7.0.1 (RPI2.201605221355Z) evbarm Update: Several months later, I tried it again with the same result. Before I did a complete new installation with NetBSD 8.99.2 (RPI2) Code:
sysupgrade auto ftp://nyftp.netbsd.org/pub/NetBSD-daily/HEAD/201711241510Z/evbarm-earmv7hf Code:
uname -a NetBSD armv7 8.99.2 NetBSD 8.99.2 (RPI2) #0: Tue Sep 12 07:19:36 UTC 2017 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/RPI2 evbarm Last edited by milestone; 25th November 2017 at 02:36 PM. Reason: Update |
|
|||
today I tried sysupgrade 8.99.8 -> 8.99.12
same result. No errors and after all I stay with 8.99.8 Code:
$ name -r 8.99.8 Code:
$ ls -l *bsd -rw-r--r-- 1 root wheel 8054460 Jan 25 22:21 netbsd -rw-r--r-- 1 root wheel 7983564 Dec 29 12:22 onetbsd Code:
$ cd /kern ; ls -l total 31 -r--r--r-- 1 root wheel 11 Jan 26 07:59 boottime -r--r--r-- 1 root wheel 318 Jan 26 08:11 copyright -rw-r--r-- 1 root wheel 6 Jan 26 08:11 hostname -r--r--r-- 1 root wheel 4 Jan 26 08:11 hz -r--r--r-- 1 root wheel 14 Jan 26 08:11 loadavg -r--r--r-- 1 root wheel 16368 Jan 26 08:11 msgbuf -r--r--r-- 1 root wheel 5 Jan 26 08:11 pagesize -r--r--r-- 1 root wheel 7 Jan 26 08:11 physmem br--r--r-- 1 root wheel 92, 0 Jan 26 08:11 rootdev cr--r--r-- 1 root wheel 92, 0 Jan 26 08:11 rrootdev -r--r--r-- 1 root wheel 18 Jan 26 08:11 time -r--r--r-- 1 root wheel 122 Jan 26 08:11 version |
|
|||
On the netbsd wiki it is mentioned how to upgrade the kernel [1]
Quote:
So I guess, that I have to copy the kernel into the directory /boot Quote:
Or do I have to build the kernel by myself on the RPI and it is not possible with sysupgrade? [1] http://wiki.netbsd.org/ports/evbarm/..._pi/#index10h2 Last edited by milestone; 9th February 2018 at 03:30 PM. Reason: additional information |
|
|||
Still the same problem when I try to upgrade from 8.0 to 8.1
Changed the Kernel manual to RPI2 Quote:
Quote:
But ... Quote:
|
|
|||
The date of the files look ok except the /boot directory
So I think the boot process is maybe different than on other systems? Code:
-bash-5.0$ ls -lT total 29554 drwxr-xr-x 2 root wheel 512 May 31 10:43:59 2019 altroot drwxr-xr-x 2 root wheel 1024 May 31 10:43:59 2019 bin drwxr-xr-x 1 root wheel 16384 Dec 31 23:00:00 1979 boot drwxr-xr-x 9 root wheel 28160 May 31 10:43:59 2019 dev -rw------- 1 root wheel 671468 Jan 1 19:28:38 2019 dhcpcd.core drwxr-xr-x 29 root wheel 2048 Jun 8 14:39:03 2019 etc drwxr-xr-x 3 root wheel 512 Oct 27 12:48:52 2018 home dr-xr-xr-x 2 root wheel 512 Jun 8 14:41:43 2019 kern drwxr-xr-x 4 root wheel 2048 May 31 10:43:59 2019 lib drwxr-xr-x 3 root wheel 512 May 31 10:43:59 2019 libdata drwxr-xr-x 5 root wheel 512 May 31 10:43:59 2019 libexec drwxr-xr-x 2 root wheel 512 May 31 10:43:59 2019 mnt -rw-r--r-- 1 root wheel 7052052 Jun 8 11:59:38 2019 netbsd -rw-r--r-- 1 root wheel 7052052 Jun 7 21:40:50 2019 onetbsd dr-xr-xr-x 1 root wheel 512 Jun 8 14:41:43 2019 proc drwxr-xr-x 2 root wheel 3072 May 31 10:43:59 2019 rescue drwxr-xr-x 5 root wheel 512 May 31 10:43:59 2019 root drwxr-xr-x 2 root wheel 3072 May 31 10:43:59 2019 sbin drwxr-xr-x 3 root wheel 512 May 31 10:43:59 2019 stand drwxrwxrwt 2 root wheel 512 Jun 8 14:38:20 2019 tmp drwxr-xr-x 15 root wheel 512 May 31 10:43:59 2019 usr drwxr-xr-x 26 root wheel 512 May 31 10:43:59 2019 var -bash-5.0$ uname -a NetBSD armv7 8.0 NetBSD 8.0 (RPI2) #0: Tue Jul 17 14:59:51 UTC 2018 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/RPI2 evbarm |
|
||||
a couple of solutions for you...
Quote:
Referring in particular to Raspberry Pi*, all files needed to boot -as well as all the .dtb firmware- are expected to be found on the first (FAT32) partition of a MBR disk: the third stage bootloader, start.elf, reads config.txt and cmdline.txt and loads to SDRAM a armv7hl PI2 kernel zImage, by default called kernel7.img: any custom name needs to be specified in config.txt, see official docs on Rpi Boot Options. Now, if you hypothetically renamed a standard netbsd kernel ELF as'kernel7.img' and put it on /boot , that would naturally fail booting as start.elf expects a zImage. While standard kernel build tools (nbmake-evbarm, build.sh) are not capable of creating zImages, gzboot was specifically created as a workaround for the issue: it produces a self-extracting, zImage-like kernel img out of a gzipped kernel raw bin. The procedure for creating a self-extracting .img should be as easy as: Code:
$ cd /usr/src/sys/arch/evbarm/stand/gzboot && make $ export GZBOOT="/path/to/gzboot-bin" KERNEL=netbsd-RPI2.bin.gz $ ftp ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-8.1/evbarm-earmv7hf/binary/kernel/${KERNEL} $ cat $GZBOOT $KERNEL > netbsd.img concatenated into a single .img file: the gzboot code will look for the gzipped data just after itself and decompress the kernel image at the specified memory address. Hereby, providing userland sets have been updated to the same version, all you'd have to do left would be uploading the netbsd.img to the Rpi2' /boot partition and edit the config.txt so as to point it to the right image and make it load at 0x200000 Code:
kernel=netbsd.img kernel_address=0x200000 enable_uart=1
Hope this helps, Cheers! EDIT: it seems NetBSD now uses a specific script to tag the kernel bin as a Rpi self-extracting .img, rpi-mkknlimg.sh Indeed: Code:
$ file /netbsd /netbsd: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, for NetBSD 8.99.48, with debug_info, not stripped $ file /boot/netbsd.img /boot/netbsd.img: Raspberry PI kernel image
__________________
“Mi casa tendrá dos piernas y mis sueños no tendrán fronteras„ Last edited by Sehnsucht94; 30th June 2019 at 10:16 PM. |
|
|||
Thanks for you detailed answer!!
I will give it a try :-) |
|
|||
Hi,
Could you give step by step instructions on how to upgrade a NetBSD on the Rpi? |
|
|||
Quote:
today I gave it a try but it didn't work for me. - I downloaded the image by j.McNeill (for RPI2) - unpacked it - mounted the IMG - copied everything to my SD (modified the config.txt before) - could not boot from SD -> copied the old files to SD and I am able to boot again. What's wrong? |
|
|||
Hey. Sorry for the late response.
I switched the usecase for my RPI2, so at the moment there is debian linux running. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SSH from WAN fails, LAN works OK. Why? | pttymuth | OpenBSD General | 12 | 24th July 2013 07:26 PM |
X forwarding fails | Graaf_van_Vlaanderen | OpenBSD General | 7 | 10th January 2010 12:57 AM |
Bootonly CD Fails | rtwingfield | FreeBSD Installation and Upgrading | 1 | 29th December 2008 01:25 AM |
Startx fails | disappearedng | FreeBSD General | 11 | 19th July 2008 09:32 AM |
PC-BSD 1.5.1 fails to install | archp2008 | FreeBSD Installation and Upgrading | 27 | 1st July 2008 11:47 PM |