summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-06-22 17:44:15 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-06-22 17:45:13 +0000
commitb5fc41ce845a88d75bfcb766f6ca59767758475c (patch)
treecaed49834debd155bfcea70103cbc36512f25710
parent8f9fae26dddee4b897e3b0195bb3fb4067930704 (diff)
downloaddefinitions-b5fc41ce845a88d75bfcb766f6ca59767758475c.tar.gz
bsp: Rewrite stage2-linux by copying what mkroot (formerly Aboriginal) does
This produces an armv8l64 system which boots in QEMU with the following commandline: qemu-system-aarch64 -M virt -cpu cortex-a57 -nographic -no-reboot -m 256 \ -append "panic=1 HOST=aarch64 console=ttyAMA0" -kernel ./linux-armv8l64/boot/Image
-rw-r--r--elements/bsp/stage2-linux.bst437
1 files changed, 83 insertions, 354 deletions
diff --git a/elements/bsp/stage2-linux.bst b/elements/bsp/stage2-linux.bst
index 5dbc1bce..d73e2e0b 100644
--- a/elements/bsp/stage2-linux.bst
+++ b/elements/bsp/stage2-linux.bst
@@ -8,8 +8,8 @@ depends:
sources:
- kind: git
url: upstream:linux
- track: v4.9
- ref: 69973b830859bc6529a7a0468ba0d80ee5117826
+ track: v4.11
+ ref: a351e9b9fc24e982ec2f0e76379a49826036da12
variables:
linux-target-arch: 'unsupported-arch'
@@ -18,363 +18,92 @@ environment:
PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin
arches:
- armv8b64:
+ armv8l64:
variables:
linux-target-arch: arm64
- config:
- configure-commands:
- # Required for M400
- - |
- /bin/bash -c "
- scripts/config -e SATA_AHCI_PLATFORM
- scripts/config -e AHCI_XGENE
- scripts/config -e GENERIC_PHY
- scripts/config -e PHY_XGENE
- scripts/config -e NET_VENDOR_MELLANOX
- scripts/config -e MLX4_EN
- scripts/config -e MLX4_EN_DCB
- scripts/config -e MLX4_EN_VXLAN
- scripts/config -e MLX4_CORE
- scripts/config -e MLX5_CORE
- scripts/config -e NET_IP_TUNNEL
- scripts/config -e VXLAN
- scripts/config -e UIO
- scripts/config -e UIO_PDRV_GENIRQ
- scripts/config -e GPIO_DWAPB
- scripts/config -e KEYBOARD_GPIO
- scripts/config -e INPUT_POLLDEV
- scripts/config -e KEYBOARD_GPIO_POLLED
- scripts/config -d DMA_CMA
- scripts/config -e POWER_RESET
- scripts/config -e POWER_RESET_GPIO
- scripts/config -e POWER_RESET_SYSCON
- scripts/config -e POWER_AVS"
- # Big endian kernel
- - scripts/config -e CPU_BIG_ENDIAN
- - yes '' | make ARCH=%{linux-target-arch} CROSS_COMPILE=%{target-stage1}- oldconfig
- build-commands:
- # Only generate Image here, uImage generated in deployment
- # due to availability of mkimage build systems
- - make ARCH=%{linux-target-arch} CROSS_COMPILE=%{target-stage1}- vmlinux dtbs
- install-commands:
- - mkdir -p "%{install-root}"/boot
- - make ARCH=%{linux-target-arch} CROSS_COMPILE=%{target-stage1}- install dtbs_install INSTALL_PATH="%{install-root}/boot"
- - cp arch/arm64/boot/Image "%{install-root}/boot/vmlinux"
+ vmlinux: arch/arm64/boot/Image
+ kernel-config: |
+ CONFIG_MMU=y
+ CONFIG_ARCH_MULTI_V7=y
+ CONFIG_ARCH_VIRT=y
+ CONFIG_SOC_DRA7XX=y
+ CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
+ CONFIG_ARCH_ALPINE=y
+ CONFIG_ARM_THUMB=y
+ CONFIG_VDSO=y
+ CONFIG_CPU_IDLE=y
+ CONFIG_ARM_CPUIDLE=y
+ CONFIG_KERNEL_MODE_NEON=y
+
+ CONFIG_SERIAL_AMBA_PL011=y
+ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+
+ CONFIG_RTC_CLASS=y
+ CONFIG_RTC_HCTOSYS=y
+ CONFIG_RTC_DRV_PL031=y
+
+ CONFIG_NET_CORE=y
+ CONFIG_VIRTIO_NET=y
+
+ CONFIG_VIRTIO_BLK=y
+ CONFIG_VIRTIO_PCI=y
+ CONFIG_VIRTIO_MMIO=y
+
+ CONFIG_ATA=y
+ CONFIG_ATA_SFF=y
+ CONFIG_ATA_BMDMA=y
+ CONFIG_ATA_PIIX=y
+
+ CONFIG_PATA_PLATFORM=y
+ CONFIG_PATA_OF_PLATFORM=y
+ CONFIG_ATA_GENERIC=y
- ppc64b:
- variables:
- linux-target-arch: powerpc
-
- config:
- configure-commands:
- - yes '' | make ARCH=%{linux-target-arch} CROSS_COMPILE=%{target-stage1}- oldconfig
- build-commands:
- - make ARCH=%{linux-target-arch} CROSS_COMPILE=%{target-stage1}- zImage
- install-commands:
- - mkdir -p "%{install-root}"/boot
- - cp arch/powerpc/boot/zImage "%{install-root}"/boot/zImage
+config:
+ configure-commands:
+ - |
+ cat > config <<"EOF"
+ %{kernel-config}
- ppc64l:
- variables:
- linux-target-arch: powerpc
+ # CONFIG_EMBEDDED is not set
+ CONFIG_EARLY_PRINTK=y
+ CONFIG_BINFMT_ELF=y
+ CONFIG_BINFMT_SCRIPT=y
+ CONFIG_NO_HZ=y
+ CONFIG_HIGH_RES_TIMERS=y
- config:
- configure-commands:
- - yes '' | make ARCH=%{linux-target-arch} CROSS_COMPILE=%{target-stage1}- oldconfig
- build-commands:
- - make ARCH=%{linux-target-arch} zImage
- install-commands:
- - mkdir -p "%{install-root}"/boot
- - cp arch/powerpc/boot/zImage "%{install-root}"/boot/zImage
+ CONFIG_BLK_DEV=y
+ CONFIG_BLK_DEV_INITRD=y
+ CONFIG_RD_GZIP=y
- x86_64:
- variables:
- linux-target-arch: x86_64
+ CONFIG_BLK_DEV_LOOP=y
+ CONFIG_EXT4_FS=y
+ CONFIG_EXT4_USE_FOR_EXT2=y
+ CONFIG_VFAT_FS=y
+ CONFIG_FAT_DEFAULT_UTF8=y
+ CONFIG_MISC_FILESYSTEMS=y
+ CONFIG_SQUASHFS=y
+ CONFIG_SQUASHFS_XATTR=y
+ CONFIG_SQUASHFS_ZLIB=y
+ CONFIG_DEVTMPFS=y
+ CONFIG_DEVTMPFS_MOUNT=y
+ CONFIG_TMPFS=y
+ CONFIG_TMPFS_POSIX_ACL=y
- config:
- configure-commands:
- - scripts/config -e CONFIG_SND_INTEL8X0
- - scripts/config -m CONFIG_DRM_CIRRUS_QEMU
- - scripts/config -m CONFIG_DRM_BOCHS
- - scripts/config -m CONFIG_DRM_VIRTIO_GPU
- - scripts/config -e BT
- - yes '' | make ARCH=%{linux-target-arch} CROSS_COMPILE=%{target-stage1}- oldconfig
- build-commands:
- - make ARCH=%{linux-target-arch} CROSS_COMPILE=%{target-stage1}- $MAKEFLAGS
- install-commands:
- - mkdir -p "%{install-root}"/boot
- - make INSTALL_PATH="%{install-root}"/boot install
- - make INSTALL_MOD_PATH="%{install-root}" modules_install
- - install -d "%{install-root}%{prefix}/src/linux"
- - |
- (
- printf 'Makefile\0'
- printf 'Module.symvers\0'
- find arch/x86 -maxdepth 1 -name 'Makefile*' -print0
- find arch/x86 \( -name 'module.lds' -o -name 'Kbuild.platforms' -o -name 'Platform' \) -print0
- find arch/x86 \( -type d -a \( -name include -o -name scripts \) \) -o \
- \! -type d -a \( -path '*include/*' -o -path '*scripts/*' \) -print0
- find include -name 'asm*' -prune -o -print0
- find include/asm-generic -print0
- find include/uapi -print0
- find scripts -print0
- ) | cpio -0pumd "%{install-root}%{prefix}/src/linux"
+ CONFIG_NET=y
+ CONFIG_PACKET=y
+ CONFIG_UNIX=y
+ CONFIG_INET=y
+ CONFIG_IPV6=y
+ CONFIG_NETDEVICES=y
+ #CONFIG_NET_CORE=y
+ #CONFIG_NETCONSOLE=y
+ CONFIG_ETHERNET=y
+ EOF
+ - touch config
+ - make ARCH=%{linux-target-arch} allnoconfig KCONFIG_ALLCONFIG="config"
+ build-commands:
+ - make ARCH=%{linux-target-arch} CROSS_COMPILE=%{target-stage1}-
+ install-commands:
+ - mkdir -p %{install-root}/boot/
+ - cp %{vmlinux} %{install-root}/boot/$(basename %{vmlinux})
-config:
- configure-commands:
- - make ARCH=%{linux-target-arch} CROSS_COMPILE=%{target-stage1}- defconfig
- - |
- /bin/bash -c "
- scripts/config -e PACKET
- scripts/config -e SATA_AHCI
- scripts/config -e ATA_GENERIC
- scripts/config -e HAVE_IDE
- scripts/config -d BLK_DEV_IDE_SATA
- scripts/config -e BTRFS_FS
- scripts/config -e BTRFS_FS_POSIX_ACL
- scripts/config -e DEVTMPFS
- scripts/config -e DEVTMPFS_MOUNT
- scripts/config -e CONFIG_FHANDLE
- scripts/config -e DEVPTS_MULTIPLE_INSTANCES
- scripts/config -e CGROUPS
- scripts/config -e AUTOFS4_FS
- scripts/config --set-str UEVENT_HELPER_PATH ''
- scripts/config -e EXT2_FS
- scripts/config -e EXT2_FS_XATTR
- scripts/config -e EXT2_FS_POSIX_ACL
- scripts/config -e EXT2_FS_SECURITY
- scripts/config -e EXT2_FS_XIP
- scripts/config -e EXT3_FS
- scripts/config -d EXT3_DEFAULTS_TO_ORDERED
- scripts/config -e EXT3_FS_XATTR
- scripts/config -e EXT3_FS_POSIX_ACL
- scripts/config -e EXT3_FS_SECURITY
- scripts/config -e EXT4_FS
- scripts/config -e EXT4_FS_XATTR
- scripts/config -e EXT4_FS_POSIX_ACL
- scripts/config -e EXT4_FS_SECURITY
- scripts/config -d EXT4_DEBUG
- scripts/config -e FUSE_FS
- scripts/config -e OVERLAY_FS
- scripts/config -e XFS_FS
- scripts/config -e LIBCRC32C
- scripts/config -d JBD_DEBUG
- scripts/config -d JBD2_DEBUG
- scripts/config -e BLK_DEV_LOOP
- scripts/config -d BLK_DEV_CRYPTOLOOP
- scripts/config -e CEPH_FS
- scripts/config --set-val BLK_DEV_LOOP_MIN_COUNT 8
- scripts/config -e DM_SNAPSHOT
- scripts/config -e VIRTIO
- scripts/config -e VIRTIO_RING
- scripts/config -e VIRTIO_PCI
- scripts/config -e VIRTIO_BALLOON
- scripts/config -e VIRTIO_BLK
- scripts/config -e VIRTIO_NET
- scripts/config -e VIRTIO_CONSOLE
- scripts/config -e HW_RANDOM_VIRTIO
- scripts/config -e 9P_FS
- scripts/config -e 9P_FSCACHE
- scripts/config -e 9P_FS_POSIX_ACL
- scripts/config -e NET_9P
- scripts/config -e NET_9P_VIRTIO
- scripts/config -e R8169
- scripts/config -e 8139TOO
- scripts/config -e 8139CP
- scripts/config -e ATL1
- scripts/config -e ATL1C
- scripts/config -e ATL1E
- scripts/config -e E100
- scripts/config -e E1000
- scripts/config -e E1000E
- scripts/config -e USB_USBNET
- scripts/config -e USB_NET_AX8817X
- scripts/config -e USB_NET_AX88179_178A
- scripts/config -e USB_NET_DM9601
- scripts/config -e IKCONFIG
- scripts/config -e IKCONFIG_PROC
- scripts/config -e SECCOMP
- scripts/config -d DEBUG_STACK_TRACE
- scripts/config -e NFSD
- scripts/config -e NFSD_V3
- scripts/config -e KVM
- scripts/config -e TUN
- scripts/config -e BRIDGE
- scripts/config -e VHOST_NET
- scripts/config -e NF_NAT
- scripts/config -e IP_NF_NAT
- scripts/config -e IP_NF_TARGET_MASQUERADE
- scripts/config -e FB_VESA
- scripts/config -e HOTPLUG_PCI
- scripts/config -e HOTPLUG_PCI_ACPI
- scripts/config -e VLAN_8021Q
- scripts/config -e BRIDGE_VLAN_FILTERING
- scripts/config -e BLK_DEV_NBD
- scripts/config -e BRIDGE_NF_EBTABLES
- scripts/config -e NETFILTER
- scripts/config -e NETFILTER_ADVANCED
- scripts/config -e NETFILTER_XT_MATCH_ADDRTYPE
- scripts/config -e OPENVSWITCH
- scripts/config -e OPENVSWITCH_VXLAN
- scripts/config -e CONFIG_OPENVSWITCH_GRE
- scripts/config -e NET_CLS_BASIC
- scripts/config -e NET_SCH_INGRESS
- scripts/config -e NET_ACT_POLICE
- scripts/config -e NET_IPGRE_DEMUX
- scripts/config -e NET_SCH_HTB
- scripts/config -e NET_SCH_HFSC
- scripts/config -e VXLAN
- scripts/config -e VETH
- scripts/config -e IP_NF_MATCH_AH
- scripts/config -e IP_NF_MATCH_ECN
- scripts/config -e IP_NF_MATCH_RPFILTER
- scripts/config -e IP_NF_MATCH_TTL
- scripts/config -e IP_NF_TARGET_SYNPROXY
- scripts/config -e IP_NF_TARGET_NETMAP
- scripts/config -e IP_NF_TARGET_REDIRECT
- scripts/config -e IP_NF_TARGET_CLUSTERIP
- scripts/config -e IP_NF_TARGET_ECN
- scripts/config -e IP_NF_TARGET_TTL
- scripts/config -e IP_NF_RAW
- scripts/config -e IP_NF_SECURITY
- scripts/config -e IP_NF_ARPTABLES
- scripts/config -e KVM_INTEL
- scripts/config -e NETFILTER_NETLINK_QUEUE
- scripts/config -e SCSI_NETLINK
- scripts/config -e NETFILTER_XT_TARGET_MARK
- scripts/config -e NETFILTER_XT_SET
- scripts/config -e IP_SET
- scripts/config -e IP_SET_BITMAP_IP
- scripts/config -e IP_SET_BITMAP_IPMAC
- scripts/config -e IP_SET_BITMAP_PORT
- scripts/config -e IP_SET_HASH_IP
- scripts/config -e IP_SET_HASH_IPMARK
- scripts/config -e IP_SET_HASH_IPPORT
- scripts/config -e IP_SET_HASH_IPPORTIP
- scripts/config -e IP_SET_HASH_IPPORTNET
- scripts/config -e IP_SET_HASH_MAC
- scripts/config -e IP_SET_HASH_NETPORTNET
- scripts/config -e IP_SET_HASH_NET
- scripts/config -e IP_SET_HASH_NETNET
- scripts/config -e IP_SET_HASH_NETPORT
- scripts/config -e IP_SET_HASH_NETIFACE
- scripts/config -e IP_SET_LIST_SET
- scripts/config -e NF_CONNTRACK_TIMEOUT
- scripts/config -e NF_CONNTRACK_TIMESTAMP
- scripts/config -e NF_CONNTRACK_EVENTS
- scripts/config -e NF_CONNTRACK_LABELS
- scripts/config -e NETFILTER_NETLINK_ACCT
- scripts/config -e NETFILTER_NETLINK_QUEUE_CT
- scripts/config -e NF_CT_PROTO_DCCP
- scripts/config -e NF_CT_PROTO_GRE
- scripts/config -e NF_CT_PROTO_SCTP
- scripts/config -e NF_CT_PROTO_UDPLITE
- scripts/config -e NF_CT_NETLINK_TIMEOUT
- scripts/config -e NF_CT_NETLINK_HELPER
- scripts/config -e NF_CONNTRACK_AMANDA
- scripts/config -e NF_CONNTRACK_H323
- scripts/config -e NF_CONNTRACK_BROADCAST
- scripts/config -e NF_CONNTRACK_NETBIOS_NS
- scripts/config -e NF_CONNTRACK_SNMP
- scripts/config -e NF_CONNTRACK_PPTP
- scripts/config -e NF_CONNTRACK_SANE
- scripts/config -e NF_CONNTRACK_TFTP
- scripts/config -e NF_LOG_COMMON
- scripts/config -e NF_NAT_PROTO_DCCP
- scripts/config -e NF_NAT_PROTO_UDPLITE
- scripts/config -e NF_NAT_PROTO_SCTP
- scripts/config -e NF_NAT_AMANDA
- scripts/config -e NF_NAT_TFTP
- scripts/config -e NF_TABLES
- scripts/config -e NF_TABLES_INET
- scripts/config -e NFT_COMPAT
- scripts/config -e NFT_EXTHDR
- scripts/config -e NFT_META
- scripts/config -e NFT_CT
- scripts/config -e NFT_LIMIT
- scripts/config -e NFT_NAT
- scripts/config -e NFT_QUEUE
- scripts/config -e NFT_REJECT
- scripts/config -e NFT_REJECT_INET
- scripts/config -e NFT_RBTREE
- scripts/config -e NFT_HASH
- scripts/config -e NFT_COUNTER
- scripts/config -e NFT_LOG
- scripts/config -e NFT_MASQ
- scripts/config -e NETFILTER_XT_CONNMARK
- scripts/config -e NETFILTER_XT_TARGET_AUDIT
- scripts/config -e NETFILTER_XT_TARGET_CHECKSUM
- scripts/config -e NETFILTER_XT_TARGET_CLASSIFY
- scripts/config -e NETFILTER_XT_TARGET_CT
- scripts/config -e NETFILTER_XT_TARGET_DSCP
- scripts/config -e NETFILTER_XT_TARGET_HMARK
- scripts/config -e NETFILTER_XT_TARGET_LED
- scripts/config -e NETFILTER_XT_TARGET_LOG
- scripts/config -e NETFILTER_XT_TARGET_NFQUEUE
- scripts/config -e NETFILTER_XT_TARGET_RATEEST
- scripts/config -e NETFILTER_XT_TARGET_TPROXY
- scripts/config -e NETFILTER_XT_TARGET_TCPOPTSTRIP
- scripts/config -e NETFILTER_XT_TARGET_TEE
- scripts/config -e NETFILTER_XT_TARGET_TRACE
- scripts/config -e NETFILTER_XT_TARGET_IDLETIMER
- scripts/config -e NETFILTER_XT_MATCH_BPF
- scripts/config -e NETFILTER_XT_MATCH_CLUSTER
- scripts/config -e NETFILTER_XT_MATCH_COMMENT
- scripts/config -e NETFILTER_XT_MATCH_CONNBYTES
- scripts/config -e NETFILTER_XT_MATCH_CONNLABEL
- scripts/config -e NETFILTER_XT_MATCH_CONNLIMIT
- scripts/config -e NETFILTER_XT_MATCH_CPU
- scripts/config -e NETFILTER_XT_MATCH_DCCP
- scripts/config -e NETFILTER_XT_MATCH_DEVGROUP
- scripts/config -e NETFILTER_XT_MATCH_DSCP
- scripts/config -e NETFILTER_XT_MATCH_ESP
- scripts/config -e NETFILTER_XT_MATCH_HASHLIMIT
- scripts/config -e NETFILTER_XT_MATCH_HELPER
- scripts/config -e NETFILTER_XT_MATCH_IPCOMP
- scripts/config -e NETFILTER_XT_MATCH_IPRANGE
- scripts/config -e NETFILTER_XT_MATCH_IPVS
- scripts/config -e NETFILTER_XT_MATCH_L2TP
- scripts/config -e NETFILTER_XT_MATCH_LENGTH
- scripts/config -e NETFILTER_XT_MATCH_LIMIT
- scripts/config -e NETFILTER_XT_MATCH_MAC
- scripts/config -e NETFILTER_XT_MATCH_MULTIPORT
- scripts/config -e NETFILTER_XT_MATCH_NFACCT
- scripts/config -e NETFILTER_XT_MATCH_OSF
- scripts/config -e NETFILTER_XT_MATCH_OWNER
- scripts/config -e NETFILTER_XT_MATCH_CGROUP
- scripts/config -e NETFILTER_XT_MATCH_PHYSDEV
- scripts/config -e NETFILTER_XT_MATCH_PKTTYPE
- scripts/config -e NETFILTER_XT_MATCH_QUOTA
- scripts/config -e NETFILTER_XT_MATCH_RATEEST
- scripts/config -e NETFILTER_XT_MATCH_REALM
- scripts/config -e NETFILTER_XT_MATCH_RECENT
- scripts/config -e NETFILTER_XT_MATCH_SCTP
- scripts/config -e NETFILTER_XT_MATCH_SOCKET
- scripts/config -e NETFILTER_XT_MATCH_STATISTIC
- scripts/config -e NETFILTER_XT_MATCH_STRING
- scripts/config -e NETFILTER_XT_MATCH_TCPMSS
- scripts/config -e NETFILTER_XT_MATCH_TIME
- scripts/config -e NETFILTER_XT_MATCH_U32
- scripts/config -e IP_VS
- scripts/config -e BRIDGE_NETFILTER
- scripts/config -e CRYPTO_CRC32C
- scripts/config -e CONFIGFS_FS
- scripts/config -e EXPERT
- scripts/config -e TARGET_CORE
- scripts/config -e ISCSI_TARGET
- scripts/config -e TCM_IBLOCK
- scripts/config -e TCM_FILEIO
- scripts/config -e TCM_PSCSI
- scripts/config -e TCM_USER
- scripts/config -e CONFIG_UIO
- scripts/config -e LOOPBACK_TARGET
- scripts/config -e TCM_FC
- scripts/config -e LIBFC
- scripts/config -e SCSI_FC_ATTRS
- scripts/config -e SCSI_ISCSI_ATTRS
- scripts/config -e ISCSI_TCP
- scripts/config -e SCSI_LOWLEVEL
- scripts/config -e SCSI_VIRTIO
- scripts/config -e HYPERVISOR_GUEST
- scripts/config -e PARAVIRT2
- "