Skip to contentSkip to conversation

board: add support for Intel Galileo Gen 2

PATCH Superseded Kinsella 3 participants 7 messages Sep 10, 2015 – Sep 21, 2015

v4 of 8 Superseded Latest is v8 →

lore
Share & tools
lore

Kinsella

#0 lore raw

PATCH v4 1/2 board: add support for Intel Galileo Gen 2

Delta's from v3:-

* mdev hack replaced with init.d script.
* SD card creation shell script replaced with genimage config.
* Kernel config reduced to minimal size.
* Introduce rootfs overlay to reduce post-build.sh logic
* Fixed typos

Board support package includes:-

* Toplevel build root configuration
* Github based 3.8.7 Kernel
* Upstream 3.8.7
* Linux 3.8.7 Kernel Driver Patches
* Linux 3.8.7 configuration
* Grub configuration
* Init Script to load modules
* genimage config to create sdcard image.
* Patch to binutils to omit LOCK prefix

---
 board/intel/galileo/efi-part.cfg                   |   9 +
 board/intel/galileo/genimage.cfg                   |  15 +
 board/intel/galileo/grub.cfg                       |  11 +
 board/intel/galileo/linux-3.8.config               | 310 +++++++++++++++++++++
 board/intel/galileo/post-build.sh                  |   2 +
 board/intel/galileo/post-image.sh                  |  26 ++
 .../galileo/rootfs_overlay/etc/init.d/S09modload   |  35 +++
 .../etc/modules-load.galileo/galileo.conf          |   6 +
 .../etc/modules-load.galileo/galileo_gen2.conf     |   7 +
 configs/galileo_defconfig                          |  25 ++
 10 files changed, 446 insertions(+)
 create mode 100644 board/intel/galileo/efi-part.cfg
 create mode 100644 board/intel/galileo/genimage.cfg
 create mode 100644 board/intel/galileo/grub.cfg
 create mode 100644 board/intel/galileo/linux-3.8.config
 create mode 100755 board/intel/galileo/post-build.sh
 create mode 100755 board/intel/galileo/post-image.sh
 create mode 100755 board/intel/galileo/rootfs_overlay/etc/init.d/S09modload
 create mode 100644 board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo.conf
 create mode 100644 board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo_gen2.conf
 create mode 100644 configs/galileo_defconfig
board/intel/galileo/efi-part.cfg new file +9 -0
new file mode 100644
index 0000000..e873db0
@@ -0,0 +1,9 @@
+image efi-part.vfat {
+  vfat {
+      files = {
+        "startup.nsh",
+        "EFI",
+      }
+    }
+  size=512K
+}
board/intel/galileo/genimage.cfg new file +15 -0
new file mode 100644
index 0000000..8ef12c9
@@ -0,0 +1,15 @@
+image sdcard.img {
+  hdimage {
+  }
+
+  partition boot {
+    partition-type = 0xC
+    image = "efi-part.vfat"
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext2"
+    size = 512M
+  }
+}
board/intel/galileo/grub.cfg new file +11 -0
new file mode 100644
index 0000000..6777277
@@ -0,0 +1,11 @@
+set default="0"
+set timeout="0"
+
+menuentry "Buildroot" {
+    # Grub2 supports ext2, load the kernel from the Linux rootfs partition
+    # Set root tells grub to search the 2nd partition for the bzImage
+    set root=(hd0,msdos2)
+
+    # Set Linux to boot from the 2nd partition, SD/MMC support is baked into the kernel
+    linux /boot/bzImage root=/dev/mmcblk0p2 console=ttyS1,115200n8 reboot=efi,warm apic=debug rw
+}
board/intel/galileo/linux-3.8.config new file +310 -0

310 lines not on this page · raw message

board/intel/galileo/post-build.sh new file +2 -0
new file mode 100755
index 0000000..490fb4d
@@ -0,0 +1,2 @@
+#!/bin/sh
+cp board/intel/galileo/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
board/intel/galileo/post-image.sh new file +26 -0
new file mode 100755
index 0000000..6f5ea66
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+EFI_IMAGE_CFG="board/intel/galileo/efi-part.cfg"
+GENIMAGE_CFG="board/intel/galileo/genimage.cfg"
+EFI_PART_DIR="${BINARIES_DIR}/efi-part"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+mkimage () {
+    rm -rf "${GENIMAGE_TMP}"
+
+    genimage \
+      --rootpath "${TARGET_DIR}" \
+      --tmppath "${GENIMAGE_TMP}" \
+      --inputpath "$1" \
+      --outputpath "${BINARIES_DIR}" \
+      --config "$2"
+}
+
+# Create the EFI Partition
+mkimage "${EFI_PART_DIR}" "${EFI_IMAGE_CFG}"
+
+# Create the SD Card Image
+mkimage "${BINARIES_DIR}" "${GENIMAGE_CFG}"
+
+RET=${?}
+exit ${RET}
board/intel/galileo/rootfs_overlay/etc/init.d/S09modload new file +35 -0
new file mode 100755
index 0000000..cb3e573
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+
+load_drivers()
+{
+    while IFS= read -r line; do
+      modprobe $line
+    done < "/etc/modules-load.galileo/$1.conf"
+}
+
+do_board()
+{
+    board=$(cat /sys/devices/virtual/dmi/id/board_name)
+    case "$board" in
+        *"GalileoGen2" )
+            load_drivers "galileo_gen2" ;;
+        *"Galileo" )
+            load_drivers "galileo" ;;
+    esac
+}
+
+case "$1" in
+  start)
+    do_board
+    ;;
+  stop)
+    ;;
+  restart|reload)
+    ;;
+  *)
+    echo "Usage: $0 {start|stop|restart}"
+    exit 1
+esac
+
+exit $?
board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo.conf new file +6 -0
new file mode 100644
index 0000000..762aa2d
@@ -0,0 +1,6 @@
+intel_qrk_gip
+cy8c9540a
+i2c_dev
+industrialio
+ad7298
+stmmac
board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo_gen2.conf new file +7 -0
new file mode 100644
index 0000000..e8081e0
@@ -0,0 +1,7 @@
+intel_qrk_gip
+gpio-pca953x
+pca9685
+i2c_dev
+industrialio
+adc1x8s102
+stmmac
configs/galileo_defconfig new file +25 -0
new file mode 100644
index 0000000..50ebc4a
@@ -0,0 +1,25 @@
+BR2_GLOBAL_PATCH_DIR="board/intel/galileo/patches"
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="3.8"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8=y
+BR2_BINUTILS_VERSION_2_25_X=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS1"
+BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
+BR2_ROOTFS_OVERLAY="board/intel/galileo/rootfs_overlay"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/intel/galileo/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/intel/galileo/post-image.sh"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/mdr78/Linux-3.8.7-galileo.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="d1a51d55dc67022be6c2d15163ce6dd28540042f"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/intel/galileo/linux-3.8.config"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_2r1=y
+BR2_TARGET_ROOTFS_EXT2_LABEL="rootfs.ext2"
+BR2_TARGET_GRUB2=y
+BR2_TARGET_GRUB2_I386_EFI=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
Signature · 1 line
2.1.0
#1 lore raw

PATCH v4 1/2 board: add support for Intel Galileo Gen 2

Hi,

I was trying this patch series out, but running into some issues.

The major one is that if I create the "sdcard.img" using the defconfig, write it onto a card, and try to boot from it, I get this kernel panic as the result:

[    3.470356] mmc0: new high speed SDHC card at address 0007
[    3.477010] VFS: Cannot open root device "mmcblk0p2" or
unknown-block(0,0): error -6
[    3.484871] Please append a correct "root=" boot option; here are
the available partitions:
[    3.493332] Kernel panic - not syncing: VFS: Unable to mount root
fs on unknown-block(0,0)
[    3.501649] Pid: 1, comm: swapper Not tainted 3.8.7 #1
[    3.503281] Call Trace:
[    3.503281]  [<c12e5571>] panic+0x64/0x144
[    3.503281]  [<c1458cc7>] mount_block_root+0x191/0x1ef
[    3.503281]  [<c10b9468>] ? sys_mknod+0x28/0x30
[    3.503281]  [<c1458e2c>] mount_root+0x4f/0x57
[    3.503281]  [<c1458f74>] prepare_namespace+0x140/0x171
[    3.503281]  [<c1458a71>] kernel_init_freeable+0x15e/0x166
[    3.503281]  [<c12e2d7b>] kernel_init+0xb/0x140
[    3.503281]  [<c12e87fb>] ret_from_kernel_thread+0x1b/0x30
[    3.503281]  [<c12e2d70>] ? rest_init+0x60/0x60

Is there anything I might be missing?
(Using a Gen2 board)

Cheers,
Greg

Quoted 557 lines · Ray

Delta's from v3:-

* mdev hack replaced with init.d script.
* SD card creation shell script replaced with genimage config.
* Kernel config reduced to minimal size.
* Introduce rootfs overlay to reduce post-build.sh logic
* Fixed typos

Board support package includes:-

* Toplevel build root configuration
* Github based 3.8.7 Kernel
* Upstream 3.8.7
* Linux 3.8.7 Kernel Driver Patches
* Linux 3.8.7 configuration
* Grub configuration
* Init Script to load modules
* genimage config to create sdcard image.
* Patch to binutils to omit LOCK prefix

---
 board/intel/galileo/efi-part.cfg                   |   9 +
 board/intel/galileo/genimage.cfg                   |  15 +
 board/intel/galileo/grub.cfg                       |  11 +
 board/intel/galileo/linux-3.8.config               | 310 +++++++++++++++++++++
 board/intel/galileo/post-build.sh                  |   2 +
 board/intel/galileo/post-image.sh                  |  26 ++
 .../galileo/rootfs_overlay/etc/init.d/S09modload   |  35 +++
 .../etc/modules-load.galileo/galileo.conf          |   6 +
 .../etc/modules-load.galileo/galileo_gen2.conf     |   7 +
 configs/galileo_defconfig                          |  25 ++
 10 files changed, 446 insertions(+)
 create mode 100644 board/intel/galileo/efi-part.cfg
 create mode 100644 board/intel/galileo/genimage.cfg
 create mode 100644 board/intel/galileo/grub.cfg
 create mode 100644 board/intel/galileo/linux-3.8.config
 create mode 100755 board/intel/galileo/post-build.sh
 create mode 100755 board/intel/galileo/post-image.sh
 create mode 100755 board/intel/galileo/rootfs_overlay/etc/init.d/S09modload
 create mode 100644 board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo.conf
 create mode 100644 board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo_gen2.conf
 create mode 100644 configs/galileo_defconfig
board/intel/galileo/efi-part.cfg new file +9 -0
new file mode 100644
index 0000000..e873db0
@@ -0,0 +1,9 @@
+image efi-part.vfat {
+  vfat {
+      files = {
+        "startup.nsh",
+        "EFI",
+      }
+    }
+  size=512K
+}
board/intel/galileo/genimage.cfg new file +15 -0
new file mode 100644
index 0000000..8ef12c9
@@ -0,0 +1,15 @@
+image sdcard.img {
+  hdimage {
+  }
+
+  partition boot {
+    partition-type = 0xC
+    image = "efi-part.vfat"
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext2"
+    size = 512M
+  }
+}
board/intel/galileo/grub.cfg new file +11 -0
new file mode 100644
index 0000000..6777277
@@ -0,0 +1,11 @@
+set default="0"
+set timeout="0"
+
+menuentry "Buildroot" {
+    # Grub2 supports ext2, load the kernel from the Linux rootfs partition
+    # Set root tells grub to search the 2nd partition for the bzImage
+    set root=(hd0,msdos2)
+
+    # Set Linux to boot from the 2nd partition, SD/MMC support is baked into the kernel
+    linux /boot/bzImage root=/dev/mmcblk0p2 console=ttyS1,115200n8 reboot=efi,warm apic=debug rw
+}
board/intel/galileo/linux-3.8.config new file +310 -0
new file mode 100644
index 0000000..9d724fe
@@ -0,0 +1,310 @@
+CONFIG_EXPERIMENTAL=y
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_KERNEL_LZMA=y
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=18
+CONFIG_CGROUPS=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CPUSETS=y
+CONFIG_CGROUP_CPUACCT=y
+CONFIG_RESOURCE_COUNTERS=y
+CONFIG_CGROUP_SCHED=y
+CONFIG_NAMESPACES=y
+CONFIG_RELAY=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS_ALL=y
+# CONFIG_PCSPKR_PLATFORM is not set
+CONFIG_EMBEDDED=y
+# CONFIG_COMPAT_BRK is not set
+CONFIG_JUMP_LABEL=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_LBDAF is not set
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_BSD_DISKLABEL=y
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_ZONE_DMA is not set
+CONFIG_INTEL_QUARK_X1000_SOC=y
+CONFIG_M586TSC=y
+CONFIG_X86_GENERIC=y
+CONFIG_HPET_TIMER=y
+CONFIG_PREEMPT_VOLUNTARY=y
+CONFIG_X86_UP_APIC=y
+CONFIG_X86_UP_IOAPIC=y
+# CONFIG_X86_MCE_AMD is not set
+CONFIG_X86_REBOOTFIXUPS=y
+CONFIG_MICROCODE=y
+CONFIG_X86_MSR=y
+CONFIG_X86_CPUID=y
+CONFIG_HIGHMEM64G=y
+# CONFIG_COMPACTION is not set
+# CONFIG_MTRR is not set
+# CONFIG_ARCH_RANDOM is not set
+CONFIG_EFI=y
+CONFIG_EFI_STUB=y
+CONFIG_EFI_CAPSULE=m
+CONFIG_HZ_100=y
+CONFIG_KEXEC=y
+CONFIG_PHYSICAL_START=0x400000
+# CONFIG_RELOCATABLE is not set
+# CONFIG_COMPAT_VDSO is not set
+CONFIG_PM_RUNTIME=y
+CONFIG_PM_DEBUG=y
+CONFIG_PM_TRACE_RTC=y
+CONFIG_ACPI_PROCFS=y
+CONFIG_ACPI_PROCFS_POWER=y
+CONFIG_ACPI_EC_DEBUGFS=y
+# CONFIG_ACPI_PROC_EVENT is not set
+# CONFIG_ACPI_BATTERY is not set
+# CONFIG_ACPI_FAN is not set
+CONFIG_ACPI_DEBUG=y
+CONFIG_ACPI_PCI_SLOT=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_DEBUG=y
+CONFIG_PCI_IOAPIC=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_SYN_COOKIES=y
+# CONFIG_IPV6_SIT is not set
+CONFIG_VLAN_8021Q=m
+CONFIG_VLAN_8021Q_GVRP=y
+CONFIG_CAN=m
+CONFIG_CAN_RAW=m
+CONFIG_CAN_BCM=m
+CONFIG_CAN_J1939=m
+CONFIG_CAN_VCAN=m
+CONFIG_CAN_SLCAN=m
+# CONFIG_CAN_DEV is not set
+CONFIG_BT=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+CONFIG_BT_HCIBTUSB=m
+CONFIG_BT_HCIVHCI=m
+CONFIG_CFG80211=m
+CONFIG_CFG80211_WEXT=y
+CONFIG_MAC80211=m
+CONFIG_RFKILL=m
+CONFIG_RFKILL_INPUT=y
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_DEBUG_DEVRES=y
+CONFIG_MTD=y
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_M25P80=y
+# CONFIG_PNP_DEBUG_MESSAGES is not set
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_LOOP_MIN_COUNT=2
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=1
+CONFIG_BLK_DEV_RAM_SIZE=81920
+CONFIG_EEPROM_AT24=m
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_SCSI_CONSTANTS=y
+CONFIG_SCSI_SPI_ATTRS=y
+# CONFIG_SCSI_LOWLEVEL is not set
+CONFIG_NETDEVICES=y
+CONFIG_MII=y
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_NET_VENDOR_ADAPTEC is not set
+# CONFIG_NET_VENDOR_ALTEON is not set
+# CONFIG_NET_VENDOR_AMD is not set
+# CONFIG_NET_VENDOR_ATHEROS is not set
+# CONFIG_NET_VENDOR_BROADCOM is not set
+# CONFIG_NET_VENDOR_BROCADE is not set
+# CONFIG_NET_VENDOR_CHELSIO is not set
+# CONFIG_NET_VENDOR_CISCO is not set
+# CONFIG_NET_VENDOR_DEC is not set
+# CONFIG_NET_VENDOR_DLINK is not set
+# CONFIG_NET_VENDOR_EMULEX is not set
+# CONFIG_NET_VENDOR_EXAR is not set
+# CONFIG_NET_VENDOR_HP is not set
+CONFIG_E1000=m
+# CONFIG_NET_VENDOR_I825XX is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MELLANOX is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_MICROCHIP is not set
+# CONFIG_NET_VENDOR_MYRI is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_NVIDIA is not set
+# CONFIG_NET_VENDOR_OKI is not set
+# CONFIG_NET_PACKET_ENGINE is not set
+# CONFIG_NET_VENDOR_QLOGIC is not set
+# CONFIG_NET_VENDOR_REALTEK is not set
+# CONFIG_NET_VENDOR_RDC is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SILAN is not set
+# CONFIG_NET_VENDOR_SIS is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+CONFIG_STMMAC_ETH=m
+# CONFIG_STMMAC_PLATFORM is not set
+CONFIG_STMMAC_PCI=y
+CONFIG_STMMAC_DA=y
+# CONFIG_NET_VENDOR_SUN is not set
+# CONFIG_NET_VENDOR_TEHUTI is not set
+# CONFIG_NET_VENDOR_TI is not set
+# CONFIG_NET_VENDOR_VIA is not set
+# CONFIG_NET_VENDOR_WIZNET is not set
+CONFIG_PHYLIB=y
+CONFIG_PPP=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_ASYNC=m
+CONFIG_IWLWIFI=m
+# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_SERIO is not set
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_LEGACY_PTY_COUNT=32
+CONFIG_SERIAL_NONSTANDARD=y
+CONFIG_SERIAL_8250=y
+# CONFIG_SERIAL_8250_PNP is not set
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_PCI is not set
+CONFIG_SERIAL_8250_NR_UARTS=8
+CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_RSA=y
+CONFIG_SERIAL_8250_DW=y
+# CONFIG_HW_RANDOM is not set
+CONFIG_HPET=y
+# CONFIG_HPET_MMAP is not set
+CONFIG_SPI_DEBUG=y
+CONFIG_SPI_GPIO=y
+CONFIG_SPI_PXA2XX=y
+CONFIG_SPI_PXA2XX_PCI=y
+CONFIG_SPI_SPIDEV=y
+CONFIG_PTP_1588_CLOCK_PCH=m
+CONFIG_GPIO_SCH=m
+CONFIG_GPIO_PCA953X=m
+CONFIG_GPIO_PCA953X_IRQ=y
+# CONFIG_HWMON is not set
+CONFIG_MFD_INTEL_QUARK_HSUART_DMA=y
+CONFIG_CY8C9540A=m
+CONFIG_MFD_PCA9685=m
+CONFIG_INTEL_QRK_GIP=m
+CONFIG_INTEL_QRK_GIP_TEST=m
+CONFIG_LPC_SCH=y
+CONFIG_MEDIA_SUPPORT=m
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_USB_VIDEO_CLASS=m
+# CONFIG_USB_GSPCA is not set
+# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
+# CONFIG_DVB_AU8522_V4L is not set
+# CONFIG_DVB_TUNER_DIB0070 is not set
+# CONFIG_DVB_TUNER_DIB0090 is not set
+# CONFIG_VGA_ARB is not set
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_SOUND=m
+CONFIG_SND=m
+CONFIG_SND_USB_AUDIO=m
+CONFIG_USB=m
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_UHCI_HCD=m
+CONFIG_USB_ACM=m
+CONFIG_USB_STORAGE=m
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_GADGET=m
+CONFIG_USB_EG20T=m
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_MASS_STORAGE=m
+CONFIG_USB_G_SERIAL=m
+CONFIG_USB_G_ACM_MS=m
+CONFIG_MMC=y
+CONFIG_MMC_UNSAFE_RESUME=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PCI=y
+CONFIG_MMC_SDHCI_ACPI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_RTC_CLASS=y
+CONFIG_DMADEVICES=y
+CONFIG_DW_DMAC=y
+CONFIG_UIO=m
+CONFIG_STAGING=y
+CONFIG_MAX78M6610_LMU=m
+CONFIG_IIO_SYSFS_TRIGGER=m
+CONFIG_IIO_HRTIMER_TRIGGER=m
+# CONFIG_NET_VENDOR_SILICOM is not set
+CONFIG_INTEL_QRK_ESRAM=y
+CONFIG_INTEL_QRK_THERMAL=y
+CONFIG_INTEL_QRK_AUDIO_CTRL=m
+CONFIG_INTEL_QRK_J1708=m
+# CONFIG_IOMMU_SUPPORT is not set
+CONFIG_IIO=m
+CONFIG_IIO_BUFFER_CB=y
+CONFIG_IIO_LIS331DLH_INTEL_QRK=m
+CONFIG_AD7298=m
+CONFIG_ADC1x8S102=m
+CONFIG_PWM=y
+CONFIG_EFI_VARS=m
+CONFIG_DMI_SYSFS=y
+CONFIG_EXT2_FS=y
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_VFAT_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_HUGETLBFS=y
+# CONFIG_MISC_FILESYSTEMS is not set
+CONFIG_NLS_DEFAULT="utf8"
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_850=y
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_PRINTK_TIME=y
+# CONFIG_ENABLE_WARN_DEPRECATED is not set
+CONFIG_FRAME_WARN=2048
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_HEADERS_CHECK=y
+# CONFIG_SCHED_DEBUG is not set
+CONFIG_TIMER_STATS=y
+CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_FTRACE is not set
+CONFIG_DEBUG_STACKOVERFLOW=y
+CONFIG_X86_PTDUMP=y
+# CONFIG_DEBUG_RODATA_TEST is not set
+CONFIG_DEBUG_SET_MODULE_RONX=y
+# CONFIG_DOUBLEFAULT is not set
+CONFIG_DEBUG_BOOT_PARAMS=y
+CONFIG_OPTIMIZE_INLINING=y
+CONFIG_KEYS=y
+CONFIG_KEYS_DEBUG_PROC_KEYS=y
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_CRYPTO_CRC32C=y
+# CONFIG_VIRTUALIZATION is not set
+CONFIG_CRC_T10DIF=y
board/intel/galileo/post-build.sh new file +2 -0
new file mode 100755
index 0000000..490fb4d
@@ -0,0 +1,2 @@
+#!/bin/sh
+cp board/intel/galileo/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
board/intel/galileo/post-image.sh new file +26 -0
new file mode 100755
index 0000000..6f5ea66
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+EFI_IMAGE_CFG="board/intel/galileo/efi-part.cfg"
+GENIMAGE_CFG="board/intel/galileo/genimage.cfg"
+EFI_PART_DIR="${BINARIES_DIR}/efi-part"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+mkimage () {
+    rm -rf "${GENIMAGE_TMP}"
+
+    genimage \
+      --rootpath "${TARGET_DIR}" \
+      --tmppath "${GENIMAGE_TMP}" \
+      --inputpath "$1" \
+      --outputpath "${BINARIES_DIR}" \
+      --config "$2"
+}
+
+# Create the EFI Partition
+mkimage "${EFI_PART_DIR}" "${EFI_IMAGE_CFG}"
+
+# Create the SD Card Image
+mkimage "${BINARIES_DIR}" "${GENIMAGE_CFG}"
+
+RET=${?}
+exit ${RET}
board/intel/galileo/rootfs_overlay/etc/init.d/S09modload new file +35 -0
new file mode 100755
index 0000000..cb3e573
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+
+load_drivers()
+{
+    while IFS= read -r line; do
+      modprobe $line
+    done < "/etc/modules-load.galileo/$1.conf"
+}
+
+do_board()
+{
+    board=$(cat /sys/devices/virtual/dmi/id/board_name)
+    case "$board" in
+        *"GalileoGen2" )
+            load_drivers "galileo_gen2" ;;
+        *"Galileo" )
+            load_drivers "galileo" ;;
+    esac
+}
+
+case "$1" in
+  start)
+    do_board
+    ;;
+  stop)
+    ;;
+  restart|reload)
+    ;;
+  *)
+    echo "Usage: $0 {start|stop|restart}"
+    exit 1
+esac
+
+exit $?
board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo.conf new file +6 -0
new file mode 100644
index 0000000..762aa2d
@@ -0,0 +1,6 @@
+intel_qrk_gip
+cy8c9540a
+i2c_dev
+industrialio
+ad7298
+stmmac
board/intel/galileo/rootfs_overlay/etc/modules-load.galileo/galileo_gen2.conf new file +7 -0
new file mode 100644
index 0000000..e8081e0
@@ -0,0 +1,7 @@
+intel_qrk_gip
+gpio-pca953x
+pca9685
+i2c_dev
+industrialio
+adc1x8s102
+stmmac
configs/galileo_defconfig new file +25 -1
new file mode 100644
index 0000000..50ebc4a
@@ -0,0 +1,25 @@
+BR2_GLOBAL_PATCH_DIR="board/intel/galileo/patches"
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="3.8"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8=y
+BR2_BINUTILS_VERSION_2_25_X=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS1"
+BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
+BR2_ROOTFS_OVERLAY="board/intel/galileo/rootfs_overlay"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/intel/galileo/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/intel/galileo/post-image.sh"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/mdr78/Linux-3.8.7-galileo.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="d1a51d55dc67022be6c2d15163ce6dd28540042f"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/intel/galileo/linux-3.8.config"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_2r1=y
+BR2_TARGET_ROOTFS_EXT2_LABEL="rootfs.ext2"
+BR2_TARGET_GRUB2=y
+BR2_TARGET_GRUB2_I386_EFI=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
--

2.1.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw

PATCH v4 1/2 board: add support for Intel Galileo Gen 2

Dear Gergely Imreh,

Quoted 25 lines · Gergely Imreh

I was trying this patch series out, but running into some issues.

The major one is that if I create the "sdcard.img" using the defconfig, write it onto a card, and try to boot from it, I get this kernel panic as the result:

[    3.470356] mmc0: new high speed SDHC card at address 0007
[    3.477010] VFS: Cannot open root device "mmcblk0p2" or
unknown-block(0,0): error -6
[    3.484871] Please append a correct "root=" boot option; here are
the available partitions:
[    3.493332] Kernel panic - not syncing: VFS: Unable to mount root
fs on unknown-block(0,0)
[    3.501649] Pid: 1, comm: swapper Not tainted 3.8.7 #1
[    3.503281] Call Trace:
[    3.503281]  [<c12e5571>] panic+0x64/0x144
[    3.503281]  [<c1458cc7>] mount_block_root+0x191/0x1ef
[    3.503281]  [<c10b9468>] ? sys_mknod+0x28/0x30
[    3.503281]  [<c1458e2c>] mount_root+0x4f/0x57
[    3.503281]  [<c1458f74>] prepare_namespace+0x140/0x171
[    3.503281]  [<c1458a71>] kernel_init_freeable+0x15e/0x166
[    3.503281]  [<c12e2d7b>] kernel_init+0xb/0x140
[    3.503281]  [<c12e87fb>] ret_from_kernel_thread+0x1b/0x30
[    3.503281]  [<c12e2d70>] ? rest_init+0x60/0x60
Quoted 2 lines

Is there anything I might be missing?
(Using a Gen2 board)

Can you add "rootwait" to your kernel command line?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v4 1/2 board: add support for Intel Galileo Gen 2

Can you the partition table and share pls.

parted -l /dev/mmcblk0

Ray K

Quoted 37 lines · Thomas Petazzoni

Dear Gergely Imreh,

Quoted 25 lines · Gergely Imreh

I was trying this patch series out, but running into some issues.

The major one is that if I create the "sdcard.img" using the defconfig, write it onto a card, and try to boot from it, I get this kernel panic as the result:

[    3.470356] mmc0: new high speed SDHC card at address 0007
[    3.477010] VFS: Cannot open root device "mmcblk0p2" or
unknown-block(0,0): error -6
[    3.484871] Please append a correct "root=" boot option; here are
the available partitions:
[    3.493332] Kernel panic - not syncing: VFS: Unable to mount root
fs on unknown-block(0,0)
[    3.501649] Pid: 1, comm: swapper Not tainted 3.8.7 #1
[    3.503281] Call Trace:
[    3.503281]  [<c12e5571>] panic+0x64/0x144
[    3.503281]  [<c1458cc7>] mount_block_root+0x191/0x1ef
[    3.503281]  [<c10b9468>] ? sys_mknod+0x28/0x30
[    3.503281]  [<c1458e2c>] mount_root+0x4f/0x57
[    3.503281]  [<c1458f74>] prepare_namespace+0x140/0x171
[    3.503281]  [<c1458a71>] kernel_init_freeable+0x15e/0x166
[    3.503281]  [<c12e2d7b>] kernel_init+0xb/0x140
[    3.503281]  [<c12e87fb>] ret_from_kernel_thread+0x1b/0x30
[    3.503281]  [<c12e2d70>] ? rest_init+0x60/0x60
Quoted 2 lines

Is there anything I might be missing?
(Using a Gen2 board)

Can you add "rootwait" to your kernel command line?

Thanks,

Thomas

#4 lore raw

PATCH v4 1/2 board: add support for Intel Galileo Gen 2

In reply to Thomas Petazzoni
Quoted 29 lines · Thomas Petazzoni

Dear Gergely Imreh,

Quoted 25 lines · Gergely Imreh

I was trying this patch series out, but running into some issues.

The major one is that if I create the "sdcard.img" using the defconfig, write it onto a card, and try to boot from it, I get this kernel panic as the result:

[    3.470356] mmc0: new high speed SDHC card at address 0007
[    3.477010] VFS: Cannot open root device "mmcblk0p2" or
unknown-block(0,0): error -6
[    3.484871] Please append a correct "root=" boot option; here are
the available partitions:
[    3.493332] Kernel panic - not syncing: VFS: Unable to mount root
fs on unknown-block(0,0)
[    3.501649] Pid: 1, comm: swapper Not tainted 3.8.7 #1
[    3.503281] Call Trace:
[    3.503281]  [<c12e5571>] panic+0x64/0x144
[    3.503281]  [<c1458cc7>] mount_block_root+0x191/0x1ef
[    3.503281]  [<c10b9468>] ? sys_mknod+0x28/0x30
[    3.503281]  [<c1458e2c>] mount_root+0x4f/0x57
[    3.503281]  [<c1458f74>] prepare_namespace+0x140/0x171
[    3.503281]  [<c1458a71>] kernel_init_freeable+0x15e/0x166
[    3.503281]  [<c12e2d7b>] kernel_init+0xb/0x140
[    3.503281]  [<c12e87fb>] ret_from_kernel_thread+0x1b/0x30
[    3.503281]  [<c12e2d70>] ? rest_init+0x60/0x60
Quoted 5 lines
Quoted 2 lines

Is there anything I might be missing?
(Using a Gen2 board)

Can you add "rootwait" to your kernel command line?

That seems to be it. Modifying the board/intel/galileo/grub.cfg to have the following line with the added "rootwait" seems to do the trick!

linux /boot/bzImage root=/dev/mmcblk0p2 rootwait console=ttyS1,115200n8 reboot=efi,warm apic=debug rw

Quoted 7 lines

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#5 lore raw

PATCH v4 1/2 board: add support for Intel Galileo Gen 2

Strange - an artifact of the speed of the SD cards perhaps? Need to add rootwait in grub.conf - me thinks.

Ray K

On Mon, 2015-09-21 at 23:13 +0800, Gergely Imreh wrote:

Quoted 29 lines · On 21 September 2015 at 22:45, Thomas Petazzoni <thomas.petazzoni at…

Dear Gergely Imreh,

Quoted 25 lines · Gergely Imreh

I was trying this patch series out, but running into some issues.

The major one is that if I create the "sdcard.img" using the defconfig, write it onto a card, and try to boot from it, I get this kernel panic as the result:

[    3.470356] mmc0: new high speed SDHC card at address 0007
[    3.477010] VFS: Cannot open root device "mmcblk0p2" or
unknown-block(0,0): error -6
[    3.484871] Please append a correct "root=" boot option; here are
the available partitions:
[    3.493332] Kernel panic - not syncing: VFS: Unable to mount root
fs on unknown-block(0,0)
[    3.501649] Pid: 1, comm: swapper Not tainted 3.8.7 #1
[    3.503281] Call Trace:
[    3.503281]  [<c12e5571>] panic+0x64/0x144
[    3.503281]  [<c1458cc7>] mount_block_root+0x191/0x1ef
[    3.503281]  [<c10b9468>] ? sys_mknod+0x28/0x30
[    3.503281]  [<c1458e2c>] mount_root+0x4f/0x57
[    3.503281]  [<c1458f74>] prepare_namespace+0x140/0x171
[    3.503281]  [<c1458a71>] kernel_init_freeable+0x15e/0x166
[    3.503281]  [<c12e2d7b>] kernel_init+0xb/0x140
[    3.503281]  [<c12e87fb>] ret_from_kernel_thread+0x1b/0x30
[    3.503281]  [<c12e2d70>] ? rest_init+0x60/0x60
Quoted 5 lines
Quoted 2 lines

Is there anything I might be missing?
(Using a Gen2 board)

Can you add "rootwait" to your kernel command line?

That seems to be it. Modifying the board/intel/galileo/grub.cfg to have the following line with the added "rootwait" seems to do the trick!

linux /boot/bzImage root=/dev/mmcblk0p2 rootwait console=ttyS1,115200n8 reboot=efi,warm apic=debug rw

Quoted 7 lines

Thanks,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

_______________________________________________
buildroot mailing list
buildroot at busybox.net<mailto:[email protected]>
http://lists.busybox.net/mailman/listinfo/buildroot

#6 lore raw

PATCH v4 1/2 board: add support for Intel Galileo Gen 2

Hello,

Quoted 2 lines · Ray

Strange - an artifact of the speed of the SD cards perhaps? Need to add rootwait in grub.conf - me thinks.

The detection of SD card is asynchronous. So even with a given SD card, from one boot to the other, you might have some cases where the SD card gets detected in time for the root filesystem to be mounted by the kernel, and some cases where it doesn't get detected in time. rootwait tells the kernel to wait until it appears.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com