Skip to content

Commit

Permalink
add support to supplement atags to device tree
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Wilczek <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
  • Loading branch information
Piotr Wilczek authored and zonque committed Dec 18, 2013
1 parent cdd52f2 commit f978242
Show file tree
Hide file tree
Showing 17 changed files with 6,759 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ LD=$(CROSS_COMPILE)ld
include Makefile.config

CFLAGS+=-DUART_BASE=$(UART_BASE)
CFLAGS+=-DNR_BANKS=$(NR_BANKS)

BOARD_OBJ = board-$(MFG).o
UART_OBJ = serial-$(UART).o
Expand All @@ -29,8 +30,16 @@ CFLAGS+=-DAPPEND_DTBS="$(APPEND_DTBS)"
BINARY_OBJS+=dtbs-bin.o
endif

ifneq ($(origin LIBFDT), undefined)
CFLAGS+=-DLIBFDT="$(LIBFDT)"
LIBS = -lfdt
LDFLAGS+=-L./libfdt -lfdt
endif

ALL_OBJS=$(COMMON_OBJS) $(BOARD_OBJ) $(UART_OBJ) $(INPUT_OBJS) $(BINARY_OBJS)

export CFLAGS GCC CROSS_COMPILE

all: uImage

version.h:
Expand All @@ -39,6 +48,8 @@ version.h:
zimage.o: $(APPEND_KERNEL)
$(OBJCOPY) -I binary -O $(BINFMT) -B arm $^ $@

$(MAKE) -C libfdt

dtbs-bin.o: $(APPEND_DTBS)
./append_dtbs.sh dtbs.bin $^
$(OBJCOPY) -I binary -O $(BINFMT) -B arm dtbs.bin $@
Expand All @@ -47,7 +58,7 @@ dtbs-bin.o: $(APPEND_DTBS)
$(GCC) $(CFLAGS) -c $^

matcher: version.h $(ALL_OBJS)
$(LD) $(LDFLAGS) -T matcher.lds -Ttext $(LOADADDR) -o $@ $(ALL_OBJS)
$(LD) $(LDFLAGS) -T matcher.lds -Ttext $(LOADADDR) -o $@ $(ALL_OBJS) $(LIBS)

matcher.bin: matcher
$(OBJCOPY) -O binary --set-section-flags .bss=alloc,load,contents $^ $@
Expand Down
2 changes: 2 additions & 0 deletions atags.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ struct tag {
#define for_each_tag(t,base) \
for (t = base; t->hdr.size; t = tag_next(t))

int atags_to_fdt(void *atag_list, void *fdt, int total_space);

#endif /* _ATAG_H */
Loading

0 comments on commit f978242

Please sign in to comment.