Reform-Boot-Config errors

So I migrated the OS from the SD card to the NVMe drive a couple weeks ago, but had been booting from the SD card. Today I tried switching to use the eMMC for booting (so I don’t have to keep the SD card in the slot). But ran into some problems.
I started with the reform-flash-rescue script. This ran without issue.
Next, I ran reform-boot-config --emmc nvme - this this errored. I tried running it again, this time outputting the stderr stream to a file in case this helps with troubleshooting. I’m pasting them here:

/etc/fstab already contains the correct entries
W: No zstd in /usr/bin:/sbin:/bin, using gzip
W: missing /lib/modules/6.0.0-reform2-arm64
W: Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/6.0.0-reform2-arm64: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
cat: /var/tmp/mkinitramfs_JWW9gi/lib/modules/6.0.0-reform2-arm64/modules.builtin: No such file or directory
W: Can't find modules.builtin.modinfo (for locating built-in drivers' firmware, supported in Linux >=5.2)
grep: warning: stray \ before #
depmod: WARNING: could not open modules.order at /var/tmp/mkinitramfs_JWW9gi/lib/modules/6.0.0-reform2-arm64: No such file or directory
depmod: WARNING: could not open modules.builtin at /var/tmp/mkinitramfs_JWW9gi/lib/modules/6.0.0-reform2-arm64: No such file or directory
depmod: WARNING: could not open modules.builtin.modinfo at /var/tmp/mkinitramfs_JWW9gi/lib/modules/6.0.0-reform2-arm64: No such file or directory
Using DTB: freescale/imx8mq-mnt-reform2.dtb
Couldn't find DTB imx8mq-mnt-reform2.dtb in /usr/lib/linux-image-6.0.0-reform2-arm64 or /etc/flash-kernel/dtbs
Installing  into /boot/dtbs/6.0.0-reform2-arm64/freescale/imx8mq-mnt-reform2.dtb
cp: cannot stat '': No such file or directory
run-parts: /etc/initramfs/post-update.d//flash-kernel exited with return code 1
/usr/sbin/reform-boot-config FAILED to run

Okay, I think the problem was that I had an old version of the reform kernel running on my machine (I had been avoiding updates for months due to instability in sid). I flashed a fresh reform-system-image-v3 to an SD card, installed updates. Cleared the first partition on the NVMe. Then ran reform-flash-rescue followed by reform-migrate --emmc. Everything seemed to work.
So I took off the back of my Reform, removed the heatsink, flipped the dip switch and put everything back together. Pressed circle, 1 to power on, and nothing.
So I took the back off my machine, connected the UART cables and powered on to see what’s happening in uBoot. I’m not sure about the output, it kinda looks like I need to update the reform firmware, is that correct?

Some of the screen output is missing, since I’m not sure how to log everything that goes through the screen command to a file. I can use ctrl+a, h to write a screenfull at a time, but the uboot messages come fast.

420000c0: c0 c1 c2 cc4 c5 c6 c7 c8 c9 ca cb  cd ce cf
420000d0: d0 d1 d2 d3 d4 d5 d6 d7  da db dc dd de df
420000e0: e0 e1 e2 e3 e4 e8 e9 ea eb eced ee e
420000f0: f0 f1 f2  f4 f5 f7 f8 fa fb fc fd ff
42000100:0 80 00  00 000000 00 a2  02 10
42000110: 00 00 30 10 80 01 00 04 00 00 01 00 80 00 00
42000120: 00 02 00 40 00 00 00 00 00 0 10 0 00 00 10
42000130: 01 00 00 00 00 00 00 24 08 02 10 10 00 00 00 00
42000140: 0 02 10 00 00 0 30 24 00 00  10 41 00
420001: 00 00 00 00 0 20 01 00 00 01 000 40  00
42000160: 20 00 00 00 00 00 09 00 01 01 08 00 80 10 00 81
0001 14 04 00 00 00 20 00 00 00 40 20 008 00 00 02
                                                  42000190 000 001 00 00 00  0 104 00 0 00 2 10
40a0 0 09041 1200 04 02 00 00 02 30 40 00 90
20001c0: 0 82 41 00 00 00 00 00 00 0 00 00 00 01 08
40  08 a  41 81 00 00 00 14 01 06 80
420001e0: 00 0 00 11 00 90 a8 11 40 08 88 82  00 00 20 00 21 00 16 10 00 01 00 00 00 00 12 a0 00 60
Nmal Boot
Trying to boot from MC1
d_t: imx) fsl_sd_iniialize: 00000000007ee6f0
board_mmc_init: (imx) fl_esdhc_initialize: 00000000007ee708


U  (Mr 30 2022 - 13:5:47 000)
CPU:   Freescale i.MX8MQ rev2.at 1000 Mz
Reset cause: POR
Model: Boundary Devicei.MX8MQ Nitrogen8M_so
MMC:   (imx slehc_pbeimx) fl_esdbeS_SDHC: 1DRAM:4 B
***   badCRC,ing default enviromnt

et_env_as)st_vFaile(-5)
board_detect_hdmi()Display: hdmi:1920x10880)
   serial
mmc0(prt 0) is current deviceet Rat 4C [I,sbrig s_t(eth1) using nd MAC address - 061:10:96
Hitan key to stoutboot:  1
 didnotspond to voltage sele!
mmc_i: -95, time 109
did spo to vage sct!
mmc_i95, time 109
*Badicm
mm_nit: -95,time 10ageeet
                   *a vice mmc 1 ** noo vgsele!m_nit-,i
ditpond o vlteselect!                                   Be mc1*
_init: -95, tme 109
** Bad device mm*
                 switc pations #0, OK
mmc0(part 0) is cuent devi


[ 83] xed: disagrees about version of symbol module_layo
[    5.3722] sha1agret von of mbol module_layout
[ 5.3715] sha1_ce: disagrees about version of symbol module_layout
[    5.373067] sha256_arm64: disagrees about version of symbolmodule_layout
[    5.373278]f128mul: disagrees about version of symbol module_lout
[   5.3345]crct10dif_common: disagrees abut version osymbol module_layout
    5.3892] aes_ce_pher: disagrees about version of symbol moduleayout[    5.374712] sha1_ce: disagrees about versionof symbole_out
[    5926] sha256_arm64: disagrees about version o mbo module_lyout
   575116] gf28mu disag t version of symbol module_layout
[    5.375301] cct10dif_common: ar aboversiof symbol module_lut
[ .375483] a_ce_cipher: rees about version of symbol module_layout
[    5.375671] aes_ce_cipher:sagion of sybol module_lu  5.405114] ommon: disagrees bout version of symbol module_layo
                                                                                                                     [    5.406702] phy_fsl_mx8mq_: dgrees aut veron of syl module__ce: s
    5411819] phy_fslmx8mq_usb: disagres about vion of symbol module_layout
[   5.412118] usb_commodies aut version of syl dule_lo.448126] msabouvon ofymboday
                                                                                  [  5.4753] pwm_ix27: disagrees out vsion of symbol mdule_layout    5.4681] pwm_imx27: disgres abven of
symbol module_layout
[    5.469] im27: disagrees about verombol module_layout
[    5.46723]muxcore: disagrees about versio o smbol mole_layout
[  5.468192] reset_imx7: disagrees about version of syl module_layout
[    5.567] sha256_arm64: diresbout verion f symbol mdule_layou[5.468795] gf128mul: disagrees bou version of symbooule_laut
[   5.46988] crctdif_mon: disagrees auvsion of symb de_layou
[    5.461] aes_ce_pher:iagreesabout version of symbol ule_layt
[    9371] aes_ce_cipher: disagrees about version of sy modullayout
[    548050 gf1 of sllayout
[    5.486383] nvmem_imx_ocotp: disagees abouversion of symbl module_layout
[    5494179] crct10dcommon: disagrees abo ver ofl mode_[    5.5231] i2c_imx: disagrees about version of so mdleout
 .533916] i2c_imx: disagrees aut version of symb module_layout341] sdhcidisagrees abut on of symbol module_layout
[    720]i_mxiagr otsionule_layout
[    5.540252] drm disagrees about version ofymbol module_layout
[    5.540778] i2cisagrees about vesion of smbol module_layout
[    5.543578] spi_imxiags about vion of mbol module_layout[    5.546526] aes_ce_cipherees about version of symbol module_layout
[    5.546725] aes_ce_iphe: digrees about version of symbolmodule_layout
                                                                        [    547815] phy_fsl_imx8_mipi_dphy: disagees about version of symbol module_layout
[    5.550841] pps_core: disagrees about rsofsy module_layout
    5.551803] i2c_imx: disagrees boversin of symbol module_layout
[    5.55284]icix:diasaoutersion of sl modul
                                              5.727 pps_redirees abouvon osymbol moduleayot
  595] w_m27dare aotverin sl lyout
[    drm: disagrees about ionbol module_layou
                                             [ 699]m: disaes about version osymbol module_layout
  5.833] drm sea vrsn of symbol oduleabol modulelayout
                                      [  26] mux_cor: disags about version of symbolmodule_layout
[ .839294] drm: disagreesbosion of symbol module_layout
[   5.507 usbmmon: disagrees about version of symbol l_aout
[   5.87518] iminterconnect: disagrees about version of symbol module_layout
                                                                            mp 3c000.pcie: Faiet geIH eecnrl49imx6q-pcie 33800000.pcie: Failet gtPIEP reset control

Hmm, this looks like the modules and the kernel version don’t match. Maybe @josch has a recipe for checking what’s going on?

As @mntmn already pointed out, your errors look like a mismatch between the kernel that uboot is loading and the modules that are then loaded by the initramfs. Could you try flashing a fresh sysimage-v3 to your sd card, then patch /usr/sbin/reform-boot-config with this patch:

And then run the same reform-flash-rescue and reform-mirate --emmc commands again? The old reform-boot-config assumes that the kernel and initramfs on the new /boot are the same as in the old one. This is not always the case, so with the patch, reform-boot-config as it is called by reform-migrate will copy over the contents of your old /boot.

1 Like

Thanks, that worked. I’m up and running - booting from eMMC and the OS on NVMe. :grinning:

Thank you @Keith_K for giving my patch a spin and confirming that it fixes your issue!

@mntmn the patch also fixes your recent trouble with you having to comment out line 75 of reform-boot-config. Since not only me but also Keith tested MR 26, I guess it’s safe to merge. :slight_smile:

2 Likes

Great, the patch is merged!

1 Like

Glad I could help as QA :smile: I used to work as software tester, I enjoyed the work.

1 Like