uboot patch, modify headers
This commit is contained in:
parent
86ecbc67f7
commit
47232020b1
1
Makefile
1
Makefile
@ -17,6 +17,7 @@ run: $(IMAGE_NAME).img
|
||||
|
||||
uboot:
|
||||
git clone https://github.com/u-boot/u-boot.git --branch=v2023.10 --depth=1 2>/dev/null | true
|
||||
sed -i '/panic("FDT and ATAGS support not compiled in\\n");/c\' u-boot/arch/arm/lib/bootm.c
|
||||
SOURCE_DATE_EPOCH=0 $(MAKE) -C u-boot rpi_3_defconfig ARCH=arm CROSS_COMPILE=aarch64-none-elf-
|
||||
SOURCE_DATE_EPOCH=0 $(MAKE) -C u-boot all ARCH=arm CROSS_COMPILE=aarch64-none-elf-
|
||||
|
||||
|
@ -16,7 +16,6 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
#include <device.h>
|
||||
|
||||
uint32_t MMIO_BASE = 0;
|
||||
|
@ -17,32 +17,16 @@
|
||||
*/
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
#include <device.h>
|
||||
#include <fdt.h>
|
||||
#include <hal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <fb.h>
|
||||
|
||||
// The buffer must be 16-byte aligned as only the upper 28 bits of the address can be passed via the mailbox
|
||||
volatile unsigned int __attribute__((aligned(16))) mbox[36];
|
||||
|
||||
#define MBOX_RESPONSE 0x80000000
|
||||
#define MBOX_FULL 0x80000000
|
||||
#define MBOX_EMPTY 0x40000000
|
||||
#define MBOX_REQUEST 0x0
|
||||
|
||||
#define MBOX_TAG_SETPOWER 0x28001
|
||||
#define MBOX_TAG_SETCLKRATE 0x38002
|
||||
#define MBOX_TAG_SETPHYWH 0x48003
|
||||
#define MBOX_TAG_SETVIRTWH 0x48004
|
||||
#define MBOX_TAG_SETVIRTOFF 0x48009
|
||||
#define MBOX_TAG_SETDEPTH 0x48005
|
||||
#define MBOX_TAG_SETPXLORDR 0x48006
|
||||
#define MBOX_TAG_GETFB 0x40001
|
||||
#define MBOX_TAG_GETPITCH 0x40008
|
||||
#define MBOX_TAG_LAST 0x0
|
||||
|
||||
#define MBOX_CH_PROP 0x8
|
||||
|
||||
unsigned int width, height, pitch, bpp, rgb;
|
||||
unsigned char *fb;
|
||||
|
||||
@ -94,8 +78,8 @@ void fb_init() {
|
||||
mbox[7] = MBOX_TAG_SETVIRTWH;
|
||||
mbox[8] = 8;
|
||||
mbox[9] = 8;
|
||||
mbox[10] = 1920;
|
||||
mbox[11] = 1080;
|
||||
mbox[10] = 640;
|
||||
mbox[11] = 480;
|
||||
|
||||
mbox[12] = MBOX_TAG_SETVIRTOFF;
|
||||
mbox[13] = 8;
|
||||
|
@ -19,6 +19,24 @@
|
||||
#ifndef _ASAGIRI_FB_H
|
||||
#define _ASAGIRI_FB_H
|
||||
|
||||
#define MBOX_RESPONSE 0x80000000
|
||||
#define MBOX_FULL 0x80000000
|
||||
#define MBOX_EMPTY 0x40000000
|
||||
#define MBOX_REQUEST 0x0
|
||||
|
||||
#define MBOX_TAG_SETPOWER 0x28001
|
||||
#define MBOX_TAG_SETCLKRATE 0x38002
|
||||
#define MBOX_TAG_SETPHYWH 0x48003
|
||||
#define MBOX_TAG_SETVIRTWH 0x48004
|
||||
#define MBOX_TAG_SETVIRTOFF 0x48009
|
||||
#define MBOX_TAG_SETDEPTH 0x48005
|
||||
#define MBOX_TAG_SETPXLORDR 0x48006
|
||||
#define MBOX_TAG_GETFB 0x40001
|
||||
#define MBOX_TAG_GETPITCH 0x40008
|
||||
#define MBOX_TAG_LAST 0x0
|
||||
|
||||
#define MBOX_CH_PROP 0x8
|
||||
|
||||
void fb_init();
|
||||
|
||||
#endif
|
||||
|
@ -16,7 +16,6 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
#include <hal.h>
|
||||
|
||||
void hcf() {
|
||||
|
@ -19,10 +19,9 @@
|
||||
#ifndef _ASAGIRI_HAL_H
|
||||
#define _ASAGIRI_HAL_H
|
||||
|
||||
#define asm __asm__ __volatile__
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
#include <device.h>
|
||||
|
||||
#define asm __asm__ __volatile__
|
||||
|
||||
void hcf();
|
||||
void delay(int32_t);
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <fdt.h>
|
||||
#include <hal.h>
|
||||
#include <string.h>
|
||||
#include <device.h>
|
||||
#include <uart.h>
|
||||
|
||||
void uart_init() {
|
||||
// Get MMIO, UART and MBOX addresses from FDT
|
||||
|
0
scripts/compile-toolchain-aarch64.sh
Normal file → Executable file
0
scripts/compile-toolchain-aarch64.sh
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user