🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    CoreMP135 Debian image

    Cores
    8
    46
    10.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      flypeek
      last edited by

      A command prompt starting with "$" indicates that the current user is in the normal user state, while a command prompt starting with "#" indicates that the user is in the super user (root) state.

      The administrator account with the highest authority in the Linux system is root, also known as the superuser account. There are no restrictions on the use of this account. Administrators can make various changes to the system as long as they obtain this account, such as formatting and Mount the hard drive, add or delete user accounts, change various system services, update the system, etc.

      How did you get into the terminal?

      A 1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3 @aradke
        last edited by ajb2k3

        @aradke trying to write documentation on how to do stuff with the CoreMP135 there are 2 ways, directly or via SSH

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        A 1 Reply Last reply Reply Quote 0
        • A
          aradke @flypeek
          last edited by

          @flypeek Please note that the issue is that files and folders are owned by UID 1000 not UID 0.

          You are asking about a completely different thing. Whether I access the command prompt by the console or SSH won't change the fact that file permissions and ownerships are incorrect. Whether I am logged in as root, or an unprivileged user, or as a user that has used sudo / su to elevate to root privileges isn't relevant to incorrect permissions.

          An example is that timedatectl won't function properly because certain files under /etc are not owned by root. Correcting the permissions is possible and it fixes it, but the entire OS image has files all over the place owned by UID 1000. At this point it would be more reasonable to recreate the image than to try to check every file.

          1 Reply Last reply Reply Quote 0
          • A
            aradke @ajb2k3
            last edited by

            @ajb2k3 Thanks. :-)

            Probably not a help in this case as we're wanting to fix or recreate the base Debian 12 image.

            The file system ownerships being incorrect is the first big hurdle. But we also have a couple of USB devices that need a newer Linux kernel and would like to be able to create test images with newer kernels if possible.

            1 Reply Last reply Reply Quote 0
            • ajb2k3A
              ajb2k3
              last edited by

              Ok I will work on the image side next and see if I can solve a few things. I know SUDO isn’t installed but yet referance is made to it.

              UIFlow, so easy an adult can learn it!
              If I don't know it, be patient!
              I've ether not learned it or am too drunk to remember it!
              Author of the WIP UIFlow Handbook!
              M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

              A 1 Reply Last reply Reply Quote 0
              • ajb2k3A
                ajb2k3
                last edited by

                The source is located here but I'm going crosseyed from looking through it.
                I can see how to set the file and directory permissions but not where they are set.
                It looks to be a build root version of archlinux

                UIFlow, so easy an adult can learn it!
                If I don't know it, be patient!
                I've ether not learned it or am too drunk to remember it!
                Author of the WIP UIFlow Handbook!
                M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                A 1 Reply Last reply Reply Quote 0
                • A
                  aradke @ajb2k3
                  last edited by

                  @ajb2k3 sudo isn't included on a minimal Debian installation. It's usually the very first things that we install so that the rest of the system can be fully configured by Ansible.

                  1 Reply Last reply Reply Quote 0
                  • A
                    aradke @ajb2k3
                    last edited by

                    @ajb2k3 if you are building the base filesystem inside a chroot environment then you should be able to install packages as normal via apt.

                    The permissions from the original source should be fine, and apt will make sure any further permissions are also correct. Going back to fix already damaged permissions would be difficult and it would be very easy to miss something.

                    ajb2k3A 1 Reply Last reply Reply Quote 0
                    • ajb2k3A
                      ajb2k3 @aradke
                      last edited by ajb2k3

                      @aradke said in CoreMP135 Debian image:

                      The permissions from the original source should be fine, and apt will make sure any further permissions are also correct. Going back to fix already damaged permissions would be difficult and it would be very easy to miss something.

                      That's why I spent last night going through the source so I could find where these are set. I could not find the config for the directory like /etc.

                      Ah it's the host system that set the file permissions.

                      When the image was generated it wasn't compiled under root so directorys weren't set as root but to the permissions of the host.
                      The image need to be re generated as root.

                      UIFlow, so easy an adult can learn it!
                      If I don't know it, be patient!
                      I've ether not learned it or am too drunk to remember it!
                      Author of the WIP UIFlow Handbook!
                      M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        aradke @ajb2k3
                        last edited by

                        @ajb2k3 :-)

                        When creating Linux container templates the same issue can arise. If you do any part of it as a non-root account the file and directory ownerships will all end up being the same as the UID you are currently working with instead of as root, etc.

                        Sometimes things will appear to function okay for a while but if a directory is meant to be owned by a non-root account, such as www-data, then anything using it will completely fail.

                        Is there any chance you'll be able to document the procedure for creating the image? It would be very, very good to be able to create customised ones and to test different kernels.

                        Thanks

                        ajb2k3A 1 Reply Last reply Reply Quote 0
                        • ajb2k3A
                          ajb2k3 @aradke
                          last edited by

                          @aradke that’s what I’m doing at the moment. I am taking to the programmer about how to build the image

                          UIFlow, so easy an adult can learn it!
                          If I don't know it, be patient!
                          I've ether not learned it or am too drunk to remember it!
                          Author of the WIP UIFlow Handbook!
                          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                          P 1 Reply Last reply Reply Quote 0
                          • P
                            prima @ajb2k3
                            last edited by

                            I am currently writing an Ansible playbook to automate the customization of my device, and some things like setting the time zone don't work for the reason described above. Hopefully this can get fixed soon.

                            I am also working on the LCD screen, as I would prefer to use Python rather than the proposed C environment.

                            ajb2k3A 1 Reply Last reply Reply Quote 0
                            • ajb2k3A
                              ajb2k3 @prima
                              last edited by

                              @prima well currently I'm trying to get the code to compile following the online instructions but they dont work

                              UIFlow, so easy an adult can learn it!
                              If I don't know it, be patient!
                              I've ether not learned it or am too drunk to remember it!
                              Author of the WIP UIFlow Handbook!
                              M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                              ajb2k3A 1 Reply Last reply Reply Quote 0
                              • ajb2k3A
                                ajb2k3 @ajb2k3
                                last edited by ajb2k3

                                Ah ha I got it to compile, the instructions are wrong.
                                You need to run

                                make BR2_EXTERNAL=../CoreMP135_buildroot-external-st/ m5stack_coremp135_515_defconfig
                                make -j4
                                

                                To get it to compile.
                                I'm Using a CM4Stack so its slow going.
                                The issue turns out to be a typo in the line. The guide says /Core135_ but the command is actually CoreMP135

                                UIFlow, so easy an adult can learn it!
                                If I don't know it, be patient!
                                I've ether not learned it or am too drunk to remember it!
                                Author of the WIP UIFlow Handbook!
                                M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                                1 Reply Last reply Reply Quote 0
                                • P
                                  prima
                                  last edited by

                                  On a side note and not sure this is a related issue, but I can't seem to shut down the device cleanly. I have tried: shutdown, poweroff, halt and the device always reboots instead of shutting down.

                                  ajb2k3A 1 Reply Last reply Reply Quote 0
                                  • ajb2k3A
                                    ajb2k3 @prima
                                    last edited by

                                    @prima yeh I noticed that too after issuing the Shutdown now command.

                                    UIFlow, so easy an adult can learn it!
                                    If I don't know it, be patient!
                                    I've ether not learned it or am too drunk to remember it!
                                    Author of the WIP UIFlow Handbook!
                                    M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                                    N 1 Reply Last reply Reply Quote 0
                                    • N
                                      nnn @ajb2k3
                                      last edited by

                                      A script to build Debian image is now available in the M5Stack repository.

                                      • CoreMP135_buildroot-external-st
                                        https://github.com/m5stack/CoreMP135_buildroot-external-st/blob/st/2023.02.10/tools/creat_coremp135_debian12_image.sh

                                      • How to implement (Japanese)
                                        https://qiita.com/nnn112358/items/44921e2470353653058e

                                      ajb2k3A M 2 Replies Last reply Reply Quote 0
                                      • ajb2k3A
                                        ajb2k3 @nnn
                                        last edited by

                                        @nnn said in CoreMP135 Debian image:

                                        A script to build Debian image is now available in the M5Stack repository.

                                        • CoreMP135_buildroot-external-st
                                          https://github.com/m5stack/CoreMP135_buildroot-external-st/blob/st/2023.02.10/tools/creat_coremp135_debian12_image.sh

                                        • How to implement (Japanese)
                                          https://qiita.com/nnn112358/items/44921e2470353653058e

                                        Nice

                                        UIFlow, so easy an adult can learn it!
                                        If I don't know it, be patient!
                                        I've ether not learned it or am too drunk to remember it!
                                        Author of the WIP UIFlow Handbook!
                                        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          mgrouch @nnn
                                          last edited by

                                          @nnn

                                          Is there Debian image for CoreMP135 which includes kernel built with all drivers for hardware interfaces of CoreMP135.

                                          I’m considering buying that CoreMP135 and
                                          I need to make sure I will be able to use CAN Bus interfaces, i2c, uart, USB, Bluetooth, RS485, Both Ethernets and WiFi, as well as
                                          touchscreen of CoreMP135 with the Debian image provided.

                                          When it boots, does it boot into some kind of framebuffer LVGL GUI on 2” touchscreen?
                                          Is there code example how to do that?

                                          Or CoreMP135 is sold as hardware platform and users are left to build own Linux kernel and Debian images to support hardware CoreMP135?

                                          Or there is a Debian image which fully supports
                                          CoreMP135 Hardware and all interfaces?

                                          Hardware is not much of use for me if there is no software with drivers supporting it.

                                          Thanks!

                                          P teastainT 2 Replies Last reply Reply Quote 0
                                          • P
                                            prima @mgrouch
                                            last edited by

                                            @mgrouch said in CoreMP135 Debian image:

                                            I’m considering buying that CoreMP135 and
                                            I need to make sure I will be able to use CAN Bus interfaces, i2c, uart, USB, Bluetooth, RS485, Both Ethernets and WiFi, as well as
                                            touchscreen of CoreMP135 with the Debian image provided.

                                            AFAIK there is no wifi/BT on this device. Dual ethernet works using the available Debian image though. That image has some defects but I guess this is being sorted out.
                                            You can now build your own image (see post above) but I haven't tried that yet.

                                            • I have not tried the CAN bus and the other interfaces.
                                            • USB: seems to work, but I only plugged in a mouse and keyboard
                                            • The serial console works over USB-C and I also use the USB-C cable to power the device from my PC.

                                            When it boots, does it boot into some kind of framebuffer LVGL GUI on 2” touchscreen?
                                            Is there code example how to do that?

                                            If that can help: I recently posted on how to develop Python apps in GTK or QT, using the frame buffer with Xorg/Openbox.

                                            This is roughly the approach I have used for developing on Raspberry PI and other SBCs.

                                            The touch screen work without problem for me.

                                            M 1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post