Add a new x86_64 target without qemu.
This commit is contained in:
19
projects/x86_64_qemu_domo/Makefile
Normal file
19
projects/x86_64_qemu_domo/Makefile
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Entry point for the project.
|
||||
|
||||
# Define the target.
|
||||
export BR_PROJECT:=$(shell pwd)
|
||||
export BR_PROJECT_NAME:=x86_64_qemu_domo
|
||||
|
||||
export BR_BOARD:=$(shell pwd)/../../bsp/board/domo/
|
||||
|
||||
include $(BR_BOARD)/main.mk
|
||||
include qemu-args.mk
|
||||
|
||||
qemu:
|
||||
qemu-system-x86_64 -kernel "$(BR_STAGING)/buildroot/images/bzImage" -fsdev "local,id=root,path=$(BR_STAGING)/buildroot/target,security_model=mapped-xattr" -device virtio-9p-pci,fsdev=root,mount_tag=/dev/root -append "rootfs=root rootfstype=9p rootflags=trans=virtio,version=9p2000.L console=ttyS0" -serial mon:stdio -nographic -usb $(QEMU_ARGS)
|
||||
|
||||
qemu.map-all-xattr:
|
||||
PATH="${PATH}:$(BR_STAGING)/cross/usr/bin" $(BR_PROJECT)/map-all-xattr.sh "$(BR_STAGING)/buildroot/target"
|
||||
|
||||
.PHONY: qemu qemu.map-all-xattr
|
||||
39
projects/x86_64_qemu_domo/configs/buildroot_defconfig
Normal file
39
projects/x86_64_qemu_domo/configs/buildroot_defconfig
Normal file
@@ -0,0 +1,39 @@
|
||||
BR2_x86_64=y
|
||||
BR2_DL_DIR="$(BUILDS_ROOT)/dl"
|
||||
BR2_HOST_DIR="$(WORKSPACE_DIR)/cross"
|
||||
BR2_PRIMARY_SITE="http://serveur.nadal-fr.com/buildroot/"
|
||||
BR2_ENABLE_DEBUG=y
|
||||
BR2_STRIP_none=y
|
||||
BR2_PACKAGE_OVERRIDE_FILE="$(BOARD)/local.mk"
|
||||
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/patches"
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="http://serveur.nadal-fr.com/toolchains/toolchain_x86_64-5_4_0-glibc.tar.bz2"
|
||||
BR2_TOOLCHAIN_EXTERNAL_GCC_5=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
BR2_TARGET_GENERIC_HOSTNAME=""
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to QuartetIII"
|
||||
BR2_INIT_NONE=y
|
||||
BR2_ROOTFS_DEVICE_CREATION_STATIC=y
|
||||
# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
|
||||
BR2_SYSTEM_DHCP="eth0"
|
||||
# BR2_ENABLE_LOCALE_PURGE is not set
|
||||
BR2_ROOTFS_OVERLAY="$(BOARD)/ovl/"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR_BOARD)/scripts/post-build.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR_PROJECT)/configs/linuxKernel.config"
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR_BOARD)/configs/busybox.config"
|
||||
BR2_PACKAGE_VALGRIND=y
|
||||
BR2_PACKAGE_ZLIB=y
|
||||
BR2_PACKAGE_POLARSSL=y
|
||||
BR2_PACKAGE_LIBCURL=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_TARGET_ROOTFS_CPIO=y
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
BR2_PACKAGE_PROCD=y
|
||||
BR2_PACKAGE_HOST_VIRTFS_XATTR=y
|
||||
3207
projects/x86_64_qemu_domo/configs/linuxKernel.config
Normal file
3207
projects/x86_64_qemu_domo/configs/linuxKernel.config
Normal file
File diff suppressed because it is too large
Load Diff
2450
projects/x86_64_qemu_domo/configs/toolchain.config
Normal file
2450
projects/x86_64_qemu_domo/configs/toolchain.config
Normal file
File diff suppressed because it is too large
Load Diff
25
projects/x86_64_qemu_domo/map-all-xattr.sh
Executable file
25
projects/x86_64_qemu_domo/map-all-xattr.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo Missing parameter: path to target root directory
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$(which virtfs-xattr)" ]; then
|
||||
echo Cannot find virtfs-xattr utility
|
||||
exit 1
|
||||
fi
|
||||
|
||||
find "$1" -type l -exec bash -c '
|
||||
function convert-link {
|
||||
content=$(readlink "$1")
|
||||
rm "$1"
|
||||
echo -n "$content" > "$1"
|
||||
virtfs-xattr -l "$1"
|
||||
echo " Link update - $1 -> $content"
|
||||
};
|
||||
convert-link "$0"' {} \;
|
||||
|
||||
find "$1" -exec virtfs-xattr -u 0 -g 0 {} \;
|
||||
|
||||
exit 0
|
||||
0
projects/x86_64_qemu_domo/ovl/.gitkeep
Normal file
0
projects/x86_64_qemu_domo/ovl/.gitkeep
Normal file
10
projects/x86_64_qemu_domo/ovl/bin/x86_64.env
Normal file
10
projects/x86_64_qemu_domo/ovl/bin/x86_64.env
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
ROOT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"/../
|
||||
|
||||
echo "ROOT: ${ROOT_DIR}"
|
||||
|
||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOT_DIR}/usr/bin:${ROOT_DIR}/usr/local/bin
|
||||
export LD_LIBRARY_PATH=${ROOT_DIR}/lib:${ROOT_DIR}/usr/lib:${ROOT_DIR}/usr/local/lib
|
||||
|
||||
|
||||
15
projects/x86_64_qemu_domo/ovl/etc/init.d/init_board
Executable file
15
projects/x86_64_qemu_domo/ovl/etc/init.d/init_board
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
|
||||
START=11
|
||||
STOP=97
|
||||
|
||||
boot() {
|
||||
rm -rf /tmp/avahi-autoipd
|
||||
mkdir /tmp/avahi-autoipd
|
||||
chown avahi.avahi /tmp/avahi-autoipd
|
||||
mount -t debugfs none /sys/kernel/debug
|
||||
mkdir -p /var/run/dbus/
|
||||
ifconfig eth0 up
|
||||
udhcpc -i eth0
|
||||
}
|
||||
1
projects/x86_64_qemu_domo/ovl/etc/rc.d/S12init_board
Symbolic link
1
projects/x86_64_qemu_domo/ovl/etc/rc.d/S12init_board
Symbolic link
@@ -0,0 +1 @@
|
||||
../init.d/init_board
|
||||
0
projects/x86_64_qemu_domo/ovl/usr/.gitkeep
Normal file
0
projects/x86_64_qemu_domo/ovl/usr/.gitkeep
Normal file
21
projects/x86_64_qemu_domo/post-build.sh
Executable file
21
projects/x86_64_qemu_domo/post-build.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Catch Postbuild Error
|
||||
function error {
|
||||
|
||||
echo "Postbuild Failed."
|
||||
exit 1;
|
||||
}
|
||||
|
||||
set -e
|
||||
trap error ERR
|
||||
|
||||
echo "==> POSTBUILD:"
|
||||
|
||||
echo "BR_STAGING: ${BR_STAGING}"
|
||||
echo "BR_PROJECT: ${BR_PROJECT}"
|
||||
|
||||
ROOT_DIR=${BR_STAGING}/buildroot/target
|
||||
|
||||
echo " => Setting-up the target rootfs to be used by qemu"
|
||||
PATH="${PATH}:${BR_STAGING}/cross/usr/bin" "${BR_PROJECT}/map-all-xattr.sh" "${ROOT_DIR}"
|
||||
24
projects/x86_64_qemu_domo/qemu-args.mk
Normal file
24
projects/x86_64_qemu_domo/qemu-args.mk
Normal file
@@ -0,0 +1,24 @@
|
||||
# Tips:
|
||||
# * the monitor console is multiplexed with the serial line; to switch between the two, hit "CTRL-a c"
|
||||
# * create a TAP virtual ethernet device named 'tap0':
|
||||
# sudo ip tuntap add dev tap0 mode tap user $USER
|
||||
# * connect a TAP device to a bridge 'bridge0':
|
||||
# sudo ip link set tap0 master bridge0 up
|
||||
|
||||
# forward an usb device to the guest, by bus/device
|
||||
#QEMU_ARGS += -usbdevice host:4.32
|
||||
|
||||
# forward an usb device to the guest, by vendor/product
|
||||
#QEMU_ARGS += -usbdevice host:050d:016a
|
||||
|
||||
# emulate a sound card
|
||||
QEMU_ARGS += -soundhw ac97
|
||||
|
||||
# wait for a gdb remote connection on port 1234 (kernel debug).
|
||||
#QEMU_ARGS += -gdb tcp::1234
|
||||
|
||||
# create a virtual ethernet interface and plug it with tap0
|
||||
#QEMU_ARGS += -netdev tap,id=tap0,ifname=tap0,script=no,downscript=no -device virtio-net,netdev=tap0
|
||||
|
||||
# add a second serial port for debugging
|
||||
QEMU_ARGS += -device pci-serial,chardev=gdb -chardev pty,id=gdb
|
||||
Reference in New Issue
Block a user