summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp
AgeCommit message (Expand)AuthorFilesLines
2020-03-18Support Salvator-X/XS boardDuy Dang20-21/+109
2020-03-18linux-agl: add pfifo patchset for fixing CAN failuresMatt Ranostay4-0/+109
2020-03-12Enable Xen for m3ulcbJérémy Fanguède2-0/+7
2020-03-12meta-rcar-gen3: Add Xen specific device tree for m3ulcbJérémy Fanguède3-0/+103
2020-03-12Add vboxguestdriver recipe to meta-agl-bsp instead of meta-agl-demoJan-Simon Moeller3-1/+126
2020-03-04meta-agl-bsp: Define Xen recipeJérémy Fanguède2-0/+35
2020-02-26rpi4-base.inc: KERNEL_DEVICETREE for rpi4 and sotaLeon Anavi1-0/+4
2020-02-21Merge remote-tracking branch 'agl/next'Jan-Simon Möller70-3895/+214
2020-02-17meta-agl-bsp: Add CONFIG_LSM workaround for 5.1+ kernelsScott Murray1-0/+3
2020-02-17zeus updates for dragonboard-410cScott Murray1-0/+0
2020-02-14Rename dtb nameMinori Yasumura3-3/+3
2020-02-12[RCAR] Fix recipes path for SOTA buildRonan Le Martret2-0/+26
2020-02-07meta-agl-bsp/meta-arago: update weston bbappendScott Murray8-134/+109
2020-02-07[RCAR] Update rcar driver weston 7 bsp 3.21.0Ronan Le Martret1-1/+1
2020-02-04[RCAR] Update rcar driver weston 7 bsp 3.21.0Ronan Le Martret1-2/+2
2020-01-30[RCAR] Split ADSP path for ulcb and ulcb-kfRonan Le Martret3-44/+59
2020-01-27meta-agl-bsp: meta-raspberrypi: handle zeus upgradeScott Murray42-3262/+7
2020-01-27meta-agl-bsp: handle ptest-runner upgradeScott Murray2-30/+26
2020-01-22meta-agl-bsp meta-agl-profile-core: upgrade to opencv 4.xScott Murray2-19/+6
2020-01-22meta-agl-bsp/meta-intel: remove linux-firmware_git.bbappendScott Murray1-0/+0
2020-01-22meta-agl-bsp: remove weston and wayland-protocols backportsScott Murray7-402/+0
2020-01-22Declare layer compatibility with zeusJan-Simon Möller2-2/+2
2020-01-21Extend qemux86-64 images to support real hardwarePaul Barker3-12/+7
2019-12-03Extend intel-corei7-64 machine to support virtual targetsPaul Barker4-1/+20
2019-11-27Enable pi 4 boot log on console output temporarilyLi Xiaoming1-0/+2
2019-11-19Support meta-ti 2019.04 releasePaul Barker9-33/+35
2019-11-19raspberrypi4.conf: Enable BluetoothLeon Anavi1-0/+1
2019-11-19conf/machine/raspberrypi4: Switch to 64-bitLeon Anavi2-13/+144
2019-11-19meta-agl-bsp/meta-rcar-gen3: Apply E3 audio configurationHarunobu Kurokawa1-0/+8
2019-11-19bsp/rcar-gen3: Avoid reinstall of driversJosé Bollo1-2/+11
2019-11-10[RCAR] Update graphics driverRonan Le Martret1-1/+1
2019-11-05Generalize create-combined-dtb to use VC4DTBO from board configJan-Simon Moeller1-6/+22
2019-11-05agl_raspberrypi3.inc: Switch to firmware KMSLeon Anavi1-0/+11
2019-11-05bcm2835-bootfiles.bbappend: Update firmwareLeon Anavi1-8/+8
2019-11-05linux-raspberrypi_4.19.bb: Update to 4.19.80Leon Anavi1-2/+2
2019-11-04rpi-config: Set max_framebuffers to 2 to support dual displayChanghyeok Bae1-0/+5
2019-10-28Add missing space in SRC_URI_append statementJan-Simon Möller1-1/+1
2019-10-20weston-ini-conf: update virtualoutput.cfgScott Murray1-1/+1
2019-10-14meta-agl-bsp: Update PACKAGES_GFX_* for TI boardsPaul Barker3-3/+3
2019-09-26raspberrypi4: Fix BluetoothLeon Anavi1-0/+1
2019-09-25raspberrypi4: Fix WiFiLeon Anavi2-0/+49
2019-09-20raspberrypi4: enable v3d and dependencies in mesaJan-Simon Möller1-0/+2
2019-09-19mesa: Upgrade Mesa for Raspberry Pi 4Leon Anavi16-0/+2080
2019-09-16[RCAR] Update BSP 3.21 driverRonan Le Martret1-2/+2
2019-09-13u-boot-2019.07: Fix for Raspberry Pi 4Leon Anavi10-5/+514
2019-09-11meta-agl-bsp/meta-rcar-gen3: Update asound.state to pipewireHarunobu Kurokawa1-4/+4
2019-09-09meta-agl-bsp: meta-rcar-gen3-adas: Rework KF radio initializationScott Murray3-0/+39
2019-09-05Add nogfx build for h3ulcbJan-Simon Moeller1-0/+10
2019-09-04Revert "Add nogfx build for h3ulcb"Jan-Simon Moeller3-10/+5
2019-09-03Add nogfx build for h3ulcbJan-Simon Moeller3-5/+10
e_tool] HDDIMG REMOVABLE_DEVICE" echo " -v: Verbose debug" echo " path_to_iasImage_tool: path the iasImage tool provided by Intel." echo " HDDIMG: The hddimg file to generate the efi disk from" echo " Supported formats are .hddimg, .wic .wic.xz" echo " REMOVABLE_DEVICE: The block device to write the image to, e.g. /dev/sdh" echo "ex:" echo " mkabl-agl.sh agl-demo-platform-intel-corei7-64.wic.xz /dev/sdd" echo " mkabl-agl.sh agl-demo-platform-intel-corei7-64.hddimg /dev/sdd" echo " assuming that iasImage is accessible via your default path" exit 1 } image_details() { IMG=$1 info "Image details" echo " image: $(stat --printf '%N\n' $IMG)" echo " size: $(stat -L --printf '%s bytes\n' $IMG)" echo " modified: $(stat -L --printf '%y\n' $IMG)" echo " type: $(file -L -b $IMG)" echo "" } device_details() { DEV=$1 BLOCK_SIZE=512 info "Device details" echo " device: $DEVICE" if [ -f "/sys/class/block/$DEV/device/vendor" ]; then echo " vendor: $(cat /sys/class/block/$DEV/device/vendor)" else echo " vendor: UNKOWN" fi if [ -f "/sys/class/block/$DEV/device/model" ]; then echo " model: $(cat /sys/class/block/$DEV/device/model)" else echo " model: UNKNOWN" fi if [ -f "/sys/class/block/$DEV/size" ]; then echo " size: $(($(cat /sys/class/block/$DEV/size) * $BLOCK_SIZE)) bytes" else echo " size: UNKNOWN" fi echo "" } unmount_device() { grep -q $DEVICE /proc/mounts if [ $? -eq 0 ]; then warn "$DEVICE listed in /proc/mounts, attempting to unmount" umount $DEVICE* 2>/dev/null ! grep -q $DEVICE /proc/mounts && info "Unmounted successfully" return $? fi return 0 } unmount() { if [ "$1" = "" ] ; then return 0 fi grep -q $1 /proc/mounts if [ $? -eq 0 ]; then debug "Unmounting $1" umount $1 ! grep -q $1 /proc/mounts # check if unmounted successfully return $? fi return 0 } # # Parse and validate arguments # if [ "$1" = "-v" ] ; then DEBUG=1 exec 3>&1 shift fi if [ "$1" = "-p" ] ; then IAS_PATH="$2""/" shift 2 fi if [ $# -ne 2 ]; then usage fi IAS_IMAGE_TOOL="$IAS_PATH$IAS_EXE" debug "iasImage tool is: $IAS_IMAGE_TOOL" which $IAS_IMAGE_TOOL > IAS_IMAGE_TOOL_PATH if [ ! -x "$(command -v $IAS_IMAGE_TOOL)" ]; then die "$IAS_IMAGE_TOOL not found pointed by the path via 'sudo; use -p option'" fi HDDIMG=$1 DEVICE=$2 LINK=$(readlink $DEVICE) if [ $? -eq 0 ]; then DEVICE="$LINK" fi if [ ! -w "$DEVICE" ]; then if [ ! -e "${DEVICE}" ] ; then die "Device $DEVICE cannot be found" else die "Device $DEVICE is not writable (need to run under sudo?)" fi fi if [ ! -e "$HDDIMG" ]; then die "HDDIMG $HDDIMG does not exist" fi HDDIMG_EXT=${HDDIMG##*.} case $HDDIMG_EXT in hddimg) IMG_TYPE="MOUNT" IMG_COMPRESS="NO" debug "Detected: uncompressed image type .hddimg" ;; wic) IMG_TYPE="DISK" IMG_COMPRESS="NO" debug "Detected: uncompressed image type .wic" ;; xz) IMG_TYPE="DISK" IMG_COMPRESS="YES" debug "Detected: xz compressed image type .wic" command -v xz >/dev/null 2>&1 || { die "xz command is not available, pleaes install xz package"; } TMP_SIZE=`df -k $TMP_DIR | awk '/[0-9]%/{print $(NF-2)}'` if [ "$TMP_SIZE" -lt "$TMP_SIZE_MIN" ]; then die "Available space on $TMP_DIR must be at least $TMP_SIZE_MIN kB" fi printf "Starting decompression of the image. It may take some time ..." xz --decompress --keep --format=auto --force --threads=0 --stdout > $TMP_DIR/TMP-AGL-wic-image.wic $HDDIMG|| \ die "xz command failled: xz --decompress --keep --format=auto --force --threads=0 --stdout > $TMP_DIR/TMP-AGL-wic-image.wic" HDDIMG="$TMP_DIR/TMP-AGL-wic-image.wic" echo "Image uncompressed, starting doing real work ..." ;; *) die "Unsupported image format: $HDDIMG_EXT Supported format are .hddimg .wic wic.xz" ;; esac # # Ensure the hddimg is not mounted # debug "will now try to umount /detach previous images" case $IMG_TYPE in MOUNT) unmount "$HDDIMG" || die "Failed to unmount $HDDIMG" ;; DISK) [ `losetup --list |grep $HDDIMG | wc -l ` -gt 1 ] && die "Image mounted more than once, manual cleaning required see: losetup --list" debug "ready to attach the wic image to aloop device" LOOP_DEVICE=`losetup --find --show $HDDIMG` && ( losetup -d $LOOP_DEVICE 1>&3 2>&1 || die "Detaching $LOOP_DEVICE from $HDDIMG failled") ;; *) die "unknown image format $IMG_TYPE" ;; esac # # Check if any $DEVICE partitions are mounted # unmount_device || die "Failed to unmount $DEVICE" # # Confirm device with user # image_details $HDDIMG device_details $(basename $DEVICE) echo -n "${INFO}Prepare ABL image on $DEVICE [y/N]?${CLEAR} " read RESPONSE if [ "$RESPONSE" != "y" ]; then echo "Image creation aborted" exit 0 fi # # Prepare the temporary working space # TMPDIR=$(mktemp -d mkabldisk-XXX) || die "Failed to create temporary mounting directory." HDDIMG_MNT=$TMPDIR/hddimg debug "TEMPDIR is: $TMPDIR" HDDIMG_ROOTFS_MNT=$TMPDIR/hddimg_rootfs ROOTFS_MNT=$TMPDIR/rootfs BOOTFS_MNT=$TMPDIR/bootfs mkdir $HDDIMG_MNT || die "Failed to create $HDDIMG_MNT" mkdir $HDDIMG_ROOTFS_MNT || die "Failed to create $HDDIMG_ROOTFS_MNT" mkdir $ROOTFS_MNT || die "Failed to create $ROOTFS_MNT" mkdir $BOOTFS_MNT || die "Failed to create $BOOTFS_MNT" # # Partition $DEVICE # DEVICE_SIZE=$(parted -s $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//") # If the device size is not reported there may not be a valid label if [ "$DEVICE_SIZE" = "" ] ; then parted -s $DEVICE mklabel msdos || die "Failed to create MSDOS partition table" DEVICE_SIZE=$(parted -s $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//") fi ROOTFS_SIZE=$((DEVICE_SIZE-BOOT_SIZE)) ROOTFS_START=$((BOOT_SIZE)) ROOTFS_END=$((ROOTFS_START+ROOTFS_SIZE)) # MMC devices use a partition prefix character 'p' PART_PREFIX="" if [ ! "${DEVICE#/dev/mmcblk}" = "${DEVICE}" ] || [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then PART_PREFIX="p" fi BOOTFS=$DEVICE${PART_PREFIX}1 ROOTFS=$DEVICE${PART_PREFIX}2 TARGET_PART_PREFIX="" if [ ! "${TARGET_DEVICE#/dev/mmcblk}" = "${TARGET_DEVICE}" ]; then TARGET_PART_PREFIX="p" fi TARGET_ROOTFS=$TARGET_DEVICE${TARGET_PART_PREFIX}2 echo "" info "Boot partition size: $BOOT_SIZE MB ($BOOTFS)" info "ROOTFS partition size: $ROOTFS_SIZE MB ($ROOTFS)" echo "" # Use MSDOS by default as GPT cannot be reliably distributed in disk image form # as it requires the backup table to be on the last block of the device, which # of course varies from device to device. info "Partitioning installation media ($DEVICE)" debug "Deleting partition table on $DEVICE" dd if=/dev/zero of=$DEVICE bs=512 count=2 1>&3 2>&1 || die "Failed to zero beginning of $DEVICE" debug "Creating new partition table (MSDOS) on $DEVICE" parted -s $DEVICE mklabel msdos 1>&3 2>&1 || die "Failed to create MSDOS partition table" debug "Creating boot partition on $BOOTFS" parted -s $DEVICE mkpart primary 0% $BOOT_SIZE 1>&3 2>&1 || die "Failed to create BOOT partition" debug "Enabling boot flag on $BOOTFS" parted -s $DEVICE set 1 boot on 1>&3 2>&1 || die "Failed to enable boot flag" debug "Creating ROOTFS partition on $ROOTFS" parted -s $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END 1>&3 2>&1 || die "Failed to create ROOTFS partition" # as blkid does not provide PARTUUID on Ubuntu LTS 14.04 we myst hack via fdisk #ROOTFS_PARTUUID=$(blkid |grep -e "$ROOTFS" |sed -n 's/^.*PARTUUID=/PARTUUID=/p') export LC_ALL=C ROOTFS_DISKID=$(fdisk -l "$DEVICE" | grep -e "Disk identifier" | sed -n 's/^.*Disk identifier: 0x/PARTUUID=/p') if [ $ROOTFS_DISKID = "" ]; then die "Failed to read DISKID" fi BOOTFS_PARTUUID="$ROOTFS_DISKID-01" ROOTFS_PARTUUID="$ROOTFS_DISKID-02" debug "PARTUUID for ROOTFS is $ROOTFS_PARTUUID" if [ $DEBUG -eq 1 ]; then parted -s $DEVICE print fi # # Check if any $DEVICE partitions are mounted after partitioning # unmount_device || die "Failed to unmount $DEVICE partitions" # # Format $DEVICE partitions # info "Formatting partitions" debug "Formatting $BOOTFS as ext2" mkfs.ext2 -F -F -L BOOT $BOOTFS 1>&3 2>&1 || die "Failed to format $BOOTFS" debug "Formatting $ROOTFS as ext4" mkfs.ext4 -F $ROOTFS -L "ROOT" 1>&3 2>&1 || die "Failed to format $ROOTFS" # Mounting image file system on loop devices # case $IMG_TYPE in MOUNT) debug "Mounting images and device in preparation for installation" mount -o loop $HDDIMG $HDDIMG_MNT 1>&3 2>&1 || die "Failed to mount $HDDIMG" mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT 1>&3 2>&1 || die "Failed to mount rootfs.img" ;; DISK) debug "Attaching image and mounting partitions then device in preparation for installation" LOOP_DEVICE=`losetup --find` || die "Failled to find an available loop device see: losetup --find" losetup -P $LOOP_DEVICE $HDDIMG 1>&3 2>&1 || die "Attaching $LOOP_DEVICE from $HDDIMG failled" mount "$LOOP_DEVICE"p2 $HDDIMG_ROOTFS_MNT 1>&3 2>&1 || die "Failed to mount $LOOP_DEVICEp1 on $HDDIMG_ROOTFS_MNT" mount "$LOOP_DEVICE"p1 $HDDIMG_MNT 1>&3 2>&1 || die "Failed to mount $LOOP_DEVICEp2 on $HDDIMG_MNT" ;; *) die "unknown image format $IMG_TYPE" ;; esac mount $ROOTFS $ROOTFS_MNT 1>&3 2>&1 || die "Failed to mount $ROOTFS on $ROOTFS_MNT" mount $BOOTFS $BOOTFS_MNT 1>&3 2>&1 || die "Failed to mount $BOOTFS on $BOOTFS_MNT" info "Preparing boot partition" # create the config file for iasImage # Remove any existing root= kernel parameters and: # o Add a root= parameter with the target rootfs # o Specify ro so fsck can be run during boot # o Specify rootwait in case the target media is an asyncronous block device # such as MMC or USB disks # o Specify "quiet" to minimize boot time when using slow serial consoles # iasImage command line file creation echo "root=$ROOTFS_PARTUUID" > $IAS_CMD_LINE echo "console=$MRB_DEBUG_TTY" >> $IAS_CMD_LINE echo "earlycon=uart8250,mmio32,0xfc000000,115200n8" >> $IAS_CMD_LINE echo "rootwait" >> $IAS_CMD_LINE echo "video=$MRB_HDMI" >> $IAS_CMD_LINE echo "i915.enable_initial_modeset=1" >> $IAS_CMD_LINE debug "temp config for iasImage is $IAS_CMD_LINE" if [ -f $HDDIMG_MNT/vmlinuz ]; then KERNEL_TYPE="vmlinuz" debug "kernel is vmlinuz" fi if [ -f $HDDIMG_MNT/bzimage ]; then KERNEL_TYPE="bzimage" debug "kernel is bzimage -> vmlinuz" fi if [ -f $HDDIMG_MNT/microcode.cpio ]; then warn "initrd=microcode.cpio is not a supported configuration, microcode.cpio has been ignored" fi [ -z $KERNEL_TYPE ] && die "Linux kernel type in $HDDIMG is unsupported" if [ -f $HDDIMG_MNT/initrd ]; then info "creating ABL image with initramsfs" debug "$IAS_IMAGE_TOOL -o $BOOTFS_MNT/iasImage -i 0x30000 $IAS_CMD_LINE $HDDIMG_MNT/$KERNEL_TYPE $HDDIMG_MNT/initrd" $IAS_IMAGE_TOOL -o $BOOTFS_MNT/iasImage -i 0x30000 $IAS_CMD_LINE $HDDIMG_MNT/$KERNEL_TYPE $HDDIMG_MNT/initrd else info "creating ABL image without initramfs" debug "$IAS_IMAGE_TOOL -o $BOOTFS_MNT/iasImage -i 0x30000 $IAS_CMD_LINE $HDDIMG_MNT/$KERNEL_TYPE" $IAS_IMAGE_TOOL -o $BOOTFS_MNT/iasImage -i 0x30000 $IAS_CMD_LINE $HDDIMG_MNT/$KERNEL_TYPE fi printf "Copying ROOTFS files ... " command -v rsync >/dev/null 2>&1 # check if rsync exists if [ $DEBUG -eq 1 ] && [ $? -eq 0 ]; then rsync --info=progress2 -h -aHAXW --no-compress $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT 1>&3 2>&1 || die "Root FS copy failed" else cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT 1>&3 2>&1 || die "Root FS copy failed" fi debug "removing any swap entry in /etc/fstab" sed --in-place '/swap/d' $ROOTFS_MNT/etc/fstab debug "fixing PARTUUID for /boot" sed --in-place -e "s#PARTUUID=[0-9a-z-]\+\t/boot#${BOOTFS_PARTUUID}\t/boot#" $ROOTFS_MNT/etc/fstab printf "flushing data on removable device. May take a while ... " sync --file-system $ROOTFS_MNT echo done # We dont want udev to mount our root device while we're booting... if [ -d $ROOTFS_MNT/etc/udev/ ] ; then echo "$TARGET_DEVICE" >> $ROOTFS_MNT/etc/udev/mount.blacklist fi # Call cleanup to unmount devices and images and remove the TMPDIR cleanup echo "" if [ $WARNINGS -ne 0 ] && [ $ERRORS -eq 0 ]; then echo "${YELLOW}Installation completed with warnings${CLEAR}" echo "${YELLOW}Warnings: $WARNINGS${CLEAR}" elif [ $ERRORS -ne 0 ]; then echo "${RED}Installation encountered errors${CLEAR}" echo "${RED}Errors: $ERRORS${CLEAR}" echo "${YELLOW}Warnings: $WARNINGS${CLEAR}" else success "Installation completed successfully" fi echo ""