chmorroni Posted November 18, 2020 Posted November 18, 2020 I'm trying to get Armbian running on a Rock Pi S, but my custom builds aren't booting (see output below). I can successfully boot with the Buster image from here, but I need a custom custom build that will eventually include a few added scripts and be flashed to the NAND flash on the board, instead of using an SD card. When I run a custom-built image, I never see the Armbian splash on in the serial console, instead I get the following output: DDR Version V1.26 REGFB: 0x00000032, 0x00000032 In 589MHz DDR3 Col=10 Bank=8 Row=15 Size=512MB msch:1 Returning to boot ROM... INFO: Preloader serial: 0 NOTICE: BL31: v1.3(release):3a579d3 NOTICE: BL31: Built : 09:09:17, Jan 29 2019 INFO: Lastlog: last=0x100000, realtime=0x102000, size=0x2000 INFO: ARM GICv2 driver initialized INFO: Using opteed sec cpu_context! INFO: boot cpu mask: 1 INFO: plat_rockchip_pmu_init: pd status 0xe INFO: BL31: Initializing runtime services WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destined for OPTEE will return SMC_UNK ERROR: Error initializing runtime service opteed_fast INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x600000 INFO: SPSR = 0x3c9 U-Boot 2017.09-armbian (Nov 18 2020 - 11:04:16 -0700) Model: Radxa ROCK Pi S PreSerial: 0 DRAM: 510 MiB Sysmem: init Relocation Offset is: 1f918000 vdd-core init 1044000 uV MMC: dwmmc@ff480000: 0, dwmmc@ff490000: 1 Using default environment In: serial@ff0c0000 Out: serial@ff0c0000 Err: serial@ff0c0000 Model: Radxa ROCK Pi S switch to partitions #0, OK mmc1 is current device Bootdev(atags): mmc 0 MMC0: Legacy, 50Mhz PartType: DOS rockchip_get_boot_mode: Could not found misc partition boot mode: None CLK: (sync kernel. arm: enter 816000 KHz, init 816000 KHz, kernel 0N/A) apll 816000 KHz dpll 1300000 KHz vpll0 1179647 KHz vpll1 903167 KHz aclk_bus 185714 KHz hclk_bus 100000 KHz pclk_bus 100000 KHz aclk_peri 185714 KHz hclk_peri 100000 KHz pclk_peri 100000 KHz hclk_audio 98303 KHz pclk_audio 98303 KHz Net: No ethernet found. Hit key to stop autoboot('CTRL+C'): 0 Could not find misc partition ANDROID: reboot reason: "(none)" load_android_image: Can't find part: boot Android image load failed Android boot failed, error -1. do_boot_rockchip: Could not find mmcsda1 part switch to partitions #0, OK mmc1 is current device ** No partition table - mmc 1 ** switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 3045 bytes read in 25 ms (118.2 KiB/s) ## Executing script at 00500000 Boot script loaded from mmc 0 138 bytes read in 22 ms (5.9 KiB/s) ** File not found /boot/uInitrd ** 10786824 bytes read in 504 ms (20.4 MiB/s) 65592 bytes read in 55 ms (1.1 MiB/s) ** File not found /boot/dtb/rockchip/overlay/rk3308-fixup.scr ** Wrong Ramdisk Image Format Ramdisk image is corrupt or invalid SCRIPT FAILED: continuing... Device 0: unknown device No ethernet found. missing environment variable: pxeuuid missing environment variable: bootfile Retrieving file: pxelinux.cfg/00000000 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/0000000 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/000000 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/00000 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/0000 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/000 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/00 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/0 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/default-arm-rockchip No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/default-arm No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/default No ethernet found. Config file not found No ethernet found. => From the console, it looks to me like there might be a boot file missing or something, but I'm a total noob with linux/u-boot, so I'm not really sure what I'm looking at. More information: Build environment: Windows 10 using Ubuntu 20.04 WSL Repo was checked out this morning Tried deleting the whole local copy and starting from scratch to no avail Build command: ./compile.sh KERNEL_ONLY="no" KERNEL_CONFIGURE="no" KERNEL_KEEP_CONFIG="no" BUILD_MINIMAL="" BUILD_DESKTOP="no" BOARD="rockpi-s" BRANCH="legacy" RELEASE="buster" Tried using Rufus and Etcher to write the SD image, also tried formatting using tool from Getting Started Guide Also, writing the SD card from Windows Reading console from UART0 on the board Image file (just in case I'm using the wrong one) is output/images/Armbian_20.11.0-trunk_Rockpi-s_buster_legacy_4.4.243_minimal.img Thanks for any and all advice!
piter75 Posted November 18, 2020 Posted November 18, 2020 28 minutes ago, chmorroni said: ** File not found /boot/uInitrd ** I remember building the ROCK Pi S image a few day ago and it was working fine. I will build again to verify it. Refer to the output/debug/install.log to see if there are any errors during initramfs build. 1
chmorroni Posted November 19, 2020 Author Posted November 19, 2020 Quote Refer to the output/debug/install.log to see if there are any errors during initramfs build. I don't see any errors, but the last couple lines do look a little weird: Adding module /lib/modules/4.4.243-rockpis/kernel/drivers/md/dm-mod.ko /usr/share/initramfs-tools/scripts/local-premount/ORDER ignored: not executable /usr/share/initramfs-tools/scripts/init-bottom/ORDER ignored: not executable /usr/share/initramfs-tools/scripts/init-top/ORDER ignored: not executable Building cpio /boot/initrd.img-4.4.243-rockpis.new initramfs mode of '/etc/kernel/postinst.d/initramfs-tools' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x) I don't see a way to attach a file, but I can try to do that, if it would be helpful. I have had a little success by doing some hacking. When I mounted the img file, I did notice that /boot/uInitrc didn't exist. By running the following command, I was able to make the file, and the image does now boot! mkimage -A arm -T ramdisk -C none -n uInitrd -d initrd.img-4.4.243-rockpis uInitrd This isn't ideal, though, so am I missing something when building that would do this step for me?
piter75 Posted November 19, 2020 Posted November 19, 2020 9 hours ago, chmorroni said: I don't see any errors, but the last couple lines do look a little weird: This script: https://github.com/armbian/build/blob/master/packages/bsp/common/etc/initramfs/post-update.d/99-uboot does not run or it fails while sourcing /etc/armbian-release. There is no "update-initramfs: Converting to u-boot format" message in your log after "Building cpio...". Is the file /etc/initramfs/post-update.d/99-uboot executable in the output image? Does it exist? Can you provide the content of /etc/armbian-release from the output image?
Heisath Posted November 19, 2020 Posted November 19, 2020 Compare with the current posts in this thread: Might be a common problem?
piter75 Posted November 19, 2020 Posted November 19, 2020 46 minutes ago, Heisath said: Might be a common problem? IMO it is rather unrelated. The other issue (introduced by me ) affects a single file and causes not updating initramfs after kernel update at all.
chmorroni Posted November 20, 2020 Author Posted November 20, 2020 On 11/19/2020 at 3:50 AM, piter75 said: Is the file /etc/initramfs/post-update.d/99-uboot executable in the output image? Does it exist? Can you provide the content of /etc/armbian-release from the output image? Not sure if it's because I'm building the legacy kernel, but I don't have the /etc/initramfs directory or /etc/armbian-release.
piter75 Posted November 20, 2020 Posted November 20, 2020 2 hours ago, chmorroni said: Not sure if it's because I'm building the legacy kernel, but I don't have the /etc/initramfs directory or /etc/armbian-release. Legacy is the only sensible option for ROCK Pi S for now so this was a good choice ;-) This function definitely did not go well. Consult the console output during build (after kernel compilation) to see if there aren't any errors.
chmorroni Posted November 23, 2020 Author Posted November 23, 2020 On 11/20/2020 at 12:51 PM, piter75 said: This function definitely did not go well. Consult the console output during build (after kernel compilation) to see if there aren't any errors. Ah, yeah, I think this is probably the issue: cp: cannot stat '/home/chris/build/.tmp/rootfs-legacy-rockpi-s-buster-no-yes/etc/armbian-release': No such file or directory The only other things I see are some warnings when compiling the sunxi_tools, but here's the console output in the area where it's calling the function you mentioned: [ .... ] Checking out [ o.k. ] Creating board support package [ rockpi-s legacy ] [ .... ] Fingerprinting [ o.k. ] Building package [ linux-buster-root-legacy-rockpi-s ] [ o.k. ] Building desktop package [ armbian-buster-desktop_20.11.0-trunk_all ] [ o.k. ] Starting rootfs and image building process for [ rockpi-s buster ] [ o.k. ] Checking for local cache [ buster-minimal-arm64.e1c...107.tar.lz4 ] [ .... ] searching on servers [ .... ] downloading using torrent network [ buster-minimal-arm64.e1cd7687d09272680f29797678682107.tar.lz4 ] [ o.k. ] Verified [ PGP ] [ o.k. ] Extracting buster-minimal-arm64.e1c...107.tar.lz4 [ 0 days old ] [ .... ] buster-minimal-arm64.e1c...107.tar.lz4: 213MiB [ 205MiB/s] [===============================================================================================>] 100% [ o.k. ] Adding Armbian repository and authentication key [ /etc/apt/sources.list.d/armbian.list ] [ o.k. ] Applying distribution specific tweaks for [ buster ] [ o.k. ] Applying common tweaks [ .... ] Updating [ package lists ] [ .... ] Temporarily disabling [ initramfs-tools hook for kernel ] [ .... ] Installing [ linux-u-boot-legacy-rockpi-s_20.11.0-trunk_arm64.deb ] [ .... ] Installing [ linux-image-legacy-rockpis_20.11.0-trunk_arm64.deb ] [ .... ] Installing [ linux-dtb-legacy-rockpis_20.11.0-trunk_arm64.deb ] [ .... ] Installing [ armbian-firmware_20.11.0-trunk_all.deb ] [ .... ] Installing from repository [ wireguard-tools --no-install-recommends ] [ o.k. ] Enabling serial console [ ttyS0 ] [ o.k. ] Enabling serial console [ ttyGS0 ] cp: cannot stat '/home/chris/build/.tmp/rootfs-legacy-rockpi-s-buster-no-yes/etc/armbian-release': No such file or directory [ o.k. ] Building kernel splash logo [ buster ] [ o.k. ] Calling image customization script [ customize-image.sh ]
Igor Posted November 23, 2020 Posted November 23, 2020 18 minutes ago, chmorroni said: Ah, yeah, I think this is probably the issue: Reboot the host and clean the output/deb content. It is possible that one of your files is bad or previous build was not cleanly unmounted. On 11/18/2020 at 9:01 PM, chmorroni said: include a few added scripts Or something is wrong here.
chmorroni Posted December 16, 2020 Author Posted December 16, 2020 On 11/23/2020 at 11:17 AM, Igor said: Reboot the host and clean the output/deb content. It is possible that one of your files is bad or previous build was not cleanly unmounted. Or something is wrong here. Interesting, I guess this could be it, I'll try to narrow down if there is something I'm doing that is breaking the build process. I'm really only doing a couple fairly simple things, though: installing some packages using apt echoing a couple things to /boot/armbianEnv.txt and /etc/rc.local adding a user copying a couple files adding a systemctl service A coworker is borrowing my board for a while, but I'll loop back when I can. For those interested, this is my customize-image.sh: #!/bin/bash # arguments: $RELEASE $LINUXFAMILY $BOARD $BUILD_DESKTOP # # This is the image customization script # NOTE: It is copied to /tmp directory inside the image # and executed there inside chroot environment # so don't reference any files that are not already installed # NOTE: If you want to transfer files between chroot and host # userpatches/overlay directory on host is bind-mounted to /tmp/overlay in chroot # The sd card's root path is accessible via $SDCARD variable. RELEASE=$1 LINUXFAMILY=$2 BOARD=$3 BUILD_DESKTOP=$4 Main() { # install packages apt update apt install -y git make mosquitto python3 python3-boto3 python3-paho-mqtt python3-requests python3-serial vim # enable UART echo "overlays=uart1" >> /boot/armbianEnv.txt # free up space apt purge -y iozone3 iw wireless-regdb rm -rf /usr/share/doc /usr/share/info /usr/share/man apt autoremove -y apt clean # add user account useradd -p $(echo mypassword | openssl passwd -1 -stdin) -m -G sudo -s /bin/bash myuser # set up ssh key and known_hosts mkdir -p /root/.ssh cp /tmp/overlay/ssh/* /root/.ssh/ chmod -R 700 /root/.ssh # startup commands echo "timedatectl set-timezone America/Denver" >> /etc/rc.local echo "apt clean" >> /etc/rc.local echo "chmod o+rw /dev/ttyS1" >> /etc/rc.local # install service to update gateway mkdir -p /home/myuser/bin cp /tmp/overlay/myservice/myservice.service /etc/systemd/system cp /tmp/overlay/myservice/myservice.sh /home/myuser/bin chmod +x /home/myuser/bin/myservice.sh systemctl enable myservice } # Main Main "$@"
Recommended Posts