@@ -226,12 +226,6 if [ -n "$(lsof -i :3142)" ] ; then | |||||
226 | HTTP_PROXY=http://127.0.0.1:3142/ |
|
226 | HTTP_PROXY=http://127.0.0.1:3142/ | |
227 | fi |
|
227 | fi | |
228 |
|
228 | |||
229 | #ipinfo=$(curl ipinfo.io | grep country ) |
|
|||
230 | #grep -o '\"[^"]*\"' $ipinfo | tr -d '"' |
|
|||
231 | #grep -Po '"country":.*?[^\\]",' $(curl ipinfo.io | grep country ) |
|
|||
232 | #sed -i "s,http:,https:,g" "${ETC_DIR}/apt/sources.list" |
|
|||
233 | #autconfigure best apt server to not spam ftp.debian.org |
|
|||
234 | #rm files/apt/sources.list |
|
|||
235 | #netselect-apt does not know buster yet |
|
229 | #netselect-apt does not know buster yet | |
236 | if [ "$RELEASE" = "buster" ] ; then |
|
230 | if [ "$RELEASE" = "buster" ] ; then | |
237 | RLS=testing |
|
231 | RLS=testing | |
@@ -250,11 +244,7 else | |||||
250 | fi |
|
244 | fi | |
251 |
|
245 | |||
252 | #sed and cut the result string so we can use it as APT_SERVER |
|
246 | #sed and cut the result string so we can use it as APT_SERVER | |
253 | APT_SERVER=$(grep -m 1 http files/apt/sources.list | sed "s|http://| |g" | cut -d ' ' -f 3) |
|
247 | APT_SERVER=$(grep -m 1 http files/apt/sources.list | sed "s|http://| |g" | cut -d ' ' -f 3 | sed 's|/$|''|') | |
254 | #non sh compatible |
|
|||
255 | #APT_SERVER=${tmp:0:-1} |
|
|||
256 | #sh compatible |
|
|||
257 | APT_SERVER=echo "$APT_SERVER" | sed 's|/$|''|' |
|
|||
258 |
|
248 | |||
259 | #make script easier and more stable to use with convenient setup switch. Just setup SET_ARCH and RPI_MODEL and your good to go! |
|
249 | #make script easier and more stable to use with convenient setup switch. Just setup SET_ARCH and RPI_MODEL and your good to go! | |
260 | if [ -n "$SET_ARCH" ] ; then |
|
250 | if [ -n "$SET_ARCH" ] ; then | |
@@ -263,7 +253,6 if [ -n "$SET_ARCH" ] ; then | |||||
263 | # 64 bit config |
|
253 | # 64 bit config | |
264 | ################################## |
|
254 | ################################## | |
265 | if [ "$SET_ARCH" = 64 ] ; then |
|
255 | if [ "$SET_ARCH" = 64 ] ; then | |
266 | echo "64 bit mode selected - Setting up enviroment" |
|
|||
267 | # 64 bit depended settings |
|
256 | # 64 bit depended settings | |
268 | QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-aarch64-static} |
|
257 | QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-aarch64-static} | |
269 | KERNEL_ARCH=${KERNEL_ARCH:=arm64} |
|
258 | KERNEL_ARCH=${KERNEL_ARCH:=arm64} | |
@@ -285,7 +274,6 if [ -n "$SET_ARCH" ] ; then | |||||
285 | # 32 bit config |
|
274 | # 32 bit config | |
286 | ################################## |
|
275 | ################################## | |
287 | if [ "$SET_ARCH" = 32 ] ; then |
|
276 | if [ "$SET_ARCH" = 32 ] ; then | |
288 | echo "32 bit mode selected - Setting up enviroment" |
|
|||
289 | #General 32bit configuration |
|
277 | #General 32bit configuration | |
290 | QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-arm-static} |
|
278 | QEMU_BINARY=${QEMU_BINARY:=/usr/bin/qemu-arm-static} | |
291 | KERNEL_ARCH=${KERNEL_ARCH:=arm} |
|
279 | KERNEL_ARCH=${KERNEL_ARCH:=arm} | |
@@ -293,7 +281,6 if [ -n "$SET_ARCH" ] ; then | |||||
293 |
|
281 | |||
294 | #Raspberry setting grouped by board compability |
|
282 | #Raspberry setting grouped by board compability | |
295 | if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] ; then |
|
283 | if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] ; then | |
296 | echo "Setting settings for bcm2835 Raspberry PI boards" |
|
|||
297 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armel" |
|
284 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armel" | |
298 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi_defconfig} |
|
285 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcmrpi_defconfig} | |
299 | RELEASE_ARCH=${RELEASE_ARCH:=armel} |
|
286 | RELEASE_ARCH=${RELEASE_ARCH:=armel} | |
@@ -301,7 +288,6 if [ -n "$SET_ARCH" ] ; then | |||||
301 | CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabi-} |
|
288 | CROSS_COMPILE=${CROSS_COMPILE:=arm-linux-gnueabi-} | |
302 | fi |
|
289 | fi | |
303 | if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then |
|
290 | if [ "$RPI_MODEL" = 2 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then | |
304 | echo "Setting settings for bcm2837 Raspberry PI boards" |
|
|||
305 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armhf" |
|
291 | REQUIRED_PACKAGES="${REQUIRED_PACKAGES} crossbuild-essential-armhf" | |
306 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig} |
|
292 | KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG:=bcm2709_defconfig} | |
307 | RELEASE_ARCH=${RELEASE_ARCH:=armhf} |
|
293 | RELEASE_ARCH=${RELEASE_ARCH:=armhf} | |
@@ -316,7 +302,6 else | |||||
316 | fi |
|
302 | fi | |
317 |
|
303 | |||
318 | #Device specific configuration |
|
304 | #Device specific configuration | |
319 | echo "Select DTB-File" |
|
|||
320 | case "$RPI_MODEL" in |
|
305 | case "$RPI_MODEL" in | |
321 | 0) |
|
306 | 0) | |
322 | DTB_FILE=${DTB_FILE:=bcm2708-rpi-0-w.dtb} |
|
307 | DTB_FILE=${DTB_FILE:=bcm2708-rpi-0-w.dtb} | |
@@ -347,7 +332,6 fi | |||||
347 | exit 1 |
|
332 | exit 1 | |
348 | ;; |
|
333 | ;; | |
349 | esac |
|
334 | esac | |
350 | echo "$DTB_FILE selected" |
|
|||
351 |
|
335 | |||
352 | #DEBUG off |
|
336 | #DEBUG off | |
353 | set +x |
|
337 | set +x | |
@@ -357,8 +341,6 if [ "$ENABLE_WIRELESS" = true ] ; then | |||||
357 | if [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] || [ "$RPI_MODEL" = 2 ] ; then |
|
341 | if [ "$RPI_MODEL" = 1 ] || [ "$RPI_MODEL" = 1P ] || [ "$RPI_MODEL" = 2 ] ; then | |
358 | echo "error: The selected Raspberry Pi model has no internal wireless interface" |
|
342 | echo "error: The selected Raspberry Pi model has no internal wireless interface" | |
359 | exit 1 |
|
343 | exit 1 | |
360 | else |
|
|||
361 | echo "Raspberry Pi $RPI_MODEL has WIFI support" |
|
|||
362 | fi |
|
344 | fi | |
363 | fi |
|
345 | fi | |
364 |
|
346 |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant