menu-and-misc.patch
Makefile Wed Aug 10 19:58:50 2011 +0200 | ||
---|---|---|
35 | 35 |
#.endif |
36 | 36 | |
37 | 37 |
.if !defined(TARGET) || !defined(TARGET_ARCH) |
38 |
.error "soc.mk must define both TARGET and TARGET_ARCH" |
|
38 |
ERROROUT:: |
|
39 |
@echo "soc.mk must define both TARGET and TARGET_ARCH" && /bin/false |
|
40 |
# .error "soc.mk must define both TARGET and TARGET_ARCH" |
|
39 | 41 |
.endif |
40 | 42 | |
43 |
menuconfig: |
|
44 |
./menu.sh |
|
41 | 45 | |
42 | 46 |
build-info: |
43 | 47 |
@echo "++++++++++++++ Selected settings for building ++++++++++++++" |
... | ... | |
342 | 346 | |
343 | 347 |
# XXX Must make makefs, mkulzma with [kernel-]toolchain + uboot_mkimage and old lzma ports |
344 | 348 | |
345 |
all: build-info world kernel ports |
|
349 |
all: menuconfig |
|
350 | ||
351 |
build: build-info world kernel ports |
|
346 | 352 |
IMAGE_SUFFIX?=trx |
347 | 353 |
ZTOOLS_PATH=${ZROUTER_OBJ}/ztools |
348 | 354 |
NEW_KERNEL=${ZROUTER_OBJ}/${TARGET_VENDOR}_${TARGET_DEVICE}_kernel |
boards/boards.mk Wed Aug 10 19:58:50 2011 +0200 | ||
---|---|---|
19 | 19 |
.if !defined(TARGET_BOARDDIR) |
20 | 20 |
PAIRS!=ls -d ${ZROUTER_ROOT}/boards/*/* | sed 's/^.*\/boards\///' |
21 | 21 | |
22 |
.warning "No board configuration for pair TARGET_VENDOR/TARGET_DEVICE `${TARGET_VENDOR}/${TARGET_DEVICE}`" |
|
23 |
.error "Posible pairs ${PAIRS}" |
|
22 |
#.warning "No board configuration for pair TARGET_VENDOR/TARGET_DEVICE `${TARGET_VENDOR}/${TARGET_DEVICE}`" |
|
23 |
#.error "Posible pairs ${PAIRS}" |
|
24 |
ERROROUT:: |
|
25 |
@echo "No board configuration for pair TARGET_VENDOR/TARGET_DEVICE `${TARGET_VENDOR}/${TARGET_DEVICE}`" |
|
26 |
@echo "Posible pairs ${PAIRS}" && /bin/false |
|
24 | 27 |
.endif |
menu.sh Wed Aug 10 19:58:50 2011 +0200 | ||
---|---|---|
34 | 34 |
main_menu() { |
35 | 35 |
TMPOPTIONSFILE=$(mktemp -t zrouter-build-menu) |
36 | 36 |
trap "${RM} -f ${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15 |
37 |
${SH} -c "${DIALOG} --title \"ZRouter build menu\" --menu ' ' 13 60 6 \ |
|
37 |
${SH} -c "${DIALOG} --title \"ZRouter build menu ${PROFILE_NAME}\" --menu ' ' 13 60 6 \
|
|
38 | 38 |
Device \"Select the target device\" \ |
39 | 39 |
Targets \"Select the build targets\" \ |
40 | 40 |
Paths \"Set the paths of sources and build objects\" \ |
... | ... | |
271 | 271 |
FREEBSD_SRC_TREE="${FREEBSD_SRC_TREE}" |
272 | 272 |
OBJ_DIR="${OBJ_DIR}" |
273 | 273 |
EOF |
274 |
PROFILE_NAME="(${PROFILE})" |
|
274 | 275 |
return 0 |
275 | 276 |
} |
276 | 277 | |
... | ... | |
320 | 321 |
\"\nThere is a problem with the selected profile (not a file ?).\nThe file could not be read.\" 8 65" |
321 | 322 |
return 1 |
322 | 323 |
fi |
324 |
PROFILE_NAME="(${PROFILE})" |
|
323 | 325 |
return 0 |
324 | 326 |
} |
325 | 327 | |
... | ... | |
332 | 334 |
else |
333 | 335 |
BOX_SIZE=$(($BOX_SIZE + 10)) |
334 | 336 |
fi |
335 |
${SH} -c "${DIALOG} --title \"ZRouter build settings\" --yesno \ |
|
337 |
${SH} -c "${DIALOG} --title \"ZRouter build settings ${PROFILE_NAME}\" --yesno \
|
|
336 | 338 |
\"\nPROFILE: ${PROFILE} \ |
337 | 339 |
\nTARGET_PAIR: ${TARGET_PAIR} \ |
338 | 340 |
\nTARGETS: ${TARGETS} \ |
... | ... | |
352 | 354 |
# |
353 | 355 |
# Set defaults |
354 | 356 |
# |
355 |
BUILD_PROFILES_DIR=build_profiles |
|
356 |
FREEBSD_SRC_TREE="/usr/src" |
|
357 |
OBJ_DIR="/usr/obj" |
|
358 |
TARGET_PAIR="NONE" |
|
359 |
PROFILE="NONE" |
|
360 |
TARGETS="kernel.oldlzma.uboot rootfs.iso.ulzma" |
|
357 |
: ${BUILD_PROFILES_DIR:="build_profiles"} |
|
358 |
: ${FREEBSD_SRC_TREE:="/usr/src"} |
|
359 |
: ${OBJ_DIR:="/usr/obj"} |
|
360 |
: ${TARGET_PAIR:="NONE"} |
|
361 |
: ${PROFILE:="NONE"} |
|
362 |
: ${TARGETS:="kernel.oldlzma.uboot rootfs.iso.ulzma"} |
|
363 |
PROFILE_NAME="(${PROFILE})" |
|
361 | 364 | |
362 | 365 |
# |
363 | 366 |
# Tools paths |
socs/socs.mk Wed Aug 10 19:58:50 2011 +0200 | ||
---|---|---|
9 | 9 |
.if !defined(TARGET_SOCDIR) |
10 | 10 |
PAIRS!=ls -d ${ZROUTER_ROOT}/socs/*/* | sed 's/^.*\/socs\///' |
11 | 11 | |
12 |
.warning "No board configuration for pair SOC_VENDOR/SOC_CHIP `${SOC_VENDOR}/${SOC_CHIP}`" |
|
13 |
.error "Posible pairs ${PAIRS}" |
|
12 |
ERROROUT:: |
|
13 |
@echo "No board configuration for pair SOC_VENDOR/SOC_DEVICE `${SOC_VENDOR}/${SOC_DEVICE}`" |
|
14 |
@echo "Posible pairs ${PAIRS}" && /bin/false |
|
15 | ||
16 |
#.warning "No board configuration for pair SOC_VENDOR/SOC_CHIP `${SOC_VENDOR}/${SOC_CHIP}`" |
|
17 |
#.error "Posible pairs ${PAIRS}" |
|
14 | 18 |
.endif |