From 7c00615de46b7952f64bba27eec97da0640f5a84 Mon Sep 17 00:00:00 2001 From: Oleg Date: Wed, 27 Jul 2022 09:44:43 +0300 Subject: [PATCH] fix jetson-nano legacy and install btrfs emmc (#4024) * fix jetson-nano legacy and install btrfs emmc * fix initrd module --- config/sources/arm64.conf | 2 +- config/sources/armhf.conf | 2 +- config/sources/families/media.conf | 14 +- .../archive/media-5.18/980-builddeb.patch | 40 ++- .../archive/media-5.19/980-builddeb.patch | 40 ++- .../archive/media-5.19/990-sound-rk.patch | 269 ------------------ .../station-p2-5.18/0980-builddeb.patch | 40 ++- 7 files changed, 107 insertions(+), 300 deletions(-) delete mode 100644 patch/kernel/archive/media-5.19/990-sound-rk.patch diff --git a/config/sources/arm64.conf b/config/sources/arm64.conf index 8cf8fefb1..42a66cd1a 100644 --- a/config/sources/arm64.conf +++ b/config/sources/arm64.conf @@ -11,7 +11,7 @@ NAME_KERNEL="Image" NAME_INITRD="uInitrd" -MAIN_CMDLINE="rootflags=data=writeback rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 bootsplash.bootfile=bootsplash.armbian" +MAIN_CMDLINE="rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 bootsplash.bootfile=bootsplash.armbian" [[ -z $INITRD_ARCH ]] && INITRD_ARCH=arm64 QEMU_BINARY="qemu-aarch64-static" ARCHITECTURE=arm64 diff --git a/config/sources/armhf.conf b/config/sources/armhf.conf index 18858241a..435c59855 100644 --- a/config/sources/armhf.conf +++ b/config/sources/armhf.conf @@ -11,7 +11,7 @@ NAME_KERNEL="zImage" NAME_INITRD="uInitrd" -MAIN_CMDLINE="rootflags=data=writeback rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 bootsplash.bootfile=bootsplash.armbian" +MAIN_CMDLINE="rw no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 bootsplash.bootfile=bootsplash.armbian" INITRD_ARCH=arm QEMU_BINARY="qemu-arm-static" ARCHITECTURE=arm diff --git a/config/sources/families/media.conf b/config/sources/families/media.conf index 5993932dc..b583525d7 100644 --- a/config/sources/families/media.conf +++ b/config/sources/families/media.conf @@ -30,6 +30,9 @@ case $BRANCH in KERNELDIR='linux-nano' KERNELSOURCE='https://github.com/150balbes/Jetson-Nano' KERNELBRANCH='branch:4.9.201' + KERNELPATCHDIR='jetson-nano-'$BRANCH + LINUXFAMILY=jetson-nano + LINUXCONFIG='linux-jetson-nano-'$BRANCH EXTRAWIFI="no" BOOT_FDT_FILE="none" SRC_CMDLINE='console=ttyS0,115200n8 console=tty0 tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb debug_uartport=lsport,4 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1075 core_edp_ma=4000 tegra_fbmem=0x800000@0x92ca9000 is_hdmi_initialised=1 earlycon=uart8250,mmio32,0x70006000 fbcon=map:0' @@ -62,16 +65,23 @@ case $BRANCH in else KERNELPATCHDIR='media-'$BRANCH LINUXFAMILY=media - fi + if [[ $BOARD == jetson-nano ]]; then + MODULES_INITRD="jetson-nano-current" + fi + fi ;; edge) KERNELPATCHDIR='media-'$BRANCH - KERNELBRANCH="tag:v5.19-rc7" + KERNELBRANCH="tag:v5.19-rc8" LINUXFAMILY=media LINUXCONFIG='linux-media-'$BRANCH SKIP_BOOTSPLASH="yes" + + if [[ $BOARD == jetson-nano ]]; then + MODULES_INITRD="jetson-nano-edge" + fi ;; esac diff --git a/patch/kernel/archive/media-5.18/980-builddeb.patch b/patch/kernel/archive/media-5.18/980-builddeb.patch index 26392518c..6fede79dc 100644 --- a/patch/kernel/archive/media-5.18/980-builddeb.patch +++ b/patch/kernel/archive/media-5.18/980-builddeb.patch @@ -26,15 +26,18 @@ # Create postinst prerm script for headers if [ "$3" = "headers" ]; then -@@ -187,7 +168,6 @@ +@@ -187,10 +168,8 @@ kernel_headers_dir="debian/hdrtmp" libc_headers_dir="debian/headertmp" dbg_dir="debian/dbgtmp" -dtb_dir="debian/dtbtmp" packagename=linux-image-"$BRANCH$LOCALVERSION" kernel_headers_packagename=linux-headers-"$BRANCH$LOCALVERSION" - dtb_packagename=linux-dtb-"$BRANCH$LOCALVERSION" -@@ -225,11 +205,9 @@ +-dtb_packagename=linux-dtb-"$BRANCH$LOCALVERSION" + libc_headers_packagename=linux-libc-dev + dbg_packagename=$packagename-dbg + +@@ -225,11 +204,9 @@ BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes) # Setup the directory structure @@ -47,24 +50,43 @@ mkdir -m 755 -p "$kernel_headers_dir/lib/modules/$version/" mkdir -m 755 -p "$libc_headers_dir/DEBIAN" -@@ -249,7 +227,7 @@ +@@ -249,13 +226,8 @@ if is_enabled CONFIG_OF_EARLY_FLATTREE; then # Only some architectures with OF support have this target if [ -d "${srctree}/arch/$SRCARCH/boot/dts" ]; then - $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/usr/lib/linux-image-$version" dtbs_install -+ $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/boot/dtb/" dtbs_install - fi +- fi +-fi +- +-if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG; then +- #mkdir -p "$tmpdir/boot/dtb" +- INSTALL_DTBS_PATH="$dtb_dir/boot/dtb-$version" $MAKE KBUILD_SRC= dtbs_install ++ $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/boot/linux-image-$version" dtbs_install ++ fi fi -@@ -346,6 +324,7 @@ + if is_enabled CONFIG_MODULES; then +@@ -318,6 +290,8 @@ + sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst + cat >> $tmpdir/DEBIAN/postinst <<- EOT + ln -sf $(basename $installed_image_path) /boot/$image_name 2> /dev/null || mv /$installed_image_path /boot/$image_name ++ cd /boot ++ ln -sfT linux-image-$version dtb 2> /dev/null || mv linux-image-$version dtb + touch /boot/.next + exit 0 + EOT +@@ -346,6 +320,10 @@ rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/$image_name /boot/uImage fi } -+ if [ -d /boot/dtb ]; then rm -rf /boot/dtb; fi ++# if [ -d /boot/dtb ]; then ++ rm -rf /boot/dtb ++ rm -rf /boot/linux-image-$version ++# fi mountpoint -q /boot && check_boot_dev exit 0 EOT -@@ -353,11 +332,6 @@ +@@ -353,11 +331,6 @@ create_package "$packagename" "$tmpdir" if [ "$ARCH" != "um" ]; then diff --git a/patch/kernel/archive/media-5.19/980-builddeb.patch b/patch/kernel/archive/media-5.19/980-builddeb.patch index 26392518c..6fede79dc 100644 --- a/patch/kernel/archive/media-5.19/980-builddeb.patch +++ b/patch/kernel/archive/media-5.19/980-builddeb.patch @@ -26,15 +26,18 @@ # Create postinst prerm script for headers if [ "$3" = "headers" ]; then -@@ -187,7 +168,6 @@ +@@ -187,10 +168,8 @@ kernel_headers_dir="debian/hdrtmp" libc_headers_dir="debian/headertmp" dbg_dir="debian/dbgtmp" -dtb_dir="debian/dtbtmp" packagename=linux-image-"$BRANCH$LOCALVERSION" kernel_headers_packagename=linux-headers-"$BRANCH$LOCALVERSION" - dtb_packagename=linux-dtb-"$BRANCH$LOCALVERSION" -@@ -225,11 +205,9 @@ +-dtb_packagename=linux-dtb-"$BRANCH$LOCALVERSION" + libc_headers_packagename=linux-libc-dev + dbg_packagename=$packagename-dbg + +@@ -225,11 +204,9 @@ BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes) # Setup the directory structure @@ -47,24 +50,43 @@ mkdir -m 755 -p "$kernel_headers_dir/lib/modules/$version/" mkdir -m 755 -p "$libc_headers_dir/DEBIAN" -@@ -249,7 +227,7 @@ +@@ -249,13 +226,8 @@ if is_enabled CONFIG_OF_EARLY_FLATTREE; then # Only some architectures with OF support have this target if [ -d "${srctree}/arch/$SRCARCH/boot/dts" ]; then - $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/usr/lib/linux-image-$version" dtbs_install -+ $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/boot/dtb/" dtbs_install - fi +- fi +-fi +- +-if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG; then +- #mkdir -p "$tmpdir/boot/dtb" +- INSTALL_DTBS_PATH="$dtb_dir/boot/dtb-$version" $MAKE KBUILD_SRC= dtbs_install ++ $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/boot/linux-image-$version" dtbs_install ++ fi fi -@@ -346,6 +324,7 @@ + if is_enabled CONFIG_MODULES; then +@@ -318,6 +290,8 @@ + sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst + cat >> $tmpdir/DEBIAN/postinst <<- EOT + ln -sf $(basename $installed_image_path) /boot/$image_name 2> /dev/null || mv /$installed_image_path /boot/$image_name ++ cd /boot ++ ln -sfT linux-image-$version dtb 2> /dev/null || mv linux-image-$version dtb + touch /boot/.next + exit 0 + EOT +@@ -346,6 +320,10 @@ rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/$image_name /boot/uImage fi } -+ if [ -d /boot/dtb ]; then rm -rf /boot/dtb; fi ++# if [ -d /boot/dtb ]; then ++ rm -rf /boot/dtb ++ rm -rf /boot/linux-image-$version ++# fi mountpoint -q /boot && check_boot_dev exit 0 EOT -@@ -353,11 +332,6 @@ +@@ -353,11 +331,6 @@ create_package "$packagename" "$tmpdir" if [ "$ARCH" != "um" ]; then diff --git a/patch/kernel/archive/media-5.19/990-sound-rk.patch b/patch/kernel/archive/media-5.19/990-sound-rk.patch deleted file mode 100644 index b2b90419b..000000000 --- a/patch/kernel/archive/media-5.19/990-sound-rk.patch +++ /dev/null @@ -1,269 +0,0 @@ ---- a/sound/soc/rockchip/rockchip_i2s.c -+++ b/sound/soc/rockchip/rockchip_i2s.c -@@ -13,7 +13,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -55,39 +54,7 @@ - const struct rk_i2s_pins *pins; - unsigned int bclk_ratio; - spinlock_t lock; /* tx/rx lock */ -- struct pinctrl *pinctrl; -- struct pinctrl_state *bclk_on; -- struct pinctrl_state *bclk_off; --}; -- --static int i2s_pinctrl_select_bclk_on(struct rk_i2s_dev *i2s) --{ -- int ret = 0; -- -- if (!IS_ERR(i2s->pinctrl) && !IS_ERR_OR_NULL(i2s->bclk_on)) -- ret = pinctrl_select_state(i2s->pinctrl, -- i2s->bclk_on); -- -- if (ret) -- dev_err(i2s->dev, "bclk enable failed %d\n", ret); -- -- return ret; --} -- --static int i2s_pinctrl_select_bclk_off(struct rk_i2s_dev *i2s) --{ -- -- int ret = 0; -- -- if (!IS_ERR(i2s->pinctrl) && !IS_ERR_OR_NULL(i2s->bclk_off)) -- ret = pinctrl_select_state(i2s->pinctrl, -- i2s->bclk_off); -- -- if (ret) -- dev_err(i2s->dev, "bclk disable failed %d\n", ret); -- -- return ret; --} -+}; - - static int i2s_runtime_suspend(struct device *dev) - { -@@ -125,49 +92,38 @@ - return snd_soc_dai_get_drvdata(dai); - } - --static int rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on) -+static void rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on) - { - unsigned int val = 0; - int retry = 10; -- int ret = 0; - - spin_lock(&i2s->lock); - if (on) { -- ret = regmap_update_bits(i2s->regmap, I2S_DMACR, -- I2S_DMACR_TDE_ENABLE, I2S_DMACR_TDE_ENABLE); -- if (ret < 0) -- goto end; -- -- ret = regmap_update_bits(i2s->regmap, I2S_XFER, -- I2S_XFER_TXS_START | I2S_XFER_RXS_START, -- I2S_XFER_TXS_START | I2S_XFER_RXS_START); -- if (ret < 0) -- goto end; -+ regmap_update_bits(i2s->regmap, I2S_DMACR, -+ I2S_DMACR_TDE_ENABLE, I2S_DMACR_TDE_ENABLE); -+ -+ regmap_update_bits(i2s->regmap, I2S_XFER, -+ I2S_XFER_TXS_START | I2S_XFER_RXS_START, -+ I2S_XFER_TXS_START | I2S_XFER_RXS_START); - - i2s->tx_start = true; - } else { - i2s->tx_start = false; - -- ret = regmap_update_bits(i2s->regmap, I2S_DMACR, -- I2S_DMACR_TDE_ENABLE, I2S_DMACR_TDE_DISABLE); -- if (ret < 0) -- goto end; -+ regmap_update_bits(i2s->regmap, I2S_DMACR, -+ I2S_DMACR_TDE_ENABLE, I2S_DMACR_TDE_DISABLE); - - if (!i2s->rx_start) { -- ret = regmap_update_bits(i2s->regmap, I2S_XFER, -- I2S_XFER_TXS_START | -- I2S_XFER_RXS_START, -- I2S_XFER_TXS_STOP | -- I2S_XFER_RXS_STOP); -- if (ret < 0) -- goto end; -+ regmap_update_bits(i2s->regmap, I2S_XFER, -+ I2S_XFER_TXS_START | -+ I2S_XFER_RXS_START, -+ I2S_XFER_TXS_STOP | -+ I2S_XFER_RXS_STOP); - - udelay(150); -- ret = regmap_update_bits(i2s->regmap, I2S_CLR, -- I2S_CLR_TXC | I2S_CLR_RXC, -- I2S_CLR_TXC | I2S_CLR_RXC); -- if (ret < 0) -- goto end; -+ regmap_update_bits(i2s->regmap, I2S_CLR, -+ I2S_CLR_TXC | I2S_CLR_RXC, -+ I2S_CLR_TXC | I2S_CLR_RXC); - - regmap_read(i2s->regmap, I2S_CLR, &val); - -@@ -182,57 +138,44 @@ - } - } - } --end: - spin_unlock(&i2s->lock); -- if (ret < 0) -- dev_err(i2s->dev, "lrclk update failed\n"); -- -- return ret; --} -- --static int rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on) -+} -+ -+static void rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on) - { - unsigned int val = 0; - int retry = 10; -- int ret = 0; - - spin_lock(&i2s->lock); - if (on) { -- ret = regmap_update_bits(i2s->regmap, I2S_DMACR, -+ regmap_update_bits(i2s->regmap, I2S_DMACR, - I2S_DMACR_RDE_ENABLE, I2S_DMACR_RDE_ENABLE); -- if (ret < 0) -- goto end; -- -- ret = regmap_update_bits(i2s->regmap, I2S_XFER, -+ -+ regmap_update_bits(i2s->regmap, I2S_XFER, - I2S_XFER_TXS_START | I2S_XFER_RXS_START, - I2S_XFER_TXS_START | I2S_XFER_RXS_START); -- if (ret < 0) -- goto end; - - i2s->rx_start = true; - } else { - i2s->rx_start = false; - -- ret = regmap_update_bits(i2s->regmap, I2S_DMACR, -+ regmap_update_bits(i2s->regmap, I2S_DMACR, - I2S_DMACR_RDE_ENABLE, I2S_DMACR_RDE_DISABLE); -- if (ret < 0) -- goto end; - - if (!i2s->tx_start) { -- ret = regmap_update_bits(i2s->regmap, I2S_XFER, -+ regmap_update_bits(i2s->regmap, I2S_XFER, - I2S_XFER_TXS_START | - I2S_XFER_RXS_START, - I2S_XFER_TXS_STOP | - I2S_XFER_RXS_STOP); -- if (ret < 0) -- goto end; -+ - udelay(150); -- ret = regmap_update_bits(i2s->regmap, I2S_CLR, -+ regmap_update_bits(i2s->regmap, I2S_CLR, - I2S_CLR_TXC | I2S_CLR_RXC, - I2S_CLR_TXC | I2S_CLR_RXC); -- if (ret < 0) -- goto end; -+ - regmap_read(i2s->regmap, I2S_CLR, &val); -+ - /* Should wait for clear operation to finish */ - while (val) { - regmap_read(i2s->regmap, I2S_CLR, &val); -@@ -244,12 +187,7 @@ - } - } - } --end: - spin_unlock(&i2s->lock); -- if (ret < 0) -- dev_err(i2s->dev, "lrclk update failed\n"); -- -- return ret; - } - - static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai, -@@ -487,26 +425,17 @@ - case SNDRV_PCM_TRIGGER_RESUME: - case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) -- ret = rockchip_snd_rxctrl(i2s, 1); -+ rockchip_snd_rxctrl(i2s, 1); - else -- ret = rockchip_snd_txctrl(i2s, 1); -- /* Do not turn on bclk if lrclk open fails. */ -- if (ret < 0) -- return ret; -- i2s_pinctrl_select_bclk_on(i2s); -+ rockchip_snd_txctrl(i2s, 1); - break; - case SNDRV_PCM_TRIGGER_SUSPEND: - case SNDRV_PCM_TRIGGER_STOP: - case SNDRV_PCM_TRIGGER_PAUSE_PUSH: -- if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { -- if (!i2s->tx_start) -- i2s_pinctrl_select_bclk_off(i2s); -- ret = rockchip_snd_rxctrl(i2s, 0); -- } else { -- if (!i2s->rx_start) -- i2s_pinctrl_select_bclk_off(i2s); -- ret = rockchip_snd_txctrl(i2s, 0); -- } -+ if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) -+ rockchip_snd_rxctrl(i2s, 0); -+ else -+ rockchip_snd_txctrl(i2s, 0); - break; - default: - ret = -EINVAL; -@@ -807,33 +736,6 @@ - } - - i2s->bclk_ratio = 64; -- i2s->pinctrl = devm_pinctrl_get(&pdev->dev); -- if (IS_ERR(i2s->pinctrl)) -- dev_err(&pdev->dev, "failed to find i2s pinctrl\n"); -- -- i2s->bclk_on = pinctrl_lookup_state(i2s->pinctrl, -- "bclk_on"); -- if (IS_ERR_OR_NULL(i2s->bclk_on)) -- dev_err(&pdev->dev, "failed to find i2s default state\n"); -- else -- dev_dbg(&pdev->dev, "find i2s bclk state\n"); -- -- i2s->bclk_off = pinctrl_lookup_state(i2s->pinctrl, -- "bclk_off"); -- if (IS_ERR_OR_NULL(i2s->bclk_off)) -- dev_err(&pdev->dev, "failed to find i2s gpio state\n"); -- else -- dev_dbg(&pdev->dev, "find i2s bclk_off state\n"); -- -- i2s_pinctrl_select_bclk_off(i2s); -- -- i2s->playback_dma_data.addr = res->start + I2S_TXDR; -- i2s->playback_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; -- i2s->playback_dma_data.maxburst = 4; -- -- i2s->capture_dma_data.addr = res->start + I2S_RXDR; -- i2s->capture_dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; -- i2s->capture_dma_data.maxburst = 4; - - dev_set_drvdata(&pdev->dev, i2s); - - diff --git a/patch/kernel/archive/station-p2-5.18/0980-builddeb.patch b/patch/kernel/archive/station-p2-5.18/0980-builddeb.patch index 26392518c..6fede79dc 100644 --- a/patch/kernel/archive/station-p2-5.18/0980-builddeb.patch +++ b/patch/kernel/archive/station-p2-5.18/0980-builddeb.patch @@ -26,15 +26,18 @@ # Create postinst prerm script for headers if [ "$3" = "headers" ]; then -@@ -187,7 +168,6 @@ +@@ -187,10 +168,8 @@ kernel_headers_dir="debian/hdrtmp" libc_headers_dir="debian/headertmp" dbg_dir="debian/dbgtmp" -dtb_dir="debian/dtbtmp" packagename=linux-image-"$BRANCH$LOCALVERSION" kernel_headers_packagename=linux-headers-"$BRANCH$LOCALVERSION" - dtb_packagename=linux-dtb-"$BRANCH$LOCALVERSION" -@@ -225,11 +205,9 @@ +-dtb_packagename=linux-dtb-"$BRANCH$LOCALVERSION" + libc_headers_packagename=linux-libc-dev + dbg_packagename=$packagename-dbg + +@@ -225,11 +204,9 @@ BUILD_DEBUG=$(if_enabled_echo CONFIG_DEBUG_INFO Yes) # Setup the directory structure @@ -47,24 +50,43 @@ mkdir -m 755 -p "$kernel_headers_dir/lib/modules/$version/" mkdir -m 755 -p "$libc_headers_dir/DEBIAN" -@@ -249,7 +227,7 @@ +@@ -249,13 +226,8 @@ if is_enabled CONFIG_OF_EARLY_FLATTREE; then # Only some architectures with OF support have this target if [ -d "${srctree}/arch/$SRCARCH/boot/dts" ]; then - $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/usr/lib/linux-image-$version" dtbs_install -+ $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/boot/dtb/" dtbs_install - fi +- fi +-fi +- +-if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG; then +- #mkdir -p "$tmpdir/boot/dtb" +- INSTALL_DTBS_PATH="$dtb_dir/boot/dtb-$version" $MAKE KBUILD_SRC= dtbs_install ++ $MAKE -f $srctree/Makefile INSTALL_DTBS_PATH="$tmpdir/boot/linux-image-$version" dtbs_install ++ fi fi -@@ -346,6 +324,7 @@ + if is_enabled CONFIG_MODULES; then +@@ -318,6 +290,8 @@ + sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst + cat >> $tmpdir/DEBIAN/postinst <<- EOT + ln -sf $(basename $installed_image_path) /boot/$image_name 2> /dev/null || mv /$installed_image_path /boot/$image_name ++ cd /boot ++ ln -sfT linux-image-$version dtb 2> /dev/null || mv linux-image-$version dtb + touch /boot/.next + exit 0 + EOT +@@ -346,6 +320,10 @@ rm -f /boot/System.map* /boot/config* /boot/vmlinuz* /boot/$image_name /boot/uImage fi } -+ if [ -d /boot/dtb ]; then rm -rf /boot/dtb; fi ++# if [ -d /boot/dtb ]; then ++ rm -rf /boot/dtb ++ rm -rf /boot/linux-image-$version ++# fi mountpoint -q /boot && check_boot_dev exit 0 EOT -@@ -353,11 +332,6 @@ +@@ -353,11 +331,6 @@ create_package "$packagename" "$tmpdir" if [ "$ARCH" != "um" ]; then