20250321在荣品的PRO-RK3566开发板的buildroot系统下使用ll命令【直接编译进IMG】

./buildroot/system/skeleton/etc/profile

some more ls aliases

alias ll='ls -alF'

alias la='ls -A'

alias l='ls -CF'

20250321在荣品的PRO-RK3566开发板的buildroot系统下使用ll命令【直接编译进IMG】

2025/3/21 16:53

cd /etc/

echo "" >>

some more ls aliases

alias ll='ls -alF'

alias la='ls -A'

alias l='ls -CF'

20250318在荣品的PRO-RK3566开发板的buildroot系统下使用ll命令【通过VI直接修改profile】

2025/3/18 10:40

缘起,在ubuntu20.04下使用ll命令习惯了。在Rockchip的Android10/11/12/13下也解决了ll命令的使用。

在Rockchip的buildroot下使用ll命令一直没有解决。

@余顺?请问如何在RK3566的buildroot下实现ll命令 ls -l

在 ubuntu下使用ll习惯了

这个在环境变量配置文件/etc/profile中间加上

alias ll='ls -al' 然后重启测试

在串口终端中使用VI直接修改/etc/profile:

root@rk3566-buildroot:/etc#

root@rk3566-buildroot:/etc# diff profile profile.bak1

--- profile

+++ profile.bak1

@@ -16,8 +16,6 @@

fi

fi

-alias ll='ls -alF'

export EDITOR='/bin/vi'

Source configuration files from /etc/profile.d

root@rk3566-buildroot:/etc#

root@rk3566-buildroot:/etc#

我直接使用了 ubuntu20.04的ll了。可以了

追问:我希望 直接将 ll编译进 IMG固件中。

请问该如何配置呢?

在sdk中find-name 同名文件将修改放进去去,然后重新清理之前构建的文件,重新编译buildroot

./buildroot/system/skeleton/etc/profile

这个profile和板子上的profile很像。应该是这里了

rootroot@rootroot-X99-Turbo:~/source rootroot@rootroot-X99-Turbo:\~/source find . -name profile
./kernel/include/config/branch/profile
./kernel/include/config/arch/has/gcov/profile
./buildroot/system/skeleton/etc/profile

./buildroot/output/rockchip_rk3566/host/aarch64-buildroot-linux-gnu/sysroot/etc/profile

./buildroot/output/rockchip_rk3566/build/host-gcc-initial-12.3.0/libstdc++-v3/testsuite/23_containers/vector/profile

./buildroot/output/rockchip_rk3566/build/host-gcc-initial-12.3.0/libstdc++-v3/testsuite/23_containers/unordered_map/profile

./buildroot/output/rockchip_rk3566/build/host-gcc-final-12.3.0/libstdc++-v3/testsuite/23_containers/vector/profile

./buildroot/output/rockchip_rk3566/build/host-gcc-final-12.3.0/libstdc++-v3/testsuite/23_containers/unordered_map/profile

./buildroot/output/rockchip_rk3566/build/linux-headers-custom/include/config/branch/profile

./buildroot/output/rockchip_rk3566/build/linux-headers-custom/include/config/arch/has/gcov/profile

./buildroot/output/rockchip_rk3566/build/linux-custom/include/config/branch/profile

./buildroot/output/rockchip_rk3566/build/linux-custom/include/config/arch/has/gcov/profile

./buildroot/output/rockchip_rk3566/build/busybox-1.36.0/examples/bootfloppy/etc/profile

./buildroot/output/rockchip_rk3566/target/etc/profile

./buildroot/output/rockchip_rk3566_recovery/host/aarch64-buildroot-linux-gnu/sysroot/etc/profile

./buildroot/output/rockchip_rk3566_recovery/build/host-gcc-initial-12.3.0/libstdc++-v3/testsuite/23_containers/vector/profile

./buildroot/output/rockchip_rk3566_recovery/build/host-gcc-initial-12.3.0/libstdc++-v3/testsuite/23_containers/unordered_map/profile

./buildroot/output/rockchip_rk3566_recovery/build/host-gcc-final-12.3.0/libstdc++-v3/testsuite/23_containers/vector/profile

./buildroot/output/rockchip_rk3566_recovery/build/host-gcc-final-12.3.0/libstdc++-v3/testsuite/23_containers/unordered_map/profile

./buildroot/output/rockchip_rk3566_recovery/build/linux-headers-custom/include/config/branch/profile

./buildroot/output/rockchip_rk3566_recovery/build/linux-headers-custom/include/config/arch/has/gcov/profile

./buildroot/output/rockchip_rk3566_recovery/build/busybox-1.36.0/examples/bootfloppy/etc/profile

./buildroot/output/rockchip_rk3566_recovery/target/etc/profile

./yocto/poky/meta/recipes-core/base-files/base-files/profile

rootroot@rootroot-X99-Turbo:~/source$

Z:\source\buildroot\system\skeleton\etc\profile

export PATH=@PATH@

if "$PS1" ; then

if "$BASH" ; then

The file bash.bashrc already sets the default PS1.

PS1='\h:\w\$ '

if -f /etc/bash.bashrc ; then

. /etc/bash.bashrc

fi

else

if "\`id -u\`" -eq 0 ; then

PS1='# '

else

PS1='$ '

fi

fi

fi

some more ls aliases

alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

export EDITOR='/bin/vi'

Source configuration files from /etc/profile.d

for i in /etc/profile.d/*.sh ; do

if -r "$i" ; then

. $i

fi

done

unset i

root@rk3566-buildroot:/# cd /etc/

root@rk3566-buildroot:/etc#

root@rk3566-buildroot:/etc# cat profile

export PATH="/usr/bin:/usr/sbin"

if "$PS1" ; then

if "$BASH" ; then

The file bash.bashrc already sets the default PS1.

PS1='\h:\w\$ '

if -f /etc/bash.bashrc ; then

. /etc/bash.bashrc

fi

else

if "\`id -u\`" -eq 0 ; then

PS1='# '

else

PS1='$ '

fi

fi

fi

alias ll='ls -alF'

export EDITOR='/bin/vi'

Source configuration files from /etc/profile.d

for i in /etc/profile.d/*.sh ; do

if -r "$i" ; then

. $i

fi

done

unset i

root@rk3566-buildroot:/etc#

修改记录:

root@rk3566-buildroot:/#

root@rk3566-buildroot:/#
root@rk3566-buildroot:/# ll
total 108
drwxr-xr-x 23 root root 4096 Aug 4 17:00 ./
drwxr-xr-x 23 root root 4096 Aug 4 17:00 ../

drwxr-xr-x 3 root root 4096 Aug 4 17:03 .cache/

-rw-r--r-- 1 root root 0 Aug 4 2017 .resized

-rw-r--r-- 1 root root 0 Mar 12 2025 .skip_fsck

-rw-r--r-- 1 root root 0 Aug 4 2017 640x512-at600.mp4

lrwxrwxrwx 1 root root 7 Mar 21 2025 bin -> usr/bin/

-rw-r--r-- 1 root root 489 Mar 12 2025 busybox.fragment

lrwxrwxrwx 1 root root 8 Mar 21 2025 data -> userdata/

drwxr-xr-x 15 root root 4940 Aug 4 17:00 dev/

drwxr-xr-x 25 root root 4096 Aug 4 2017 etc/

drwxr-xr-x 2 root root 4096 Mar 21 2025 info/

lrwxrwxrwx 1 root root 7 Mar 21 2025 lib -> usr/lib/

lrwxrwxrwx 1 root root 3 Mar 21 2025 lib64 -> lib/

lrwxrwxrwx 1 root root 11 Mar 21 2025 linuxrc -> bin/busybox*

drwx------ 2 root root 16384 Mar 21 2025 lost+found/

drwxr-xr-x 11 root root 4096 Mar 21 2025 media/

drwxr-xr-x 5 root root 4096 Mar 21 2025 mnt/

drwxr-xr-x 2 root root 4096 Mar 21 2025 oem/

drwxr-xr-x 3 root root 4096 Mar 21 2025 opt/

dr-xr-xr-x 219 root root 0 Aug 4 17:00 proc/

drwxr-xr-x 16 root root 4096 Mar 21 2025 rockchip-test/

drwx------ 2 root root 4096 Mar 12 2025 root/

drwxr-xr-x 7 root root 4096 Mar 12 2025 rp_stress_test/

drwxr-xr-x 31 root root 4096 Mar 12 2025 rp_test/

drwxr-xr-x 11 root root 520 Aug 4 17:00 run/

lrwxrwxrwx 1 root root 8 Mar 21 2025 sbin -> usr/sbin/

lrwxrwxrwx 1 root root 10 Mar 21 2025 sdcard -> mnt/sdcard/

dr-xr-xr-x 14 root root 0 Aug 4 17:00 sys/

drwxr-xr-x 3 root root 4096 Mar 21 2025 system/

drwxrwxrwt 6 root root 280 Aug 4 17:00 tmp/

-rwxr-xr-x 1 root root 18608 Aug 4 2017 uart_test*

lrwxrwxrwx 1 root root 9 Mar 21 2025 udisk -> mnt/udisk/

drwxr-xr-x 3 root root 4096 Aug 4 2017 userdata/

drwxr-xr-x 8 root root 4096 Mar 21 2025 usr/

drwxr-xr-x 6 root root 4096 Mar 21 2025 var/

lrwxrwxrwx 1 root root 6 Mar 21 2025 vendor -> system/

root@rk3566-buildroot:/#

root@rk3566-buildroot:/# ls -l

total 96

-rw-r--r-- 1 root root 0 Aug 4 2017 640x512-at600.mp4

lrwxrwxrwx 1 root root 7 Mar 21 2025 bin -> usr/bin

-rw-r--r-- 1 root root 489 Mar 12 2025 busybox.fragment

lrwxrwxrwx 1 root root 8 Mar 21 2025 data -> userdata

drwxr-xr-x 15 root root 4940 Aug 4 17:00 dev

drwxr-xr-x 25 root root 4096 Aug 4 2017 etc

drwxr-xr-x 2 root root 4096 Mar 21 2025 info

lrwxrwxrwx 1 root root 7 Mar 21 2025 lib -> usr/lib

lrwxrwxrwx 1 root root 3 Mar 21 2025 lib64 -> lib

lrwxrwxrwx 1 root root 11 Mar 21 2025 linuxrc -> bin/busybox

drwx------ 2 root root 16384 Mar 21 2025 lost+found

drwxr-xr-x 11 root root 4096 Mar 21 2025 media

drwxr-xr-x 5 root root 4096 Mar 21 2025 mnt

drwxr-xr-x 2 root root 4096 Mar 21 2025 oem

drwxr-xr-x 3 root root 4096 Mar 21 2025 opt

dr-xr-xr-x 219 root root 0 Aug 4 17:00 proc

drwxr-xr-x 16 root root 4096 Mar 21 2025 rockchip-test

drwx------ 2 root root 4096 Mar 12 2025 root

drwxr-xr-x 7 root root 4096 Mar 12 2025 rp_stress_test

drwxr-xr-x 31 root root 4096 Mar 12 2025 rp_test

drwxr-xr-x 11 root root 520 Aug 4 17:00 run

lrwxrwxrwx 1 root root 8 Mar 21 2025 sbin -> usr/sbin

lrwxrwxrwx 1 root root 10 Mar 21 2025 sdcard -> mnt/sdcard

dr-xr-xr-x 14 root root 0 Aug 4 17:00 sys

drwxr-xr-x 3 root root 4096 Mar 21 2025 system

drwxrwxrwt 6 root root 280 Aug 4 17:00 tmp

-rwxr-xr-x 1 root root 18608 Aug 4 2017 uart_test

lrwxrwxrwx 1 root root 9 Mar 21 2025 udisk -> mnt/udisk

drwxr-xr-x 3 root root 4096 Aug 4 2017 userdata

drwxr-xr-x 8 root root 4096 Mar 21 2025 usr

drwxr-xr-x 6 root root 4096 Mar 21 2025 var

lrwxrwxrwx 1 root root 6 Mar 21 2025 vendor -> system

root@rk3566-buildroot:/#

root@rk3566-buildroot:/#

root@rk3566-buildroot:/# cd /etc/

root@rk3566-buildroot:/etc# ls -l

root@rk3566-buildroot:/etc# cat profile

export PATH="/usr/bin:/usr/sbin"

if "$PS1" ; then

if "$BASH" ; then

The file bash.bashrc already sets the default PS1.

PS1='\h:\w\$ '

if -f /etc/bash.bashrc ; then

. /etc/bash.bashrc

fi

else

if "\`id -u\`" -eq 0 ; then

PS1='# '

else

PS1='$ '

fi

fi

fi

export EDITOR='/bin/vi'

Source configuration files from /etc/profile.d

for i in /etc/profile.d/*.sh ; do

if -r "$i" ; then

. $i

fi

done

unset i

root@rk3566-buildroot:/etc#

root@rk3566-buildroot:/etc#

root@rk3566-buildroot:/etc# sudo cp profile profile.bak1

sh: sudo: command not found

root@rk3566-buildroot:/etc# cp profile profile.bak1

root@rk3566-buildroot:/etc# ls -l

root@rk3566-buildroot:/etc# vi profile

root@rk3566-buildroot:/etc# diff profile profile.bak1

--- profile

+++ profile.bak1

@@ -16,8 +16,6 @@

fi

fi

-alias ll='ls -alF'

export EDITOR='/bin/vi'

Source configuration files from /etc/profile.d

root@rk3566-buildroot:/etc#

root@rk3566-buildroot:/etc#

root@rk3566-buildroot:/etc# reboot

root@rk3566-buildroot:/#

root@rk3566-buildroot:/# ll

root@rk3566-buildroot:/#

ubuntu20.04下的ll的配置【.bashrc文件中】

rootroot@rootroot-X99-Turbo:~$

rootroot@rootroot-X99-Turbo:~$ cat .bashrc

~/.bashrc: executed by bash(1) for non-login shells.

see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)

for examples

If not running interactively, don't do anything

case $- in

*i*) ;;

*) return;;

esac

don't put duplicate lines or lines starting with space in the history.

See bash(1) for more options

HISTCONTROL=ignoreboth

append to the history file, don't overwrite it

shopt -s histappend

for setting history length see HISTSIZE and HISTFILESIZE in bash(1)

HISTSIZE=1000

HISTFILESIZE=2000

check the window size after each command and, if necessary,

update the values of LINES and COLUMNS.

shopt -s checkwinsize

If set, the pattern "**" used in a pathname expansion context will

match all files and zero or more directories and subdirectories.

#shopt -s globstar

make less more friendly for non-text input files, see lesspipe(1)

-x /usr/bin/lesspipe && eval "$(SHELL=/bin/sh lesspipe)"

set variable identifying the chroot you work in (used in the prompt below)

if -z "${debian_chroot:-}" && -r /etc/debian_chroot ; then

debian_chroot=$(cat /etc/debian_chroot)

fi

set a fancy prompt (non-color, unless we know we "want" color)

case "$TERM" in

xterm-color|*-256color) color_prompt=yes;;

esac

uncomment for a colored prompt, if the terminal has the capability; turned

off by default to not distract the user: the focus in a terminal window

should be on the output of commands, not on the prompt

#force_color_prompt=yes

if -n "$force_color_prompt" ; then

if -x /usr/bin/tput && tput setaf 1 >&/dev/null; then

We have color support; assume it's compliant with Ecma-48

(ISO/IEC-6429). (Lack of such support is extremely rare, and such

a case would tend to support setf rather than setaf.)

color_prompt=yes

else

color_prompt=

fi

fi

if "$color_prompt" = yes ; then

PS1='{debian_chroot:+(debian_chroot)}\\\033\[01;32m\\\u@\h\\\033\[00m\\:\\\033\[01;34m\\\w\\\033\[00m\\\$ '

else

PS1='{debian_chroot:+(debian_chroot)}\u@\h:\w\$ '

fi

unset color_prompt force_color_prompt

If this is an xterm set the title to user@host:dir

case "$TERM" in

xterm*|rxvt*)

PS1="\\\e0;{debian_chroot:+(debian_chroot)}\u@\h: \w\a\]$PS1"

;;

*)

;;

esac

enable color support of ls and also add handy aliases

if -x /usr/bin/dircolors ; then

test -r ~/.dircolors && eval "(dircolors -b \~/.dircolors)" \|\| eval "(dircolors -b)"

alias ls='ls --color=auto'

#alias dir='dir --color=auto'

#alias vdir='vdir --color=auto'

alias grep='grep --color=auto'

alias fgrep='fgrep --color=auto'

alias egrep='egrep --color=auto'

fi

colored GCC warnings and errors

#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

some more ls aliases

alias ll='ls -alF'

alias la='ls -A'

alias l='ls -CF'

Add an "alert" alias for long running commands. Use like so:

sleep 10; alert

alias alert='notify-send --urgency=low -i "(\[ ? = 0 ] && echo terminal || echo error)" "(history\|tail -n1\|sed -e '\\''s/\^\\s\*\[0-9\]\\+\\s\*//;s/\[;\&\|\]\\s\*alert//'\'')"'

Alias definitions.

You may want to put all your additions into a separate file like

~/.bash_aliases, instead of adding them here directly.

See /usr/share/doc/bash-doc/examples in the bash-doc package.

if -f \~/.bash_aliases ; then

. ~/.bash_aliases

fi

enable programmable completion features (you don't need to enable

this, if it's already enabled in /etc/bash.bashrc and /etc/profile

sources /etc/bash.bashrc).

if ! shopt -oq posix; then

if -f /usr/share/bash-completion/bash_completion ; then

. /usr/share/bash-completion/bash_completion

elif -f /etc/bash_completion ; then

. /etc/bash_completion

fi

fi

rootroot@rootroot-X99-Turbo:~$

rootroot@rootroot-X99-Turbo:~$ cat /etc/issue

Ubuntu 20.04.6 LTS \n \l

rootroot@rootroot-X99-Turbo:~$

rootroot@rootroot-X99-Turbo:~$ uanme -a

Command 'uanme' not found, did you mean:

command 'uname' from deb coreutils (8.30-3ubuntu2)

command 'uacme' from deb uacme (1.0.22-1)

Try: sudo apt install <deb name>

rootroot@rootroot-X99-Turbo:~$

rootroot@rootroot-X99-Turbo:~$ uname -a

Linux rootroot-X99-Turbo 5.15.0-131-generic #141~20.04.1-Ubuntu SMP Thu Jan 16 18:38:51 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

rootroot@rootroot-X99-Turbo:~$

rootroot@rootroot-X99-Turbo:~$

相关推荐
我是一颗柠檬1 小时前
【MySQL全面教学】MySQL面试高频考点汇总Day15(2026年)
数据库·后端·mysql·面试
凯瑟琳.奥古斯特2 小时前
高阶子查询题目精炼
开发语言·数据库·python·职场和发展·数据库开发
lolo大魔王2 小时前
Linux 文件系统超全面详解(原理、结构、挂载、分区、inode、日志、管理命令)
linux·运维·服务器
身如柳絮随风扬2 小时前
数据库读写分离:从原理到实战,构建高并发系统
数据库·mysql
提笔了无痕3 小时前
RAG存储策略中.md格式的切片与存储怎么处理
数据库·ai·rag
陳土3 小时前
DuckDB精读——基于Getting started with DuckDB
数据库·oracle
磊 子3 小时前
详细讲解一下epoll
linux·io·epoll·io多路复用
凯瑟琳.奥古斯特4 小时前
数据库原理选择题精选
数据库·python·职场和发展
printfLILEI4 小时前
php中的类与对象以及反序列化
linux·开发语言·php