]> Zhao Yanbai Git Server - minix.git/commitdiff
Fix OS X crossbuilds for arm 59/2859/2
authorLionel Sambuc <lionel@minix3.org>
Fri, 10 Oct 2014 09:19:08 +0000 (11:19 +0200)
committerLionel Sambuc <lionel@minix3.org>
Fri, 10 Oct 2014 10:56:41 +0000 (12:56 +0200)
 - Fixed missing variable interpolation because of single quotes
 - Replaced /bin/sh in gen_uEnv.txt.sh with /usr/bin/env bash as the default
   echo doesn't support '-n'
 - Fixed some whitespace errors
 - A succesful build requires for now to skip the gold linker on OSX.

Change-Id: Id09bf52f45252026e3a58b74e8448ea24a0dab12

releasetools/arm_sdimage.sh
releasetools/gen_uEnv.txt.sh

index 8e2d109ae1533a908dd1abec0b4ea777f0dd066f..98876094ab58c32f1739adac6c2d6d0c45ba8607 100755 (executable)
@@ -79,7 +79,7 @@ HOME_START=$(($USR_START + $USR_SIZE))
 case $(uname -s) in
 Darwin)
        MKFS_VFAT_CMD=newfs_msdos
-       MKFS_VFAT_OPTS='-h 64 -u 32 -S 512 -s ${FAT_SIZE} -o 0'
+       MKFS_VFAT_OPTS="-h 64 -u 32 -S 512 -s ${FAT_SIZE} -o 0"
 ;;
 FreeBSD)
        MKFS_VFAT_CMD=newfs_msdos
index 2bfe6d6fdbe541e2f7847b976d80b313c83ffddf..4884c82795a745bad1f0d635feeea328fcdda0c8 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 #generate a u-boot u-env.
 list="0x80200000 kernel.bin
@@ -22,34 +22,34 @@ NETBOOT="no"
 BOOT="mmcbootcmd"
 
 #default for the beagleboard-xM
-CONSOLE=tty02 
+CONSOLE=tty02
 #verbosity
 VERBOSE=0
 HZ=1000
 
 while getopts "c:v:h:p:n?" c
 do
-        case "$c" in
-        \?)
-                echo "Usage: $0 [-p netboot_prefix] -n [-c consoletty] [-v level] " >&2
-                exit 1
-               ;;
-        n)
+       case "$c" in
+       \?)
+               echo "Usage: $0 [-p netboot_prefix] -n [-c consoletty] [-v level] " >&2
+               exit 1
+               ;;
+       n)
                # genrate netbooting uEnv.txt
-                BOOT="netbootcmd"
-                NETBOOT="yes"
+               BOOT="netbootcmd"
+               NETBOOT="yes"
                ;;
-        p)
-                NETBOOT_PREFIX=$OPTARG
+       p)
+               NETBOOT_PREFIX=$OPTARG
                ;;
-        c)
-                CONSOLE=$OPTARG
+       c)
+               CONSOLE=$OPTARG
                ;;
-        v)
-                VERBOSE=$OPTARG
+       v)
+               VERBOSE=$OPTARG
                ;;
-        h)
-                # system hz
+       h)
+               # system hz
                HZ=$OPTARG
                ;;
        esac
@@ -60,7 +60,7 @@ fill_cmd() {
        #prefix is an optional directory containing the ending /
        load=$1
        prefix=$2
-       export IFS=" " 
+       export IFS=" "
        echo $list | while true
        do
                if ! read -r mem addr
@@ -78,9 +78,9 @@ echo "uenvcmd=run $BOOT"
 echo "bootargs=console=$CONSOLE rootdevname=c0d0p1 verbose=$VERBOSE hz=$HZ"
 echo
 echo 'bootminix=setenv bootargs \$bootargs board_name=\$board_name ; echo \$bootargs; go  0x80200000 \\\"$bootargs\\\"'
-echo 
+echo
 echo "mmcbootcmd=echo starting from MMC ; mmc part 0; $(fill_cmd "fatload mmc 0:1" "") ; run bootminix"
-echo 
+echo
 echo "# Netbooting."
 echo "serverip=192.168.12.10"
 echo "ipaddr=192.168.12.62"