-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.config.amd64
216 lines (186 loc) · 7.24 KB
/
build.config.amd64
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
214
215
216
#!/bin/bash
#######################################################################
# build.config
#
# 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 x86_64-to-ARM32 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
##################### UPDATE as required
# @@@@@
CONFIG_NAME_STR="SEALs config file for the PC ! (AMD64 / x86_64)"
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
VERBOSE_MSG=0 # set to 1 to get more verbose messages displayed
# [loglevel][date-timestamp]<actual-message>
LOGFILE_COMMON=log_seals.txt
###------###
TOPDIR=$(pwd)
### Locations on Disk ###
### UPDATE ### on your system!
# @@@@@
STG=~/seals_staging/seals_staging_pc
STG=~/SEALS_staging/stg_x86_64/
# Recommendation: if running a cloud-sync service (like pCloud/Dropbox),
# keep the staging area outside it.
# 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..
# @@@@@
# For the PC, we don't need a special toolchain; the native one on the build host is fine!
CXX=""
# 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=""
# Toolchain in the PATH
#PATH=$PATH:${CXX_LOC}/bin
# Verbose build? (if 1, we run as 'make V=1 ...')
VERBOSE_BUILD=0
# 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_VER="1.33.2"
# 1.29 : build failing with a linker error
BB_FOLDER=${STG}/busybox
SHELL2RUN=/bin/sh #/bin/bash
ROOTFS=${STG}/rootfs
ROOTFS_PC=${STG}/rootfs_pc
IMAGES_FOLDER=${STG}/images
IMAGES_BKP_FOLDER=${STG}/images_bkp
CONFIGS_FOLDER=${STG}/configs
#####
# @@@@@
# Set to exactly one of:
# arc arm64 csky hexagon m68k mips nios2 parisc riscv sh um x86_64
# alpha arm c6x h8300 ia64 microblaze nds32 openrisc powerpc s390 sparc x86 xtensa
# TODO / RELOOK - do we need this ??
ARCH_SPEC=x86_64
# Select the platform (to build the kernel for). Choices:
# For the purpose of a "real" example, this file is pre-populated with values
# relevant to the Qemu Verastile Express (vexpress) platform (ARMv7 Cortex-A9).
# @@@@@
# English-like name
ARCH_PLATFORM_STR="AMD64"
# ! IMPORTANT !
# Pl set the variable ARCH_PLATFORM carefully; it will be used to setup
# the inital config and is therefore very critical that it's given correctly:
# make ARCH=${ARCH_SPEC} ${ARCH_PLATFORM}_defconfig
# So, check under <kernel-src>/arch/<cpu>/configs/
# for the best match to your platform, in the form
# <ARCH_PLATFORM>_defconfig
# and put it here..
# For AMD64, put 'x86_64'
ARCH_PLATFORM=x86_64
# ARCH_PLATFORM_OPT is the value passed via the -M switch to Qemu
# Look for it via qemu-system-arm -M ? ; eg.
# qemu-system-arm -M ? |grep -i "i.mx"
# For AMD64, comment it out!
#ARCH_PLATFORM_OPT=vexpress-a9
# For this platform - AMD64 (or x86_64) - many options are simply NULL
ARCH="x86"
CPU_MODEL="pc" # -M option to Qemu ; becomes 'Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-7.2)'
ARM_PLATFORM=""
ARM_PLATFORM_STR=""
DTB_BLOB=""
DTB_BLOB_PATHNAME=""
### 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}/
# @@@@@
# Set to 1 to build the initramfs image and use it at boot
USE_INITRAMFS=0
# @@@@@
# DTB: specify the Device Tree Blob <filename>.dtb
#DTB_BLOB=vexpress-v2p-ca9.dtb
#####
#####
# @@@@@
# SEALs (virtual) "Hardware"
SEALS_RAM=1024 # MB
#####
# 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=1024 #512
MYPRJ=myprj
#####
# @@@@@
# SEALs kernel command-line
SERIAL_CONSOLE=ttyS0
SEALS_K_CMDLINE="console=${SERIAL_CONSOLE} console=ttyS1 tsc=reliable no_timer_check nokaslr root=/dev/sda rw init=/sbin/init" #/bin/bash" #/sbin/init"
#SEALS_K_CMDLINE="debug console=ttyS0 console=ttyS1 tsc=reliable no_timer_check nokaslr root=/dev/sda rw init=${INIT}" #/bin/bash" #/sbin/init"
# if 512M RAM, reserve 32M for crashk, else if 256M RAM, reserve 16M
#K_CMDLINE_XTRA="crashkernel=32M" # works with 32M not 16M [?]
#K_CMDLINE_XTRA="initcall_debug ignore_loglevel debug"
K_CMDLINE_XTRA=""
[ ! -z "${K_CMDLINE_XTRA}" ] && SEALS_K_CMDLINE="${SEALS_K_CMDLINE} ${K_CMDLINE_XTRA}"
##### 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
### "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
QEMUNAME=qemu-system-x86_64
KGDB_MODE=0 # make '1' to have qemu run with the '-s -S' switch (waits for client GDB to 'connect')
SMP_EMU_MODE=1 # make '1' to have qemu run w/ 2 emulated cores
#--- End build.config