Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Running Linux From SD Card or USB Flash Drive - Using Balbes150 Method And Files.

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I believe I had the correct dtb copied to /boot partition before the install.sh .

    I have been trying a fresh install on SD and then an install to eMMC but ran into a different issue so couldn't complete it.

    The problem I ran into today was that to build abootimg on Arch linux, I installed some tools and this time when I reboot after installing tools then the Arch linux doesn't boot properly because it cannot mount /boot partition.

    I think I upgraded something along with the tools and that is causing this mount to fail. i'll do this from scratch again tomorrow and will report back.

    Comment


      I tried several different things but none worked.

      I started with a fresh SD card and did the following:

      - make SD bootable by writing image you've created (Arch linux with Kodi ).
      - increase the root parition by another gigabyte so we can install development tools and make abootimg on it. reboot a couple of times
      - installed git, cpio, wget, gcc, make, binutils, fakeroot
      - now git clone https://aur.archlinux.org/abootimg-git.git
      - cd to folder of abootimg-git and then do "makepkg -A"
      - cp executable abootimg from this build to /bin

      Verified that I am using gxbb_p200.dtb as dtb.img now booted into Arch linux via SD card:

      ----- Booted Arch linux from SD Card ------

      [alarm@alarm ~]$ ls /boot
      ArchLinux_w_KODI_Balbes.txt Image dtbs s905_autoscript
      GXBB_P200_is_dtb.img.txt dtb.img hdmi.sh uInitrd

      Logs from executing install.sh:

      Code:
      [root@alarm ~]# ./install.sh 
      Start copy system for DATA partition.
      Formatting DATA partition...
      umount: /dev/data: not mounted
      /dev/data contains a ext4 file system
              last mounted on /ddbr/install on Fri Sep  1 02:20:11 2017
      e2fsck 1.43.4 (31-Jan-2017)
      /dev/data: clean, 11/321920 files, 41630/1287168 blocks
      done.
      Copying ROOTFS.
      [   95.938361@3] EXT4-fs (mmcblk0p14): mounted filesystem with ordered data mode. Opts: (null)
      Copy BIN
      Copy BOOT
      Create DEV
      Copy ETC
      Copy HOME
      Copy LIB
      Create MNT
      Copy OPT
      Create PROC
      Copy ROOT
      Create RUN
      Copy SBIN
      Copy SRV
      Create SYS
      Create TMP
      Copy USR
      Copy VAR
      Copy fstab
      rm: cannot remove '/ddbr/install/usr/bin/ddbr': No such file or directory
      rm: cannot remove '/ddbr/install/usr/bin/ddbr_backup_nand': No such file or directory
      rm: cannot remove '/ddbr/install/usr/bin/ddbr_restore_nand': No such file or directory
      *******************************************
      Done copy ROOTFS
      *******************************************
      Writing new kernel image...
      65536+0 records in
      65536+0 records out
      33554432 bytes (34 MB, 32 MiB) copied, 0.64902 s, 51.7 MB/s
      writing boot image config in bootimg.cfg
      extracting kernel in zImage
      extracting ramdisk in initrd.img
      extracting second stage image in stage2.img
      reading kernel from /boot/Image
      Writing Boot Image /dev/boot
      reading ramdisk from /boot/uInitrd
      Writing Boot Image /dev/boot
      reading second stage from /boot/dtb.img
      Writing Boot Image /dev/boot
      done.
      Write env bootargs
      Cannot open /dev/nand_env: No such file or directory
      Error: environment not initialized
      *******************************************
      Complete copy OS to eMMC parted DATA
      *******************************************
      The Error " environment not initialized" is because even though the file fw_setenv is present in /usr/sbin , it still cannot be read/executed for some reason. Any attempt to read/execute this file generates the message "cannot open /dev/nand_env: No such file or directory "

      [root@alarm aboot]# ls /usr/sbin/fw_*
      /usr/sbin/fw_printenv /usr/sbin/fw_setenv

      [root@alarm aboot]# ls /usr/sbin/fw_* -l
      -rwxr-xr-x 1 root root 33408 May 19 01:44 /usr/sbin/fw_printenv
      lrwxrwxrwx 1 root root 20 Jun 15 07:10 /usr/sbin/fw_setenv -> /usr/bin/fw_printenv

      [root@alarm aboot]# /usr/sbin/fw_setenv initargs
      Cannot open /dev/nand_env: No such file or directory

      I was able to resolve this error message a couple of days ago, but now I cannot remember where I made changes to fix this error.

      Anyhow as an alternative I booted into uboot and then modified the initargs value to what install.sh would have set and then did a saveenv to store the value to eMMC.

      in uboot mode I executed following commands:

      setenv initargs "root=/dev/data rootflags=data=writeback rw console=ttyS0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.repair=yes net.ifnames=0 mac=\${mac}"
      saveenv

      printenv (to verify that initargs had these values)

      Booting from eMMC still fails. Here are the partial logs of the boot attempt, basically, it still failing at the point of root device. It just cannot mount /dev/data:

      Code:
      [    7.673377@0] cpufreq-scpi cpufreq-meson.7: probe  cpufreq okay
      [    7.680593@0] gxbb_pm: enter meson_pm_probe!
      [    7.684459@0] gxbb_pm: meson_pm_probe done
      [    7.688830@0] cpucore_cooling_register, max_cpu_core_num:4
      [    7.708019@0] aml_istbt_dev_ready NULL
      [    7.711928@0] ALSA device list:
      [    7.715773@0]   #0: AML-M8AUDIO
      [    7.719890@0] VFS: Cannot open root device "data" or unknown-block(0,0): error -6
      [    7.725655@0] Please append a correct "root=" boot option; here are the available partitions:
      [    7.734124@0] b300         7634944 mmcblk0  driver: mmcblk
      [    7.742020@0]   b301            4096 mmcblk0p1 
      [    7.747838@0]   b302           65536 mmcblk0p2 
      [    7.752250@0]   b303          524288 mmcblk0p3 
      [    7.756744@0]   b304            8192 mmcblk0p4 
      [    7.761159@0]   b305           32768 mmcblk0p5 
      [    7.765601@0]   b306           32768 mmcblk0p6 
      [    7.770039@0]   b307            8192 mmcblk0p7 
      [    7.774477@0]   b308            8192 mmcblk0p8 
      [    7.778878@0]   b309           32768 mmcblk0p9 
      [    7.783296@0]   b30a           32768 mmcblk0p10 
      [    7.787821@0]   b30b          524288 mmcblk0p11 
      [    7.792353@0]   b30c           32768 mmcblk0p12 
      [    7.796915@0]   b30d         1048576 mmcblk0p13 
      [    7.801452@0]   b30e         5148672 mmcblk0p14 
      [    7.806043@0] b360             512 mmcblk0rpmb  (driver?)
      [    7.810481@0] b340            4096 mmcblk0boot1  (driver?)
      [    7.815880@0] b320            4096 mmcblk0boot0  (driver?)
      [    7.821249@0] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
      [    7.827499@0] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.29-g665b9a3-dirty #1
      [    7.834913@0] Call trace:
      In the last 4-5 days I have tried every possible combination by rebooting multiple times and still fail at this point.

      I'm open to trying anything, else I'll wait until you or some one else releases the updated script/image.

      Comment


        1. The configuration parameters can be found in the file /etc/fw_env.config
        2. I already wrote, after the first install, reboot (restarting from the external media) and run the install script again.

        Comment


          Thanks Balbes.

          I was able to comment NAND in /etc/fw_env.config and that helped resolve the issue about fw_setenv.

          I did as you said just now:
          - boot using SD card,
          - run install script, let it complete
          - reboot with SD card inserted so we boot using SD card
          - run install script again and let it complete.
          - now took out the SD card and rebooted one more time.
          - it still failed at the same spot - inability to mount root.

          I will review this thread for all your suggestions and also try this method on a different TV box (maybe there's something about this one that is not setup right).
          Note: I should add that your armbian image and install script works perfectly the first time and allows boot from eMMC.

          Even though I have not been able to get this to work yet, I appreciate your help! Thanks again.

          Comment


            I think I was overlooking a log message that came in earlier in the boot process.

            Code:
            [    2.154559@0] aml_wifi wifi.31: [wifi_setup_dt] power_on_pin(234)
            [    2.154789@0] Unpacking initramfs...
            [    2.154801@0] Initramfs unpacking failed: junk in compressed archive
            [    2.157162@0] Freeing initrd memory: 5108K (ffffffc0339be000 - ffffffc033ebb000)
            [    2.159796@0] futex hash table entries: 1024 (order: 4, 65536 bytes)
            Initramfs unpacks with no issues when booting from SD card. This error only comes up when booting from eMMC.

            I'll spend some time on this to see what I can find an report back.





            Comment


              I tried the process on another board - it is similar EM95 with 2GB RAM and the dtb from last box didn't work (GXBB_P200.dtb), so I chose GXBB_p200_2G.dtb and saved it as dtb.img. It boots just fine from SD card with network and all.

              - I then ran the install script, it completed successfully.
              - Reboot the box from SD card
              - ran the install script again, completed successfully.
              - Now when I try to boot from eMMC, I reach starting kernel and then it hangs there.
              - I've compared the boot partition of SD card and eMMC by mounting /dev/data to ddbr/install and see that all the files (incl dtb) are there and they're identical.

              I am at a loss on how to proceed further. I'll take a break from this for a few days and then come back with a fresh perspective.

              Balbes - Thanks for your help.

              Comment


                Update regarding the buildroot I attempted a couple of weeks ago. I think I had a few different issues that prevented my last attempt to be successful.

                This time I followed the steps in this release to successfully make buildroot and install it on one of my boxes.



                This box is ENY EM95 with S905, 1GB RAM and Gigabit ethernet. I used GXBB_p200 for dtb file and can successfully boot using buildroot, get gigabit ethernet connectivity. The only issue is that HDMI does not display anything on monitor. I suspect this is due to faulty HDMI on the board because none of the other distro's are displaying on the monitor either.

                The only way I can be certain that buildroot I made is good for display is by installing it on another board to test. The other board I have is an ENY EM95 with 2GB RAM and gigabit ethernet.

                Unfortunately, this board fails to boot. I think this may be due to incorrect DTB file - I am using GXBB_p200. How do I find out which DTB file to use for this board ?

                I've tried Armbian with GXBB_p200_2G and that does boot alright. So I used GXBB_P200_2g.dtb while installing buildroot and it still fails to boot.

                I have a few other boards and will look into installing buildroot on them to try this out later.


                Comment


                  I should add - this time I installed the Buildroot using Amlogic USB burning tool and that was successful.

                  Is there any way for me to unpack aml_upgrade_package.img so I can insert different dtb files in the package one by one and write to this second board (ENY EM95 2G) ?
                  In my post a few minutes ago - when I said I tried different dtb files, I meant using the instructions to install buildroot to eMMC via SD card. This process has not been as much fool proof as the USB burning method, that's why I'd prefer the USB burning method if I can get the dtb file inserted in that image.

                  Comment


                    Originally posted by ajiratech View Post
                    I should add - this time I installed the Buildroot using Amlogic USB burning tool and that was successful.

                    Is there any way for me to unpack aml_upgrade_package.img so I can insert different dtb files in the package one by one and write to this second board (ENY EM95 2G) ?
                    In my post a few minutes ago - when I said I tried different dtb files, I meant using the instructions to install buildroot to eMMC via SD card. This process has not been as much fool proof as the USB burning method, that's why I'd prefer the USB burning method if I can get the dtb file inserted in that image.
                    As far as I know, is to change the dtb file in the firmware, there is a tool Burn Tool UBS. On this forum there is a topic with description of this tool.

                    Comment


                      Hi all,
                      I've got an s912 h96 Pro plus with android Nougat update by myself with usb cable.
                      I would like to test an armbian version on, I'm trying to do the balbes150 procedure but I'm not able to find local update in backup app? Only online backup in my Rom...
                      Does anyone could help me to put Linux on my h96.
                      If you have a easy full tutorial for me... Thank's by advance.
                      I'm French
                      Regards
                      Remi

                      Envoyé de mon SM-T580 en utilisant Tapatalk

                      Comment


                        Originally posted by pulesky View Post
                        Hi all,
                        I would like to test an armbian version on, I'm trying to do the balbes150 procedure but I'm not able to find local update in backup app? Only online backup in my Rom...
                        That's unusual but the toothpick method should work as well. H96 Pro+ needs a dtb.img in the root directory, see the armbian thread for details.

                        Comment


                          I know for dtb file but which dtb file is working? does anyone who have h96 Pro plus have a tutorial?

                          Comment


                            Originally posted by pulesky View Post
                            I know for dtb file but which dtb file is working?
                            Start with an image based on the 3.14 kernel and use this dtb file. It's all in the mentioned thread.

                            Comment


                              Originally posted by Shimon View Post

                              Start with an image based on the 3.14 kernel and use this dtb file. It's all in the mentioned thread.
                              Thanks that the dtb I used...
                              do you have the link of the thread?
                              Thank you for your help!

                              Comment


                                balbes150

                                Gave you considered using ordrobian as the base image rather than armbian?

                                Comment

                                Working...
                                X