Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odroidm1: de-infest Petitboot 🔥 use Kwiboo's 2023.10 u-boot; UMS works; bump kernel to 6.5-rcX #5606

Conversation

rpardini
Copy link
Member

@rpardini rpardini commented Aug 18, 2023

odroidm1: de-infest Petitboot 🔥 use Kwiboo's 2023.10 u-boot; UMS works; bump kernel to 6.5-rcX

  • odroidm1/edge (rk3568-odroid): bump to 6.4.y, update config, rebase patches to 6.4.10
  • odroidm1/edge (rk3568-odroid): bump to 6.5-rc6; manually fix RK808 breakage in .config; externalize overlays; use Makefile autopatcher; rebase patches
  • odroidm1/edge (rk3568-odroid): drop 6.3 and 6.4 patches
  • odroidm1: de-infest Petitboot 🔥 use Kwiboo's 2023.10 u-boot; UMS works
    • using Kwiboo's rk3568-2023.10 branch with BINMAN-handled blobs
    • patches (defconfig unless indicated):
      • boot usb first (rockchip-common)
      • blink leds & keep red one one on preboot; reset SPI env once after deinfesting from Petitboot
      • change usb_host0_xhci to otg (u-boot dtsi)
      • enable DM_GADGET, UMS 🔥 and RockUSB
    • usage instructions:
      • build & burn image to SD card
      • insert SD card into board
      • hold the recovery (RCY) button and power on the board
      • watch board boot
      • de-infest Petitboot: use armbian-install to install bootloader to MTD
        • if you don't, you'll need to hold the recovery button every boot
        • optionally: use armbian-install to install OS to eMMC/NVMe/USB
      • power-off board
      • remove SD card (new u-boot always boots SD first!)
      • boot into your newly de-infested machine
        • boot order: USB, SD, MMC, NVME, SCSI
    • de-infested machine can now boot (directly) from USB/SATA/NVMe, possibly via EFI:
      • Armbian UEFI-arm64
      • Fedora 38 aarch64
      • HASSOS for ODROID-M1
      • Talos arm64
      • others...
    • extra: new u-boot by Kwiboo (with GMAC patches) gives us stable MAC address
      • although it is based on cpuid#, doesn't match the HK sticker on the board
        • run fw_setenv ethaddr XX:XX:XX:XX:XX:XX to change eth addr in SPI flash environment if needed
    • odroidm1: update DDR/BL31 blobs (this depends on rk3568: updated ddr/bl31 blobs rkbin#20)
  • odroidm1: fix flashcp --partition non-usage for old mtd-utils (bullseye etc)

@rpardini rpardini force-pushed the pr/odroidm1-de-infest-Petitboot--use-Kwiboos-202310-u-boot-UMS-works-bump-kernel-to-65-rcX branch from b532926 to 9243b7d Compare August 18, 2023 20:39
@rpardini
Copy link
Member Author

Testing image -- See instructions above https://github.com/rpardini/armbian-release/releases/download/23.08.18-rpardini-434/Armbian_23.08.18-rpardini-434_Odroidm1_bookworm_edge_6.5.0-rc6.img.xz

@rpardini rpardini marked this pull request as ready for review August 18, 2023 21:39
@samuraikid0
Copy link

samuraikid0 commented Aug 18, 2023

Testing image -- See instructions above https://github.com/rpardini/armbian-release/releases/download/23.08.18-rpardini-434/Armbian_23.08.18-rpardini-434_Odroidm1_bookworm_edge_6.5.0-rc6.img.xz

Will this reach bullseye ? (Some stuff I'm using is still broken in bookworm)
Thanks this is good news !

@rpardini
Copy link
Member Author

Will this reach bullseye ? (Some stuff I'm using is still broken in bookworm) Thanks this is good news !

Pick this PR and build it yourself, should work yes with bullseye.

@samuraikid0
Copy link

samuraikid0 commented Aug 19, 2023

Will this reach bullseye ? (Some stuff I'm using is still broken in bookworm) Thanks this is good news !

Pick this PR and build it yourself, should work yes with bullseye.

The MTD flash fails on Debian 11
With your image it overwritte the MTD
And Im able to boot from disk debian 11 after running your img.

Edit: On bullseye it seems if I give the shutdown command and remove the power and plug again, the board boots from disk, if I reboot it it doesn't boot..

Thanks !

Here's the error
IMG_20230819_080435
IMG_20230819_080428

…808 breakage in .config; externalize overlays; use Makefile autopatcher; rebase patches
- using Kwiboo's `rk3568-2023.10` branch  with BINMAN-handled blobs
- patches (defconfig unless indicated):
  - boot usb first (rockchip-common)
  - blink leds & keep red one one on preboot; reset SPI env once after deinfesting from Petitboot
  - change usb_host0_xhci to otg (u-boot dtsi)
  - enable DM_GADGET, UMS 🔥 and RockUSB
- **usage instructions**:
  - build & burn image to SD card
  - insert SD card into board
  - **hold the recovery (RCY) button** and power on the board
  - watch board boot
  - **de-infest Petitboot**: use `armbian-install` to install bootloader to MTD
    - if you don't, you'll need to hold the recovery button every boot
    - optionally: use `armbian-install` to install OS to eMMC/NVMe/USB
  - power-off board
  - remove SD card (new u-boot always boots SD first!)
  - boot into your newly de-infested machine
    - boot order: USB, SD, MMC, NVME, SCSI
- de-infested machine can now boot (directly) from USB/SATA/NVMe, possibly via EFI:
  - Armbian UEFI-arm64
  - Fedora 38 aarch64
  - HASSOS for ODROID-M1
  - Talos arm64
  - others...
- extra: new u-boot by Kwiboo (with GMAC patches) gives us stable MAC address
  - although it is based on cpuid#, doesn't match the HK sticker on the board
    - run `fw_setenv ethaddr XX:XX:XX:XX:XX:XX` to change eth addr in SPI flash environment if needed
- `odroidm1`: update DDR/BL31 blobs (this depends on armbian/rkbin#20)
@rpardini rpardini force-pushed the pr/odroidm1-de-infest-Petitboot--use-Kwiboos-202310-u-boot-UMS-works-bump-kernel-to-65-rcX branch from 9243b7d to c8b1474 Compare August 20, 2023 10:10
@rpardini
Copy link
Member Author

The MTD flash fails on Debian 11

Indeed, bullseye has an extremely old mtd-utils package, flashcp does not have the -p parameter there. I did a hack to workaround that in c8b1474

Edit: On bullseye it seems if I give the shutdown command and remove the power and plug again, the board boots from disk, if I reboot it it doesn't boot..

I haven't anything even close to this problem. What are you booting from? Also, capture UART bootlogs in both situations so we can debug.

Thanks for testing @samuraikid0

@samuraikid0
Copy link

samuraikid0 commented Aug 20, 2023

The MTD flash fails on Debian 11

Indeed, bullseye has an extremely old mtd-utils package, flashcp does not have the -p parameter there. I did a hack to workaround that in c8b1474

Edit: On bullseye it seems if I give the shutdown command and remove the power and plug again, the board boots from disk, if I reboot it it doesn't boot..

I haven't anything even close to this problem. What are you booting from? Also, capture UART bootlogs in both situations so we can debug.

Thanks for testing @samuraikid0

I'm booting from a usb case a sata disk of 1 TB, it worked so I didn't bother to buy an NVME at the time.

The steps I did after de-infest MTD with your .img following your steps above

I've burned the bullseye .img that I made with your PR to the 1 TB disk
plugged it on the board usb
Power board
finish the setup

Currently I don't have the debug tools
I've seen you had updated the script, I'll build it again and leave a comment

Edit: the script throws another error

IMG_20230820_175142

Using the latest fix
Boot using RCY recovery steps
Install MTD flash
Then I install to disk and shutdown
Remove sd card
Plug power
board and disk lights
no boot

I'm forking the official armbian/build repo and then pull your PR is this correct ?

I'll try to get an NVME to see if it persists

Edit: after 2 or 3 power plug it booted from disk, seems related to the usb disk, but then I rebooted and no boot again

Thanks !

@rpardini
Copy link
Member Author

Edit: after 2 or 3 power plug it booted from disk, seems related to the usb disk

Better to test with NVMe; external USB disks are prone to unrelated errors.

@samuraikid0
Copy link

samuraikid0 commented Aug 20, 2023

Edit: after 2 or 3 power plug it booted from disk, seems related to the usb disk

Better to test with NVMe; external USB disks are prone to unrelated errors.

Just tested if I unplug the power wait 5 min and plug the power again the disk boots again

Just tested again same result
it seems the reboot doesn't shutdown the usb disk fully and it fails to boot

Which means de-infest petitboot is working but has this little bug

@rpardini
Copy link
Member Author

Edit: after 2 or 3 power plug it booted from disk, seems related to the usb disk

Better to test with NVMe; external USB disks are prone to unrelated errors.

Just tested if I unplug the power wait 5 min and plug the power again the disk boots again

Just tested again same result it seems the reboot doesn't shutdown the usb disk fully and it fails to boot

Which means de-infest petitboot is working but has this little bug

Sorry @samuraikid0 this is unrelated...

@rpardini rpardini requested a review from a team August 21, 2023 09:13
@samuraikid0
Copy link

Edit: after 2 or 3 power plug it booted from disk, seems related to the usb disk

Better to test with NVMe; external USB disks are prone to unrelated errors.

Just tested if I unplug the power wait 5 min and plug the power again the disk boots again
Just tested again same result it seems the reboot doesn't shutdown the usb disk fully and it fails to boot
Which means de-infest petitboot is working but has this little bug

Sorry @samuraikid0 this is unrelated...

I'll order the nvme
Thanks for fixing the bullseye issue.
All the best !

Copy link
Member

@igorpecovnik igorpecovnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As its edge ...

@rpardini rpardini merged commit 67f916c into armbian:main Aug 22, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants