blob: 31443c8d9e7944b5ccd92de01aca8330189443ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# Makefile - build a kernel+filesystem image for stand-alone Linux booting
#
# Copyright (C) 2011 ARM Limited. All rights reserved.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE.txt file.
CPPFLAGS += -DSMP
CPPFLAGS += -DUSE_INITRD
#CPPFLAGS += -DTHUMB2_KERNEL
CPPFLAGS += -march=armv7-a
CPPFLAGS += -DVEXPRESS
# MPS (Cortex-M3) definitions
#CPPFLAGS += -DMACH_MPS -DTHUMB2_KERNEL
#CPPFLAGS += -march=armv7-m
#CPPFLAGS += -mthumb -Wa,-mthumb -Wa,-mimplicit-it=always
BOOTLOADER = boot.S
KERNEL = uImage
FILESYSTEM = filesystem.cpio.gz
IMAGE = linux-system.axf
LD_SCRIPT = model.lds.S
CROSS_COMPILE = arm-none-linux-gnueabi-
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
all: $(IMAGE)
clean:
rm -f $(IMAGE) boot.o model.lds
$(IMAGE): boot.o model.lds $(KERNEL) $(FILESYSTEM)
$(LD) -o $@ --script=model.lds
boot.o: $(BOOTLOADER)
$(CC) $(CPPFLAGS) -c -o $@ $<
model.lds: $(LD_SCRIPT)
$(CC) $(CPPFLAGS) -E -P -C -o $@ $<
|