summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-09-10 18:10:50 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-10 22:58:33 +0100
commit5992830145c55f5103b4ba24f98eeeae13c604fc (patch)
treeec1616b3571c63b7bb5c9c4832097368ed4af866 /meta
parent32090b6ea0bf7d49a6c8bfb271535c644fe612d6 (diff)
downloadpoky-5992830145c55f5103b4ba24f98eeeae13c604fc.tar.gz
adt-installer: allow installation of other machines
Currently, adt-installer allows only the installation of qemu target sysroots. The changes in this patch do the following: * add a new setting in adt-installer.conf (YOCTOADT_TARGET_MACHINE) for each target architecture. For example, for arm we can choose to use a qemuarm sysroot or a beagleboard sysroot. By default, only the qemu target sysroots are selected (current behavior); * change adt_installer scripts to allow installing the correct meta-environment package for the selected machine; * remove some left-over commented lines; * use packagegroup-cross-canadian-${MACHINE} when installing the cross canadian packages instead of doing it separately for each package; * change the opkg config files in order to be able to find the packagegroup package, which is allarch; [YOCTO #4783] (From OE-Core rev: 02085d410bf734e833d45293f4d5b06bb9536a60) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rwxr-xr-xmeta/recipes-devtools/installer/adt-installer/adt_installer33
-rw-r--r--meta/recipes-devtools/installer/adt-installer/adt_installer.conf20
-rw-r--r--meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-i686.conf1
-rw-r--r--meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-x86_64.conf1
-rwxr-xr-xmeta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal27
5 files changed, 42 insertions, 40 deletions
diff --git a/meta/recipes-devtools/installer/adt-installer/adt_installer b/meta/recipes-devtools/installer/adt-installer/adt_installer
index a6042b9c2d..76afcf36ed 100755
--- a/meta/recipes-devtools/installer/adt-installer/adt_installer
+++ b/meta/recipes-devtools/installer/adt-installer/adt_installer
@@ -233,44 +233,44 @@ wget "$YOCTOADT_REPO/rootfs/$1" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | t
233 233
234 234
235 235
236#Need two input params, $1 -- arch_type(arm powerpc x86 mips) $2 rootfs_image_type (a list of sdk sato minimal lsb) 236#Need three input params:
237get_qemu_image() 237# $1 arch_type(arm powerpc x86 mips)
238# $2 machine(qemuarm beagleboard)
239# $3 rootfs_image_type (a list of sdk sato minimal lsb)
240get_image()
238{ 241{
242 local machine=$2
239 243
240 local target=`echo "$1" | sed -e 's/x86_64/x86-64/'`
241
242 if [ "$1" == "x86" ] || [ "$1" == "x86_64" ]; then 244 if [ "$1" == "x86" ] || [ "$1" == "x86_64" ]; then
243 qemu_kernel="bzImage-qemu$target.bin" 245 kernel="bzImage-$machine.bin"
244 elif [ "$1" == "ppc" ] || [ "$1" == "mips" ]; then 246 elif [ "$1" == "ppc" ] || [ "$1" == "mips" ]; then
245 qemu_kernel="vmlinux-qemu$target.bin" 247 kernel="vmlinux-$machine.bin"
246 else 248 else
247 qemu_kernel="zImage-qemu$target.bin" 249 kernel="zImage-$machine.bin"
248 fi 250 fi
249 251
250 #echo_info "[ADT_INST] Downloading qemu kernel binary: $qemu_kernel" 252 #echo_info "[ADT_INST] Downloading qemu kernel binary: $qemu_kernel"
251 download_file qemu$1/$qemu_kernel 253 download_file $machine/$kernel
252 check_result 254 check_result
253 255
254 for image_type in $select_rootfs; do 256 for image_type in $select_rootfs; do
255 #echo_info "[ADT_INST] Downloading rootfs file: core-image-$image_type-qemu$1.tar.bz2" 257 #echo_info "[ADT_INST] Downloading rootfs file: core-image-$image_type-$machine.tar.bz2"
256 filename="core-image-$image_type-qemu$target.tar.bz2" 258 filename="core-image-$image_type-$machine.tar.bz2"
257 download_file qemu$1/$filename 259 download_file $machine/$filename
258 check_result 260 check_result
259 done 261 done
260} 262}
261 263
262download_images() 264download_images()
263{ 265{
264 #select_target_var="\$YOCTOADT_TARGET_$1"
265 #select_target=`eval echo $select_target_var`
266
267 #if [ "$select_target" == "Y" ]; then
268 select_rootfs_var="\$YOCTOADT_ROOTFS_$1" 266 select_rootfs_var="\$YOCTOADT_ROOTFS_$1"
269 select_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$1" 267 select_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$1"
270 select_sysroot_var="\$YOCTOADT_TARGET_SYSROOT_LOC_$1" 268 select_sysroot_var="\$YOCTOADT_TARGET_SYSROOT_LOC_$1"
269 select_machine_var="\$YOCTOADT_TARGET_MACHINE_$1"
271 select_rootfs=`eval echo $select_rootfs_var` 270 select_rootfs=`eval echo $select_rootfs_var`
272 select_sysroot_image=`eval echo $select_sysroot_image_var` 271 select_sysroot_image=`eval echo $select_sysroot_image_var`
273 select_sysroot=`eval echo $select_sysroot_var` 272 select_sysroot=`eval echo $select_sysroot_var`
273 select_machine=`eval echo $select_machine_var`
274 274
275 if [ -n "$select_sysroot" ]; then 275 if [ -n "$select_sysroot" ]; then
276 select_sysroot=`readlink -m $select_sysroot` 276 select_sysroot=`readlink -m $select_sysroot`
@@ -282,13 +282,14 @@ download_images()
282 #echo_info "# To be downloaded rootfs image details defined in adt_installer.conf" 282 #echo_info "# To be downloaded rootfs image details defined in adt_installer.conf"
283 #echo_info "############################################################################" 283 #echo_info "############################################################################"
284 echo_info "# Target architecture:\t\t$1" 284 echo_info "# Target architecture:\t\t$1"
285 echo_info "# Target machine:\t\t$select_machine"
285 echo_info "# Root_fs images:\t\t$select_rootfs" 286 echo_info "# Root_fs images:\t\t$select_rootfs"
286 echo_info "# Target sysroot image:\t\t$select_sysroot_image" 287 echo_info "# Target sysroot image:\t\t$select_sysroot_image"
287 echo_info "# Target sysroot loc:\t\t$select_sysroot" 288 echo_info "# Target sysroot loc:\t\t$select_sysroot"
288 echo_info "\n" 289 echo_info "\n"
289 #echo_info "############################################################################\n" 290 #echo_info "############################################################################\n"
290 else 291 else
291 get_qemu_image $1 $select_rootfs 292 get_image $1 $select_machine $select_rootfs
292 fi 293 fi
293 fi 294 fi
294} 295}
diff --git a/meta/recipes-devtools/installer/adt-installer/adt_installer.conf b/meta/recipes-devtools/installer/adt-installer/adt_installer.conf
index 171d2acc45..cc54acda19 100644
--- a/meta/recipes-devtools/installer/adt-installer/adt_installer.conf
+++ b/meta/recipes-devtools/installer/adt-installer/adt_installer.conf
@@ -43,23 +43,33 @@ YOCTOADT_NFS_UTIL="Y"
43YOCTOADT_ROOTFS_arm="minimal sato-sdk" 43YOCTOADT_ROOTFS_arm="minimal sato-sdk"
44#Specify which root filesystem file to use to extract as target sysroot. Please ensure the entry is in the list of downloaded root filesystem files that specified above in YOCTOADT_ROOTFS_$arch 44#Specify which root filesystem file to use to extract as target sysroot. Please ensure the entry is in the list of downloaded root filesystem files that specified above in YOCTOADT_ROOTFS_$arch
45YOCTOADT_TARGET_SYSROOT_IMAGE_arm="sato-sdk" 45YOCTOADT_TARGET_SYSROOT_IMAGE_arm="sato-sdk"
46#The machine for which you want to download the image. Each machine might have
47#different compilation options in order to select certain hardware models or
48#configurations
49YOCTOADT_TARGET_MACHINE_arm="qemuarm"
46#The location where the target sysroot will be setup 50#The location where the target sysroot will be setup
47YOCTOADT_TARGET_SYSROOT_LOC_arm="$HOME/test-yocto/arm" 51YOCTOADT_TARGET_SYSROOT_LOC_arm="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_arm"
52
48 53
49#Here's another example for setting up target arch of x86, by uncommenting it will trigger the installer to download and setup 2 sysroot environment for 2 target arches: arm and x86. If you want to add more target arch support, you can append more entries by following these samples 54#Here's another example for setting up target arch of x86, by uncommenting it will trigger the installer to download and setup 2 sysroot environment for 2 target arches: arm and x86. If you want to add more target arch support, you can append more entries by following these samples
50#YOCTOADT_ROOTFS_x86="sato-sdk" 55#YOCTOADT_ROOTFS_x86="sato-sdk"
51#YOCTOADT_TARGET_SYSROOT_IMAGE_x86="sato-sdk" 56#YOCTOADT_TARGET_SYSROOT_IMAGE_x86="sato-sdk"
52#YOCTOADT_TARGET_SYSROOT_LOC_x86="$HOME/test-yocto/x86" 57#YOCTOADT_TARGET_MACHINE_x86="qemux86"
58#YOCTOADT_TARGET_SYSROOT_LOC_x86="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_x86"
53 59
54#Here's some template of other arches, which you need to change the value in "" 60#Here's some template of other arches, which you need to change the value in ""
55#YOCTOADT_ROOTFS_x86_64="sato-sdk" 61#YOCTOADT_ROOTFS_x86_64="sato-sdk"
56#YOCTOADT_TARGET_SYSROOT_IMAGE_x86_64="sato-sdk" 62#YOCTOADT_TARGET_SYSROOT_IMAGE_x86_64="sato-sdk"
57#YOCTOADT_TARGET_SYSROOT_LOC_x86_64="$HOME/test-yocto/x86_64" 63#YOCTOADT_TARGET_MACHINE_x86_64="qemux86-64"
64#YOCTOADT_TARGET_SYSROOT_LOC_x86_64="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_x86_64"
58 65
59#YOCTOADT_ROOTFS_ppc="sato-sdk" 66#YOCTOADT_ROOTFS_ppc="sato-sdk"
60#YOCTOADT_TARGET_SYSROOT_IMAGE_ppc="sato-sdk" 67#YOCTOADT_TARGET_SYSROOT_IMAGE_ppc="sato-sdk"
61#YOCTOADT_TARGET_SYSROOT_LOC_ppc="$HOME/test-yocto/ppc" 68#YOCTOADT_TARGET_MACHINE_ppc="qemuppc"
69#YOCTOADT_TARGET_SYSROOT_LOC_ppc="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_ppc"
62 70
63#YOCTOADT_ROOTFS_mips="sato-sdk" 71#YOCTOADT_ROOTFS_mips="sato-sdk"
64#YOCTOADT_TARGET_SYSROOT_IMAGE_mips="sato-sdk" 72#YOCTOADT_TARGET_SYSROOT_IMAGE_mips="sato-sdk"
65#YOCTOADT_TARGET_SYSROOT_LOC_mips="$HOME/test-yocto/mips" 73#YOCTOADT_TARGET_MACHINE_mips="qemumips"
74#YOCTOADT_TARGET_SYSROOT_LOC_mips="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_mips"
75
diff --git a/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-i686.conf b/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-i686.conf
index 71c62e882e..ee169f6ccd 100644
--- a/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-i686.conf
+++ b/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-i686.conf
@@ -3,3 +3,4 @@ arch any 6
3arch noarch 11 3arch noarch 11
4arch i686-nativesdk 16 4arch i686-nativesdk 16
5src yp-i686-nativesdk ADTREPO_URL/adt-ipk/i686-nativesdk 5src yp-i686-nativesdk ADTREPO_URL/adt-ipk/i686-nativesdk
6src yp-i686-nativesdk ADTREPO_URL/adt-ipk/all
diff --git a/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-x86_64.conf b/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-x86_64.conf
index f0d0634ab4..199ea50fb7 100644
--- a/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-x86_64.conf
+++ b/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-x86_64.conf
@@ -3,3 +3,4 @@ arch any 6
3arch noarch 11 3arch noarch 11
4arch x86_64-nativesdk 16 4arch x86_64-nativesdk 16
5src yp-x86_64-nativesdk ADTREPO_URL/adt-ipk/x86_64-nativesdk 5src yp-x86_64-nativesdk ADTREPO_URL/adt-ipk/x86_64-nativesdk
6src yp-x86_64-nativesdk ADTREPO_URL/adt-ipk/all
diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
index 462199c563..abed90d241 100755
--- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
+++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
@@ -121,23 +121,12 @@ for pkg in $BASE_HOSTSDK_PKGNAMES; do
121 check_result 121 check_result
122done 122done
123 123
124for native_target_type in $YOCTOADT_TARGETS; do 124for target_type in $YOCTOADT_TARGETS; do
125 native_target_type=`echo "$native_target_type" | sed -e 's/x86_64/x86-64/' -e 's/ppc/powerpc/' -e 's/x86$/i586/'` 125 machine_var="\$YOCTOADT_TARGET_MACHINE_$target_type"
126 echo_info "Installing cross toolchain for $native_target_type ..." 126 machine=`eval echo $machine_var`
127 echo_info "Installing binutils for $native_target_type ..." 127 echo_info "Installing cross canadian packages for $machine ..."
128 $OPKG_INSTALL_NATIVE_CMD binutils-cross-canadian-$native_target_type &>> $YOCTOADT_INSTALL_LOG_FILE 128 $OPKG_INSTALL_NATIVE_CMD packagegroup-cross-canadian-$machine &>> $YOCTOADT_INSTALL_LOG_FILE
129 check_result 129 check_result
130 echo_info "Installing gcc for $native_target_type ..."
131 $OPKG_INSTALL_NATIVE_CMD gcc-cross-canadian-$native_target_type &>> $YOCTOADT_INSTALL_LOG_FILE
132 check_result
133 echo_info "Installing gdb for $native_target_type ..."
134 $OPKG_INSTALL_NATIVE_CMD gdb-cross-canadian-$native_target_type &>> $YOCTOADT_INSTALL_LOG_FILE
135 check_result
136
137 echo_info "Installing environment file for $native_target_type ..."
138 $OPKG_INSTALL_NATIVE_CMD meta-environment-$native_target_type &>> $YOCTOADT_INSTALL_LOG_FILE
139 check_result
140
141done 130done
142 131
143if [ "$YOCTOADT_QEMU" == "Y" ] || [ "$YOCTOADT_QEMU" = "y" ]; then 132if [ "$YOCTOADT_QEMU" == "Y" ] || [ "$YOCTOADT_QEMU" = "y" ]; then
@@ -255,9 +244,9 @@ fi
255 244
256echo_info "Installing target sysroot for arch: $1, rootfs type: $target_sysroot_image, location: $target_sysroot" 245echo_info "Installing target sysroot for arch: $1, rootfs type: $target_sysroot_image, location: $target_sysroot"
257 246
258 247target_machine_var="\$YOCTOADT_TARGET_MACHINE_$1"
259qemu_type=`echo "$1" | sed -e 's/x86_64/x86-64/'` 248target_machine=`eval echo $target_machine_var`
260sysroot_image_name="core-image-$target_sysroot_image-qemu$qemu_type.tar.bz2" 249sysroot_image_name="core-image-$target_sysroot_image-$target_machine.tar.bz2"
261 #echo_info "Extracting rootfs: $sysroot_image_name, using pseudo..." 250 #echo_info "Extracting rootfs: $sysroot_image_name, using pseudo..."
262 251
263$SUDO scripts/extract_rootfs $sysroot_image_name $target_sysroot $OECORE_NATIVE_SYSROOT $user_inst_type 252$SUDO scripts/extract_rootfs $sysroot_image_name $target_sysroot $OECORE_NATIVE_SYSROOT $user_inst_type