下載檔案至 JK2410 Board

From JK2410.org

Jump to: navigation, search
[編輯] 方法一:

「JK2410 進入 Linux 作業系統」後,設定 JK2410 的 IP address:

# ifconfig eth0 192.168.100.1

在Linux命令模式下執行busybox所提供的tftp指令下載hello至JK2410:

# tftp –g –r hello 192.168.100.14

請記得先設定好 host 端的 tftp server。

下載完成後,再將檔案的屬性修改為可執行即可:

# chmod a+x ./hello
# ./hello

我們可以在Minicom畫面中看到hello的執行結果。

[編輯] 方法二:

到課程網頁上下載 rootfs.gz

  # wget http://ftp.jollen.org/97J008/rootfs.gz

把tar ball打開,會得到rootfs映像檔

  # gunzip rootfs.gz

建立一個空的目錄

  # mkdir mnt

以loop device的方式把rootfs掛載起來

  # mount -o loop rootfs mnt/

把編譯好的hello(給ARM用的執行檔)複製到rootfs中

  # cp hello mnt/bin

卸載rootfs並壓縮

  # umount mnt/
  # gzip -9 rootfs

製作uboot格式的映像檔

  # mkimage -A arm -O linux -T ramdisk -C none -a 0x30800000 -e 0x30800000 -n ramdisk -d rootfs.gz urootfs.img
[編輯] 方法三:

到課程網頁上下載 rootfs.tar.gz

  # wget http://ftp.jollen.org/97J008/rootfs.tar.gz

把tar ball打開

  # tar vzxf rootfs.tar.gz

把編譯好的hello(給ARM用的執行檔)複製到rootfs中

  # cp hello rootfs/bin

安裝genext2fs

  # sudo apt-get install genext2fs

產生ext2fs

  # genext2fs -b 8192 -i 1024 -d rootfs/ ext2fs

壓縮

   # gzip -9c ext2fs > ext2fs.gz

製作uboot格式的映像檔

  # mkimage -A arm -O linux -T ramdisk -C none -a 0x30800000 -e 0x30800000 -n ramdisk -d ext2fs.gz urootfs.img
Views
個人工具
導航
工具