MrGrimod
Posts: 10
Joined: Tue Jul 31, 2018 11:06 am

Simple Serial Boot for Simple Kernel

Mon Sep 19, 2022 4:31 pm

Hi, I’m currently working on my own mini kernel and am searching for a simple way of booting. SD cards are both an overkill and not very elegant for my application. I’ve read here and there that it is indeed possible to flash the raspberry via a serial line but am unsure weather that is a buitlin thing or hacks which you first have to install via as card….
So is there any rp model out there that supports that similar to the jetson nano boards?

Greets from Germany Luick

cleverca22
Posts: 6600
Joined: Sat Aug 18, 2012 2:33 pm

Re: Simple Serial Boot for Simple Kernel

Mon Sep 19, 2022 4:44 pm

there is no way to flash the rpi over serial, it needs some kind of serial capable bootloader that is already on the SD card

but some models can also network boot without any SD
and the older models can still network boot with an SD card helping

MrGrimod
Posts: 10
Joined: Tue Jul 31, 2018 11:06 am

Re: Simple Serial Boot for Simple Kernel

Mon Sep 19, 2022 4:50 pm

Ok, thank you! Do you maybe know which boards, similar to the pi (ideally also in popularity) do support something like this(and still have a arm cortex Soc)?

Undertow
Posts: 117
Joined: Thu Feb 18, 2021 2:00 pm

Re: Simple Serial Boot for Simple Kernel

Mon Sep 19, 2022 6:11 pm

You can get a Raspberry Pi CM4 with "Options for 0GB ("Lite"), 8GB, 16GB or 32GB eMMC Flash memory". You can put whatever you want on the onboard flash and boot from it.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 31508
Joined: Sat Jul 30, 2011 7:41 pm

Re: Simple Serial Boot for Simple Kernel

Mon Sep 19, 2022 6:28 pm

MrGrimod wrote:
Mon Sep 19, 2022 4:31 pm
Hi, I’m currently working on my own mini kernel and am searching for a simple way of booting. SD cards are both an overkill and not very elegant for my application. I’ve read here and there that it is indeed possible to flash the raspberry via a serial line but am unsure weather that is a buitlin thing or hacks which you first have to install via as card….
So is there any rp model out there that supports that similar to the jetson nano boards?

Greets from Germany Luick
There is no flash memory built in to the standard Pis, so what would you be trying to flash? As above, maybe the CM4 is the way to go?
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

Fridux
Posts: 13
Joined: Sun Jul 03, 2022 4:14 am

Re: Simple Serial Boot for Simple Kernel

Thu Sep 22, 2022 7:15 am

This is not exactly the solution you're looking for, but as others have mentioned, some versions of the Raspberry Pi can boot from the network, and that's what I'm doing in order to prevent damaging the hardware with wear and tear.

I have a USB-c to Ethernet dongle configured as 192.168.0.1/16 as well asdnsmasq from MacPorts installed on my Mac with the following configuration:

Code: Select all

interface=en7
dhcp-range=192.168.0.50,192.168.0.150,12h
pxe-service=0, "Raspberry Pi Boot"
enable-tftp
tftp-root=/Users/jps/tftp
Then in /Users/jps/tftp I have some files required to boot the Pi along with two symbolic links: one named config.txt pointing at a file with the same name within my project's root directory, and another named kernel8.txt pointing at the location where cargo puts the generated raw binary.

The above, combined with a USB-c cable with a power switch that came with the starter kit that I bought, makes testing new builds as easy as compiling the code and flipping the switch, which seems to be what you wish to accomplish.

User avatar
Gavinmc42
Posts: 6843
Joined: Wed Aug 28, 2013 3:31 am

Re: Simple Serial Boot for Simple Kernel

Tue Oct 04, 2022 2:46 am

USB boot any use?
https://github.com/raspberrypi/usbboot

I use it for Zero's and CM4's
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Bare metal, Assembly language”