diffstat for flash-kernel-3.75 flash-kernel-3.75ev3dev10 README | 7 +++ bootscript/armhf/bootscr.beaglebone | 60 ------------------------------- db/all.db | 69 +++++++++++++++++++++++++++++++----- debian/changelog | 61 +++++++++++++++++++++++++++++++ debian/control | 7 +-- debian/gbp.conf | 6 +++ debian/release.sh | 24 ++++++++++++ debian/rules | 12 +++--- functions | 52 ++++++++++++++++++++++----- test_db | 2 - uenv/armhf/uenv.beaglebone | 5 ++ 11 files changed, 216 insertions(+), 89 deletions(-) diff -Nru flash-kernel-3.75/README flash-kernel-3.75ev3dev10/README --- flash-kernel-3.75/README 2016-08-07 03:01:44.000000000 +0000 +++ flash-kernel-3.75ev3dev10/README 2018-06-18 16:44:23.000000000 +0000 @@ -40,6 +40,7 @@ - LaCie Network Space v2 - LaCie Network Space Max v2 - LaCie d2 Network v2 + - LEGO MINDSTORMS EV3 - Linksys NSLU2 - Marvell DB-78x00-BP Development Board - Marvell OpenRD-Base @@ -57,6 +58,9 @@ - QNAP TS-409 - QNAP TS-410 and TS-410U Turbo NAS - QNAP TS-419P and TS-419U Turbo NAS + - Raspberry Pi Zero Wireless + - Raspberry Pi + - Raspberry Pi 2/3 - Seagate FreeAgent DockStar - Seagate NAS (2 and 4 bay) - Seagate Personal Cloud (1 and 2 bay) @@ -123,6 +127,9 @@ which should be run. The script must produce the DTB filename (just the filename, without a vendor subdirectory) on stdout (and nothing else). +* DTB-Alt-Ids: (optional) specifies the names of one or more DTB files for this + device relative to the kernel package DTB dir or /etc/flash-kernel/dtbs. + * DTB-Append: (optional) when yes the DTB specified by DTB-Id will be appended to the kernel image. diff -Nru flash-kernel-3.75/bootscript/armhf/bootscr.beaglebone flash-kernel-3.75ev3dev10/bootscript/armhf/bootscr.beaglebone --- flash-kernel-3.75/bootscript/armhf/bootscr.beaglebone 2016-02-21 04:01:42.000000000 +0000 +++ flash-kernel-3.75ev3dev10/bootscript/armhf/bootscr.beaglebone 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -# boot script for BeagleBone Black - -# BeagleBone white uses a different .dtb file, and flash-kernel is -# currently unable to support multiple .dtb files. -if test "${board_name}" = "A335BONE" -then - echo "BeagleBone white detected, unsupported platform." - echo "Exiting in 10 seconds..." - sleep 10 - exit -fi - -if test "${devtype}" = "" -then - setenv device mmc -else - # use device provided by distro_bootcmd - setenv device "${devtype}" -fi - -if test "${devnum}" = "" -then - setenv partition ${bootpart} -elif test "${distro_bootpart}" = "" -then - # use partition provided by bootpart - setenv partition ${devnum}:${bootpart} -else - # use partition provided by distro_bootpart - setenv partition ${devnum}:${distro_bootpart} -fi - -setenv bootargs @@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@ - -if test "${prefix}" = "" -then - setenv image_locations '/boot/ /' -else - # use prefix provided by distro_bootcmd - setenv image_locations "${prefix}" -fi - -if test -z "${fk_kvers}"; then - setenv fk_kvers '@@KERNEL_VERSION@@' -fi - -if test -n "${fdtfile}"; then - setenv fdtpath dtbs/${fk_kvers}/${fdtfile} -else - setenv fdtpath dtb-${fk_kvers} -fi - -for pathprefix in ${image_locations} -do - load ${device} ${partition} ${loadaddr} ${pathprefix}vmlinuz-${fk_kvers} \ - && load ${device} ${partition} ${fdtaddr} ${pathprefix}${fdtpath} \ - && load ${device} ${partition} ${rdaddr} ${pathprefix}initrd.img-${fk_kvers} \ - && echo "Booting Debian ${fk_kvers} from ${device} ${partition}..." \ - && bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr} -done diff -Nru flash-kernel-3.75/db/all.db flash-kernel-3.75ev3dev10/db/all.db --- flash-kernel-3.75/db/all.db 2017-01-15 04:01:54.000000000 +0000 +++ flash-kernel-3.75ev3dev10/db/all.db 2018-07-09 00:10:59.000000000 +0000 @@ -719,6 +719,14 @@ Mtd-Initrd: ramdisk.gz Bootloader-Sets-Incorrect-Root: yes +Machine: LEGO MINDSTORMS EV3 +Kernel-Flavors: ev3 +Boot-Script-Path: /boot/boot.scr +DTB-Id: da850-lego-ev3.dtb +DTB-Alt-Ids: da850-lego-ev3-lms2012.dtb da850-lego-ev3-adafruit18.dtb da850-lego-ev3-color.dtb +U-Boot-Script-Name: bootscr.uboot-generic +Required-Packages: u-boot-tools + Machine: LeMaker Banana Pi Kernel-Flavors: armmp armmp-lpae Boot-Script-Path: /boot/boot.scr @@ -1237,12 +1245,55 @@ U-Boot-Script-Name: bootscr.sunxi Required-Packages: u-boot-tools +Machine: Raspberry Pi Zero W Rev 1.1 +Kernel-Flavors: rpi rpi-rpfv +DTB-Id: bcm2708-rpi-0-w.dtb +Boot-Kernel-Path: kernel.img +Boot-DTB-Path: bcm2708-rpi-0-w.dtb +Boot-Device: /dev/mmcblk0p1 + +Machine: Raspberry Pi Model B +Machine: Raspberry Pi Model B Rev 1 +Machine: Raspberry Pi Model B Rev 2 +Kernel-Flavors: rpi rpi-rpfv +DTB-Id: bcm2708-rpi-b.dtb +Boot-Kernel-Path: kernel.img +Boot-DTB-Path: bcm2708-rpi-b.dtb +Boot-Device: /dev/mmcblk0p1 + +Machine: Raspberry Pi Model B Plus +Machine: Raspberry Pi Model B Plus Rev 1.0 +Machine: Raspberry Pi Model B Plus Rev 1.1 +Machine: Raspberry Pi Model B Plus Rev 1.2 +Kernel-Flavors: rpi rpi-rpfv +DTB-Id: bcm2708-rpi-b-plus.dtb +Boot-Kernel-Path: kernel.img +Boot-DTB-Path: bcm2708-rpi-b-plus.dtb +Boot-Device: /dev/mmcblk0p1 + Machine: Raspberry Pi 2 Model B -Kernel-Flavors: armmp armmp-lpae -DTB-Id: bcm2836-rpi-2-b.dtb -U-Boot-Script-Name: bootscr.uboot-generic -Required-Packages: u-boot-tools -Boot-Script-Path: /boot/boot.scr +Machine: Raspberry Pi 2 Model B Rev 1.0 +Machine: Raspberry Pi 2 Model B Rev 1.1 +Machine: Raspberry Pi 2 Model B Rev 1.2 +Kernel-Flavors: rpi2 rpi2-rpfv +DTB-Id: bcm2709-rpi-2-b.dtb +Boot-Kernel-Path: kernel7.img +Boot-DTB-Path: bcm2709-rpi-2-b.dtb +Boot-Device: /dev/mmcblk0p1 + +Machine: Raspberry Pi 3 Model B Rev 1.2 +Kernel-Flavors: rpi2 rpi2-rpfv +DTB-Id: bcm2710-rpi-3-b.dtb +Boot-Kernel-Path: kernel7.img +Boot-DTB-Path: bcm2710-rpi-3-b.dtb +Boot-Device: /dev/mmcblk0p1 + +Machine: Raspberry Pi 3 Model B Plus Rev 1.3 +Kernel-Flavors: rpi2 rpi2-rpfv +DTB-Id: bcm2710-rpi-3-b-plus.dtb +Boot-Kernel-Path: kernel7.img +Boot-DTB-Path: bcm2710-rpi-3-b-plus.dtb +Boot-Device: /dev/mmcblk0p1 Machine: Seagate FreeAgent Dockstar Machine: Seagate FreeAgent DockStar @@ -1331,10 +1382,10 @@ Machine: TI AM335x BeagleBone Machine: TI AM335x BeagleBone Black -Kernel-Flavors: armmp -DTB-Id: am335x-boneblack.dtb -Boot-Script-Path: /boot/boot.scr -U-Boot-Script-Name: bootscr.beaglebone +Machine: TI AM335x BeagleBone Green +Kernel-Flavors: bb.org +U-Env-Path: /boot/uEnv.txt +U-Env-Name: uenv.beaglebone Required-Packages: u-boot-tools Machine: TI AM5728 BeagleBoard-X15 diff -Nru flash-kernel-3.75/debian/changelog flash-kernel-3.75ev3dev10/debian/changelog --- flash-kernel-3.75/debian/changelog 2017-01-18 06:00:43.000000000 +0000 +++ flash-kernel-3.75ev3dev10/debian/changelog 2018-07-09 00:11:46.000000000 +0000 @@ -1,3 +1,64 @@ +flash-kernel (3.75ev3dev10) stable; urgency=medium + + * Add da850-lego-ev3-adafruit18.dtb to LEGO MINDSTORMS EV3 + + -- David Lechner Sun, 08 Jul 2018 19:11:46 -0500 + +flash-kernel (3.75ev3dev9) stable; urgency=medium + + * Add da850-lego-ev3-color.dtb to LEGO MINDSTORMS EV3 + + -- David Lechner Wed, 13 Jun 2018 17:53:56 -0500 + +flash-kernel (3.75ev3dev8) stable; urgency=medium + + * Add DTB-Alt-Ids field for supporting more than one DTB file for a board + * update LEGO MINDSTORMS EV3 to use generic boot script + + -- David Lechner Thu, 24 May 2018 16:23:44 -0500 + +flash-kernel (3.75ev3dev7) stable; urgency=medium + + * fix RPi3B+ model name + + -- David Lechner Sun, 15 Apr 2018 21:31:11 -0500 + +flash-kernel (3.75ev3dev6) stable; urgency=medium + + * Add Raspberry Pi 3 Model B+ + + -- David Lechner Mon, 09 Apr 2018 21:07:07 -0500 + +flash-kernel (3.75ev3dev5) testing; urgency=medium + + * Add Raspberry Pi Zero Wireless + + -- David Lechner Fri, 08 Sep 2017 19:17:20 -0500 + +flash-kernel (3.75ev3dev4) testing; urgency=medium + + * Fix lms2012-compat kernel flavor + + -- David Lechner Tue, 25 Jul 2017 10:31:15 -0500 + +flash-kernel (3.75ev3dev3) testing; urgency=medium + + * Update EV3 entry for device tree + + -- David Lechner Mon, 27 Mar 2017 19:05:48 -0500 + +flash-kernel (3.75ev3dev2) testing; urgency=medium + + * Fix uenv directory path + + -- David Lechner Fri, 24 Mar 2017 18:53:11 -0500 + +flash-kernel (3.75ev3dev1) testing; urgency=medium + + * ev3dev takeover with patches from jessie + + -- David Lechner Fri, 24 Mar 2017 17:41:27 -0500 + flash-kernel (3.75) unstable; urgency=medium [ Vagrant Cascadian ] diff -Nru flash-kernel-3.75/debian/control flash-kernel-3.75ev3dev10/debian/control --- flash-kernel-3.75/debian/control 2016-01-30 04:03:37.000000000 +0000 +++ flash-kernel-3.75ev3dev10/debian/control 2017-03-24 22:00:26.000000000 +0000 @@ -1,11 +1,8 @@ Source: flash-kernel Section: utils Priority: optional -Maintainer: Debian Install System Team -Uploaders: Loïc Minier , - Hector Oron , - Christian Perrier , - Ian Campbell +Maintainer: David Lechner +XSBC-Original-Maintainer: Debian Install System Team Build-Depends: debhelper (>= 9), devio, linux-base (>= 3.2), dash Standards-Version: 3.9.6 Vcs-Browser: https://anonscm.debian.org/cgit/d-i/flash-kernel.git diff -Nru flash-kernel-3.75/debian/gbp.conf flash-kernel-3.75ev3dev10/debian/gbp.conf --- flash-kernel-3.75/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 +++ flash-kernel-3.75ev3dev10/debian/gbp.conf 2017-03-24 22:01:32.000000000 +0000 @@ -0,0 +1,6 @@ +[DEFAULT] +debian-branch=ev3dev-stretch +debian-tag=ev3dev-stretch/%(version)s + +upstream-branch=master +upstream-tag=%(version)s diff -Nru flash-kernel-3.75/debian/release.sh flash-kernel-3.75ev3dev10/debian/release.sh --- flash-kernel-3.75/debian/release.sh 1970-01-01 00:00:00.000000000 +0000 +++ flash-kernel-3.75ev3dev10/debian/release.sh 2018-04-10 02:25:08.000000000 +0000 @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Maintainer script for publishing releases. + +set -e + +source=$(dpkg-parsechangelog -S Source) +version=$(dpkg-parsechangelog -S Version) +distribution=$(dpkg-parsechangelog -S Distribution) +codename=$(debian-distro-info --codename --${distribution}) + +OS=debian DIST=${codename} ARCH=armhf pbuilder-ev3dev build +OS=debian DIST=${codename} ARCH=armel PBUILDER_OPTIONS="--binary-arch" pbuilder-ev3dev build +OS=raspbian DIST=${codename} ARCH=armhf pbuilder-ev3dev build + +debsign ~/pbuilder-ev3dev/debian/${codename}-armhf/${source}_${version}_armhf.changes +debsign ~/pbuilder-ev3dev/debian/${codename}-armel/${source}_${version}_armel.changes +debsign ~/pbuilder-ev3dev/raspbian/${codename}-armhf/${source}_${version}_armhf.changes + +dput ev3dev-debian ~/pbuilder-ev3dev/debian/${codename}-armhf/${source}_${version}_armhf.changes +dput ev3dev-debian ~/pbuilder-ev3dev/debian/${codename}-armel/${source}_${version}_armel.changes +dput ev3dev-raspbian ~/pbuilder-ev3dev/raspbian/${codename}-armhf/${source}_${version}_armhf.changes + +gbp buildpackage --git-tag-only diff -Nru flash-kernel-3.75/debian/rules flash-kernel-3.75ev3dev10/debian/rules --- flash-kernel-3.75/debian/rules 2015-06-11 03:02:10.000000000 +0000 +++ flash-kernel-3.75ev3dev10/debian/rules 2018-05-24 01:56:13.000000000 +0000 @@ -4,12 +4,6 @@ AUTOGEN_DEB_FILES := flash-kernel.templates flash-kernel-installer.postinst default/flash-kernel -ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes)) -DEFAULT_CMDLINE := quiet splash -else -DEFAULT_CMDLINE := quiet -endif - override_dh_auto_install: for i in $(AUTOGEN_DEB_FILES); do \ sed "s/@DEFAULT_CMDLINE@/$(DEFAULT_CMDLINE)/" \ @@ -22,6 +16,12 @@ install -m0644 bootscript/$${arch}/bootscr.* \ debian/flash-kernel/etc/flash-kernel/bootscript/ ; \ done + install -m0755 -p -d debian/flash-kernel/etc/flash-kernel/uenv + set -ex ; for arch in all $(DEB_HOST_ARCH) ; do \ + [ -d uenv/$${arch} ] || continue ; \ + install -m0644 uenv/$${arch}/uenv.* \ + debian/flash-kernel/etc/flash-kernel/uenv/ ; \ + done dh_auto_install diff -Nru flash-kernel-3.75/functions flash-kernel-3.75ev3dev10/functions --- flash-kernel-3.75/functions 2017-01-03 04:01:53.000000000 +0000 +++ flash-kernel-3.75ev3dev10/functions 2018-06-18 16:44:23.000000000 +0000 @@ -20,6 +20,7 @@ # USA. BOOTSCRIPTS_DIR="${FK_CHECKOUT:-/etc/flash-kernel}/bootscript" +UENV_DIR="${FK_CHECKOUT:-/etc/flash-kernel}/uenv" FK_ETC_MACHINE="${FK_ETC_MACHINE:-/etc/flash-kernel/machine}" PROC_CPUINFO="${FK_PROC_CPUINFO:-/proc/cpuinfo}" PROC_DTMODEL="${FK_PROC_DRMODEL:-/proc/device-tree/model}" @@ -261,6 +262,14 @@ fi } +get_alt_dtbs() { + local field="$(get_machine_field "$machine" "DTB-Alt-Ids")" || : + dtb_alt_names="$field" + if [ -n "$dtb_alt_names" ] ; then + echo "Alternate DTBs: $dtb_alt_names" >&2 + fi +} + machine_uses_flash() { local machine="$1" @@ -487,6 +496,21 @@ echo "done." >&2 } +generate_uenv() { + local input_file="$1" + + local output_file="$tmpdir/uEnv.txt" + + printf "Generating uEnv.txt..." >&2 + sed -e "s/@@KERNEL_VERSION@@/$kvers/g" \ + -e "s!@@LINUX_KERNEL_CMDLINE@@!$(get_kernel_cmdline)!g" \ + -e "/@@UBOOT_ENV_EXTRA@@/{ + s/@@UBOOT_ENV_EXTRA@@//g + r $ubootenv + }" > "$output_file" < "$input_file" + echo "done." >&2 +} + # Return a nonempty string *unless* NO_CREATE_DOT_BAK_FILES is set. get_dot_bak_preference() { . /etc/default/flash-kernel @@ -622,14 +646,16 @@ rmdir --ignore-fail-on-non-empty /boot/dtbs fi else - dtb=$(find_dtb_file) - dtb_name=$(basename $dtb_name) - echo "Installing $dtb into /boot/dtbs/$kvers/$dtb_name" >&2 - mkdir -p /boot/dtbs/$kvers/ - cp "$dtb" "/boot/dtbs/$kvers/$dtb_name.new" - backup_and_install \ - "/boot/dtbs/$kvers/$dtb_name.new" \ - "/boot/dtbs/$kvers/$dtb_name" + for dtb_name in $dtb_alt_names $dtb_name; do + dtb=$(find_dtb_file) + dtb_name=$(basename $dtb_name) + echo "Installing $dtb into /boot/dtbs/$kvers/$dtb_name" >&2 + mkdir -p /boot/dtbs/$kvers/ + cp "$dtb" "/boot/dtbs/$kvers/$dtb_name.new" + backup_and_install \ + "/boot/dtbs/$kvers/$dtb_name.new" \ + "/boot/dtbs/$kvers/$dtb_name" + done # Historically we installed the dtb as # dtb-$kvers, keep it around as an alternative @@ -672,6 +698,7 @@ kvers="$1" get_dtb_name +get_alt_dtbs # Install/remove any DTB from postinst, regardless of version if [ -n "$kvers" ] ; then @@ -802,6 +829,8 @@ boot_dtb_path="$(get_machine_field "$machine" "Boot-DTB-Path")" || : boot_multi_path="$(get_machine_field "$machine" "Boot-Multi-Path")" || : android_boot_device="$(get_machine_field "$machine" "Android-Boot-Device")" || : +uenv_path="$(get_machine_field "$machine" "U-Env-Path")" || : +uenv_name="$(get_machine_field "$machine" "U-Env-Name")" || : if [ -n "$dtb_append_from" ]; then if dtb_append_required; then @@ -961,6 +990,13 @@ cp "$boot_dtb" "$dtb" backup_and_install "$dtb" "$boot_dtb_path" fi + if [ -n "$uenv_path" ]; then + uenv_path="$boot_mnt_dir/$uenv_path" + uenv_txt="$UENV_DIR/$uenv_name" + generate_uenv "$uenv_txt" + uenv_txt="$tmpdir/uEnv.txt" + backup_and_install "$uenv_txt" "$uenv_path" + fi ;; "symlink") rm -f /boot/initrd /boot/zImage diff -Nru flash-kernel-3.75/test_db flash-kernel-3.75ev3dev10/test_db --- flash-kernel-3.75/test_db 2014-01-23 07:25:28.000000000 +0000 +++ flash-kernel-3.75ev3dev10/test_db 2018-06-18 16:44:23.000000000 +0000 @@ -22,7 +22,7 @@ MACHINE_DB="$(cat "${FK_CHECKOUT:-$FK_DIR}/db/"*.db)" test_no_unknown_fields() { - local expected='Android-Boot-Device Boot-Device Boot-DTB-Path Boot-Initrd-Path Boot-Kernel-Path Boot-Multi-Path Boot-Script-Path Bootloader-Sets-Incorrect-Root DTB-Append DTB-Append-From DTB-Id Kernel-Flavors Machine Machine-Id Method Mtd-Initrd Mtd-Kernel Optional-Packages Required-Packages U-Boot-Initrd-Address U-Boot-Kernel-Address U-Boot-Kernel-Entry-Point U-Boot-Multi-Address U-Boot-Script-Address U-Boot-Script-Name' + local expected='Android-Boot-Device Boot-Device Boot-DTB-Path Boot-Initrd-Path Boot-Kernel-Path Boot-Multi-Path Boot-Script-Path Bootloader-Sets-Incorrect-Root DTB-Append DTB-Append-From DTB-Id DTB-Alt-Ids Kernel-Flavors Machine Machine-Id Method Mtd-Initrd Mtd-Kernel Optional-Packages Required-Packages U-Boot-Initrd-Address U-Boot-Kernel-Address U-Boot-Kernel-Entry-Point U-Boot-Multi-Address U-Boot-Script-Address U-Boot-Script-Name U-Env-Path U-Env-Name' expected="$(echo "$expected" | sed 's/ /\n/g' | sort -u | xargs)" local fields="$(echo "$MACHINE_DB" | sed -n '/^[^#]*:/s/:.*//p' | sort -u | xargs)" if [ "$fields" != "$expected" ]; then diff -Nru flash-kernel-3.75/uenv/armhf/uenv.beaglebone flash-kernel-3.75ev3dev10/uenv/armhf/uenv.beaglebone --- flash-kernel-3.75/uenv/armhf/uenv.beaglebone 1970-01-01 00:00:00.000000000 +0000 +++ flash-kernel-3.75ev3dev10/uenv/armhf/uenv.beaglebone 2017-03-24 22:07:51.000000000 +0000 @@ -0,0 +1,5 @@ +#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0 + +uname_r=@@KERNEL_VERSION@@ + +@@UBOOT_ENV_EXTRA@@