Jump to content

How can i disable from kernel in Sunxi the HDMI, Audio, etc


bl4ckc00k1e

Recommended Posts

Hi all again,

 

I need disable this hardware on the kernel of the board because i dont use it:

  • HDMI
  • Audio
  • IR receiver
  • Camera
  • LCD screen

 

For do this i should recompile the kernel? or i can desactivate in the armbian with out recompile?

 

And how i do this? i am very noob with kernels.

 

Best Regards!

Link to comment
Share on other sites

Try having a look at the top of /boot/boot.cmd

 

-This is a file, which needs to be compiled (but you have the compiler)

Now, if you make a mistake, you might have to re-write your sd-card, so I will suggest you do the following:

 

1: Take out the SD-card you usually boot from and put it somewhere safe.

2: Get an empty card (a different card).

3: Write Armbian to this card, then boot from it.

4: When you've done the basic setup, CD into /boot.

5: copy boot.cmd to boot.cmd.old and boot.scr to boot.scr.old

6: Edit boot.cmd using your favorite editor. (I like nano myself, as it's very simple and easy to learn)

7: Look in /usr/sbin/nand-sata-install, you'll find a few places where 'boot.scr' is re-built from 'boot.cmd'.

8: Pick the one, which generates the SD-card booter and copy that:

mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

After running the above command, your boot.scr is updated. Try booting from the card and see if it works as expected.

 

My boot.cmd for CubieBoard2 looks like this (note: you can most likely not use mine; use the one that is already written to your SD-card)...

 

 

setenv bootargs "console=tty1 root=/dev/mmcblk0p1 rootwait rootfstype=ext4 cgroup-enable=memory swapaccount=1 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 loglevel=1"

-As you see, there are several interesting things to mess with.

What exactly to do to disable things, I do not know, but I'd start by reducing the screen resolution to something small like 640x480@60.

 

I think that other users of this forum will be able to provide a much better answer than mine, but this should give you a place to start.

Link to comment
Share on other sites

I need disable this hardware on the kernel of the board because i dont use it

 

And why don't you start removing the few thousand other drivers from the kernel for hardware that is not even present on your board before? What do you fear?

Link to comment
Share on other sites

And why don't you start removing the few thousand other drivers from the kernel for hardware that is not even present on your board before? What do you fear?

Dont understand very well your question but i supposed that if i remove from kernel this devices, the board will be more eficcient, true? and the kernel will run more faster, true? or i am totaly wronge?

Link to comment
Share on other sites

Dont understand very well your question but i supposed that if i remove from kernel this devices, the board will be more eficcient, true? and the kernel will run more faster, true? or i am totaly wronge?

 

If you really care about performance you have to tweak other settings first. As a starting point: http://linux-sunxi.org/Sunxi_devices_as_NAS#Influence_of_the_chosen_OS_image_on_NAS_performance(follow the links there especially if you have an A10 device since there memory bandwidth might suffer from graphics settings)

Link to comment
Share on other sites

I tried compile the kernel, but i have this issue: "ccache: FATAL: Could not find compiler "arm-linux-gnueabihf-gcc" in PATH"

I see diferent post about this, but i can fix it. i use Vbox and use the ubuntu 14.04 of the download that are in the official tutto of ArmBian y tried too on a Debian Jessie and have same problems.

 

Any helps?

 Armbian building script, http://www.armbian.com | Author: Igor Pecovnik
 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────




                          ┌──────────────────────────────────────────────────────────────────────────────â”
                          │ Installing 27 host dependencies...                                           │  
                          │──────────────────────────────────────────────────────────────────────────────│  
                          │   build-essential cpp-4.7-arm-linux-gnueabi cpp-arm-linux-gnueabi            │  
                          │   cpp-arm-linux-gnueabihf debian-archive-keyring debian-keyring debootstrap  │  
                          │   device-tree-compiler dpkg-dev f2fs-tools g++ g++-4.8                       │  
                          │   gcc-4.7-arm-linux-gnueabi gcc-4.7-arm-linux-gnueabi-base                   │  
                          │   gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf keyutils libcloog-ppl1       │  
                          │   libdpkg-perl libfile-fcntllock-perl libgcc-4.7-dev-armel-cross             │  
                          │   libgcc1-armel-cross libgmpxx4ldbl libgomp1-armel-cross libgssglue1 liblzo2 │  
                          │   libncurses5-dev libnfsidmap2 libppl-c4 libppl13 libssl-dev libstdc++-4.8-d │  
                          │   libtinfo-dev libtirpc1 libusb-1.0-0-dev lzop nfs-common nfs-kernel-server  │  
                          │   pigz pkg-config pv qemu-user-static rpcbind u-boot-tools unzip uuid-dev zi │  
                          │   zlib1g-dev                                                                 │  
                          │ 0 upgraded, 53 newly installed, 0 to remove and 0 not upgraded.              │  
                          │ Need to get 98.8 MB of archives.                                             │  
                          │ After this operation, 253 MB of additional disk space will be used.          │  
                          │ WARNING: The following packages cannot be authenticated!                     │  
                          │   aptly                                                                     E: There are problems and -y was used without --force-yeshe following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9E3E53F19C7DE460                       





/home/test/lib/general.sh: line 362: update-binfmts: command not found
[ o.k. ] Starting Armbian build script [ @host ]
[ o.k. ] Building [ Armbian 5.05 Bananapim2 Debian jessie dev ]
[ o.k. ] Syncing clock [ host ]
[ o.k. ] source downloading [ @host ]
[ o.k. ] ... updating [ u-boot ]
[ o.k. ] ... updating [ linux-vanilla ]
[ o.k. ] ... updating [ sunxi-tools ]
[ o.k. ] ... updating [ rt8192cu ]
[ o.k. ] ... updating [ sunxi-display-changer ]
[ o.k. ] ... updating [ mt7601 ]
[ o.k. ] Compiling sunxi tools [ @host & target ]
cp: cannot stat ‘fex2bin’: No such file or directory
cp: cannot stat ‘bin2fex’: No such file or directory
[ o.k. ] Cleaning [ /home/test/sources/u-boot/branchless ]
[ o.k. ] Cleaning [ /home/test/sources/linux-vanilla/branchless ]
[ o.k. ] Cleaning /home/test/output/debs for [ bananapim2 dev ]
[ o.k. ] Started patching process for [ kernel sunxi-dev 4.5.0 ]
[ o.k. ] Looking for user patches in [ userpatches/kernel/sunxi-dev ]
[ o.k. ] ... 0012-bananapi_r1_dts.patch [ succeeded ]
[ o.k. ] ... a20-gmac-txfifo.patch [ succeeded ]
[ o.k. ] ... axp20x-sysfs-interface.patch [ succeeded ]
[ o.k. ] ... bananapi-codec.patch [ succeeded ]
[ o.k. ] ... headers-packing.patch [ succeeded ]
[ o.k. ] ... orangepi-mini-codec.patch [ succeeded ]
[ o.k. ] ... packaging-dev.patch [ succeeded ]
[ o.k. ] ... pcDuino3-nano-codec.patch [ succeeded ]
[ o.k. ] ... stmmac-coe-and-bugged-jumbo.patch [ succeeded ]
[ o.k. ] Started patching process for [ u-boot u-boot-dev 2016.03 ]
[ o.k. ] Looking for user patches in [ userpatches/u-boot/u-boot-dev ]
[ o.k. ] ... add-awsom-uboot.patch [ succeeded ]
[ o.k. ] ... add-cubieboard4.patch [ succeeded ]
[ o.k. ] ... u-boot-02-support-cheap-mmc.patch [ succeeded ]
[ o.k. ] Compiling uboot. Please wait. [ 2016.03 ]

 Armbian building script, http://www.armbian.com | Author: Igor Pecovnik
 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────â”
  │ Compiling u-boot...                                                                                                          │  
  │──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────│  
  │ ccache: FATAL: Could not find compiler "arm-linux-gnueabihf-gcc" in PATH                                                     │  
  │ ccache: FATAL: Could not find compiler "arm-linux-gnueabihf-gcc" in PATH                                                     │  
  │ dirname: missing operand                                                                                                     │  
  │ Try 'dirname --help' for more information.                                                                                   │  
  │ scripts/kconfig/conf  --silentoldconfig Kconfig                                                                              │  
  │   CHK     include/config.h                                                                                                   │  
  │   GEN     include/autoconf.mk                                                                                                │  
  │ ccache: FATAL: Could not find compiler "arm-linux-gnueabihf-gcc" in PATH                                                     │  
  │ make[1]: *** [include/autoconf.mk] Error 1                                                                                   │  
  │ make: *** No rule to make target `include/config/auto.conf', needed by `include/config/uboot.release'.  Stop.                │  
  │                                                                                                                              │  
  │                                                                                                                              │  
  │                                                                                                                              │  
  │                                                                                                                              │  
  │                                                                                                                              │  
  │                                                                                                                              │  
  │                                                                                                                              │  
  │                                                                                                                              │  
  │                                                                                                                              │  
  │                                                                                                                              │  
  │                                                                                                                              │  
  │                                                                                                                              │  
  │                                                                                                                              │  
  └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘  
    


[ o.k. ] Target directory [ /home/test/output/debs/ ]
[ o.k. ] Building deb [ linux-u-boot-dev-bananapim2_5.05_armhf.deb ]
[ error ] ERROR in function compile_uboot [ common.sh:143 ]
[ error ] Building u-boot failed, check configuration 
[ o.k. ] Process terminated 
root@ubuntu:/home/test# find / -name 'arm-linux-gnueabihf*'
/usr/share/man/man1/arm-linux-gnueabihf-cpp-4.8.1.gz
/usr/share/man/man1/arm-linux-gnueabihf-gcc-nm-4.8.1.gz
/usr/share/man/man1/arm-linux-gnueabihf-gcov-4.8.1.gz
/usr/share/man/man1/arm-linux-gnueabihf-gfortran-4.8.1.gz
/usr/share/man/man1/arm-linux-gnueabihf-g++-4.8.1.gz
/usr/share/man/man1/arm-linux-gnueabihf-gcc-ranlib-4.8.1.gz
/usr/share/man/man1/arm-linux-gnueabihf-gcc-4.8.1.gz
/usr/share/man/man1/arm-linux-gnueabihf-gcc-ar-4.8.1.gz
/usr/lib/gcc-cross/arm-linux-gnueabihf
/usr/arm-linux-gnueabihf
/usr/arm-linux-gnueabihf/include/c++/4.8.2/arm-linux-gnueabihf
/usr/x86_64-linux-gnu/arm-linux-gnueabihf
/usr/bin/arm-linux-gnueabihf-g++-4.8
/usr/bin/arm-linux-gnueabihf-elfedit
/usr/bin/arm-linux-gnueabihf-c++filt
/usr/bin/arm-linux-gnueabihf-strip
/usr/bin/arm-linux-gnueabihf-ld.bfd
/usr/bin/arm-linux-gnueabihf-gprof
/usr/bin/arm-linux-gnueabihf-gcov-4.8
/usr/bin/arm-linux-gnueabihf-ld
/usr/bin/arm-linux-gnueabihf-strings
/usr/bin/arm-linux-gnueabihf-gcc-4.8
/usr/bin/arm-linux-gnueabihf-ranlib
/usr/bin/arm-linux-gnueabihf-ar
/usr/bin/arm-linux-gnueabihf-nm
/usr/bin/arm-linux-gnueabihf-addr2line
/usr/bin/arm-linux-gnueabihf-objcopy
/usr/bin/arm-linux-gnueabihf-ld.gold
/usr/bin/arm-linux-gnueabihf-dwp
/usr/bin/arm-linux-gnueabihf-gcc-nm-4.8
/usr/bin/arm-linux-gnueabihf-as
/usr/bin/arm-linux-gnueabihf-cpp-4.8
/usr/bin/arm-linux-gnueabihf-size
/usr/bin/arm-linux-gnueabihf-gcc-ar-4.8
/usr/bin/arm-linux-gnueabihf-gcc-ranlib-4.8
/usr/bin/arm-linux-gnueabihf-readelf
/usr/bin/arm-linux-gnueabihf-gfortran-4.8
/usr/bin/arm-linux-gnueabihf-objdump

Link to comment
Share on other sites

It's a temporary error, long story short - GPG key for aptly repository expired, and now dependencies installation will fail on Ubuntu Trusty.

 

 

# apt-key list
...
pub   2048R/2A194991 2014-03-12 [expired: 2016-03-11]
uid                  Andrey Smirnov <me@sm***.ru>
...

 

 

 

Please try Ubuntu Wily (or Xenial) as your build host in VM.

 

Edit: new key added to build script, so this should be fixed shortly.

Link to comment
Share on other sites

It's a temporary error, long story short - GPG key for aptly repository expired, and now dependencies installation will fail on Ubuntu Trusty.

 

 

# apt-key list
...
pub   2048R/2A194991 2014-03-12 [expired: 2016-03-11]
uid                  Andrey Smirnov <me@sm***.ru>
...

 

 

 

Please try Ubuntu Wily (or Xenial) as your build host in VM.

 

Edit: new key added to build script, so this should be fixed shortly.

 

 

Ubuntu 15.10 works perfectly, thanks.

 

 

I compile the kernel and making an image (i will test it this afternoon), i add some drivers, and delete drivers from IR and Audio.

 

The only problem is that i cant see the HDMI drivers ( or options ) only LCD options.

Link to comment
Share on other sites

Can i add 

net.ifnames=0 biosdevname=0

in this config file? 

https://github.com/armbian/build/issues/944 (its for me critical)

setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait rootfstype=ext4 cgroup-enable=memory swapaccount=1 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 loglevel=7"


where to find all possible settings for disabling hdmi / usb and another?
Not only examples, but all options settings

Link to comment
Share on other sites

also can i use 

script 

 

sed -i 's/disp.screen0_output_mode=1920x1080p60/monitor=none net.ifnames=0 biosdevname=0/' /boot/boot.scr 

or 

 

sed -i 's/disp.screen0_output_mode=1920x1080p60/monitor=none net.ifnames=0 biosdevname=0/' /boot/boot.cmd
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr 

 

what might be the problem in the second case?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines