Page 1 of 1

Re: bare metal project

Posted: Tue Jan 30, 2018 6:02 pm
by davef
There is a "bare metal" subsection on the RaspberryPI forums that should deal with the topics and processes that you need to understand and use.

Re: bare metal project

Posted: Tue May 15, 2018 4:26 pm
by rpidmx512
The "bare metal" section in the Raspberry Pi forum can give you some ideas on how-to program an ARM CPU. But for programming the Allwinner SoC we need to have details on how to create a startup.S (or similar). The ideal option is not using the U-Boot loader and have our own 'bare metal' loader. Any ideas are much appreciated.

Re: bare metal project

Posted: Wed May 16, 2018 4:49 am
by igorp
rpidmx512 wrote:
The "bare metal" section in the Raspberry Pi forum can give you some ideas on how-to program an ARM CPU. But for programming the Allwinner SoC we need to have details on how to create a startup.S (or similar). The ideal option is not using the U-Boot loader and have our own 'bare metal' loader. Any ideas are much appreciated.


Try here:

http://linux-sunxi.org/Main_Page
https://forum.armbian.com/forum/4-development/

Re: bare metal project

Posted: Wed May 16, 2018 6:40 am
by rpidmx512

The above is mostly Linux, it does not give the details for baremetal programming.

I’ve found the following:
https://github.com/dwelch67/allwinner_s ... /master/H3
https://github.com/trebisky/orangepi {Allwinner H3}

Both are still using U-Boot.

Re: bare metal project

Posted: Thu Feb 28, 2019 6:49 pm
by JAGITA
rpidmx512 wrote:

The above is mostly Linux, it does not give the details for baremetal programming.

I’ve found the following:
https://github.com/dwelch67/allwinner_s ... /master/H3
https://github.com/trebisky/orangepi {Allwinner H3}
FileZilla Malwarebytes Rufus
Both are still using U-Boot.

The "bare metal" section in the Raspberry Pi forum can give you some ideas on how-to program an ARM CPU. But for programming the Allwinner SoC we need to have details on how to create a startup.S (or similar). The ideal option is not using the U-Boot loader and have our own 'bare metal' loader. Any ideas are much appreciated.

Re: bare metal project

Posted: Thu Feb 28, 2019 7:18 pm
by rpidmx512
JAGITA wrote:
rpidmx512 wrote:

The above is mostly Linux, it does not give the details for baremetal programming.

I’ve found the following:
https://github.com/dwelch67/allwinner_s ... /master/H3
https://github.com/trebisky/orangepi {Allwinner H3}

Both are still using U-Boot.

The "bare metal" section in the Raspberry Pi forum can give you some ideas on how-to program an ARM CPU. But for programming the Allwinner SoC we need to have details on how to create a startup.S (or similar). The ideal option is not using the U-Boot loader and have our own 'bare metal' loader. Any ideas are much appreciated.


I have a complete baremetal environment here -> https://github.com/vanvught/rpidmx512
This includes: I2C, SPI, Ethernet, GPIO

I still use U-Boot. This is basically the Allwinner supported method. I am not eager to invent the wheel in writing my own SPL.
http://linux-sunxi.org/Boot_Process

Re: bare metal project

Posted: Sun Jun 28, 2020 10:58 pm
by bigtreeman
Try OpenBSD for a really interesting way to learn old school where Makefile is 'it'
https://www.openbsd.org mirrors https://www.openbsd.org/ftp.html
https://www.openbsd.org/arm64.html https://www.openbsd.org/armv7.html
is simpler than Linux, especially when dealing with systemd and all the dross that has become attached to Linux.
Load up snapshot openbsd on a pc, download the install files from
https://mirror.aarnet.edu.au/pub/OpenBS ... ots/arm64/
https://mirror.aarnet.edu.au/pub/OpenBS ... ots/armv7/
look through INSTALL.arm64 or INSTALL.armv7 then grab
https://mirror.aarnet.edu.au/pub/OpenBS ... rts.tar.gz
https://mirror.aarnet.edu.au/pub/OpenBSD/6.7/sys.tar.gz and src.tar.gz
sys has the kernel build system to build /bsd (kernel) and /bsd.rd (the installer)
src has the build system for a basic install
ports is the build system everything
Patch and cross compile enough to get it up and running on your bare metal then native compile what you want.
I've just about finished nanopi-neo-air and I'm about to embark on nanopc-t4, then submit the patches to OpenBSD for inclusion in "current".

Re: bare metal project

Posted: Mon Jun 29, 2020 8:22 am
by rpidmx512
bigtreeman wrote:
Try OpenBSD for a really interesting way to learn old school where Makefile is 'it'
https://www.openbsd.org mirrors https://www.openbsd.org/ftp.html
https://www.openbsd.org/arm64.html https://www.openbsd.org/armv7.html
is simpler than Linux, especially when dealing with systemd and all the dross that has become attached to Linux.
Load up snapshot openbsd on a pc, download the install files from
https://mirror.aarnet.edu.au/pub/OpenBS ... ots/arm64/
https://mirror.aarnet.edu.au/pub/OpenBS ... ots/armv7/
look through INSTALL.arm64 or INSTALL.armv7 then grab
https://mirror.aarnet.edu.au/pub/OpenBS ... rts.tar.gz
https://mirror.aarnet.edu.au/pub/OpenBSD/6.7/sys.tar.gz and src.tar.gz
sys has the kernel build system to build /bsd (kernel) and /bsd.rd (the installer)
src has the build system for a basic install
ports is the build system everything
Patch and cross compile enough to get it up and running on your bare metal then native compile what you want.
I've just about finished nanopi-neo-air and I'm about to embark on nanopc-t4, then submit the patches to OpenBSD for inclusion in "current".


Baremetal programming has nothing to do with old school and/or Makefile.
In todays world the baremetal programming environment is based on Modern C++ with cmake.

In baremetal your write your own startup routine and low-level devices firmware. Preferable based on CMSIS. For the latter it would be great when AllWinner would provide packages.

Of course you have the option to write your own Ethernet stack, but mostly lwIP is used.
The same applies for FAT (and others); you can write your own, but mostly FatFS is used.