📄 makefile
字号:
## if you want the loader in a special location (e.g. to RPMize shoehorn) use# make all [ EXTRAFLAGS="-DLOADERPATH=/usr/lib/shoehorn/" ]# if you have sudo use# make suid [ SUDO=sudo ]# select an install path with# make install INSTALLPREFIX=/usr (or /usr/local)#CROSS := arm-linux-CFLAGS := -g -Walloverride CFLAGS += $(EXTRAFLAGS)INSTALL := installINSTALLPREFIX := /armLDFLAGS := -gWHOAMI := $(shell whoami)ifneq ($(WHOAMI),root) SUDO := sudoendifSRCS := download.c cploader.c# The shoehorn loader needs to be setuid root to use packet sockets# (needed for Ethernet download). We only need this for the machine# which actually has the EDB7211 connected to it.#all: loader.bin download cploader binarycopyloader.elf: init.S loader.c ioregs.h ep7211.h flash.h $(CROSS)gcc -Wall -fomit-frame-pointer -O2 -nostdlib \ -Wl,-Ttext,0x10000000 -N init.S loader.c -o loader.elf%.bin: %.elf $(CROSS)objcopy -O binary $^ $@download: download.c loader.bin gcc -o download download.ccploader:loader.bin download cploader.c gcc -o cploader cploader.cbinarycopy: ./cploader# housecleaningclean: rm -f loader.elf loader.bin download cploader rm -f *.o
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -