remove petitboot

It doesn't build, and hasn't been able to build in a long time. The point of
petitboot was to enable booting an image from uSD. Initially the rockchip
bootloaders did not support booting from uSD. However, more recent rockchip
bootloaders do support booting an image from uSD. If your board doesn't
support booting from uSD, try updating your device's in-flash bootloader.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
This commit is contained in:
Trevor Woerner 2018-04-11 23:23:39 -04:00
parent 95c6ec2ece
commit 42176d5b36
8 changed files with 2 additions and 413 deletions

53
README
View File

@ -1,6 +1,5 @@
This README file contains information on building the meta-rockchip
BSP layer, and booting images.
Please see the corresponding sections below for details.
This README file contains information on building with the meta-rockchip BSP
layer.
Dependencies
============
@ -39,13 +38,6 @@ available here:
Please also send your patches by using git send-email and prefix your subject
by "[meta-rockchip]".
Table of Contents
=================
I. Configure yocto/oe environment
II. Building a second level bootloader based on kexec
III. Booting your device
I. Configure yocto/oe environment
=================================
@ -80,44 +72,3 @@ You should then be able to build a image as such:
At the end of a successful build, you should have an image in
tmp-glibc/deploy/images/<MACHINE>/<IMAGE_NAME>
II. Building a second level bootloader based on kexec
=====================================================
This BSP contains "Petitboot", a kexec-based second leval bootloader.
As all available bootloaders provided by Rockchip are very limited and do not allow
to boot from a block device containing a file system or from the network, we decided
to use Petitboot, which just needs a minimalistic kernel to work.
See https://www.kernel.org/pub/linux/kernel/people/geoff/petitboot/petitboot.html
In a terminal, just type the following command:
~/yocto $ bitbake linux-petitboot
At the end of a successful build, you should have an image
/path/to/yocto/build/tmp/deploy/<MACHINE>/RK3XPetitbootLoader-<MACHINE>.bin.
This image is already to the right format, so you can directly flash it as a
kernel image to a Rockchip device with upgrade_tool.
III. Booting your device
========================
Petitboot allows you to boot a kernel from the EMMC, an SDCARD, an USB storage
device or even tthe network (it just needs to be supported by the Linux kernel).
In order to do so, you need to put a configuration file at the root of the target
device. Petitboot supports differents kind of configuration files, in this example
we will an SDCARD and a kboot configuration file.
Copy your kernel image and your dtb under the /boot directory, on your device.
Then create a kboot.conf in / and add the following content:
linux-next from sdcard='/boot/zImage dtb=/boot/<MACHINE>.dtb root=/dev/mmcblk0p2 rootwait console=ttyS2,115200 earlyprintk'
linux-next from tftp='tftp://192.168.0.5/zImage dtb=tftp://192.168.0.5/<MACHINE>.dtb root=/dev/mmcblk0p2 rootwait console=ttyS2,115200 earlyprintk'
# You can also use nfs
# nfs='nfs://192.168.0.5/fire/boot/vmlinux.strip root=/dev/nfs rw ip=dhcp video=1080p fbcon=rotate:3'
# Or http and nfs mixed together
# http_nfs='http://192.168.0.5/ice/boot/vmlinux.strip nfs://192.168.0.5/ice/boot/initrd root=/dev/nfs'
Then, plug your SDCARD into your Rockchip device and power on the board. If
everything worked fine, Petitboot should be started automatically and list all
entries found in the configuration file.

View File

@ -1,28 +0,0 @@
# Copyright (C) 2015 Romain Perier <romain.perier@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
inherit gettext autotools
DESCRIPTION = "Petitboot kexec bootloader"
HOMEPAGE = "https://www.kernel.org/pub/linux/kernel/people/geoff/petitboot/petitboot.html"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
DEPENDS = "udev ncurses"
RDEPENDS_${PN} = "libudev ncurses-libncurses ncurses-libtinfo ncurses-libmenu ncurses-libform kexec udev"
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/geoff/petitboot.git"
SRCREV_pn-${PN} = "e330e3f5adf78d3ba77217995a4bc3cd1fd16f4c"
PV = "git+20141211-e330e3"
S = "${WORKDIR}/git"
B = "${S}"
EXTRA_OECONF = "--enable-busybox --with-twin-x11=no --with-twin-fbdev=no"
PARALLEL_MAKE = ""
do_configure() {
olddir=`pwd`
cd ${S}
./bootstrap
cd $olddir
export CURSES_LIB=-lncurses HOST_PROG_KEXEC=/usr/sbin/kexec
oe_runconf
}

View File

@ -1,19 +0,0 @@
# Copyright (C) 2015 Romain Perier <romain.perier@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
PACKAGE_INSTALL = "initramfs-boot-petitboot busybox base-files petitboot ${ROOTFS_BOOTSTRAP_INSTALL}"
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""
export IMAGE_BASENAME = "petitboot-initramfs-image"
IMAGE_LINGUAS = ""
LICENSE = "MIT"
IMAGE_FSTYPES = "cpio.xz"
inherit core-image
IMAGE_ROOTFS_SIZE = "8192"
BAD_RECOMMENDATIONS += "busybox-syslog"

View File

@ -1,18 +0,0 @@
#!/bin/sh
# Copyright (C) 2015 Romain Perier <romain.perier@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
PATH=/sbin:/bin:/usr/sbin:/usr/bin
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t devtmpfs dev /dev
mkdir /var/volatile/log /var/volatile/tmp
/lib/udev/udevd --daemon
pb-discover --verbose -l /var/log/pb-discover.log &
udevadm trigger --action=add
udevadm settle
clear
export TERM=screen
petitboot-nc

View File

@ -1,19 +0,0 @@
# Copyright (C) 2015 Romain Perier <romain.perier@gmail.com>
# Released under the MIT license (see COPYING.MIT for the terms)
inherit allarch
SUMMARY = "Extremely basic init script which starts Petitboot"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://init-boot-petitboot.sh"
do_install() {
install -d ${D}/dev
mknod -m 600 ${D}/dev/console c 5 1
mknod -m 666 ${D}/dev/null c 1 3
install -m 0755 ${WORKDIR}/init-boot-petitboot.sh ${D}/init
}
FILES_${PN} += " /init /dev/console /dev/null "

View File

@ -1,46 +0,0 @@
From 60eb1f94a1747e721bb7ce29524c9acd06a887b8 Mon Sep 17 00:00:00 2001
From: Heiko Stuebner <heiko@sntech.de>
Date: Fri, 20 Feb 2015 01:31:57 +0100
Subject: [PATCH] ARM: dts: rockchip: enable gmac on rk3288-firefly
This was left out of the original firefly board definition due to the
ethernet support going completely through the network tree, making the
underlying nodes unavailable.
Now that everything is present enable the gmac on the firefly.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
arch/arm/boot/dts/rk3288-firefly.dtsi | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index e6f873a..9851453 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -179,6 +179,22 @@
status = "okay";
};
+&gmac {
+ assigned-clocks = <&cru SCLK_MAC>;
+ assigned-clock-parents = <&ext_gmac>;
+ clock_in_out = "input";
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
+ phy-supply = <&vcc_lan>;
+ phy-mode = "rgmii";
+ snps,reset-active-low;
+ snps,reset-delays-us = <0 10000 1000000>;
+ snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
+ tx_delay = <0x30>;
+ rx_delay = <0x10>;
+ status = "ok";
+};
+
&hdmi {
ddc-i2c-bus = <&i2c5>;
status = "okay";
--
1.9.1

View File

@ -1,186 +0,0 @@
CONFIG_CROSS_COMPILE="arm-linux-gnueabi-"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_KERNEL_LZO=y
CONFIG_DEFAULT_HOSTNAME="rockchip"
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
# CONFIG_USELIB is not set
CONFIG_BLK_DEV_INITRD=y
# CONFIG_RD_GZIP is not set
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_COMPAT_BRK is not set
CONFIG_SLAB=y
CONFIG_JUMP_LABEL=y
CONFIG_CC_STACKPROTECTOR_REGULAR=y
CONFIG_PARTITION_ADVANCED=y
# CONFIG_EFI_PARTITION is not set
# CONFIG_IOSCHED_CFQ is not set
CONFIG_ARCH_ROCKCHIP=y
CONFIG_PL310_ERRATA_588369=y
CONFIG_PL310_ERRATA_727915=y
CONFIG_ARM_ERRATA_720789=y
CONFIG_ARM_ERRATA_754322=y
CONFIG_SMP=y
CONFIG_PREEMPT=y
CONFIG_AEABI=y
CONFIG_HIGHMEM=y
# CONFIG_COMPACTION is not set
CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
CONFIG_CLEANCACHE=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND=y
CONFIG_CMDLINE="console=ttyS2,115200 quiet"
CONFIG_CMDLINE_FORCE=y
CONFIG_KEXEC=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
CONFIG_CPUFREQ_DT=y
CONFIG_CPU_IDLE=y
CONFIG_VFP=y
CONFIG_NEON=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_INET_DIAG is not set
# CONFIG_IPV6 is not set
CONFIG_CFG80211_WEXT=y
CONFIG_RFKILL=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=1
CONFIG_BLK_DEV_RAM_SIZE=16384
CONFIG_SRAM=y
CONFIG_SCSI=y
# CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=y
# CONFIG_SCSI_LOWLEVEL is not set
CONFIG_NETDEVICES=y
CONFIG_EMAC_ROCKCHIP=y
# CONFIG_NET_CADENCE is not set
# CONFIG_NET_VENDOR_BROADCOM is not set
# CONFIG_NET_VENDOR_CIRRUS is not set
# CONFIG_NET_VENDOR_FARADAY is not set
# CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_SAMSUNG is not set
# CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SMSC is not set
CONFIG_STMMAC_ETH=y
# CONFIG_NET_VENDOR_VIA is not set
# CONFIG_NET_VENDOR_WIZNET is not set
CONFIG_SMSC_PHY=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=800
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=600
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_GPIO=y
CONFIG_KEYBOARD_GPIO_POLLED=y
# CONFIG_INPUT_MOUSE is not set
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_INPUT_MISC=y
# CONFIG_SERIO is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_DEVKMEM is not set
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_DW=y
# CONFIG_HW_RANDOM is not set
CONFIG_I2C_GPIO=y
CONFIG_I2C_RK3X=y
CONFIG_SPI=y
CONFIG_SPI_ROCKCHIP=y
CONFIG_GPIO_DWAPB=y
CONFIG_POWER_SUPPLY=y
CONFIG_POWER_RESET=y
CONFIG_ROCKCHIP_IODOMAIN=y
CONFIG_SENSORS_IIO_HWMON=y
CONFIG_THERMAL=y
CONFIG_CPU_THERMAL=y
CONFIG_MFD_RK808=y
CONFIG_MFD_TPS65910=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_ACT8865=y
CONFIG_REGULATOR_FAN53555=y
CONFIG_REGULATOR_RK808=y
CONFIG_DRM=y
CONFIG_DRM_ROCKCHIP=y
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_PWM=y
CONFIG_USB=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_OTG=y
CONFIG_USB_MON=y
CONFIG_USB_DWC2=y
CONFIG_USB_DWC2_PLATFORM=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_USB_ULPI=y
CONFIG_MMC=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_HYM8563=y
CONFIG_RTC_DRV_RK808=y
CONFIG_DMADEVICES=y
CONFIG_DMADEVICES_DEBUG=y
CONFIG_DMADEVICES_VDEBUG=y
CONFIG_PL330_DMA=y
CONFIG_ASYNC_TX_DMA=y
CONFIG_STAGING=y
CONFIG_R8188EU=y
CONFIG_R8723AU=y
CONFIG_COMMON_CLK_RK808=y
CONFIG_ROCKCHIP_IOMMU=y
CONFIG_IIO=y
CONFIG_ROCKCHIP_SARADC=y
CONFIG_INV_MPU6050_IIO=y
CONFIG_AK8975=y
CONFIG_PWM=y
CONFIG_PWM_ROCKCHIP=y
CONFIG_GENERIC_PHY=y
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
# CONFIG_EXT3_FS_XATTR is not set
CONFIG_EXT4_FS=y
# CONFIG_DNOTIFY is not set
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
# CONFIG_MISC_FILESYSTEMS is not set
# CONFIG_NETWORK_FILESYSTEMS is not set
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_850=m
CONFIG_NLS_CODEPAGE_852=m
CONFIG_NLS_ASCII=m
CONFIG_NLS_ISO8859_1=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_UTF8=m
CONFIG_DYNAMIC_DEBUG=y
# CONFIG_ENABLE_WARN_DEPRECATED is not set
# CONFIG_ENABLE_MUST_CHECK is not set
CONFIG_FRAME_WARN=2048
# CONFIG_CRYPTO_HW is not set
CONFIG_XZ_DEC=y

View File

@ -1,46 +0,0 @@
# Copyright (C) 2015 Romain Perier
# Released under the MIT license (see COPYING.MIT for the terms)
inherit kernel
require recipes-kernel/linux/linux-yocto.inc
SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git;nobranch=1 \
file://0001-ARM-dts-rockchip-enable-gmac-on-rk3288-firefly.patch \
file://defconfig"
SRCREV = "39a8804455fb23f09157341d3ba7db6d7ae6ee76"
# Override this variable in order to don't pass --noallconfig to configme,
# which restarts configuration from scratch most of the time
KCONFIG_MODE = " "
LINUX_VERSION = "4.0"
# Override local version in order to use the one generated by linux build system
# And not "yocto-standard"
LINUX_VERSION_EXTENSION = ""
PR = "r1"
PV = "${LINUX_VERSION}"
PROVIDES = "${PN}"
DEPENDS += "rkflashtool-native"
# Include only supported boards for now
COMPATIBLE_MACHINE = "(radxarock|marsboard-rk3066|firefly-rk3288)"
# Build the devicetree blob in kernel_do_compile
KERNEL_ALT_IMAGETYPE = "${KERNEL_DEVICETREE}"
# The resulting image to be deployed in DEPLOY_IMAGE_DIR
KERNEL_OUTPUT = "${B}/arch/${ARCH}/boot/${KERNEL_IMAGETYPE}-dtb"
KERNEL_IMAGE_BASE_NAME = "RK3XPetitbootLoader-${PV}-${MACHINE}"
KERNEL_IMAGE_SYMLINK_NAME = "RK3XPetitbootLoader-${MACHINE}"
INITRAMFS_IMAGE = "petitboot-initramfs-image"
INITRAMFS_TASK = "${INITRAMFS_IMAGE}:do_rootfs"
do_compile_append() {
cat ${B}/arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${B}/arch/${ARCH}/boot/dts/${KERNEL_ALT_IMAGETYPE} > ${KERNEL_OUTPUT}
}
do_deploy_append() {
rkcrc -k ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.img
mv ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.img ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
}