Check-in [f781dc0560]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add preliminary support for cross building mips64 and armv6 This consider you have qemu-mips64 or qemu-arm installed in static version on your system This is also considering you have Stacey Son patches and binmisctl on your system: see: http://people.freebsd.org/~sson/imgact_binmisc/ and https://wiki.freebsd.org/QemuUserModeHowTo This patch consider you condigure binmisc expecting qemu-mips64 or qemu-arm being launch from the following path: /usr/bin/qemu-*
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f781dc056073a54a7c839e80f237897b65d7a278
User & Date: bapt 2013-06-25 21:07:40
Context
2013-06-25
21:42
if no packages were built and digests.txz does not exists then rebuild the repository catalog Requested by: rpaulo Ticker: [d0eae39481] Leaf check-in: 3aa09e9f82 user: bapt tags: trunk
21:07
Add preliminary support for cross building mips64 and armv6 This consider you have qemu-mips64 or qemu-arm installed in static version on your system This is also considering you have Stacey Son patches and binmisctl on your system: see: http://people.freebsd.org/~sson/imgact_binmisc/ and https://wiki.freebsd.org/QemuUserModeHowTo This patch consider you condigure binmisc expecting qemu-mips64 or qemu-arm being launch from the following path: /usr/bin/qemu-* check-in: f781dc0560 user: bapt tags: trunk
20:53
If host is recent current and building stable/9 or stable/8 then use fmake to build check-in: c7c8cee859 user: bapt tags: trunk
Changes

Changes to src/share/poudriere/jail.sh.

175
176
177
178
179
180
181








182
183
184
185
186
187
188
...
208
209
210
211
212
213
214









215
216
217
218
219
220
221
...
515
516
517
518
519
520
521








522
523
524
525
526
527
528
		err 1 "Unsupported method"
		;;
	esac

}

build_and_install_world() {








	export TARGET_ARCH=${ARCH}
	export SRC_BASE=${JAILMNT}/usr/src
	mkdir -p ${JAILMNT}/etc
	[ -f ${JAILMNT}/etc/src.conf ] && rm -f ${JAILMNT}/etc/src.conf
	touch ${JAILMNT}/etc/src.conf
	[ -f ${POUDRIERED}/src.conf ] && cat ${POUDRIERED}/src.conf > ${JAILMNT}/etc/src.conf
	[ -f ${POUDRIERED}/${JAILNAME}-src.conf ] && cat ${POUDRIERED}/${JAILNAME}-src.conf >> ${JAILMNT}/etc/src.conf
................................................................................
	fi
	msg "Starting make buildworld with ${PARALLEL_JOBS} jobs"
	${make_cmd} -C ${JAILMNT}/usr/src buildworld ${MAKE_JOBS} ${MAKEWORLDARGS} || err 1 "Fail to build world"
	msg "Starting make installworld"
	${make_cmd} -C ${JAILMNT}/usr/src installworld DESTDIR=${JAILMNT} DB_FROM_SRC=1 || err 1 "Fail to install world"
	${make_cmd} -C ${JAILMNT}/usr/src DESTDIR=${JAILMNT} distrib-dirs &&
	${make_cmd} -C ${JAILMNT}/usr/src DESTDIR=${JAILMNT} distribution









}

install_from_svn() {
	local UPDATE=0
	local proto
	[ -d ${JAILMNT}/usr/src ] && UPDATE=1
	mkdir -p ${JAILMNT}/usr/src
................................................................................
		v)
			VERSION=${OPTARG}
			;;
		a)
			[ "${REALARCH}" != "amd64" -a "${REALARCH}" != ${OPTARG} ] &&
				err 1 "Only amd64 host can choose another architecture"
			ARCH=${OPTARG}








			;;
		m)
			METHOD=${OPTARG}
			;;
		f)
			JAILFS=${OPTARG}
			;;







>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>







175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
...
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
...
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
		err 1 "Unsupported method"
		;;
	esac

}

build_and_install_world() {
	case "${ARCH}" in
	mips64)
		export TARGET=mips
		;;
	armv6)
		export TARGET=arm
		;;
	esac
	export TARGET_ARCH=${ARCH}
	export SRC_BASE=${JAILMNT}/usr/src
	mkdir -p ${JAILMNT}/etc
	[ -f ${JAILMNT}/etc/src.conf ] && rm -f ${JAILMNT}/etc/src.conf
	touch ${JAILMNT}/etc/src.conf
	[ -f ${POUDRIERED}/src.conf ] && cat ${POUDRIERED}/src.conf > ${JAILMNT}/etc/src.conf
	[ -f ${POUDRIERED}/${JAILNAME}-src.conf ] && cat ${POUDRIERED}/${JAILNAME}-src.conf >> ${JAILMNT}/etc/src.conf
................................................................................
	fi
	msg "Starting make buildworld with ${PARALLEL_JOBS} jobs"
	${make_cmd} -C ${JAILMNT}/usr/src buildworld ${MAKE_JOBS} ${MAKEWORLDARGS} || err 1 "Fail to build world"
	msg "Starting make installworld"
	${make_cmd} -C ${JAILMNT}/usr/src installworld DESTDIR=${JAILMNT} DB_FROM_SRC=1 || err 1 "Fail to install world"
	${make_cmd} -C ${JAILMNT}/usr/src DESTDIR=${JAILMNT} distrib-dirs &&
	${make_cmd} -C ${JAILMNT}/usr/src DESTDIR=${JAILMNT} distribution

	case "${ARCH}" in
	mips64)
		cp `which qemu-mips64` ${JAILMNT}/usr/bin/qemu-mips64
		;;
	armv6)
		cp `which qemu-arm` ${JAILMNT}/usr/bin/qemu-arm
		;;
	esac
}

install_from_svn() {
	local UPDATE=0
	local proto
	[ -d ${JAILMNT}/usr/src ] && UPDATE=1
	mkdir -p ${JAILMNT}/usr/src
................................................................................
		v)
			VERSION=${OPTARG}
			;;
		a)
			[ "${REALARCH}" != "amd64" -a "${REALARCH}" != ${OPTARG} ] &&
				err 1 "Only amd64 host can choose another architecture"
			ARCH=${OPTARG}
			case "${ARCH}" in
			mips64)
				[ -x `which qemu-mips64` ] || err 1 "You need qemu-mips64 installed on the host"
				;;
			armv6)
				[ -x `which qemu-arm` ] || err 1 "You need qemu-arm installed on the host"
				;;
			esac
			;;
		m)
			METHOD=${OPTARG}
			;;
		f)
			JAILFS=${OPTARG}
			;;