Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RPI: kernel variants, documentation



On 15/10/2020 19:38, Greg Troxel wrote:

I updated an RPI3 from 8 to 9 June, and remember having to add
dtb files and not much else specific.

Now I want to update along 9.   I know that the RPI2 kernel is gone and
it uses GENERIC (that's what I used in June).  But I see 4 GENERIC
kernels:

-rw-r--r--  1 root   wheel  4106729 Oct  8 23:07 netbsd-GENERIC.bin.gz
-rw-r--r--  1 root   wheel  4886368 Oct  8 23:07 netbsd-GENERIC.gz
-rw-r--r--  1 root   wheel  4106768 Oct  8 23:07 netbsd-GENERIC.img.gz
-rw-r--r--  1 root   wheel  4106705 Oct  8 23:07 netbsd-GENERIC.ub.gz

If I ungzip them, file says:

netbsd-GENERIC:     ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, for NetBSD 9.0, not stripped
netbsd-GENERIC.bin: data
netbsd-GENERIC.img: data
netbsd-GENERIC.ub:  u-boot legacy uImage, NetBSD/earmv7hf 9.0_STABLE, Linux/ARM, (Not compressed), 8884440 bytes, Fri Oct  9 02:11:47 2020, Load Address: 0x00000000, Entry Point: 0x00000000, Header CRC: 0x30A81853, Data CRC: 0xB366126D

The RPI HOWTO, perhaps edited by me, says:

   Besides the "netbsd" kernel in ELF format, there is also a "netbsd.img"
   (for current) or "netbsd.bin" (for 7 and 8) kernel that is in a format
   that the Raspberry can boot.

but in 9, I see both.  img has 55 bytes more:

0000000   \0  \0  \0  \0  \0  \0  \0 001  \0  \0  \0 004  \0  \0  \0   2
0000020    8   3   x 001  \0  \0  \0 004  \0  \0  \0   D   T   O   K 001
0000040   \0  \0  \0 004  \0  \0  \0   D   D   T   K   8  \0  \0  \0 004
0000060   \0  \0  \0   R   P   T   L
0000067

I used the img version and it works to boot.

Reading INSTALL.txt, it tells me only that netbsd-GENERIC.gz is a
gzipped kernel and that RPI and RPI2 kernels also exist (now incorrect).


So can anyone tell me, or fix:

1) Could someone teach file(1) to identify these?

2) What are the img and bin formats, and why are they used?

There's a bunch of history here that I forget, but here are some urls to
help

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/evbarm/conf/mk.generic?rev=1.9&content-type=text/x-cvsweb-markup

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/evbarm/conf/mk.rpi?rev=1.8&content-type=text/x-cvsweb-markup&only_with_tag=MAIN

https://github.com/raspberrypi/linux/commit/2367d8a42e2717d8d15a39a9085cc2909fae033a#diff-8f088aca645d10d79b594d58db4136f3e09caee077fe373bb08f02f2040900a9


I *think* netbsd-9 needs the RPTL trailer and head doesn't, but I might
misremember.

Nick


Home | Main Index | Thread Index | Old Index