diff options
Diffstat (limited to 'scripts/creat-lsb-image')
-rwxr-xr-x | scripts/creat-lsb-image | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/scripts/creat-lsb-image b/scripts/creat-lsb-image index 1dc48dd54c..657784cba4 100755 --- a/scripts/creat-lsb-image +++ b/scripts/creat-lsb-image | |||
@@ -60,14 +60,14 @@ ECHO "Enter directory $IMAGE_PATH" | |||
60 | cd $IMAGE_PATH | 60 | cd $IMAGE_PATH |
61 | 61 | ||
62 | #get architecture | 62 | #get architecture |
63 | PN=`find . -name poky-image-lsb-${MACHINE_ARCH}\*.rootfs.tar.bz2 -type f | awk -F- 'BEGIN{ max=0;} {if( NR!=0 && $5>max ) max=$5 }END{ printf "%d" ,max ;}'` | 63 | PN=`find . -name core-image-lsb-${MACHINE_ARCH}\*.rootfs.tar.bz2 -type f | awk -F- 'BEGIN{ max=0;} {if( NR!=0 && $5>max ) max=$5 }END{ printf "%d" ,max ;}'` |
64 | if [ "XPN" == "X" ];then | 64 | if [ "XPN" == "X" ];then |
65 | ECHO "${red}Don't find lsb image on platform, Please run \"poky-image-lsb\" to generate lsb image" | 65 | ECHO "${red}Don't find lsb image on platform, Please run \"core-image-lsb\" to generate lsb image" |
66 | exit 1 | 66 | exit 1 |
67 | fi | 67 | fi |
68 | 68 | ||
69 | if [ $PN -eq 0 ];then | 69 | if [ $PN -eq 0 ];then |
70 | ECHO "${red}Can't ${MACHINE_ARCH} rootfs.tar.gz,Please run poky-image-lsb to get lsb image" | 70 | ECHO "${red}Can't ${MACHINE_ARCH} rootfs.tar.gz,Please run core-image-lsb to get lsb image" |
71 | exit 1 | 71 | exit 1 |
72 | fi | 72 | fi |
73 | #set varible ARCH | 73 | #set varible ARCH |
@@ -125,25 +125,25 @@ else | |||
125 | ECHO "Can't find lsb test suite for ${MACHINE_ARCH}" | 125 | ECHO "Can't find lsb test suite for ${MACHINE_ARCH}" |
126 | fi | 126 | fi |
127 | cd .. | 127 | cd .. |
128 | if [ -L poky-image-lsb-${MACHINE_ARCH}.ext3 ];then | 128 | if [ -L core-image-lsb-${MACHINE_ARCH}.ext3 ];then |
129 | /bin/rm poky-image-lsb-${MACHINE_ARCH}.ext3 | 129 | /bin/rm core-image-lsb-${MACHINE_ARCH}.ext3 |
130 | exit_check | 130 | exit_check |
131 | fi | 131 | fi |
132 | 132 | ||
133 | #creat lsb image | 133 | #creat lsb image |
134 | if [ -f poky-image-lsb-${MACHINE_ARCH}-test.ext3 ];then | 134 | if [ -f core-image-lsb-${MACHINE_ARCH}-test.ext3 ];then |
135 | if [ -d lsbtmp ];then | 135 | if [ -d lsbtmp ];then |
136 | sudo umount lsbtmp | 136 | sudo umount lsbtmp |
137 | fi | 137 | fi |
138 | ECHO "Remove old lsb image..." | 138 | ECHO "Remove old lsb image..." |
139 | /bin/rm poky-image-lsb-${MACHINE_ARCH}-test.ext3 | 139 | /bin/rm core-image-lsb-${MACHINE_ARCH}-test.ext3 |
140 | fi | 140 | fi |
141 | ECHO "creat a big ext3 file for lsb image with 5G..." | 141 | ECHO "creat a big ext3 file for lsb image with 5G..." |
142 | dd if=/dev/zero of=poky-image-lsb-${MACHINE_ARCH}-test.ext3 bs=1M count=5000 | 142 | dd if=/dev/zero of=core-image-lsb-${MACHINE_ARCH}-test.ext3 bs=1M count=5000 |
143 | exit_check | 143 | exit_check |
144 | ECHO "Format ext3 image,please input \"y\"" | 144 | ECHO "Format ext3 image,please input \"y\"" |
145 | mkfs.ext3 poky-image-lsb-${MACHINE_ARCH}-test.ext3 | 145 | mkfs.ext3 core-image-lsb-${MACHINE_ARCH}-test.ext3 |
146 | tune2fs -j poky-image-lsb-${MACHINE_ARCH}-test.ext3 | 146 | tune2fs -j core-image-lsb-${MACHINE_ARCH}-test.ext3 |
147 | 147 | ||
148 | 148 | ||
149 | ECHO "get a lsb image with lsb test suite" | 149 | ECHO "get a lsb image with lsb test suite" |
@@ -153,11 +153,11 @@ fi | |||
153 | 153 | ||
154 | 154 | ||
155 | #install file system and lsb test suite to lsb image | 155 | #install file system and lsb test suite to lsb image |
156 | sudo mount -o loop poky-image-lsb-${MACHINE_ARCH}-test.ext3 lsbtmp | 156 | sudo mount -o loop core-image-lsb-${MACHINE_ARCH}-test.ext3 lsbtmp |
157 | exit_check | 157 | exit_check |
158 | 158 | ||
159 | ECHO " ->Install file system..." | 159 | ECHO " ->Install file system..." |
160 | sudo tar jxf poky-image-lsb-${MACHINE_ARCH}-${PN}.rootfs.tar.bz2 -C lsbtmp | 160 | sudo tar jxf core-image-lsb-${MACHINE_ARCH}-${PN}.rootfs.tar.bz2 -C lsbtmp |
161 | exit_check | 161 | exit_check |
162 | 162 | ||
163 | ECHO " ->Install lsb test suite..." | 163 | ECHO " ->Install lsb test suite..." |
@@ -181,18 +181,18 @@ exit_check | |||
181 | sudo rm -rf lsbtmp | 181 | sudo rm -rf lsbtmp |
182 | 182 | ||
183 | #change file attribute | 183 | #change file attribute |
184 | sudo chown ${USER}:${USER} poky-image-lsb-${MACHINE_ARCH}-test.ext3 | 184 | sudo chown ${USER}:${USER} core-image-lsb-${MACHINE_ARCH}-test.ext3 |
185 | exit_check | 185 | exit_check |
186 | sudo chmod 755 poky-image-lsb-${MACHINE_ARCH}-test.ext3 | 186 | sudo chmod 755 core-image-lsb-${MACHINE_ARCH}-test.ext3 |
187 | exit_check | 187 | exit_check |
188 | 188 | ||
189 | #set up link | 189 | #set up link |
190 | if [ -L poky-image-lsb-${MACHINE_ARCH}.ext3 ];then | 190 | if [ -L core-image-lsb-${MACHINE_ARCH}.ext3 ];then |
191 | ECHO "Set up link" | 191 | ECHO "Set up link" |
192 | /bin/rm poky-image-lsb-${MACHINE_ARCH}.ext3 | 192 | /bin/rm core-image-lsb-${MACHINE_ARCH}.ext3 |
193 | exit_check | 193 | exit_check |
194 | fi | 194 | fi |
195 | ln -s poky-image-lsb-${MACHINE_ARCH}-test.ext3 poky-image-lsb-${MACHINE_ARCH}.ext3 | 195 | ln -s core-image-lsb-${MACHINE_ARCH}-test.ext3 core-image-lsb-${MACHINE_ARCH}.ext3 |
196 | 196 | ||
197 | ECHO "LSB test environment is set successfully, Please run this image on platform ${MACHINE_ARCH}" | 197 | ECHO "LSB test environment is set successfully, Please run this image on platform ${MACHINE_ARCH}" |
198 | 198 | ||