Bladeren bron

implement update for foxboard

Waldemar Brodkorb 14 jaren geleden
bovenliggende
commit
e268ce3ada
3 gewijzigde bestanden met toevoegingen van 6617 en 271 verwijderingen
  1. 8 3
      package/base-files/extra/sbin/update
  2. 7 4
      target/foxboard/Makefile
  3. 6602 264
      target/foxboard/patches/cris.patch

+ 8 - 3
package/base-files/extra/sbin/update

@@ -6,6 +6,11 @@ if [ $who -ne 0 ]; then
   exit 1
 fi
 
+if [ -x /sbin/mtd ];then
+	updatecmd="mtd -r write - linux"
+else
+	updatecmd="gunzip -c | tar -xf -"
+fi
 
 check_exit() {
 	if [ $? -ne 0 ];then
@@ -22,19 +27,19 @@ prepare() {
 
 extract_from_file() {
 	prepare
-        cat $1 | gunzip -c | tar -xf -
+        cat $1 | $updatecmd
 	check_exit
 }
 
 extract_from_ssh() {
 	prepare
-        ssh $1 "cat $2" | gunzip -c | tar -xf -
+        ssh $1 "cat $2" | $updatecmd
 	check_exit
 }
 
 extract_from_http() {
 	prepare
-        wget -O - $1 | gunzip -c | tar -xf -
+        wget -O - $1 | $updatecmd
 	check_exit
 }
                 

+ 7 - 4
target/foxboard/Makefile

@@ -24,10 +24,13 @@ ifeq ($(FS),squashfs)
 imageinstall: $(BIN_DIR)/$(ROOTFSSQUASHFS)
 	dd if=${BUILD_DIR}/${ROOTFSSQUASHFS} of=${BIN_DIR}/${ROOTFSSQUASHFS} \
 		bs=4063232 conv=sync $(MAKE_TRACE)
-	@echo 
-	@echo Use sudo ./boot_linux -F -i $(ROOTFSSQUASHFS) to flash
-	@echo Do not forget to set network boot jumper, before you start the foxboard
-	@echo 'Login as user root with password linux123 via ssh or console'
+	@if [ $$(stat --format=%s ${BIN_DIR}/${ROOTFSSQUASHFS}) -gt 4063232 ];then \
+		echo 'Image is too big!'; \
+	else \
+		echo 'Use sudo ./boot_linux -F -i $(ROOTFSSQUASHFS) to flash'; \
+		echo 'Do not forget to set the network boot jumper, before you start the foxboard'; \
+		echo 'Login as user root with password linux123 via ssh or console'; \
+	fi
 endif
 ifeq ($(FS),nfsroot)
 imageinstall: ${BIN_DIR}/${ROOTFSTARBALL}

File diff suppressed because it is too large
+ 6602 - 264
target/foxboard/patches/cris.patch


Some files were not shown because too many files changed in this diff