Port-arm archive

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

Re: How do I write a kernel to an SD card?

On Fri, Jan 20, 2023 at 02:56:15PM -0700, Tom Trebisky wrote:
> Is there some way to copy the kernel I just built into this partition or is
> this
> entirely the wrong way to go about things.

I don't know the Orange PI PC directly, but it seems to be similar to
the Orange PI zero, so 32bit and booting via u-boot and a FAT partition.

First slightly off topic: if you want to try it and don't have a custom
build kernel already, the place to start is


and get a suitable image from there (for whatever NetBSD version you prefer).
For Orange PI there are only pre-made images fof Pi 2, Pi One, Pi Plus 2E
and Pi Zero, but since you managed to deal with u-boot already, you can
use the generic 32bit image and add the proper u-boot yourself.

Now back on topic: you have two options:

 - from the device itself: boot your old install, copy "netbsd" and "netbsd.ub"
   from the kernel build over to it, mount the fat partition (I guess something
   like: mount /dev/ld0e /mnt) and then replace the kernel and the ub image,
	mv /mnt/netbsd.ub /mnt/netbsd.ub.old
	cp /tmp/netbsd.ub /mnt
	mv /netbsd /netbsd.old
	cp /tmp/netbsd /

 - do the same from some other machine: mount the fat partition of the SD
   card somewhere and replace netbsd.ub with the new one.
   It is not easy to replace the /netbsd on the FFS partition, but you can
   do that later when you have booted the new kernel on the device
   (the file /netbsd is only used for kernel symbols)


Home | Main Index | Thread Index | Old Index