先试一下,简单的程序,效果
#incude<stdio.h>
int main(void){
printf("this is a simple programme for test!\n");
return 0;
}
- LDFLAGS_bootp :=-p --no-undefined -X \
- 9 --defsym initrd_phys=$(INITRD_PHYS) \
- 10 --defsym params_phys=$(PARAMS_PHYS) -T
- 11AFLAGS_initrd.o :=-DINITRD=\"$(INITRD)\"
- 15# Note that bootp.lds picks up kernel.o and initrd.o
- 16$(obj)/bootp: $(src)/bootp.lds $(addprefix $(obj)/,init.o kernel.o initrd.o) FORCE
- 17 $(call if_changed,ld)
- 18 @:
- 19
- 20# kernel.o and initrd.o includes a binary p_w_picpath using
- #incude<stdio.h>
- int main(void){
- printf("this is a simple programme for test!\n");
- return 0;
- }