|
EDA365欢迎您!
您需要 登录 才可以下载或查看,没有帐号?注册
x
完全自己写的bootloader启动kernel,2440直接可用,4.3寸屏,带apple的logo- int main(void)
- {
- char c;
- char cmd_buf[200];
- uart0_init();
- puts("\n\r#####################################\n\r");
- puts("The board:TQ2440\n\r");
- puts("The NAND:K9F1216U0A 256MB\n\r");
- puts("The NOR:EN29LV160AB 2MB\n\r");
- puts("The SRAM:HY57V561620 x2 64MB\n\r");
- puts("just bootloader linux date: 2013.8.19;by jiangdou\n\r");
- puts("#####################################\n\r");
- lcd_Init();
- my_logo();
- PutPixel(20,250,0x001F);
- PutPixel(40,250,0x07E0);
- PutPixel(40,250,0xF800);
- //paint_Bmp(0,0,320,240,logo);
- //lcd_ClearScr(0x001F);
- //paint_Bmp((LCD_XSIZE_TFT -80) / 2, (LCD_YSIZE_TFT -80) / 2, 80, 80, logo);
- puts("Booting Linux ...\n\r");
- boot_zImage(0x00200000, 0x00300000);
复制代码 2.makefile- CC = arm-linux-gcc
- LD = arm-linux-ld
- AR = arm-linux-ar
- OBJCOPY = arm-linux-objcopy
- OBJDUMP = arm-linux-objdump
- CFLAGS := -Wall -O2
- CPPFLAGS := -nostdinc -nostdlib -fno-builtin
- LIB := $(obj)liblcd.a
- objs := start.o init.o main.o boot_zImage.o lcd_logo.o logo.o
- u-boot.bin: $(objs)
- ${LD} -Tboot.lds -o boot.elf $^
- ${OBJCOPY} -O binary -S boot.elf $@
- ${OBJDUMP} -D -m arm boot.elf > u_boot.dis
- %.o:%.c
- ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
- %.o:%.S
- ${CC} $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
- clean:
- rm -f *.o *.bin *.elf *.dis
复制代码 |
|