diff --git a/board/phytium/common/post-custom-skeleton-ubuntu.sh b/board/phytium/common/post-custom-skeleton-ubuntu.sh index ce87ed34..26414115 100755 --- a/board/phytium/common/post-custom-skeleton-ubuntu.sh +++ b/board/phytium/common/post-custom-skeleton-ubuntu.sh @@ -55,19 +55,20 @@ do_distrorfs_first_stage() { exit 1 fi - mkdir -p $2/usr/local/bin - cp -f board/phytium/common/ubuntu-package-installer $RFSDIR/usr/local/bin/ + sudo chown 0:0 $RFSDIR + sudo mkdir -p $2/usr/local/bin + sudo cp -f board/phytium/common/ubuntu-package-installer $RFSDIR/usr/local/bin/ packages_list=board/phytium/common/$3 [ ! -f $packages_list ] && echo $packages_list not found! && exit 1 echo additional packages list: $packages_list if [ ! -d $RFSDIR/usr/aptpkg ]; then - mkdir -p $RFSDIR/usr/aptpkg - cp -f $packages_list $RFSDIR/usr/aptpkg + sudo mkdir -p $RFSDIR/usr/aptpkg + sudo cp -f $packages_list $RFSDIR/usr/aptpkg fi - mkdir -p $RFSDIR/etc - cp -f /etc/resolv.conf $RFSDIR/etc/resolv.conf + sudo mkdir -p $RFSDIR/etc + sudo cp -f /etc/resolv.conf $RFSDIR/etc/resolv.conf if [ ! -d $RFSDIR/debootstrap ]; then echo "testdeboot" diff --git a/board/phytium/common/ubuntu-package-installer b/board/phytium/common/ubuntu-package-installer index c5d05a2e..ef7a9738 100755 --- a/board/phytium/common/ubuntu-package-installer +++ b/board/phytium/common/ubuntu-package-installer @@ -30,6 +30,8 @@ do_distrorfs_second_stage() { # set default hostname echo localhost > /etc/hostname + test -f /proc/uptime || mount -t proc proc /proc + # set apt sources list to install additional packages asl=/etc/apt/sources.list rm -f $asl @@ -55,7 +57,6 @@ do_distrorfs_second_stage() { dpkg -l | grep linux-headers | cut -d ' ' -f3 | xargs dpkg --purge - test -f /proc/uptime || mount -t proc proc /proc test -f /dev/pts/ptmx || mount -t devpts devpts /dev/pts echo installed additional packages.