1*4882a593Smuzhiyun## Introduction 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunA set of shell scripts that will build GNU/Linux distribution rootfs image 4*4882a593Smuzhiyunfor rockchip platform. 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun## Available Distro 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun* Debian 11 (Bullseye-X11 and Wayland)~~ 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun``` 11*4882a593Smuzhiyunsudo apt-get install binfmt-support qemu-user-static 12*4882a593Smuzhiyunsudo dpkg -i ubuntu-build-service/packages/* 13*4882a593Smuzhiyunsudo apt-get install -f 14*4882a593Smuzhiyun``` 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun## Usage for 32bit Debian 11 (Bullseye-32) 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun### Building debian system from linaro 19*4882a593Smuzhiyun 20*4882a593SmuzhiyunBuilding a base debian system by ubuntu-build-service from linaro. 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun``` 23*4882a593Smuzhiyun RELEASE=bullseye TARGET=base ARCH=armhf ./mk-base-debian.sh 24*4882a593Smuzhiyun``` 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunBuilding a desktop debian system by ubuntu-build-service from linaro. 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun``` 29*4882a593Smuzhiyun RELEASE=bullseye TARGET=desktop ARCH=armhf ./mk-base-debian.sh 30*4882a593Smuzhiyun``` 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun### Building overlay with rockchip audio/video hardware accelerated 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun- Building with overlay with rockchip debian rootfs: 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun``` 37*4882a593Smuzhiyun RELEASE=bullseye ARCH=armhf ./mk-rootfs.sh 38*4882a593Smuzhiyun``` 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun- Building with overlay with rockchip debug debian rootfs: 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun``` 43*4882a593Smuzhiyun VERSION=debug ARCH=armhf ./mk-rootfs-bullseye.sh 44*4882a593Smuzhiyun``` 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun### Creating roofs image 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunCreating the ext4 image(linaro-rootfs.img): 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun``` 51*4882a593Smuzhiyun ./mk-image.sh 52*4882a593Smuzhiyun``` 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun--- 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun## Usage for 64bit Debian 11 (Bullseye-64) 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun### Building debian system from linaro 59*4882a593Smuzhiyun 60*4882a593SmuzhiyunBuilding a base debian system by ubuntu-build-service from linaro. 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun``` 63*4882a593Smuzhiyun RELEASE=bullseye TARGET=desktop ARCH=arm64 ./mk-base-debian.sh 64*4882a593Smuzhiyun``` 65*4882a593Smuzhiyun 66*4882a593Smuzhiyun### Building overlay with rockchip audio/video hardware accelerated 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun- Building the rk-debian rootfs 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun``` 71*4882a593Smuzhiyun RELEASE=bullseye ARCH=arm64 ./mk-rootfs.sh 72*4882a593Smuzhiyun``` 73*4882a593Smuzhiyun 74*4882a593Smuzhiyun- Building the rk-debain rootfs with debug 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun``` 77*4882a593Smuzhiyun VERSION=debug ARCH=arm64 ./mk-rootfs-bullseye.sh 78*4882a593Smuzhiyun``` 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun### Creating roofs image 81*4882a593Smuzhiyun 82*4882a593SmuzhiyunCreating the ext4 image(linaro-rootfs.img): 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun``` 85*4882a593Smuzhiyun ./mk-image.sh 86*4882a593Smuzhiyun``` 87*4882a593Smuzhiyun--- 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun## Cross Compile for ARM Debian 90*4882a593Smuzhiyun 91*4882a593Smuzhiyun[Docker + Multiarch](http://opensource.rock-chips.com/wiki_Cross_Compile#Docker) 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun## Package Code Base 94*4882a593Smuzhiyun 95*4882a593SmuzhiyunPlease apply [those patches](https://github.com/rockchip-linux/rk-rootfs-build/tree/master/packages-patches) to release code base before rebuilding! 96*4882a593Smuzhiyun 97*4882a593Smuzhiyun## License information 98*4882a593Smuzhiyun 99*4882a593SmuzhiyunPlease see [debian license](https://www.debian.org/legal/licenses/) 100*4882a593Smuzhiyun 101*4882a593Smuzhiyun## FAQ 102*4882a593Smuzhiyun 103*4882a593Smuzhiyun- noexec or nodev issue 104*4882a593Smuzhiyunnoexec or nodev issue /usr/share/debootstrap/functions: line 1450: 105*4882a593Smuzhiyun../rootfs/ubuntu-build-service/bullseye-desktop-arm64/chroot/test-dev-null: 106*4882a593SmuzhiyunPermission denied E: Cannot install into target 107*4882a593Smuzhiyun... 108*4882a593Smuzhiyunmounted with noexec or nodev 109*4882a593Smuzhiyun 110*4882a593SmuzhiyunSolution: mount -o remount,exec,dev xxx (xxx is the mount place), then rebuild it. 111