-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.config.arm32_vexpress
213 lines (189 loc) · 8.13 KB
/
build.config.arm32_vexpress
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
#!/bin/bash
#######################################################################
# build.config.arm32_vexpress
#
# Part of the SEALs project.
# This is the configuration file; all config variables must go here.
#
# !! IMP NOTE TO THE END-USER OF THIS PROJECT !!
# You are responsible for editing this configuration file, setting the
# variables to sane values.
# To help you out, the place in the source below which has the config
# variables that you MUST update have been marked with a comment line
# as follows:
# # @@@@@
# So, you could just search for this string '@@@@@' (excluding the quotes of course),
# and make sure you update the following config variable(s) to the sane value
# for your box.
# !!
#---
# Author: Kaiwan N Billimoria
# (C) kaiwanTECH
#---
#######################################################################
#
#----------------------
# !!!VERY IMPORTANT!!!
#----------------------
# Pl read the documentation here, at least once:
# https://github.com/kaiwan/seals/wiki
#----------------------
#
# Generic Config file.
# For a minimal QEMU-ARM project, we Expect that:
#
# - an appropriate toolchain is installed and working, and setup in the config below
# details: https://github.com/kaiwan/seals/wiki/HOWTO-Install-required-packages-on-the-Host-for-SEALS
# - a recent version of the Linux kernel source tree is available and setup in the config below
# - a recent version of busybox source tree is available and setup in the config below
##############
set -a # auto export all vars
#--------GENERIC CONFIG OPTIONS------------------------------------------------------------
##################### UPDATE as required
# @@@@@
CONFIG_NAME_STR="SEALs config file for ARM-32 Versatile Express (vexpress-a15) board"
COLOR=1 # terminal color support? Assume yes..
GUI_MODE=0 # auto-detects GUI / console mode
DEBUG=0 # set to 1 to get debug messages displayed
[ ${DEBUG} -eq 1 ] && export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
VERBOSE_MSG=0 # set to 1 to get more verbose messages displayed
# [loglevel][date-timestamp]<actual-message>
LOGFILE_COMMON=log_seals.txt
###------###
TOPDIR=$(pwd)
#------------------------------------------------------------------------------
#--------KEY DISK LOCATIONS and Settings---------------------------------------
### Locations on Disk ###
### UPDATE ### on your system!
# @@@@@
STG=~/seals_staging/seals_staging_arm32
# Recommendation: if running a cloud-sync service (like Dropbox), keep the
# staging area outside it.
ROOTFS=${STG}/rootfs
IMAGES_FOLDER=${STG}/images
IMAGES_BKP_FOLDER=${STG}/images_bkp
CONFIGS_FOLDER=${STG}/configs
# Verbose build (for the kernel and busybox)? (if 1, we run as 'make V=1 ...')
VERBOSE_BUILD=0
#------------------------------------------------------------------------------
#--------'HARDWARE'------------------------------------------------------------
# SEALs (virtual) "Hardware"
# @@@@@
# Select the CPU arch (to build the kernel for); the value to specify is the
# name of the dir under <kernel-src>/arch/XXX
ARCH=arm
ARCH_PLATFORM=""
QEMUNAME=qemu-system-arm
CPU_MODEL=cortex-a15
SEALS_RAM=512 # MB
# Select the platform (to build the kernel for).
# @@@@@
# English-like name
ARM_PLATFORM_STR="Versatile Express (A15)"
# ! IMPORTANT !
# Selecting the platform varies with the ARCH:
# ===> For Aarch32 (ARM):
# Pl set the variable ARM_PLATFORM carefully; it will be used to setup
# the inital config and is therefore very critical that it's given correctly:
# make ARCH=arm ${ARM_PLATFORM}_defconfig
# So, check under <kernel-src>/arch/<cpu>/configs/
# for the best match to your platform, in the form
# <ARM_PLATFORM>_defconfig
# and put it here.. F.e.:
ARM_PLATFORM=vexpress
#
# ===> For Aarch64 (arm64):
# On Aarch64, all platforms will be selected by default.
# (Can see them within the 'Platform selection' menu).
# Either build it this way or deselect all and enable only the platform(s) you want to support...
# So here, we leave the variable ARM_PLATFORM as NULL to fulfill the default case (all platforms)
#ARM_PLATFORM=
# ARM_PLATFORM_OPT is the value passed via the -M (machine) switch to Qemu
# Look for it via qemu-system-arm -M ? ; eg.
# qemu-system-arm -M ? |grep -i "i.mx"
ARM_PLATFORM_OPT=vexpress-a15
SMP_EMU_MODE=1 # make '1' to have qemu run w/ 4 emulated cores
# (only works on appropriate h/w-emulated platforms)
#------------------------------------------------------------------------------
# Okay, so under the ${STG} folder, we expect you have extracted the:
#--------TOOLCHAIN------------------------------------------------------------
# The toolchain to use; expect that it is installed and the PATH is setup..
# @@@@@
CXX=arm-none-linux-gnueabihf- # toolchain prefix
# CXX_LOC is the location of the x86-to-ARM toolchain on disk
# (used to setup the PATH and locate the ARM shared libraries within the toolchain)
# @@@@@
CXX_LOC=~/tc/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-linux-gnueabihf/bin
# Keep your toolchain in the PATH
PATH=$PATH:${CXX_LOC}/bin
#------------------------------------------------------------------------------
#--------KERNEL------------------------------------------------------------
### UPDATE ### on your system!
# Okay, so under the ${STG} folder (or other), we expect you have extracted the
# source of the Linux kernel into ${KERNEL_FOLDER} , ver ${KERNELVER}.
# (Update the variables below to reflect your settings and installation).
# @@@@@
KERNELVER=6.1.25
KERNEL_FOLDER=${STG}/linux-${KERNELVER}/
# @@@@@
# DTB: specify the Device Tree Blob <filename>.dtb
# (Leave empty for the Aarch64 Qemu virt system)
DTB_BLOB=vexpress-v2p-ca15_a7.dtb
#####
# @@@@@
# SEALs kernel command-line
SERIAL_CONSOLE=ttyAMA0
SEALS_K_CMDLINE="console=${SERIAL_CONSOLE} root=/dev/mmcblk0 rw init=/sbin/init"
# if 512M RAM, reserve 32M for crashk, else if 256M RAM, reserve 16M
K_CMDLINE_XTRA=""
#K_CMDLINE_XTRA="crashkernel=32M" # works with 32M not 16M [?]
#K_CMDLINE_XTRA="initcall_debug ignore_loglevel debug"
[ ! -z "${K_CMDLINE_XTRA}" ] && SEALS_K_CMDLINE="${SEALS_K_CMDLINE} ${K_CMDLINE_XTRA}"
#--------BUSYBOX and ROOTFS------------------------------------------------------------
# Also under the ${STG} folder, we expect you have extracted the
# source of busybox into the folder ${BB_FOLDER} ver ${BB_VER}.
# (Update the variables below to reflect your settings and installation).
# @@@@@
BB_FOLDER=${STG}/busybox # the src seems to reside only in the dir named 'busybox' and ! 'busybox-<ver#>'
SHELL2RUN=/bin/sh #/bin/bash
## RootFS
# !Careful! Set to 1 to force a rebuild of the rootfs; implies OVERWRITING any
# existing rootfs
RFS_FORCE_REBUILD=0
# Rootfs size: Recommendation: if using a kdump kernel, as a rough thumb rule,
# make it ~ 150% of the size of RAM on the platform (so for eg. if the RAM is 512M,
# make the rootfs size ~ >= 768 MB).
# Else (no kdump), 512 MB is fine for the Vexpress.
RFS_SZ_MB=512
MYPRJ=myprj
#------------------------------------------------------------------------------
#--------MISC / REMAINING Options------------------------------------------------------------
##### Config vars for what to build
# VAR=1 : 'do' the work 'VAR'
# VAR=0 : 'do Not' do the work 'VAR'
BUILD_KERNEL=0
BUILD_ROOTFS=0
GEN_EXT4_ROOTFS_IMAGE=0
SAVE_BACKUP_IMG_CONFIGS=0
RUN_QEMU=0
#SHELL_PROMPT_STR="qarm64 \w # "
### "WIPE_*_CONFIG" directives
# Set var to '1' implies any existing kernel configuration is wiped out.
# Suggestion: set to '1' for the FIRST build with a clean kernel source tree..
# @@@@@
WIPE_KERNEL_CONFIG=0
# Set var to '1' implies any existing busybox configuration is wiped out.
# Suggestion: set to '1' for the FIRST build with a clean busybox source tree..
# @@@@@
WIPE_BUSYBOX_CONFIG=0
# Set var to '1' implies that the busybox configuration will be set to have
# all config options OFF/No by default.
# Suggestion: set to '1' when you want an 'as tiny as possible' busybox binary
# and know how to configure it
# @@@@@
TINY_BUSYBOX_CONFIG=0
###
# Config vars for when we run QEMU:
KGDB_MODE=0 # make '1' to have qemu run w/ the '-S' switch (waits for gdb to 'connect')
#------------------------------------------------------------------------------
#--- End build.config